diff --git a/CHANGELOG.md b/CHANGELOG.md index eb5b9c4d5..7e8bfa953 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# 0.11.3 +* Add `RequestOptions.api_format_version` to opt-in to receive v2 error messages +* Fix `to_json` signature to allow args +* Regenerate APIs + # 0.11.2 * Regenerate all APIs except `dataflow:v1b3` * Add `dfareporting:v2.8` diff --git a/api_names.yaml b/api_names.yaml index 7c08bacab..9ad1c901a 100644 --- a/api_names.yaml +++ b/api_names.yaml @@ -1086,6 +1086,7 @@ "/coordinate:v1/LocationListResponse": list_location_response "/coordinate:v1/TeamListResponse": list_team_response "/coordinate:v1/WorkerListResponse": list_worker_response +"/dataflow:v1b3/dataflow.projects.locations.templates.create": create_job_from_template_with_location "/dataflow:v1b3/CounterStructuredName/otherOrigin": other_origin "/dataflow:v1b3/CounterStructuredName/standardOrigin": standard_origin "/dataflow:v1b3/KeyRangeLocation/persistentDirectory": persistent_directory diff --git a/api_names_out.yaml b/api_names_out.yaml index 7c08bacab..2fb145e90 100644 --- a/api_names_out.yaml +++ b/api_names_out.yaml @@ -1086,6 +1086,7 @@ "/coordinate:v1/LocationListResponse": list_location_response "/coordinate:v1/TeamListResponse": list_team_response "/coordinate:v1/WorkerListResponse": list_worker_response +"/dataflow:v1b3/dataflow.projects.locations.templates.create": create_job_from_template_with_location "/dataflow:v1b3/CounterStructuredName/otherOrigin": other_origin "/dataflow:v1b3/CounterStructuredName/standardOrigin": standard_origin "/dataflow:v1b3/KeyRangeLocation/persistentDirectory": persistent_directory @@ -43871,3 +43872,1058 @@ "/youtubereporting:v1/ListReportsResponse/nextPageToken": next_page_token "/youtubereporting:v1/Media": media "/youtubereporting:v1/Media/resourceName": resource_name +"/compute:beta/compute.instances.setMinCpuPlatform": set_instance_min_cpu_platform +"/compute:beta/compute.instances.setMinCpuPlatform/instance": instance +"/compute:beta/compute.instances.setMinCpuPlatform/project": project +"/compute:beta/compute.instances.setMinCpuPlatform/requestId": request_id +"/compute:beta/compute.instances.setMinCpuPlatform/zone": zone +"/compute:beta/Instance/minCpuPlatform": min_cpu_platform +"/compute:beta/InstanceProperties/minCpuPlatform": min_cpu_platform +"/compute:beta/InstancesSetMinCpuPlatformRequest": instances_set_min_cpu_platform_request +"/compute:beta/InstancesSetMinCpuPlatformRequest/minCpuPlatform": min_cpu_platform +"/compute:beta/Zone/availableCpuPlatforms": available_cpu_platforms +"/compute:beta/Zone/availableCpuPlatforms/available_cpu_platform": available_cpu_platform +"/adexchangebuyer:v1.4/MarketplaceDeal/isSetupComplete": is_setup_complete +"/adexchangebuyer:v1.4/PricePerBuyer/billedBuyer": billed_buyer +"/adexchangebuyer:v1.4/Product/billedBuyer": billed_buyer +"/adexchangebuyer:v1.4/Product/buyer": buyer +"/adexchangebuyer:v1.4/Product/creatorRole": creator_role +"/adexchangebuyer:v1.4/TargetingValueCreativeSize/nativeTemplate": native_template +"/androidenterprise:v1/Notification/notificationType": notification_type +"/clouderrorreporting:v1beta1/ErrorContext/sourceReferences": source_references +"/clouderrorreporting:v1beta1/ErrorContext/sourceReferences/source_reference": source_reference +"/clouderrorreporting:v1beta1/SourceReference": source_reference +"/clouderrorreporting:v1beta1/SourceReference/repository": repository +"/clouderrorreporting:v1beta1/SourceReference/revisionId": revision_id +"/cloudkms:v1/CloudAuditOptions/logName": log_name +"/compute:v1/compute.disks.setLabels": set_disk_labels +"/compute:v1/compute.disks.setLabels/project": project +"/compute:v1/compute.disks.setLabels/resource": resource +"/compute:v1/compute.disks.setLabels/zone": zone +"/compute:v1/compute.images.setLabels": set_image_labels +"/compute:v1/compute.images.setLabels/project": project +"/compute:v1/compute.images.setLabels/resource": resource +"/compute:v1/compute.instances.setLabels": set_instance_labels +"/compute:v1/compute.instances.setLabels/instance": instance +"/compute:v1/compute.instances.setLabels/project": project +"/compute:v1/compute.instances.setLabels/zone": zone +"/compute:v1/compute.projects.disableXpnHost": disable_project_xpn_host +"/compute:v1/compute.projects.disableXpnHost/project": project +"/compute:v1/compute.projects.disableXpnResource": disable_project_xpn_resource +"/compute:v1/compute.projects.disableXpnResource/project": project +"/compute:v1/compute.projects.enableXpnHost": enable_project_xpn_host +"/compute:v1/compute.projects.enableXpnHost/project": project +"/compute:v1/compute.projects.enableXpnResource": enable_project_xpn_resource +"/compute:v1/compute.projects.enableXpnResource/project": project +"/compute:v1/compute.projects.getXpnHost": get_project_xpn_host +"/compute:v1/compute.projects.getXpnHost/project": project +"/compute:v1/compute.projects.getXpnResources": get_project_xpn_resources +"/compute:v1/compute.projects.getXpnResources/filter": filter +"/compute:v1/compute.projects.getXpnResources/maxResults": max_results +"/compute:v1/compute.projects.getXpnResources/order_by": order_by +"/compute:v1/compute.projects.getXpnResources/pageToken": page_token +"/compute:v1/compute.projects.getXpnResources/project": project +"/compute:v1/compute.projects.listXpnHosts": list_project_xpn_hosts +"/compute:v1/compute.projects.listXpnHosts/filter": filter +"/compute:v1/compute.projects.listXpnHosts/maxResults": max_results +"/compute:v1/compute.projects.listXpnHosts/order_by": order_by +"/compute:v1/compute.projects.listXpnHosts/pageToken": page_token +"/compute:v1/compute.projects.listXpnHosts/project": project +"/compute:v1/compute.snapshots.setLabels": set_snapshot_labels +"/compute:v1/compute.snapshots.setLabels/project": project +"/compute:v1/compute.snapshots.setLabels/resource": resource +"/compute:v1/BackendService/iap": iap +"/compute:v1/BackendServiceIAP": backend_service_iap +"/compute:v1/BackendServiceIAP/enabled": enabled +"/compute:v1/BackendServiceIAP/oauth2ClientId": oauth2_client_id +"/compute:v1/BackendServiceIAP/oauth2ClientSecret": oauth2_client_secret +"/compute:v1/BackendServiceIAP/oauth2ClientSecretSha256": oauth2_client_secret_sha256 +"/compute:v1/Disk/labels": labels +"/compute:v1/Disk/labels/label": label +"/compute:v1/GlobalSetLabelsRequest": global_set_labels_request +"/compute:v1/GlobalSetLabelsRequest/labelFingerprint": label_fingerprint +"/compute:v1/GlobalSetLabelsRequest/labels": labels +"/compute:v1/GlobalSetLabelsRequest/labels/label": label +"/compute:v1/Image/labels": labels +"/compute:v1/Image/labels/label": label +"/compute:v1/Instance/labels": labels +"/compute:v1/Instance/labels/label": label +"/compute:v1/InstanceProperties/labels": labels +"/compute:v1/InstanceProperties/labels/label": label +"/compute:v1/InstancesSetLabelsRequest": instances_set_labels_request +"/compute:v1/InstancesSetLabelsRequest/labelFingerprint": label_fingerprint +"/compute:v1/InstancesSetLabelsRequest/labels": labels +"/compute:v1/InstancesSetLabelsRequest/labels/label": label +"/compute:v1/Project/xpnProjectStatus": xpn_project_status +"/compute:v1/ProjectsDisableXpnResourceRequest": projects_disable_xpn_resource_request +"/compute:v1/ProjectsDisableXpnResourceRequest/xpnResource": xpn_resource +"/compute:v1/ProjectsEnableXpnResourceRequest": projects_enable_xpn_resource_request +"/compute:v1/ProjectsEnableXpnResourceRequest/xpnResource": xpn_resource +"/compute:v1/ProjectsGetXpnResources": projects_get_xpn_resources +"/compute:v1/ProjectsGetXpnResources/kind": kind +"/compute:v1/ProjectsGetXpnResources/nextPageToken": next_page_token +"/compute:v1/ProjectsGetXpnResources/resources": resources +"/compute:v1/ProjectsGetXpnResources/resources/resource": resource +"/compute:v1/ProjectsListXpnHostsRequest": projects_list_xpn_hosts_request +"/compute:v1/ProjectsListXpnHostsRequest/organization": organization +"/compute:v1/Snapshot/labels": labels +"/compute:v1/Snapshot/labels/label": label +"/compute:v1/XpnHostList": xpn_host_list +"/compute:v1/XpnHostList/id": id +"/compute:v1/XpnHostList/items": items +"/compute:v1/XpnHostList/items/item": item +"/compute:v1/XpnHostList/kind": kind +"/compute:v1/XpnHostList/nextPageToken": next_page_token +"/compute:v1/XpnHostList/selfLink": self_link +"/compute:v1/XpnResourceId": xpn_resource_id +"/compute:v1/XpnResourceId/id": id +"/compute:v1/XpnResourceId/type": type +"/compute:v1/ZoneSetLabelsRequest": zone_set_labels_request +"/compute:v1/ZoneSetLabelsRequest/labelFingerprint": label_fingerprint +"/compute:v1/ZoneSetLabelsRequest/labels": labels +"/compute:v1/ZoneSetLabelsRequest/labels/label": label +"/content:v2/content.accounts.claimwebsite": claimwebsite_account +"/content:v2/content.accounts.claimwebsite/accountId": account_id +"/content:v2/content.accounts.claimwebsite/merchantId": merchant_id +"/content:v2/content.accounts.claimwebsite/overwrite": overwrite +"/content:v2/content.productstatuses.custombatch/includeAttributes": include_attributes +"/content:v2/content.productstatuses.get/includeAttributes": include_attributes +"/content:v2/content.productstatuses.list/includeAttributes": include_attributes +"/content:v2/AccountStatus/websiteClaimed": website_claimed +"/content:v2/AccountsClaimWebsiteResponse": accounts_claim_website_response +"/content:v2/AccountsClaimWebsiteResponse/kind": kind +"/content:v2/AccountsCustomBatchRequestEntry/overwrite": overwrite +"/dataflow:v1b3/fields": fields +"/dataflow:v1b3/key": key +"/dataflow:v1b3/quotaUser": quota_user +"/dataflow:v1b3/dataflow.projects.workerMessages": worker_project_messages +"/dataflow:v1b3/dataflow.projects.workerMessages/projectId": project_id +"/dataflow:v1b3/dataflow.projects.templates.launch": launch_project_template +"/dataflow:v1b3/dataflow.projects.templates.launch/projectId": project_id +"/dataflow:v1b3/dataflow.projects.templates.launch/gcsPath": gcs_path +"/dataflow:v1b3/dataflow.projects.templates.launch/location": location +"/dataflow:v1b3/dataflow.projects.templates.launch/validateOnly": validate_only +"/dataflow:v1b3/dataflow.projects.templates.get": get_project_template +"/dataflow:v1b3/dataflow.projects.templates.get/gcsPath": gcs_path +"/dataflow:v1b3/dataflow.projects.templates.get/location": location +"/dataflow:v1b3/dataflow.projects.templates.get/projectId": project_id +"/dataflow:v1b3/dataflow.projects.templates.get/view": view +"/dataflow:v1b3/dataflow.projects.templates.create": create_job_from_template +"/dataflow:v1b3/dataflow.projects.templates.create/projectId": project_id +"/dataflow:v1b3/dataflow.projects.locations.workerMessages": worker_project_location_messages +"/dataflow:v1b3/dataflow.projects.locations.workerMessages/location": location +"/dataflow:v1b3/dataflow.projects.locations.workerMessages/projectId": project_id +"/dataflow:v1b3/dataflow.projects.locations.templates.create/projectId": project_id +"/dataflow:v1b3/dataflow.projects.locations.templates.create/location": location +"/dataflow:v1b3/dataflow.projects.locations.templates.launch": launch_project_location_template +"/dataflow:v1b3/dataflow.projects.locations.templates.launch/projectId": project_id +"/dataflow:v1b3/dataflow.projects.locations.templates.launch/gcsPath": gcs_path +"/dataflow:v1b3/dataflow.projects.locations.templates.launch/location": location +"/dataflow:v1b3/dataflow.projects.locations.templates.launch/validateOnly": validate_only +"/dataflow:v1b3/dataflow.projects.locations.templates.get": get_project_location_template +"/dataflow:v1b3/dataflow.projects.locations.templates.get/location": location +"/dataflow:v1b3/dataflow.projects.locations.templates.get/projectId": project_id +"/dataflow:v1b3/dataflow.projects.locations.templates.get/view": view +"/dataflow:v1b3/dataflow.projects.locations.templates.get/gcsPath": gcs_path +"/dataflow:v1b3/dataflow.projects.locations.jobs.get": get_project_location_job +"/dataflow:v1b3/dataflow.projects.locations.jobs.get/projectId": project_id +"/dataflow:v1b3/dataflow.projects.locations.jobs.get/jobId": job_id +"/dataflow:v1b3/dataflow.projects.locations.jobs.get/view": view +"/dataflow:v1b3/dataflow.projects.locations.jobs.get/location": location +"/dataflow:v1b3/dataflow.projects.locations.jobs.list": list_project_location_jobs +"/dataflow:v1b3/dataflow.projects.locations.jobs.list/projectId": project_id +"/dataflow:v1b3/dataflow.projects.locations.jobs.list/filter": filter +"/dataflow:v1b3/dataflow.projects.locations.jobs.list/location": location +"/dataflow:v1b3/dataflow.projects.locations.jobs.list/pageToken": page_token +"/dataflow:v1b3/dataflow.projects.locations.jobs.list/pageSize": page_size +"/dataflow:v1b3/dataflow.projects.locations.jobs.list/view": view +"/dataflow:v1b3/dataflow.projects.locations.jobs.update": update_project_location_job +"/dataflow:v1b3/dataflow.projects.locations.jobs.update/projectId": project_id +"/dataflow:v1b3/dataflow.projects.locations.jobs.update/jobId": job_id +"/dataflow:v1b3/dataflow.projects.locations.jobs.update/location": location +"/dataflow:v1b3/dataflow.projects.locations.jobs.create": create_project_location_job +"/dataflow:v1b3/dataflow.projects.locations.jobs.create/projectId": project_id +"/dataflow:v1b3/dataflow.projects.locations.jobs.create/view": view +"/dataflow:v1b3/dataflow.projects.locations.jobs.create/location": location +"/dataflow:v1b3/dataflow.projects.locations.jobs.create/replaceJobId": replace_job_id +"/dataflow:v1b3/dataflow.projects.locations.jobs.getMetrics": get_project_location_job_metrics +"/dataflow:v1b3/dataflow.projects.locations.jobs.getMetrics/location": location +"/dataflow:v1b3/dataflow.projects.locations.jobs.getMetrics/startTime": start_time +"/dataflow:v1b3/dataflow.projects.locations.jobs.getMetrics/projectId": project_id +"/dataflow:v1b3/dataflow.projects.locations.jobs.getMetrics/jobId": job_id +"/dataflow:v1b3/dataflow.projects.locations.jobs.debug.getConfig": get_project_location_job_debug_config +"/dataflow:v1b3/dataflow.projects.locations.jobs.debug.getConfig/projectId": project_id +"/dataflow:v1b3/dataflow.projects.locations.jobs.debug.getConfig/jobId": job_id +"/dataflow:v1b3/dataflow.projects.locations.jobs.debug.getConfig/location": location +"/dataflow:v1b3/dataflow.projects.locations.jobs.debug.sendCapture": send_project_location_job_debug_capture +"/dataflow:v1b3/dataflow.projects.locations.jobs.debug.sendCapture/projectId": project_id +"/dataflow:v1b3/dataflow.projects.locations.jobs.debug.sendCapture/jobId": job_id +"/dataflow:v1b3/dataflow.projects.locations.jobs.debug.sendCapture/location": location +"/dataflow:v1b3/dataflow.projects.locations.jobs.workItems.lease/projectId": project_id +"/dataflow:v1b3/dataflow.projects.locations.jobs.workItems.lease/jobId": job_id +"/dataflow:v1b3/dataflow.projects.locations.jobs.workItems.lease/location": location +"/dataflow:v1b3/dataflow.projects.locations.jobs.workItems.reportStatus": report_project_location_job_work_item_status +"/dataflow:v1b3/dataflow.projects.locations.jobs.workItems.reportStatus/projectId": project_id +"/dataflow:v1b3/dataflow.projects.locations.jobs.workItems.reportStatus/jobId": job_id +"/dataflow:v1b3/dataflow.projects.locations.jobs.workItems.reportStatus/location": location +"/dataflow:v1b3/dataflow.projects.locations.jobs.messages.list": list_project_location_job_messages +"/dataflow:v1b3/dataflow.projects.locations.jobs.messages.list/location": location +"/dataflow:v1b3/dataflow.projects.locations.jobs.messages.list/endTime": end_time +"/dataflow:v1b3/dataflow.projects.locations.jobs.messages.list/startTime": start_time +"/dataflow:v1b3/dataflow.projects.locations.jobs.messages.list/pageToken": page_token +"/dataflow:v1b3/dataflow.projects.locations.jobs.messages.list/pageSize": page_size +"/dataflow:v1b3/dataflow.projects.locations.jobs.messages.list/minimumImportance": minimum_importance +"/dataflow:v1b3/dataflow.projects.locations.jobs.messages.list/jobId": job_id +"/dataflow:v1b3/dataflow.projects.locations.jobs.messages.list/projectId": project_id +"/dataflow:v1b3/dataflow.projects.jobs.get": get_project_job +"/dataflow:v1b3/dataflow.projects.jobs.get/projectId": project_id +"/dataflow:v1b3/dataflow.projects.jobs.get/jobId": job_id +"/dataflow:v1b3/dataflow.projects.jobs.get/view": view +"/dataflow:v1b3/dataflow.projects.jobs.get/location": location +"/dataflow:v1b3/dataflow.projects.jobs.list": list_project_jobs +"/dataflow:v1b3/dataflow.projects.jobs.list/projectId": project_id +"/dataflow:v1b3/dataflow.projects.jobs.list/filter": filter +"/dataflow:v1b3/dataflow.projects.jobs.list/location": location +"/dataflow:v1b3/dataflow.projects.jobs.list/pageToken": page_token +"/dataflow:v1b3/dataflow.projects.jobs.list/pageSize": page_size +"/dataflow:v1b3/dataflow.projects.jobs.list/view": view +"/dataflow:v1b3/dataflow.projects.jobs.update": update_project_job +"/dataflow:v1b3/dataflow.projects.jobs.update/location": location +"/dataflow:v1b3/dataflow.projects.jobs.update/projectId": project_id +"/dataflow:v1b3/dataflow.projects.jobs.update/jobId": job_id +"/dataflow:v1b3/dataflow.projects.jobs.create": create_project_job +"/dataflow:v1b3/dataflow.projects.jobs.create/location": location +"/dataflow:v1b3/dataflow.projects.jobs.create/replaceJobId": replace_job_id +"/dataflow:v1b3/dataflow.projects.jobs.create/projectId": project_id +"/dataflow:v1b3/dataflow.projects.jobs.create/view": view +"/dataflow:v1b3/dataflow.projects.jobs.getMetrics": get_project_job_metrics +"/dataflow:v1b3/dataflow.projects.jobs.getMetrics/startTime": start_time +"/dataflow:v1b3/dataflow.projects.jobs.getMetrics/projectId": project_id +"/dataflow:v1b3/dataflow.projects.jobs.getMetrics/jobId": job_id +"/dataflow:v1b3/dataflow.projects.jobs.getMetrics/location": location +"/dataflow:v1b3/dataflow.projects.jobs.debug.getConfig": get_project_job_debug_config +"/dataflow:v1b3/dataflow.projects.jobs.debug.getConfig/projectId": project_id +"/dataflow:v1b3/dataflow.projects.jobs.debug.getConfig/jobId": job_id +"/dataflow:v1b3/dataflow.projects.jobs.debug.sendCapture": send_project_job_debug_capture +"/dataflow:v1b3/dataflow.projects.jobs.debug.sendCapture/projectId": project_id +"/dataflow:v1b3/dataflow.projects.jobs.debug.sendCapture/jobId": job_id +"/dataflow:v1b3/dataflow.projects.jobs.workItems.lease/projectId": project_id +"/dataflow:v1b3/dataflow.projects.jobs.workItems.lease/jobId": job_id +"/dataflow:v1b3/dataflow.projects.jobs.workItems.reportStatus": report_project_job_work_item_status +"/dataflow:v1b3/dataflow.projects.jobs.workItems.reportStatus/projectId": project_id +"/dataflow:v1b3/dataflow.projects.jobs.workItems.reportStatus/jobId": job_id +"/dataflow:v1b3/dataflow.projects.jobs.messages.list": list_project_job_messages +"/dataflow:v1b3/dataflow.projects.jobs.messages.list/endTime": end_time +"/dataflow:v1b3/dataflow.projects.jobs.messages.list/location": location +"/dataflow:v1b3/dataflow.projects.jobs.messages.list/pageToken": page_token +"/dataflow:v1b3/dataflow.projects.jobs.messages.list/startTime": start_time +"/dataflow:v1b3/dataflow.projects.jobs.messages.list/pageSize": page_size +"/dataflow:v1b3/dataflow.projects.jobs.messages.list/minimumImportance": minimum_importance +"/dataflow:v1b3/dataflow.projects.jobs.messages.list/projectId": project_id +"/dataflow:v1b3/dataflow.projects.jobs.messages.list/jobId": job_id +"/dataflow:v1b3/LogBucket": log_bucket +"/dataflow:v1b3/LogBucket/log": log +"/dataflow:v1b3/LogBucket/count": count +"/dataflow:v1b3/SendWorkerMessagesRequest": send_worker_messages_request +"/dataflow:v1b3/SendWorkerMessagesRequest/workerMessages": worker_messages +"/dataflow:v1b3/SendWorkerMessagesRequest/workerMessages/worker_message": worker_message +"/dataflow:v1b3/SendWorkerMessagesRequest/location": location +"/dataflow:v1b3/SourceSplitShard": source_split_shard +"/dataflow:v1b3/SourceSplitShard/derivationMode": derivation_mode +"/dataflow:v1b3/SourceSplitShard/source": source +"/dataflow:v1b3/CPUTime": cpu_time +"/dataflow:v1b3/CPUTime/timestamp": timestamp +"/dataflow:v1b3/CPUTime/totalMs": total_ms +"/dataflow:v1b3/CPUTime/rate": rate +"/dataflow:v1b3/Environment": environment +"/dataflow:v1b3/Environment/dataset": dataset +"/dataflow:v1b3/Environment/experiments": experiments +"/dataflow:v1b3/Environment/experiments/experiment": experiment +"/dataflow:v1b3/Environment/internalExperiments": internal_experiments +"/dataflow:v1b3/Environment/internalExperiments/internal_experiment": internal_experiment +"/dataflow:v1b3/Environment/version": version +"/dataflow:v1b3/Environment/version/version": version +"/dataflow:v1b3/Environment/serviceAccountEmail": service_account_email +"/dataflow:v1b3/Environment/userAgent": user_agent +"/dataflow:v1b3/Environment/userAgent/user_agent": user_agent +"/dataflow:v1b3/Environment/sdkPipelineOptions": sdk_pipeline_options +"/dataflow:v1b3/Environment/sdkPipelineOptions/sdk_pipeline_option": sdk_pipeline_option +"/dataflow:v1b3/Environment/clusterManagerApiService": cluster_manager_api_service +"/dataflow:v1b3/Environment/tempStoragePrefix": temp_storage_prefix +"/dataflow:v1b3/Environment/workerPools": worker_pools +"/dataflow:v1b3/Environment/workerPools/worker_pool": worker_pool +"/dataflow:v1b3/StreamingComputationTask": streaming_computation_task +"/dataflow:v1b3/StreamingComputationTask/computationRanges": computation_ranges +"/dataflow:v1b3/StreamingComputationTask/computationRanges/computation_range": computation_range +"/dataflow:v1b3/StreamingComputationTask/dataDisks": data_disks +"/dataflow:v1b3/StreamingComputationTask/dataDisks/data_disk": data_disk +"/dataflow:v1b3/StreamingComputationTask/taskType": task_type +"/dataflow:v1b3/SendDebugCaptureRequest": send_debug_capture_request +"/dataflow:v1b3/SendDebugCaptureRequest/componentId": component_id +"/dataflow:v1b3/SendDebugCaptureRequest/workerId": worker_id +"/dataflow:v1b3/SendDebugCaptureRequest/location": location +"/dataflow:v1b3/SendDebugCaptureRequest/data": data +"/dataflow:v1b3/GetDebugConfigResponse": get_debug_config_response +"/dataflow:v1b3/GetDebugConfigResponse/config": config +"/dataflow:v1b3/ComponentTransform": component_transform +"/dataflow:v1b3/ComponentTransform/originalTransform": original_transform +"/dataflow:v1b3/ComponentTransform/name": name +"/dataflow:v1b3/ComponentTransform/userName": user_name +"/dataflow:v1b3/StreamingSetupTask": streaming_setup_task +"/dataflow:v1b3/StreamingSetupTask/workerHarnessPort": worker_harness_port +"/dataflow:v1b3/StreamingSetupTask/drain": drain +"/dataflow:v1b3/StreamingSetupTask/receiveWorkPort": receive_work_port +"/dataflow:v1b3/StreamingSetupTask/streamingComputationTopology": streaming_computation_topology +"/dataflow:v1b3/PubsubLocation": pubsub_location +"/dataflow:v1b3/PubsubLocation/subscription": subscription +"/dataflow:v1b3/PubsubLocation/dropLateData": drop_late_data +"/dataflow:v1b3/PubsubLocation/trackingSubscription": tracking_subscription +"/dataflow:v1b3/PubsubLocation/withAttributes": with_attributes +"/dataflow:v1b3/PubsubLocation/idLabel": id_label +"/dataflow:v1b3/PubsubLocation/timestampLabel": timestamp_label +"/dataflow:v1b3/PubsubLocation/topic": topic +"/dataflow:v1b3/WorkerHealthReport": worker_health_report +"/dataflow:v1b3/WorkerHealthReport/pods": pods +"/dataflow:v1b3/WorkerHealthReport/pods/pod": pod +"/dataflow:v1b3/WorkerHealthReport/pods/pod/pod": pod +"/dataflow:v1b3/WorkerHealthReport/vmStartupTime": vm_startup_time +"/dataflow:v1b3/WorkerHealthReport/vmIsHealthy": vm_is_healthy +"/dataflow:v1b3/WorkerHealthReport/reportInterval": report_interval +"/dataflow:v1b3/JobMessage": job_message +"/dataflow:v1b3/JobMessage/id": id +"/dataflow:v1b3/JobMessage/messageText": message_text +"/dataflow:v1b3/JobMessage/messageImportance": message_importance +"/dataflow:v1b3/JobMessage/time": time +"/dataflow:v1b3/ParameterMetadata": parameter_metadata +"/dataflow:v1b3/ParameterMetadata/regexes": regexes +"/dataflow:v1b3/ParameterMetadata/regexes/regex": regex +"/dataflow:v1b3/ParameterMetadata/label": label +"/dataflow:v1b3/ParameterMetadata/helpText": help_text +"/dataflow:v1b3/ParameterMetadata/isOptional": is_optional +"/dataflow:v1b3/ParameterMetadata/name": name +"/dataflow:v1b3/MultiOutputInfo": multi_output_info +"/dataflow:v1b3/MultiOutputInfo/tag": tag +"/dataflow:v1b3/SourceSplitRequest": source_split_request +"/dataflow:v1b3/SourceSplitRequest/source": source +"/dataflow:v1b3/SourceSplitRequest/options": options +"/dataflow:v1b3/SourceGetMetadataResponse": source_get_metadata_response +"/dataflow:v1b3/SourceGetMetadataResponse/metadata": metadata +"/dataflow:v1b3/ShellTask": shell_task +"/dataflow:v1b3/ShellTask/exitCode": exit_code +"/dataflow:v1b3/ShellTask/command": command +"/dataflow:v1b3/MetricShortId": metric_short_id +"/dataflow:v1b3/MetricShortId/metricIndex": metric_index +"/dataflow:v1b3/MetricShortId/shortId": short_id +"/dataflow:v1b3/AutoscalingEvent": autoscaling_event +"/dataflow:v1b3/AutoscalingEvent/targetNumWorkers": target_num_workers +"/dataflow:v1b3/AutoscalingEvent/eventType": event_type +"/dataflow:v1b3/AutoscalingEvent/currentNumWorkers": current_num_workers +"/dataflow:v1b3/AutoscalingEvent/description": description +"/dataflow:v1b3/AutoscalingEvent/time": time +"/dataflow:v1b3/TaskRunnerSettings": task_runner_settings +"/dataflow:v1b3/TaskRunnerSettings/baseUrl": base_url +"/dataflow:v1b3/TaskRunnerSettings/logToSerialconsole": log_to_serialconsole +"/dataflow:v1b3/TaskRunnerSettings/continueOnException": continue_on_exception +"/dataflow:v1b3/TaskRunnerSettings/parallelWorkerSettings": parallel_worker_settings +"/dataflow:v1b3/TaskRunnerSettings/taskUser": task_user +"/dataflow:v1b3/TaskRunnerSettings/vmId": vm_id +"/dataflow:v1b3/TaskRunnerSettings/alsologtostderr": alsologtostderr +"/dataflow:v1b3/TaskRunnerSettings/taskGroup": task_group +"/dataflow:v1b3/TaskRunnerSettings/harnessCommand": harness_command +"/dataflow:v1b3/TaskRunnerSettings/logDir": log_dir +"/dataflow:v1b3/TaskRunnerSettings/dataflowApiVersion": dataflow_api_version +"/dataflow:v1b3/TaskRunnerSettings/oauthScopes": oauth_scopes +"/dataflow:v1b3/TaskRunnerSettings/oauthScopes/oauth_scope": oauth_scope +"/dataflow:v1b3/TaskRunnerSettings/streamingWorkerMainClass": streaming_worker_main_class +"/dataflow:v1b3/TaskRunnerSettings/logUploadLocation": log_upload_location +"/dataflow:v1b3/TaskRunnerSettings/workflowFileName": workflow_file_name +"/dataflow:v1b3/TaskRunnerSettings/baseTaskDir": base_task_dir +"/dataflow:v1b3/TaskRunnerSettings/tempStoragePrefix": temp_storage_prefix +"/dataflow:v1b3/TaskRunnerSettings/commandlinesFileName": commandlines_file_name +"/dataflow:v1b3/TaskRunnerSettings/languageHint": language_hint +"/dataflow:v1b3/Position": position +"/dataflow:v1b3/Position/shufflePosition": shuffle_position +"/dataflow:v1b3/Position/concatPosition": concat_position +"/dataflow:v1b3/Position/byteOffset": byte_offset +"/dataflow:v1b3/Position/end": end +"/dataflow:v1b3/Position/key": key +"/dataflow:v1b3/Position/recordIndex": record_index +"/dataflow:v1b3/Source": source +"/dataflow:v1b3/Source/codec": codec +"/dataflow:v1b3/Source/codec/codec": codec +"/dataflow:v1b3/Source/doesNotNeedSplitting": does_not_need_splitting +"/dataflow:v1b3/Source/spec": spec +"/dataflow:v1b3/Source/spec/spec": spec +"/dataflow:v1b3/Source/metadata": metadata +"/dataflow:v1b3/Source/baseSpecs": base_specs +"/dataflow:v1b3/Source/baseSpecs/base_spec": base_spec +"/dataflow:v1b3/Source/baseSpecs/base_spec/base_spec": base_spec +"/dataflow:v1b3/SplitInt64": split_int64 +"/dataflow:v1b3/SplitInt64/lowBits": low_bits +"/dataflow:v1b3/SplitInt64/highBits": high_bits +"/dataflow:v1b3/WorkerPool": worker_pool +"/dataflow:v1b3/WorkerPool/packages": packages +"/dataflow:v1b3/WorkerPool/packages/package": package +"/dataflow:v1b3/WorkerPool/teardownPolicy": teardown_policy +"/dataflow:v1b3/WorkerPool/onHostMaintenance": on_host_maintenance +"/dataflow:v1b3/WorkerPool/poolArgs": pool_args +"/dataflow:v1b3/WorkerPool/poolArgs/pool_arg": pool_arg +"/dataflow:v1b3/WorkerPool/diskSizeGb": disk_size_gb +"/dataflow:v1b3/WorkerPool/workerHarnessContainerImage": worker_harness_container_image +"/dataflow:v1b3/WorkerPool/machineType": machine_type +"/dataflow:v1b3/WorkerPool/diskType": disk_type +"/dataflow:v1b3/WorkerPool/kind": kind +"/dataflow:v1b3/WorkerPool/dataDisks": data_disks +"/dataflow:v1b3/WorkerPool/dataDisks/data_disk": data_disk +"/dataflow:v1b3/WorkerPool/subnetwork": subnetwork +"/dataflow:v1b3/WorkerPool/ipConfiguration": ip_configuration +"/dataflow:v1b3/WorkerPool/taskrunnerSettings": taskrunner_settings +"/dataflow:v1b3/WorkerPool/autoscalingSettings": autoscaling_settings +"/dataflow:v1b3/WorkerPool/metadata": metadata +"/dataflow:v1b3/WorkerPool/metadata/metadatum": metadatum +"/dataflow:v1b3/WorkerPool/defaultPackageSet": default_package_set +"/dataflow:v1b3/WorkerPool/network": network +"/dataflow:v1b3/WorkerPool/zone": zone +"/dataflow:v1b3/WorkerPool/numWorkers": num_workers +"/dataflow:v1b3/WorkerPool/numThreadsPerWorker": num_threads_per_worker +"/dataflow:v1b3/WorkerPool/diskSourceImage": disk_source_image +"/dataflow:v1b3/SourceOperationRequest": source_operation_request +"/dataflow:v1b3/SourceOperationRequest/split": split +"/dataflow:v1b3/SourceOperationRequest/getMetadata": get_metadata +"/dataflow:v1b3/StructuredMessage": structured_message +"/dataflow:v1b3/StructuredMessage/messageKey": message_key +"/dataflow:v1b3/StructuredMessage/messageText": message_text +"/dataflow:v1b3/StructuredMessage/parameters": parameters +"/dataflow:v1b3/StructuredMessage/parameters/parameter": parameter +"/dataflow:v1b3/WorkItem": work_item +"/dataflow:v1b3/WorkItem/configuration": configuration +"/dataflow:v1b3/WorkItem/mapTask": map_task +"/dataflow:v1b3/WorkItem/seqMapTask": seq_map_task +"/dataflow:v1b3/WorkItem/packages": packages +"/dataflow:v1b3/WorkItem/packages/package": package +"/dataflow:v1b3/WorkItem/projectId": project_id +"/dataflow:v1b3/WorkItem/sourceOperationTask": source_operation_task +"/dataflow:v1b3/WorkItem/streamingSetupTask": streaming_setup_task +"/dataflow:v1b3/WorkItem/reportStatusInterval": report_status_interval +"/dataflow:v1b3/WorkItem/streamingConfigTask": streaming_config_task +"/dataflow:v1b3/WorkItem/leaseExpireTime": lease_expire_time +"/dataflow:v1b3/WorkItem/initialReportIndex": initial_report_index +"/dataflow:v1b3/WorkItem/streamingComputationTask": streaming_computation_task +"/dataflow:v1b3/WorkItem/shellTask": shell_task +"/dataflow:v1b3/WorkItem/jobId": job_id +"/dataflow:v1b3/WorkItem/id": id +"/dataflow:v1b3/ResourceUtilizationReport": resource_utilization_report +"/dataflow:v1b3/ResourceUtilizationReport/cpuTime": cpu_time +"/dataflow:v1b3/ResourceUtilizationReport/cpuTime/cpu_time": cpu_time +"/dataflow:v1b3/ReportedParallelism": reported_parallelism +"/dataflow:v1b3/ReportedParallelism/isInfinite": is_infinite +"/dataflow:v1b3/ReportedParallelism/value": value +"/dataflow:v1b3/TopologyConfig": topology_config +"/dataflow:v1b3/TopologyConfig/userStageToComputationNameMap": user_stage_to_computation_name_map +"/dataflow:v1b3/TopologyConfig/userStageToComputationNameMap/user_stage_to_computation_name_map": user_stage_to_computation_name_map +"/dataflow:v1b3/TopologyConfig/computations": computations +"/dataflow:v1b3/TopologyConfig/computations/computation": computation +"/dataflow:v1b3/TopologyConfig/dataDiskAssignments": data_disk_assignments +"/dataflow:v1b3/TopologyConfig/dataDiskAssignments/data_disk_assignment": data_disk_assignment +"/dataflow:v1b3/TopologyConfig/persistentStateVersion": persistent_state_version +"/dataflow:v1b3/TopologyConfig/forwardingKeyBits": forwarding_key_bits +"/dataflow:v1b3/SourceSplitOptions": source_split_options +"/dataflow:v1b3/SourceSplitOptions/desiredBundleSizeBytes": desired_bundle_size_bytes +"/dataflow:v1b3/SourceSplitOptions/desiredShardSizeBytes": desired_shard_size_bytes +"/dataflow:v1b3/ReadInstruction": read_instruction +"/dataflow:v1b3/ReadInstruction/source": source +"/dataflow:v1b3/WorkerSettings": worker_settings +"/dataflow:v1b3/WorkerSettings/workerId": worker_id +"/dataflow:v1b3/WorkerSettings/tempStoragePrefix": temp_storage_prefix +"/dataflow:v1b3/WorkerSettings/baseUrl": base_url +"/dataflow:v1b3/WorkerSettings/reportingEnabled": reporting_enabled +"/dataflow:v1b3/WorkerSettings/servicePath": service_path +"/dataflow:v1b3/WorkerSettings/shuffleServicePath": shuffle_service_path +"/dataflow:v1b3/StreamingStageLocation": streaming_stage_location +"/dataflow:v1b3/StreamingStageLocation/streamId": stream_id +"/dataflow:v1b3/DataDiskAssignment": data_disk_assignment +"/dataflow:v1b3/DataDiskAssignment/vmInstance": vm_instance +"/dataflow:v1b3/DataDiskAssignment/dataDisks": data_disks +"/dataflow:v1b3/DataDiskAssignment/dataDisks/data_disk": data_disk +"/dataflow:v1b3/ApproximateSplitRequest": approximate_split_request +"/dataflow:v1b3/ApproximateSplitRequest/position": position +"/dataflow:v1b3/ApproximateSplitRequest/fractionConsumed": fraction_consumed +"/dataflow:v1b3/Status": status +"/dataflow:v1b3/Status/code": code +"/dataflow:v1b3/Status/message": message +"/dataflow:v1b3/Status/details": details +"/dataflow:v1b3/Status/details/detail": detail +"/dataflow:v1b3/Status/details/detail/detail": detail +"/dataflow:v1b3/ExecutionStageState": execution_stage_state +"/dataflow:v1b3/ExecutionStageState/executionStageName": execution_stage_name +"/dataflow:v1b3/ExecutionStageState/currentStateTime": current_state_time +"/dataflow:v1b3/ExecutionStageState/executionStageState": execution_stage_state +"/dataflow:v1b3/StreamLocation": stream_location +"/dataflow:v1b3/StreamLocation/streamingStageLocation": streaming_stage_location +"/dataflow:v1b3/StreamLocation/pubsubLocation": pubsub_location +"/dataflow:v1b3/StreamLocation/sideInputLocation": side_input_location +"/dataflow:v1b3/StreamLocation/customSourceLocation": custom_source_location +"/dataflow:v1b3/SendWorkerMessagesResponse": send_worker_messages_response +"/dataflow:v1b3/SendWorkerMessagesResponse/workerMessageResponses": worker_message_responses +"/dataflow:v1b3/SendWorkerMessagesResponse/workerMessageResponses/worker_message_response": worker_message_response +"/dataflow:v1b3/StreamingComputationConfig": streaming_computation_config +"/dataflow:v1b3/StreamingComputationConfig/instructions": instructions +"/dataflow:v1b3/StreamingComputationConfig/instructions/instruction": instruction +"/dataflow:v1b3/StreamingComputationConfig/computationId": computation_id +"/dataflow:v1b3/StreamingComputationConfig/systemName": system_name +"/dataflow:v1b3/StreamingComputationConfig/stageName": stage_name +"/dataflow:v1b3/TransformSummary": transform_summary +"/dataflow:v1b3/TransformSummary/outputCollectionName": output_collection_name +"/dataflow:v1b3/TransformSummary/outputCollectionName/output_collection_name": output_collection_name +"/dataflow:v1b3/TransformSummary/displayData": display_data +"/dataflow:v1b3/TransformSummary/displayData/display_datum": display_datum +"/dataflow:v1b3/TransformSummary/kind": kind +"/dataflow:v1b3/TransformSummary/inputCollectionName": input_collection_name +"/dataflow:v1b3/TransformSummary/inputCollectionName/input_collection_name": input_collection_name +"/dataflow:v1b3/TransformSummary/name": name +"/dataflow:v1b3/TransformSummary/id": id +"/dataflow:v1b3/LeaseWorkItemResponse": lease_work_item_response +"/dataflow:v1b3/LeaseWorkItemResponse/workItems": work_items +"/dataflow:v1b3/LeaseWorkItemResponse/workItems/work_item": work_item +"/dataflow:v1b3/LaunchTemplateParameters": launch_template_parameters +"/dataflow:v1b3/LaunchTemplateParameters/jobName": job_name +"/dataflow:v1b3/LaunchTemplateParameters/environment": environment +"/dataflow:v1b3/LaunchTemplateParameters/parameters": parameters +"/dataflow:v1b3/LaunchTemplateParameters/parameters/parameter": parameter +"/dataflow:v1b3/Sink": sink +"/dataflow:v1b3/Sink/codec": codec +"/dataflow:v1b3/Sink/codec/codec": codec +"/dataflow:v1b3/Sink/spec": spec +"/dataflow:v1b3/Sink/spec/spec": spec +"/dataflow:v1b3/FlattenInstruction": flatten_instruction +"/dataflow:v1b3/FlattenInstruction/inputs": inputs +"/dataflow:v1b3/FlattenInstruction/inputs/input": input +"/dataflow:v1b3/PartialGroupByKeyInstruction": partial_group_by_key_instruction +"/dataflow:v1b3/PartialGroupByKeyInstruction/valueCombiningFn": value_combining_fn +"/dataflow:v1b3/PartialGroupByKeyInstruction/valueCombiningFn/value_combining_fn": value_combining_fn +"/dataflow:v1b3/PartialGroupByKeyInstruction/inputElementCodec": input_element_codec +"/dataflow:v1b3/PartialGroupByKeyInstruction/inputElementCodec/input_element_codec": input_element_codec +"/dataflow:v1b3/PartialGroupByKeyInstruction/originalCombineValuesInputStoreName": original_combine_values_input_store_name +"/dataflow:v1b3/PartialGroupByKeyInstruction/originalCombineValuesStepName": original_combine_values_step_name +"/dataflow:v1b3/PartialGroupByKeyInstruction/sideInputs": side_inputs +"/dataflow:v1b3/PartialGroupByKeyInstruction/sideInputs/side_input": side_input +"/dataflow:v1b3/PartialGroupByKeyInstruction/input": input +"/dataflow:v1b3/InstructionInput": instruction_input +"/dataflow:v1b3/InstructionInput/producerInstructionIndex": producer_instruction_index +"/dataflow:v1b3/InstructionInput/outputNum": output_num +"/dataflow:v1b3/StageSource": stage_source +"/dataflow:v1b3/StageSource/userName": user_name +"/dataflow:v1b3/StageSource/originalTransformOrCollection": original_transform_or_collection +"/dataflow:v1b3/StageSource/name": name +"/dataflow:v1b3/StageSource/sizeBytes": size_bytes +"/dataflow:v1b3/StringList": string_list +"/dataflow:v1b3/StringList/elements": elements +"/dataflow:v1b3/StringList/elements/element": element +"/dataflow:v1b3/DisplayData": display_data +"/dataflow:v1b3/DisplayData/boolValue": bool_value +"/dataflow:v1b3/DisplayData/javaClassValue": java_class_value +"/dataflow:v1b3/DisplayData/strValue": str_value +"/dataflow:v1b3/DisplayData/int64Value": int64_value +"/dataflow:v1b3/DisplayData/durationValue": duration_value +"/dataflow:v1b3/DisplayData/namespace": namespace +"/dataflow:v1b3/DisplayData/floatValue": float_value +"/dataflow:v1b3/DisplayData/key": key +"/dataflow:v1b3/DisplayData/shortStrValue": short_str_value +"/dataflow:v1b3/DisplayData/url": url +"/dataflow:v1b3/DisplayData/label": label +"/dataflow:v1b3/DisplayData/timestampValue": timestamp_value +"/dataflow:v1b3/LeaseWorkItemRequest": lease_work_item_request +"/dataflow:v1b3/LeaseWorkItemRequest/requestedLeaseDuration": requested_lease_duration +"/dataflow:v1b3/LeaseWorkItemRequest/currentWorkerTime": current_worker_time +"/dataflow:v1b3/LeaseWorkItemRequest/location": location +"/dataflow:v1b3/LeaseWorkItemRequest/workItemTypes": work_item_types +"/dataflow:v1b3/LeaseWorkItemRequest/workItemTypes/work_item_type": work_item_type +"/dataflow:v1b3/LeaseWorkItemRequest/workerCapabilities": worker_capabilities +"/dataflow:v1b3/LeaseWorkItemRequest/workerCapabilities/worker_capability": worker_capability +"/dataflow:v1b3/LeaseWorkItemRequest/workerId": worker_id +"/dataflow:v1b3/GetDebugConfigRequest": get_debug_config_request +"/dataflow:v1b3/GetDebugConfigRequest/componentId": component_id +"/dataflow:v1b3/GetDebugConfigRequest/workerId": worker_id +"/dataflow:v1b3/GetDebugConfigRequest/location": location +"/dataflow:v1b3/GetTemplateResponse": get_template_response +"/dataflow:v1b3/GetTemplateResponse/metadata": metadata +"/dataflow:v1b3/GetTemplateResponse/status": status +"/dataflow:v1b3/Parameter": parameter +"/dataflow:v1b3/Parameter/value": value +"/dataflow:v1b3/Parameter/key": key +"/dataflow:v1b3/ReportWorkItemStatusRequest": report_work_item_status_request +"/dataflow:v1b3/ReportWorkItemStatusRequest/workItemStatuses": work_item_statuses +"/dataflow:v1b3/ReportWorkItemStatusRequest/workItemStatuses/work_item_status": work_item_status +"/dataflow:v1b3/ReportWorkItemStatusRequest/workerId": worker_id +"/dataflow:v1b3/ReportWorkItemStatusRequest/currentWorkerTime": current_worker_time +"/dataflow:v1b3/ReportWorkItemStatusRequest/location": location +"/dataflow:v1b3/PipelineDescription": pipeline_description +"/dataflow:v1b3/PipelineDescription/displayData": display_data +"/dataflow:v1b3/PipelineDescription/displayData/display_datum": display_datum +"/dataflow:v1b3/PipelineDescription/executionPipelineStage": execution_pipeline_stage +"/dataflow:v1b3/PipelineDescription/executionPipelineStage/execution_pipeline_stage": execution_pipeline_stage +"/dataflow:v1b3/PipelineDescription/originalPipelineTransform": original_pipeline_transform +"/dataflow:v1b3/PipelineDescription/originalPipelineTransform/original_pipeline_transform": original_pipeline_transform +"/dataflow:v1b3/StreamingConfigTask": streaming_config_task +"/dataflow:v1b3/StreamingConfigTask/windmillServiceEndpoint": windmill_service_endpoint +"/dataflow:v1b3/StreamingConfigTask/userStepToStateFamilyNameMap": user_step_to_state_family_name_map +"/dataflow:v1b3/StreamingConfigTask/userStepToStateFamilyNameMap/user_step_to_state_family_name_map": user_step_to_state_family_name_map +"/dataflow:v1b3/StreamingConfigTask/windmillServicePort": windmill_service_port +"/dataflow:v1b3/StreamingConfigTask/streamingComputationConfigs": streaming_computation_configs +"/dataflow:v1b3/StreamingConfigTask/streamingComputationConfigs/streaming_computation_config": streaming_computation_config +"/dataflow:v1b3/JobExecutionInfo": job_execution_info +"/dataflow:v1b3/JobExecutionInfo/stages": stages +"/dataflow:v1b3/JobExecutionInfo/stages/stage": stage +"/dataflow:v1b3/Step": step +"/dataflow:v1b3/Step/name": name +"/dataflow:v1b3/Step/kind": kind +"/dataflow:v1b3/Step/properties": properties +"/dataflow:v1b3/Step/properties/property": property +"/dataflow:v1b3/FailedLocation": failed_location +"/dataflow:v1b3/FailedLocation/name": name +"/dataflow:v1b3/Disk": disk +"/dataflow:v1b3/Disk/sizeGb": size_gb +"/dataflow:v1b3/Disk/diskType": disk_type +"/dataflow:v1b3/Disk/mountPoint": mount_point +"/dataflow:v1b3/CounterMetadata": counter_metadata +"/dataflow:v1b3/CounterMetadata/standardUnits": standard_units +"/dataflow:v1b3/CounterMetadata/otherUnits": other_units +"/dataflow:v1b3/CounterMetadata/kind": kind +"/dataflow:v1b3/CounterMetadata/description": description +"/dataflow:v1b3/ListJobMessagesResponse": list_job_messages_response +"/dataflow:v1b3/ListJobMessagesResponse/nextPageToken": next_page_token +"/dataflow:v1b3/ListJobMessagesResponse/autoscalingEvents": autoscaling_events +"/dataflow:v1b3/ListJobMessagesResponse/autoscalingEvents/autoscaling_event": autoscaling_event +"/dataflow:v1b3/ListJobMessagesResponse/jobMessages": job_messages +"/dataflow:v1b3/ListJobMessagesResponse/jobMessages/job_message": job_message +"/dataflow:v1b3/ApproximateReportedProgress": approximate_reported_progress +"/dataflow:v1b3/ApproximateReportedProgress/position": position +"/dataflow:v1b3/ApproximateReportedProgress/fractionConsumed": fraction_consumed +"/dataflow:v1b3/ApproximateReportedProgress/consumedParallelism": consumed_parallelism +"/dataflow:v1b3/ApproximateReportedProgress/remainingParallelism": remaining_parallelism +"/dataflow:v1b3/StateFamilyConfig": state_family_config +"/dataflow:v1b3/StateFamilyConfig/stateFamily": state_family +"/dataflow:v1b3/StateFamilyConfig/isRead": is_read +"/dataflow:v1b3/IntegerList": integer_list +"/dataflow:v1b3/IntegerList/elements": elements +"/dataflow:v1b3/IntegerList/elements/element": element +"/dataflow:v1b3/ResourceUtilizationReportResponse": resource_utilization_report_response +"/dataflow:v1b3/SourceSplitResponse": source_split_response +"/dataflow:v1b3/SourceSplitResponse/outcome": outcome +"/dataflow:v1b3/SourceSplitResponse/bundles": bundles +"/dataflow:v1b3/SourceSplitResponse/bundles/bundle": bundle +"/dataflow:v1b3/SourceSplitResponse/shards": shards +"/dataflow:v1b3/SourceSplitResponse/shards/shard": shard +"/dataflow:v1b3/ParallelInstruction": parallel_instruction +"/dataflow:v1b3/ParallelInstruction/parDo": par_do +"/dataflow:v1b3/ParallelInstruction/read": read +"/dataflow:v1b3/ParallelInstruction/originalName": original_name +"/dataflow:v1b3/ParallelInstruction/flatten": flatten +"/dataflow:v1b3/ParallelInstruction/write": write +"/dataflow:v1b3/ParallelInstruction/systemName": system_name +"/dataflow:v1b3/ParallelInstruction/partialGroupByKey": partial_group_by_key +"/dataflow:v1b3/ParallelInstruction/outputs": outputs +"/dataflow:v1b3/ParallelInstruction/outputs/output": output +"/dataflow:v1b3/ParallelInstruction/name": name +"/dataflow:v1b3/Package": package +"/dataflow:v1b3/Package/location": location +"/dataflow:v1b3/Package/name": name +"/dataflow:v1b3/KeyRangeDataDiskAssignment": key_range_data_disk_assignment +"/dataflow:v1b3/KeyRangeDataDiskAssignment/start": start +"/dataflow:v1b3/KeyRangeDataDiskAssignment/dataDisk": data_disk +"/dataflow:v1b3/KeyRangeDataDiskAssignment/end": end +"/dataflow:v1b3/ParDoInstruction": par_do_instruction +"/dataflow:v1b3/ParDoInstruction/numOutputs": num_outputs +"/dataflow:v1b3/ParDoInstruction/sideInputs": side_inputs +"/dataflow:v1b3/ParDoInstruction/sideInputs/side_input": side_input +"/dataflow:v1b3/ParDoInstruction/multiOutputInfos": multi_output_infos +"/dataflow:v1b3/ParDoInstruction/multiOutputInfos/multi_output_info": multi_output_info +"/dataflow:v1b3/ParDoInstruction/userFn": user_fn +"/dataflow:v1b3/ParDoInstruction/userFn/user_fn": user_fn +"/dataflow:v1b3/ParDoInstruction/input": input +"/dataflow:v1b3/CounterStructuredName": counter_structured_name +"/dataflow:v1b3/CounterStructuredName/componentStepName": component_step_name +"/dataflow:v1b3/CounterStructuredName/portion": portion +"/dataflow:v1b3/CounterStructuredName/originalStepName": original_step_name +"/dataflow:v1b3/CounterStructuredName/workerId": worker_id +"/dataflow:v1b3/CounterStructuredName/originNamespace": origin_namespace +"/dataflow:v1b3/CounterStructuredName/origin": origin +"/dataflow:v1b3/CounterStructuredName/name": name +"/dataflow:v1b3/CounterStructuredName/executionStepName": execution_step_name +"/dataflow:v1b3/MetricUpdate": metric_update +"/dataflow:v1b3/MetricUpdate/scalar": scalar +"/dataflow:v1b3/MetricUpdate/meanCount": mean_count +"/dataflow:v1b3/MetricUpdate/meanSum": mean_sum +"/dataflow:v1b3/MetricUpdate/updateTime": update_time +"/dataflow:v1b3/MetricUpdate/name": name +"/dataflow:v1b3/MetricUpdate/distribution": distribution +"/dataflow:v1b3/MetricUpdate/set": set +"/dataflow:v1b3/MetricUpdate/internal": internal +"/dataflow:v1b3/MetricUpdate/cumulative": cumulative +"/dataflow:v1b3/MetricUpdate/kind": kind +"/dataflow:v1b3/ApproximateProgress": approximate_progress +"/dataflow:v1b3/ApproximateProgress/remainingTime": remaining_time +"/dataflow:v1b3/ApproximateProgress/position": position +"/dataflow:v1b3/ApproximateProgress/percentComplete": percent_complete +"/dataflow:v1b3/WorkerMessageResponse": worker_message_response +"/dataflow:v1b3/WorkerMessageResponse/workerMetricsResponse": worker_metrics_response +"/dataflow:v1b3/WorkerMessageResponse/workerHealthReportResponse": worker_health_report_response +"/dataflow:v1b3/TemplateMetadata": template_metadata +"/dataflow:v1b3/TemplateMetadata/description": description +"/dataflow:v1b3/TemplateMetadata/bypassTempDirValidation": bypass_temp_dir_validation +"/dataflow:v1b3/TemplateMetadata/name": name +"/dataflow:v1b3/TemplateMetadata/parameters": parameters +"/dataflow:v1b3/TemplateMetadata/parameters/parameter": parameter +"/dataflow:v1b3/WorkerMessage": worker_message +"/dataflow:v1b3/WorkerMessage/time": time +"/dataflow:v1b3/WorkerMessage/workerHealthReport": worker_health_report +"/dataflow:v1b3/WorkerMessage/workerMessageCode": worker_message_code +"/dataflow:v1b3/WorkerMessage/workerMetrics": worker_metrics +"/dataflow:v1b3/WorkerMessage/labels": labels +"/dataflow:v1b3/WorkerMessage/labels/label": label +"/dataflow:v1b3/JobMetrics": job_metrics +"/dataflow:v1b3/JobMetrics/metricTime": metric_time +"/dataflow:v1b3/JobMetrics/metrics": metrics +"/dataflow:v1b3/JobMetrics/metrics/metric": metric +"/dataflow:v1b3/FloatingPointList": floating_point_list +"/dataflow:v1b3/FloatingPointList/elements": elements +"/dataflow:v1b3/FloatingPointList/elements/element": element +"/dataflow:v1b3/CounterUpdate": counter_update +"/dataflow:v1b3/CounterUpdate/structuredNameAndMetadata": structured_name_and_metadata +"/dataflow:v1b3/CounterUpdate/integerList": integer_list +"/dataflow:v1b3/CounterUpdate/floatingPoint": floating_point +"/dataflow:v1b3/CounterUpdate/integerMean": integer_mean +"/dataflow:v1b3/CounterUpdate/cumulative": cumulative +"/dataflow:v1b3/CounterUpdate/internal": internal +"/dataflow:v1b3/CounterUpdate/floatingPointMean": floating_point_mean +"/dataflow:v1b3/CounterUpdate/boolean": boolean +"/dataflow:v1b3/CounterUpdate/nameAndKind": name_and_kind +"/dataflow:v1b3/CounterUpdate/stringList": string_list +"/dataflow:v1b3/CounterUpdate/distribution": distribution +"/dataflow:v1b3/CounterUpdate/shortId": short_id +"/dataflow:v1b3/CounterUpdate/floatingPointList": floating_point_list +"/dataflow:v1b3/CounterUpdate/integer": integer +"/dataflow:v1b3/SourceMetadata": source_metadata +"/dataflow:v1b3/SourceMetadata/producesSortedKeys": produces_sorted_keys +"/dataflow:v1b3/SourceMetadata/infinite": infinite +"/dataflow:v1b3/SourceMetadata/estimatedSizeBytes": estimated_size_bytes +"/dataflow:v1b3/DistributionUpdate": distribution_update +"/dataflow:v1b3/DistributionUpdate/min": min +"/dataflow:v1b3/DistributionUpdate/sumOfSquares": sum_of_squares +"/dataflow:v1b3/DistributionUpdate/sum": sum +"/dataflow:v1b3/DistributionUpdate/max": max +"/dataflow:v1b3/DistributionUpdate/logBuckets": log_buckets +"/dataflow:v1b3/DistributionUpdate/logBuckets/log_bucket": log_bucket +"/dataflow:v1b3/DistributionUpdate/count": count +"/dataflow:v1b3/WorkerHealthReportResponse": worker_health_report_response +"/dataflow:v1b3/WorkerHealthReportResponse/reportInterval": report_interval +"/dataflow:v1b3/SourceFork": source_fork +"/dataflow:v1b3/SourceFork/primary": primary +"/dataflow:v1b3/SourceFork/primarySource": primary_source +"/dataflow:v1b3/SourceFork/residual": residual +"/dataflow:v1b3/SourceFork/residualSource": residual_source +"/dataflow:v1b3/WorkItemStatus": work_item_status +"/dataflow:v1b3/WorkItemStatus/counterUpdates": counter_updates +"/dataflow:v1b3/WorkItemStatus/counterUpdates/counter_update": counter_update +"/dataflow:v1b3/WorkItemStatus/workItemId": work_item_id +"/dataflow:v1b3/WorkItemStatus/metricUpdates": metric_updates +"/dataflow:v1b3/WorkItemStatus/metricUpdates/metric_update": metric_update +"/dataflow:v1b3/WorkItemStatus/errors": errors +"/dataflow:v1b3/WorkItemStatus/errors/error": error +"/dataflow:v1b3/WorkItemStatus/dynamicSourceSplit": dynamic_source_split +"/dataflow:v1b3/WorkItemStatus/sourceOperationResponse": source_operation_response +"/dataflow:v1b3/WorkItemStatus/progress": progress +"/dataflow:v1b3/WorkItemStatus/requestedLeaseDuration": requested_lease_duration +"/dataflow:v1b3/WorkItemStatus/reportIndex": report_index +"/dataflow:v1b3/WorkItemStatus/stopPosition": stop_position +"/dataflow:v1b3/WorkItemStatus/completed": completed +"/dataflow:v1b3/WorkItemStatus/reportedProgress": reported_progress +"/dataflow:v1b3/WorkItemStatus/sourceFork": source_fork +"/dataflow:v1b3/ComponentSource": component_source +"/dataflow:v1b3/ComponentSource/name": name +"/dataflow:v1b3/ComponentSource/userName": user_name +"/dataflow:v1b3/ComponentSource/originalTransformOrCollection": original_transform_or_collection +"/dataflow:v1b3/WorkItemServiceState": work_item_service_state +"/dataflow:v1b3/WorkItemServiceState/suggestedStopPoint": suggested_stop_point +"/dataflow:v1b3/WorkItemServiceState/splitRequest": split_request +"/dataflow:v1b3/WorkItemServiceState/suggestedStopPosition": suggested_stop_position +"/dataflow:v1b3/WorkItemServiceState/reportStatusInterval": report_status_interval +"/dataflow:v1b3/WorkItemServiceState/harnessData": harness_data +"/dataflow:v1b3/WorkItemServiceState/harnessData/harness_datum": harness_datum +"/dataflow:v1b3/WorkItemServiceState/leaseExpireTime": lease_expire_time +"/dataflow:v1b3/WorkItemServiceState/metricShortId": metric_short_id +"/dataflow:v1b3/WorkItemServiceState/metricShortId/metric_short_id": metric_short_id +"/dataflow:v1b3/WorkItemServiceState/nextReportIndex": next_report_index +"/dataflow:v1b3/MetricStructuredName": metric_structured_name +"/dataflow:v1b3/MetricStructuredName/origin": origin +"/dataflow:v1b3/MetricStructuredName/name": name +"/dataflow:v1b3/MetricStructuredName/context": context +"/dataflow:v1b3/MetricStructuredName/context/context": context +"/dataflow:v1b3/SeqMapTaskOutputInfo": seq_map_task_output_info +"/dataflow:v1b3/SeqMapTaskOutputInfo/tag": tag +"/dataflow:v1b3/SeqMapTaskOutputInfo/sink": sink +"/dataflow:v1b3/JobExecutionStageInfo": job_execution_stage_info +"/dataflow:v1b3/JobExecutionStageInfo/stepName": step_name +"/dataflow:v1b3/JobExecutionStageInfo/stepName/step_name": step_name +"/dataflow:v1b3/KeyRangeLocation": key_range_location +"/dataflow:v1b3/KeyRangeLocation/deprecatedPersistentDirectory": deprecated_persistent_directory +"/dataflow:v1b3/KeyRangeLocation/deliveryEndpoint": delivery_endpoint +"/dataflow:v1b3/KeyRangeLocation/start": start +"/dataflow:v1b3/KeyRangeLocation/dataDisk": data_disk +"/dataflow:v1b3/KeyRangeLocation/end": end +"/dataflow:v1b3/SourceGetMetadataRequest": source_get_metadata_request +"/dataflow:v1b3/SourceGetMetadataRequest/source": source +"/dataflow:v1b3/NameAndKind": name_and_kind +"/dataflow:v1b3/NameAndKind/name": name +"/dataflow:v1b3/NameAndKind/kind": kind +"/dataflow:v1b3/SeqMapTask": seq_map_task +"/dataflow:v1b3/SeqMapTask/name": name +"/dataflow:v1b3/SeqMapTask/outputInfos": output_infos +"/dataflow:v1b3/SeqMapTask/outputInfos/output_info": output_info +"/dataflow:v1b3/SeqMapTask/inputs": inputs +"/dataflow:v1b3/SeqMapTask/inputs/input": input +"/dataflow:v1b3/SeqMapTask/systemName": system_name +"/dataflow:v1b3/SeqMapTask/stageName": stage_name +"/dataflow:v1b3/SeqMapTask/userFn": user_fn +"/dataflow:v1b3/SeqMapTask/userFn/user_fn": user_fn +"/dataflow:v1b3/WorkerMessageCode": worker_message_code +"/dataflow:v1b3/WorkerMessageCode/parameters": parameters +"/dataflow:v1b3/WorkerMessageCode/parameters/parameter": parameter +"/dataflow:v1b3/WorkerMessageCode/code": code +"/dataflow:v1b3/CustomSourceLocation": custom_source_location +"/dataflow:v1b3/CustomSourceLocation/stateful": stateful +"/dataflow:v1b3/MapTask": map_task +"/dataflow:v1b3/MapTask/systemName": system_name +"/dataflow:v1b3/MapTask/stageName": stage_name +"/dataflow:v1b3/MapTask/instructions": instructions +"/dataflow:v1b3/MapTask/instructions/instruction": instruction +"/dataflow:v1b3/FloatingPointMean": floating_point_mean +"/dataflow:v1b3/FloatingPointMean/count": count +"/dataflow:v1b3/FloatingPointMean/sum": sum +"/dataflow:v1b3/ReportWorkItemStatusResponse": report_work_item_status_response +"/dataflow:v1b3/ReportWorkItemStatusResponse/workItemServiceStates": work_item_service_states +"/dataflow:v1b3/ReportWorkItemStatusResponse/workItemServiceStates/work_item_service_state": work_item_service_state +"/dataflow:v1b3/InstructionOutput": instruction_output +"/dataflow:v1b3/InstructionOutput/originalName": original_name +"/dataflow:v1b3/InstructionOutput/onlyCountKeyBytes": only_count_key_bytes +"/dataflow:v1b3/InstructionOutput/systemName": system_name +"/dataflow:v1b3/InstructionOutput/onlyCountValueBytes": only_count_value_bytes +"/dataflow:v1b3/InstructionOutput/codec": codec +"/dataflow:v1b3/InstructionOutput/codec/codec": codec +"/dataflow:v1b3/InstructionOutput/name": name +"/dataflow:v1b3/CreateJobFromTemplateRequest": create_job_from_template_request +"/dataflow:v1b3/CreateJobFromTemplateRequest/environment": environment +"/dataflow:v1b3/CreateJobFromTemplateRequest/location": location +"/dataflow:v1b3/CreateJobFromTemplateRequest/parameters": parameters +"/dataflow:v1b3/CreateJobFromTemplateRequest/parameters/parameter": parameter +"/dataflow:v1b3/CreateJobFromTemplateRequest/jobName": job_name +"/dataflow:v1b3/CreateJobFromTemplateRequest/gcsPath": gcs_path +"/dataflow:v1b3/IntegerMean": integer_mean +"/dataflow:v1b3/IntegerMean/count": count +"/dataflow:v1b3/IntegerMean/sum": sum +"/dataflow:v1b3/ListJobsResponse": list_jobs_response +"/dataflow:v1b3/ListJobsResponse/jobs": jobs +"/dataflow:v1b3/ListJobsResponse/jobs/job": job +"/dataflow:v1b3/ListJobsResponse/nextPageToken": next_page_token +"/dataflow:v1b3/ListJobsResponse/failedLocation": failed_location +"/dataflow:v1b3/ListJobsResponse/failedLocation/failed_location": failed_location +"/dataflow:v1b3/ComputationTopology": computation_topology +"/dataflow:v1b3/ComputationTopology/stateFamilies": state_families +"/dataflow:v1b3/ComputationTopology/stateFamilies/state_family": state_family +"/dataflow:v1b3/ComputationTopology/outputs": outputs +"/dataflow:v1b3/ComputationTopology/outputs/output": output +"/dataflow:v1b3/ComputationTopology/systemStageName": system_stage_name +"/dataflow:v1b3/ComputationTopology/inputs": inputs +"/dataflow:v1b3/ComputationTopology/inputs/input": input +"/dataflow:v1b3/ComputationTopology/computationId": computation_id +"/dataflow:v1b3/ComputationTopology/keyRanges": key_ranges +"/dataflow:v1b3/ComputationTopology/keyRanges/key_range": key_range +"/dataflow:v1b3/RuntimeEnvironment": runtime_environment +"/dataflow:v1b3/RuntimeEnvironment/zone": zone +"/dataflow:v1b3/RuntimeEnvironment/maxWorkers": max_workers +"/dataflow:v1b3/RuntimeEnvironment/bypassTempDirValidation": bypass_temp_dir_validation +"/dataflow:v1b3/RuntimeEnvironment/serviceAccountEmail": service_account_email +"/dataflow:v1b3/RuntimeEnvironment/tempLocation": temp_location +"/dataflow:v1b3/RuntimeEnvironment/machineType": machine_type +"/dataflow:v1b3/MountedDataDisk": mounted_data_disk +"/dataflow:v1b3/MountedDataDisk/dataDisk": data_disk +"/dataflow:v1b3/StreamingSideInputLocation": streaming_side_input_location +"/dataflow:v1b3/StreamingSideInputLocation/tag": tag +"/dataflow:v1b3/StreamingSideInputLocation/stateFamily": state_family +"/dataflow:v1b3/LaunchTemplateResponse": launch_template_response +"/dataflow:v1b3/LaunchTemplateResponse/job": job +"/dataflow:v1b3/Job": job +"/dataflow:v1b3/Job/projectId": project_id +"/dataflow:v1b3/Job/type": type +"/dataflow:v1b3/Job/pipelineDescription": pipeline_description +"/dataflow:v1b3/Job/replaceJobId": replace_job_id +"/dataflow:v1b3/Job/requestedState": requested_state +"/dataflow:v1b3/Job/tempFiles": temp_files +"/dataflow:v1b3/Job/tempFiles/temp_file": temp_file +"/dataflow:v1b3/Job/clientRequestId": client_request_id +"/dataflow:v1b3/Job/name": name +"/dataflow:v1b3/Job/steps": steps +"/dataflow:v1b3/Job/steps/step": step +"/dataflow:v1b3/Job/replacedByJobId": replaced_by_job_id +"/dataflow:v1b3/Job/executionInfo": execution_info +"/dataflow:v1b3/Job/id": id +"/dataflow:v1b3/Job/currentState": current_state +"/dataflow:v1b3/Job/location": location +"/dataflow:v1b3/Job/currentStateTime": current_state_time +"/dataflow:v1b3/Job/transformNameMapping": transform_name_mapping +"/dataflow:v1b3/Job/transformNameMapping/transform_name_mapping": transform_name_mapping +"/dataflow:v1b3/Job/labels": labels +"/dataflow:v1b3/Job/labels/label": label +"/dataflow:v1b3/Job/environment": environment +"/dataflow:v1b3/Job/createTime": create_time +"/dataflow:v1b3/Job/stageStates": stage_states +"/dataflow:v1b3/Job/stageStates/stage_state": stage_state +"/dataflow:v1b3/DynamicSourceSplit": dynamic_source_split +"/dataflow:v1b3/DynamicSourceSplit/residual": residual +"/dataflow:v1b3/DynamicSourceSplit/primary": primary +"/dataflow:v1b3/DerivedSource": derived_source +"/dataflow:v1b3/DerivedSource/derivationMode": derivation_mode +"/dataflow:v1b3/DerivedSource/source": source +"/dataflow:v1b3/SourceOperationResponse": source_operation_response +"/dataflow:v1b3/SourceOperationResponse/split": split +"/dataflow:v1b3/SourceOperationResponse/getMetadata": get_metadata +"/dataflow:v1b3/SendDebugCaptureResponse": send_debug_capture_response +"/dataflow:v1b3/SideInputInfo": side_input_info +"/dataflow:v1b3/SideInputInfo/sources": sources +"/dataflow:v1b3/SideInputInfo/sources/source": source +"/dataflow:v1b3/SideInputInfo/kind": kind +"/dataflow:v1b3/SideInputInfo/kind/kind": kind +"/dataflow:v1b3/SideInputInfo/tag": tag +"/dataflow:v1b3/CounterStructuredNameAndMetadata": counter_structured_name_and_metadata +"/dataflow:v1b3/CounterStructuredNameAndMetadata/name": name +"/dataflow:v1b3/CounterStructuredNameAndMetadata/metadata": metadata +"/dataflow:v1b3/ConcatPosition": concat_position +"/dataflow:v1b3/ConcatPosition/position": position +"/dataflow:v1b3/ConcatPosition/index": index +"/dataflow:v1b3/WriteInstruction": write_instruction +"/dataflow:v1b3/WriteInstruction/input": input +"/dataflow:v1b3/WriteInstruction/sink": sink +"/dataflow:v1b3/AutoscalingSettings": autoscaling_settings +"/dataflow:v1b3/AutoscalingSettings/algorithm": algorithm +"/dataflow:v1b3/AutoscalingSettings/maxNumWorkers": max_num_workers +"/dataflow:v1b3/StreamingComputationRanges": streaming_computation_ranges +"/dataflow:v1b3/StreamingComputationRanges/computationId": computation_id +"/dataflow:v1b3/StreamingComputationRanges/rangeAssignments": range_assignments +"/dataflow:v1b3/StreamingComputationRanges/rangeAssignments/range_assignment": range_assignment +"/dataflow:v1b3/ExecutionStageSummary": execution_stage_summary +"/dataflow:v1b3/ExecutionStageSummary/id": id +"/dataflow:v1b3/ExecutionStageSummary/componentTransform": component_transform +"/dataflow:v1b3/ExecutionStageSummary/componentTransform/component_transform": component_transform +"/dataflow:v1b3/ExecutionStageSummary/componentSource": component_source +"/dataflow:v1b3/ExecutionStageSummary/componentSource/component_source": component_source +"/dataflow:v1b3/ExecutionStageSummary/kind": kind +"/dataflow:v1b3/ExecutionStageSummary/outputSource": output_source +"/dataflow:v1b3/ExecutionStageSummary/outputSource/output_source": output_source +"/dataflow:v1b3/ExecutionStageSummary/name": name +"/dataflow:v1b3/ExecutionStageSummary/inputSource": input_source +"/dataflow:v1b3/ExecutionStageSummary/inputSource/input_source": input_source +"/iam:v1/CreateServiceAccountKeyRequest/includePublicKeyData": include_public_key_data +"/logging:v2/LogEntry/receiveTimestamp": receive_timestamp +"/logging:v2beta1/LogEntry/receiveTimestamp": receive_timestamp +"/ml:v1/GoogleApi__HttpBody/extensions": extensions +"/ml:v1/GoogleApi__HttpBody/extensions/extension": extension +"/ml:v1/GoogleApi__HttpBody/extensions/extension/extension": extension +"/servicemanagement:v1/servicemanagement.services.rollouts.list/filter": filter +"/servicemanagement:v1/CloudAuditOptions/logName": log_name +"/servicemanagement:v1/MediaDownload/completeNotification": complete_notification +"/servicemanagement:v1/MediaDownload/dropzone": dropzone +"/servicemanagement:v1/MediaDownload/maxDirectDownloadSize": max_direct_download_size +"/servicemanagement:v1/MediaDownload/useDirectDownload": use_direct_download +"/servicemanagement:v1/MediaUpload/mimeTypes": mime_types +"/servicemanagement:v1/MediaUpload/mimeTypes/mime_type": mime_type +"/servicemanagement:v1/MediaUpload/maxSize": max_size +"/servicemanagement:v1/MediaUpload/completeNotification": complete_notification +"/servicemanagement:v1/MediaUpload/progressNotification": progress_notification +"/servicemanagement:v1/MediaUpload/dropzone": dropzone +"/servicemanagement:v1/MediaUpload/startNotification": start_notification +"/servicemanagement:v1/HttpRule/restMethodName": rest_method_name +"/servicemanagement:v1/HttpRule/restCollection": rest_collection +"/serviceuser:v1/MediaDownload/dropzone": dropzone +"/serviceuser:v1/MediaDownload/maxDirectDownloadSize": max_direct_download_size +"/serviceuser:v1/MediaDownload/useDirectDownload": use_direct_download +"/serviceuser:v1/MediaDownload/completeNotification": complete_notification +"/serviceuser:v1/MediaUpload/progressNotification": progress_notification +"/serviceuser:v1/MediaUpload/completeNotification": complete_notification +"/serviceuser:v1/MediaUpload/dropzone": dropzone +"/serviceuser:v1/MediaUpload/startNotification": start_notification +"/serviceuser:v1/MediaUpload/mimeTypes": mime_types +"/serviceuser:v1/MediaUpload/mimeTypes/mime_type": mime_type +"/serviceuser:v1/MediaUpload/maxSize": max_size +"/serviceuser:v1/HttpRule/restMethodName": rest_method_name +"/serviceuser:v1/HttpRule/restCollection": rest_collection +"/slides:v1/ReplaceAllTextRequest/pageObjectIds": page_object_ids +"/slides:v1/ReplaceAllTextRequest/pageObjectIds/page_object_id": page_object_id +"/slides:v1/ReplaceAllShapesWithSheetsChartRequest/pageObjectIds": page_object_ids +"/slides:v1/ReplaceAllShapesWithSheetsChartRequest/pageObjectIds/page_object_id": page_object_id +"/slides:v1/ReplaceAllShapesWithImageRequest/pageObjectIds": page_object_ids +"/slides:v1/ReplaceAllShapesWithImageRequest/pageObjectIds/page_object_id": page_object_id +"/sourcerepo:v1/sourcerepo.projects.repos.list/pageToken": page_token +"/sourcerepo:v1/sourcerepo.projects.repos.list/pageSize": page_size +"/sourcerepo:v1/ListReposResponse/nextPageToken": next_page_token +"/sqladmin:v1beta4/ImportContext/importUser": import_user +"/storage:v1/storage.bucketAccessControls.delete/userProject": user_project +"/storage:v1/storage.bucketAccessControls.get/userProject": user_project +"/storage:v1/storage.bucketAccessControls.insert/userProject": user_project +"/storage:v1/storage.bucketAccessControls.list/userProject": user_project +"/storage:v1/storage.bucketAccessControls.patch/userProject": user_project +"/storage:v1/storage.bucketAccessControls.update/userProject": user_project +"/storage:v1/storage.buckets.delete/userProject": user_project +"/storage:v1/storage.buckets.get/userProject": user_project +"/storage:v1/storage.buckets.getIamPolicy/userProject": user_project +"/storage:v1/storage.buckets.patch/userProject": user_project +"/storage:v1/storage.buckets.setIamPolicy/userProject": user_project +"/storage:v1/storage.buckets.testIamPermissions/userProject": user_project +"/storage:v1/storage.buckets.update/userProject": user_project +"/storage:v1/storage.defaultObjectAccessControls.delete/userProject": user_project +"/storage:v1/storage.defaultObjectAccessControls.get/userProject": user_project +"/storage:v1/storage.defaultObjectAccessControls.insert/userProject": user_project +"/storage:v1/storage.defaultObjectAccessControls.list/userProject": user_project +"/storage:v1/storage.defaultObjectAccessControls.patch/userProject": user_project +"/storage:v1/storage.defaultObjectAccessControls.update/userProject": user_project +"/storage:v1/storage.notifications.delete/userProject": user_project +"/storage:v1/storage.notifications.get/userProject": user_project +"/storage:v1/storage.notifications.insert/userProject": user_project +"/storage:v1/storage.notifications.list/userProject": user_project +"/storage:v1/storage.objectAccessControls.delete/userProject": user_project +"/storage:v1/storage.objectAccessControls.get/userProject": user_project +"/storage:v1/storage.objectAccessControls.insert/userProject": user_project +"/storage:v1/storage.objectAccessControls.list/userProject": user_project +"/storage:v1/storage.objectAccessControls.patch/userProject": user_project +"/storage:v1/storage.objectAccessControls.update/userProject": user_project +"/storage:v1/storage.objects.compose/userProject": user_project +"/storage:v1/storage.objects.copy/userProject": user_project +"/storage:v1/storage.objects.delete/userProject": user_project +"/storage:v1/storage.objects.get/userProject": user_project +"/storage:v1/storage.objects.getIamPolicy/userProject": user_project +"/storage:v1/storage.objects.insert/userProject": user_project +"/storage:v1/storage.objects.list/userProject": user_project +"/storage:v1/storage.objects.patch/userProject": user_project +"/storage:v1/storage.objects.rewrite/userProject": user_project +"/storage:v1/storage.objects.setIamPolicy/userProject": user_project +"/storage:v1/storage.objects.testIamPermissions/userProject": user_project +"/storage:v1/storage.objects.update/userProject": user_project +"/storage:v1/storage.objects.watchAll/userProject": user_project +"/storage:v1/Bucket/billing": billing +"/storage:v1/Bucket/billing/requesterPays": requester_pays +"/translate:v2/language.languages.list/model": model +"/translate:v2/language.translations.list/model": model +"/translate:v2/language.translations.translate": translate_translation_text +"/translate:v2/language.detections.detect": detect_detection_language +"/translate:v2/GetSupportedLanguagesRequest": get_supported_languages_request +"/translate:v2/GetSupportedLanguagesRequest/target": target +"/translate:v2/TranslationsResource/model": model +"/translate:v2/TranslateTextRequest": translate_text_request +"/translate:v2/TranslateTextRequest/q": q +"/translate:v2/TranslateTextRequest/q/q": q +"/translate:v2/TranslateTextRequest/format": format +"/translate:v2/TranslateTextRequest/source": source +"/translate:v2/TranslateTextRequest/model": model +"/translate:v2/TranslateTextRequest/target": target +"/translate:v2/DetectLanguageRequest": detect_language_request +"/translate:v2/DetectLanguageRequest/q": q +"/translate:v2/DetectLanguageRequest/q/q": q diff --git a/generated/google/apis/acceleratedmobilepageurl_v1/classes.rb b/generated/google/apis/acceleratedmobilepageurl_v1/classes.rb index f81540137..793ddbe26 100644 --- a/generated/google/apis/acceleratedmobilepageurl_v1/classes.rb +++ b/generated/google/apis/acceleratedmobilepageurl_v1/classes.rb @@ -22,38 +22,6 @@ module Google module Apis module AcceleratedmobilepageurlV1 - # AMP URL response for a requested URL. - class AmpUrl - include Google::Apis::Core::Hashable - - # The [AMP Cache URL](/amp/cache/overview#amp-cache-url-format) pointing to - # the cached document in the Google AMP Cache. - # Corresponds to the JSON property `cdnAmpUrl` - # @return [String] - attr_accessor :cdn_amp_url - - # The original non-AMP URL. - # Corresponds to the JSON property `originalUrl` - # @return [String] - attr_accessor :original_url - - # The AMP URL pointing to the publisher's web server. - # Corresponds to the JSON property `ampUrl` - # @return [String] - attr_accessor :amp_url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @cdn_amp_url = args[:cdn_amp_url] if args.key?(:cdn_amp_url) - @original_url = args[:original_url] if args.key?(:original_url) - @amp_url = args[:amp_url] if args.key?(:amp_url) - end - end - # AMP URL Error resource for a requested URL that couldn't be found. class AmpUrlError include Google::Apis::Core::Hashable @@ -89,6 +57,11 @@ module Google class BatchGetAmpUrlsRequest include Google::Apis::Core::Hashable + # The lookup_strategy being requested. + # Corresponds to the JSON property `lookupStrategy` + # @return [String] + attr_accessor :lookup_strategy + # List of URLs to look up for the paired AMP URLs. # The URLs are case-sensitive. Up to 50 URLs per lookup # (see [Usage Limits](/amp/cache/reference/limits)). @@ -96,19 +69,14 @@ module Google # @return [Array] attr_accessor :urls - # The lookup_strategy being requested. - # Corresponds to the JSON property `lookupStrategy` - # @return [String] - attr_accessor :lookup_strategy - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @urls = args[:urls] if args.key?(:urls) @lookup_strategy = args[:lookup_strategy] if args.key?(:lookup_strategy) + @urls = args[:urls] if args.key?(:urls) end end @@ -139,6 +107,38 @@ module Google @url_errors = args[:url_errors] if args.key?(:url_errors) end end + + # AMP URL response for a requested URL. + class AmpUrl + include Google::Apis::Core::Hashable + + # The [AMP Cache URL](/amp/cache/overview#amp-cache-url-format) pointing to + # the cached document in the Google AMP Cache. + # Corresponds to the JSON property `cdnAmpUrl` + # @return [String] + attr_accessor :cdn_amp_url + + # The original non-AMP URL. + # Corresponds to the JSON property `originalUrl` + # @return [String] + attr_accessor :original_url + + # The AMP URL pointing to the publisher's web server. + # Corresponds to the JSON property `ampUrl` + # @return [String] + attr_accessor :amp_url + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @cdn_amp_url = args[:cdn_amp_url] if args.key?(:cdn_amp_url) + @original_url = args[:original_url] if args.key?(:original_url) + @amp_url = args[:amp_url] if args.key?(:amp_url) + end + end end end end diff --git a/generated/google/apis/acceleratedmobilepageurl_v1/representations.rb b/generated/google/apis/acceleratedmobilepageurl_v1/representations.rb index 0ee2a8e52..cf6a10bcf 100644 --- a/generated/google/apis/acceleratedmobilepageurl_v1/representations.rb +++ b/generated/google/apis/acceleratedmobilepageurl_v1/representations.rb @@ -22,12 +22,6 @@ module Google module Apis module AcceleratedmobilepageurlV1 - class AmpUrl - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class AmpUrlError class Representation < Google::Apis::Core::JsonRepresentation; end @@ -47,12 +41,9 @@ module Google end class AmpUrl - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :cdn_amp_url, as: 'cdnAmpUrl' - property :original_url, as: 'originalUrl' - property :amp_url, as: 'ampUrl' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class AmpUrlError @@ -67,8 +58,8 @@ module Google class BatchGetAmpUrlsRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :urls, as: 'urls' property :lookup_strategy, as: 'lookupStrategy' + collection :urls, as: 'urls' end end @@ -81,6 +72,15 @@ module Google end end + + class AmpUrl + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :cdn_amp_url, as: 'cdnAmpUrl' + property :original_url, as: 'originalUrl' + property :amp_url, as: 'ampUrl' + end + end end end end diff --git a/generated/google/apis/acceleratedmobilepageurl_v1/service.rb b/generated/google/apis/acceleratedmobilepageurl_v1/service.rb index 6e3891372..351dd4b38 100644 --- a/generated/google/apis/acceleratedmobilepageurl_v1/service.rb +++ b/generated/google/apis/acceleratedmobilepageurl_v1/service.rb @@ -33,16 +33,16 @@ module Google # # @see https://developers.google.com/amp/cache/ class AcceleratedmobilepageurlService < Google::Apis::Core::BaseService - # @return [String] - # API key. Your API key identifies your project and provides you with API access, - # quota, and reports. Required unless you provide an OAuth 2.0 token. - attr_accessor :key - # @return [String] # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. attr_accessor :quota_user + # @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 + def initialize super('https://acceleratedmobilepageurl.googleapis.com/', '') @batch_path = 'batch' @@ -51,11 +51,11 @@ module Google # Returns AMP URL(s) and equivalent # [AMP Cache URL(s)](/amp/cache/overview#amp-cache-url-format). # @param [Google::Apis::AcceleratedmobilepageurlV1::BatchGetAmpUrlsRequest] batch_get_amp_urls_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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -68,22 +68,22 @@ 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 batch_get_amp_urls(batch_get_amp_urls_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def batch_get_amp_urls(batch_get_amp_urls_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/ampUrls:batchGet', options) command.request_representation = Google::Apis::AcceleratedmobilepageurlV1::BatchGetAmpUrlsRequest::Representation command.request_object = batch_get_amp_urls_request_object command.response_representation = Google::Apis::AcceleratedmobilepageurlV1::BatchGetAmpUrlsResponse::Representation command.response_class = Google::Apis::AcceleratedmobilepageurlV1::BatchGetAmpUrlsResponse - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.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['key'] = key unless key.nil? end end end diff --git a/generated/google/apis/adexchangebuyer2_v2beta1.rb b/generated/google/apis/adexchangebuyer2_v2beta1.rb index 5e8ef179d..57fcf9a80 100644 --- a/generated/google/apis/adexchangebuyer2_v2beta1.rb +++ b/generated/google/apis/adexchangebuyer2_v2beta1.rb @@ -26,7 +26,7 @@ module Google # @see https://developers.google.com/ad-exchange/buyer-rest/guides/client-access/ module Adexchangebuyer2V2beta1 VERSION = 'V2beta1' - REVISION = '20170503' + REVISION = '20170525' # Manage your Ad Exchange buyer account configuration AUTH_ADEXCHANGE_BUYER = 'https://www.googleapis.com/auth/adexchange.buyer' diff --git a/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb b/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb index d5bc2df75..20bf388ed 100644 --- a/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +++ b/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb @@ -45,38 +45,48 @@ module Google class NativeContent include Google::Apis::Core::Hashable + # A long description of the ad. + # Corresponds to the JSON property `body` + # @return [String] + attr_accessor :body + + # The app rating in the app store. Must be in the range [0-5]. + # Corresponds to the JSON property `starRating` + # @return [Float] + attr_accessor :star_rating + # The URL to fetch a native video ad. # Corresponds to the JSON property `videoUrl` # @return [String] attr_accessor :video_url + # The URL that the browser/SDK will load when the user clicks the ad. + # Corresponds to the JSON property `clickLinkUrl` + # @return [String] + attr_accessor :click_link_url + # An image resource. You may provide a larger image than was requested, # so long as the aspect ratio is preserved. # Corresponds to the JSON property `logo` # @return [Google::Apis::Adexchangebuyer2V2beta1::Image] attr_accessor :logo - # The URL that the browser/SDK will load when the user clicks the ad. - # Corresponds to the JSON property `clickLinkUrl` - # @return [String] - attr_accessor :click_link_url - # The price of the promoted app including currency info. # Corresponds to the JSON property `priceDisplayText` # @return [String] attr_accessor :price_display_text + # The URL to use for click tracking. + # Corresponds to the JSON property `clickTrackingUrl` + # @return [String] + attr_accessor :click_tracking_url + # An image resource. You may provide a larger image than was requested, # so long as the aspect ratio is preserved. # Corresponds to the JSON property `image` # @return [Google::Apis::Adexchangebuyer2V2beta1::Image] attr_accessor :image - # The URL to use for click tracking. - # Corresponds to the JSON property `clickTrackingUrl` - # @return [String] - attr_accessor :click_tracking_url - # The name of the advertiser or sponsor, to be displayed in the ad creative. # Corresponds to the JSON property `advertiserName` # @return [String] @@ -103,35 +113,25 @@ module Google # @return [String] attr_accessor :call_to_action - # A long description of the ad. - # Corresponds to the JSON property `body` - # @return [String] - attr_accessor :body - - # The app rating in the app store. Must be in the range [0-5]. - # Corresponds to the JSON property `starRating` - # @return [Float] - attr_accessor :star_rating - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @body = args[:body] if args.key?(:body) + @star_rating = args[:star_rating] if args.key?(:star_rating) @video_url = args[:video_url] if args.key?(:video_url) - @logo = args[:logo] if args.key?(:logo) @click_link_url = args[:click_link_url] if args.key?(:click_link_url) + @logo = args[:logo] if args.key?(:logo) @price_display_text = args[:price_display_text] if args.key?(:price_display_text) - @image = args[:image] if args.key?(:image) @click_tracking_url = args[:click_tracking_url] if args.key?(:click_tracking_url) + @image = args[:image] if args.key?(:image) @advertiser_name = args[:advertiser_name] if args.key?(:advertiser_name) @store_url = args[:store_url] if args.key?(:store_url) @headline = args[:headline] if args.key?(:headline) @app_icon = args[:app_icon] if args.key?(:app_icon) @call_to_action = args[:call_to_action] if args.key?(:call_to_action) - @body = args[:body] if args.key?(:body) - @star_rating = args[:star_rating] if args.key?(:star_rating) end end @@ -139,11 +139,6 @@ module Google class ListClientsResponse include Google::Apis::Core::Hashable - # The returned list of clients. - # Corresponds to the JSON property `clients` - # @return [Array] - attr_accessor :clients - # A token to retrieve the next page of results. # Pass this value in the # ListClientsRequest.pageToken @@ -154,14 +149,19 @@ module Google # @return [String] attr_accessor :next_page_token + # The returned list of clients. + # Corresponds to the JSON property `clients` + # @return [Array] + attr_accessor :clients + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @clients = args[:clients] if args.key?(:clients) @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @clients = args[:clients] if args.key?(:clients) end end @@ -217,11 +217,6 @@ module Google class HtmlContent include Google::Apis::Core::Hashable - # The height of the HTML snippet in pixels. - # Corresponds to the JSON property `height` - # @return [Fixnum] - attr_accessor :height - # The width of the HTML snippet in pixels. # Corresponds to the JSON property `width` # @return [Fixnum] @@ -232,15 +227,20 @@ module Google # @return [String] attr_accessor :snippet + # The height of the HTML snippet in pixels. + # Corresponds to the JSON property `height` + # @return [Fixnum] + attr_accessor :height + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @height = args[:height] if args.key?(:height) @width = args[:width] if args.key?(:width) @snippet = args[:snippet] if args.key?(:snippet) + @height = args[:height] if args.key?(:height) end end @@ -248,16 +248,6 @@ module Google class ServingContext include Google::Apis::Core::Hashable - # @OutputOnly The type of platform the restriction applies to. - # Corresponds to the JSON property `platform` - # @return [Google::Apis::Adexchangebuyer2V2beta1::PlatformContext] - attr_accessor :platform - - # @OutputOnly The Geo criteria the restriction applies to. - # Corresponds to the JSON property `location` - # @return [Google::Apis::Adexchangebuyer2V2beta1::LocationContext] - attr_accessor :location - # @OutputOnly The auction type the restriction applies to. # Corresponds to the JSON property `auctionType` # @return [Google::Apis::Adexchangebuyer2V2beta1::AuctionContext] @@ -278,18 +268,28 @@ module Google # @return [Google::Apis::Adexchangebuyer2V2beta1::SecurityContext] attr_accessor :security_type + # @OutputOnly The type of platform the restriction applies to. + # Corresponds to the JSON property `platform` + # @return [Google::Apis::Adexchangebuyer2V2beta1::PlatformContext] + attr_accessor :platform + + # @OutputOnly The Geo criteria the restriction applies to. + # Corresponds to the JSON property `location` + # @return [Google::Apis::Adexchangebuyer2V2beta1::LocationContext] + attr_accessor :location + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @platform = args[:platform] if args.key?(:platform) - @location = args[:location] if args.key?(:location) @auction_type = args[:auction_type] if args.key?(:auction_type) @all = args[:all] if args.key?(:all) @app_type = args[:app_type] if args.key?(:app_type) @security_type = args[:security_type] if args.key?(:security_type) + @platform = args[:platform] if args.key?(:platform) + @location = args[:location] if args.key?(:location) end end @@ -329,12 +329,6 @@ module Google class Reason include Google::Apis::Core::Hashable - # The number of times the creative was filtered for the status. The - # count is aggregated across all publishers on the exchange. - # Corresponds to the JSON property `count` - # @return [Fixnum] - attr_accessor :count - # The filtering status code. Please refer to the # [creative-status-codes.txt](https://storage.googleapis.com/adx-rtb- # dictionaries/creative-status-codes.txt) @@ -343,14 +337,20 @@ module Google # @return [Fixnum] attr_accessor :status + # The number of times the creative was filtered for the status. The + # count is aggregated across all publishers on the exchange. + # Corresponds to the JSON property `count` + # @return [Fixnum] + attr_accessor :count + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @count = args[:count] if args.key?(:count) @status = args[:status] if args.key?(:status) + @count = args[:count] if args.key?(:count) end end @@ -430,37 +430,6 @@ module Google end end - # - class ListClientUsersResponse - include Google::Apis::Core::Hashable - - # A token to retrieve the next page of results. - # Pass this value in the - # ListClientUsersRequest.pageToken - # field in the subsequent call to the - # clients.invitations.list - # method to retrieve the next - # page of results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # The returned list of client users. - # Corresponds to the JSON property `users` - # @return [Array] - attr_accessor :users - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @users = args[:users] if args.key?(:users) - end - end - # class ListClientUserInvitationsResponse include Google::Apis::Core::Hashable @@ -492,6 +461,37 @@ module Google end end + # + class ListClientUsersResponse + include Google::Apis::Core::Hashable + + # The returned list of client users. + # Corresponds to the JSON property `users` + # @return [Array] + attr_accessor :users + + # A token to retrieve the next page of results. + # Pass this value in the + # ListClientUsersRequest.pageToken + # field in the subsequent call to the + # clients.invitations.list + # method to retrieve the next + # page of results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @users = args[:users] if args.key?(:users) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + # @OutputOnly The Geo criteria the restriction applies to. class LocationContext include Google::Apis::Core::Hashable @@ -547,19 +547,6 @@ module Google class ClientUser include Google::Apis::Core::Hashable - # The unique numerical ID of the client user - # that has accepted an invitation. - # The value of this field is ignored in an update operation. - # Corresponds to the JSON property `userId` - # @return [Fixnum] - attr_accessor :user_id - - # User's email address. The value of this field - # is ignored in an update operation. - # Corresponds to the JSON property `email` - # @return [String] - attr_accessor :email - # Numerical account ID of the client buyer # with which the user is associated; the # buyer must be a client of the current sponsor buyer. @@ -573,16 +560,29 @@ module Google # @return [String] attr_accessor :status + # The unique numerical ID of the client user + # that has accepted an invitation. + # The value of this field is ignored in an update operation. + # Corresponds to the JSON property `userId` + # @return [Fixnum] + attr_accessor :user_id + + # User's email address. The value of this field + # is ignored in an update operation. + # Corresponds to the JSON property `email` + # @return [String] + attr_accessor :email + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @user_id = args[:user_id] if args.key?(:user_id) - @email = args[:email] if args.key?(:email) @client_account_id = args[:client_account_id] if args.key?(:client_account_id) @status = args[:status] if args.key?(:status) + @user_id = args[:user_id] if args.key?(:user_id) + @email = args[:email] if args.key?(:email) end end @@ -617,10 +617,100 @@ module Google end end + # @OutputOnly Filtering reasons for this creative during a period of a single + # day (from midnight to midnight Pacific). + class FilteringStats + include Google::Apis::Core::Hashable + + # The set of filtering reasons for this date. + # Corresponds to the JSON property `reasons` + # @return [Array] + attr_accessor :reasons + + # Represents a whole calendar date, e.g. date of birth. The time of day and + # time zone are either specified elsewhere or are not significant. The date + # is relative to the Proleptic Gregorian Calendar. The day may be 0 to + # represent a year and month where the day is not significant, e.g. credit card + # expiration date. The year may be 0 to represent a month and day independent + # of year, e.g. anniversary date. Related types are google.type.TimeOfDay + # and `google.protobuf.Timestamp`. + # Corresponds to the JSON property `date` + # @return [Google::Apis::Adexchangebuyer2V2beta1::Date] + attr_accessor :date + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @reasons = args[:reasons] if args.key?(:reasons) + @date = args[:date] if args.key?(:date) + end + end + # A creative and its classification data. class Creative include Google::Apis::Core::Hashable + # HTML content for a creative. + # Corresponds to the JSON property `html` + # @return [Google::Apis::Adexchangebuyer2V2beta1::HtmlContent] + attr_accessor :html + + # @OutputOnly The top-level deals status of this creative. + # If disapproved, an entry for 'auctionType=DIRECT_DEALS' (or 'ALL') in + # serving_restrictions will also exist. Note + # that this may be nuanced with other contextual restrictions, in which case, + # it may be preferable to read from serving_restrictions directly. + # Can be used to filter the response of the + # creatives.list + # method. + # Corresponds to the JSON property `dealsStatus` + # @return [String] + attr_accessor :deals_status + + # @OutputOnly Detected product categories, if any. + # See the ad-product-categories.txt file in the technical documentation + # for a list of IDs. + # Corresponds to the JSON property `detectedProductCategories` + # @return [Array] + attr_accessor :detected_product_categories + + # @OutputOnly The top-level open auction status of this creative. + # If disapproved, an entry for 'auctionType = OPEN_AUCTION' (or 'ALL') in + # serving_restrictions will also exist. Note + # that this may be nuanced with other contextual restrictions, in which case, + # it may be preferable to read from serving_restrictions directly. + # Can be used to filter the response of the + # creatives.list + # method. + # Corresponds to the JSON property `openAuctionStatus` + # @return [String] + attr_accessor :open_auction_status + + # The name of the company being advertised in the creative. + # Corresponds to the JSON property `advertiserName` + # @return [String] + attr_accessor :advertiser_name + + # @OutputOnly Detected advertiser IDs, if any. + # Corresponds to the JSON property `detectedAdvertiserIds` + # @return [Array] + attr_accessor :detected_advertiser_ids + + # @OutputOnly + # The detected domains for this creative. + # Corresponds to the JSON property `detectedDomains` + # @return [Array] + attr_accessor :detected_domains + + # @OutputOnly Filtering reasons for this creative during a period of a single + # day (from midnight to midnight Pacific). + # Corresponds to the JSON property `filteringStats` + # @return [Google::Apis::Adexchangebuyer2V2beta1::FilteringStats] + attr_accessor :filtering_stats + # All attributes for the ads that may be shown from this creative. # Can be used to filter the response of the # creatives.list @@ -663,6 +753,11 @@ module Google # @return [Google::Apis::Adexchangebuyer2V2beta1::NativeContent] attr_accessor :native + # Video content for a creative. + # Corresponds to the JSON property `video` + # @return [Google::Apis::Adexchangebuyer2V2beta1::VideoContent] + attr_accessor :video + # @OutputOnly The granular status of this ad in specific contexts. # A context here relates to where something ultimately serves (for example, # a physical location, a platform, an HTTPS vs HTTP request, or the type @@ -671,11 +766,6 @@ module Google # @return [Array] attr_accessor :serving_restrictions - # Video content for a creative. - # Corresponds to the JSON property `video` - # @return [Google::Apis::Adexchangebuyer2V2beta1::VideoContent] - attr_accessor :video - # The agency ID for this creative. # Corresponds to the JSON property `agencyId` # @return [Fixnum] @@ -726,78 +816,28 @@ module Google # @return [Array] attr_accessor :impression_tracking_urls - # HTML content for a creative. - # Corresponds to the JSON property `html` - # @return [Google::Apis::Adexchangebuyer2V2beta1::HtmlContent] - attr_accessor :html - - # @OutputOnly Detected product categories, if any. - # See the ad-product-categories.txt file in the technical documentation - # for a list of IDs. - # Corresponds to the JSON property `detectedProductCategories` - # @return [Array] - attr_accessor :detected_product_categories - - # @OutputOnly The top-level deals status of this creative. - # If disapproved, an entry for 'auctionType=DIRECT_DEALS' (or 'ALL') in - # serving_restrictions will also exist. Note - # that this may be nuanced with other contextual restrictions, in which case, - # it may be preferable to read from serving_restrictions directly. - # Can be used to filter the response of the - # creatives.list - # method. - # Corresponds to the JSON property `dealsStatus` - # @return [String] - attr_accessor :deals_status - - # @OutputOnly The top-level open auction status of this creative. - # If disapproved, an entry for 'auctionType = OPEN_AUCTION' (or 'ALL') in - # serving_restrictions will also exist. Note - # that this may be nuanced with other contextual restrictions, in which case, - # it may be preferable to read from serving_restrictions directly. - # Can be used to filter the response of the - # creatives.list - # method. - # Corresponds to the JSON property `openAuctionStatus` - # @return [String] - attr_accessor :open_auction_status - - # The name of the company being advertised in the creative. - # Corresponds to the JSON property `advertiserName` - # @return [String] - attr_accessor :advertiser_name - - # @OutputOnly Detected advertiser IDs, if any. - # Corresponds to the JSON property `detectedAdvertiserIds` - # @return [Array] - attr_accessor :detected_advertiser_ids - - # @OutputOnly - # The detected domains for this creative. - # Corresponds to the JSON property `detectedDomains` - # @return [Array] - attr_accessor :detected_domains - - # @OutputOnly Filtering reasons for this creative during a period of a single - # day (from midnight to midnight Pacific). - # Corresponds to the JSON property `filteringStats` - # @return [Google::Apis::Adexchangebuyer2V2beta1::FilteringStats] - attr_accessor :filtering_stats - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @html = args[:html] if args.key?(:html) + @deals_status = args[:deals_status] if args.key?(:deals_status) + @detected_product_categories = args[:detected_product_categories] if args.key?(:detected_product_categories) + @open_auction_status = args[:open_auction_status] if args.key?(:open_auction_status) + @advertiser_name = args[:advertiser_name] if args.key?(:advertiser_name) + @detected_advertiser_ids = args[:detected_advertiser_ids] if args.key?(:detected_advertiser_ids) + @detected_domains = args[:detected_domains] if args.key?(:detected_domains) + @filtering_stats = args[:filtering_stats] if args.key?(:filtering_stats) @attributes = args[:attributes] if args.key?(:attributes) @api_update_time = args[:api_update_time] if args.key?(:api_update_time) @detected_languages = args[:detected_languages] if args.key?(:detected_languages) @creative_id = args[:creative_id] if args.key?(:creative_id) @account_id = args[:account_id] if args.key?(:account_id) @native = args[:native] if args.key?(:native) - @serving_restrictions = args[:serving_restrictions] if args.key?(:serving_restrictions) @video = args[:video] if args.key?(:video) + @serving_restrictions = args[:serving_restrictions] if args.key?(:serving_restrictions) @agency_id = args[:agency_id] if args.key?(:agency_id) @click_through_urls = args[:click_through_urls] if args.key?(:click_through_urls) @ad_choices_destination_url = args[:ad_choices_destination_url] if args.key?(:ad_choices_destination_url) @@ -807,46 +847,6 @@ module Google @version = args[:version] if args.key?(:version) @vendor_ids = args[:vendor_ids] if args.key?(:vendor_ids) @impression_tracking_urls = args[:impression_tracking_urls] if args.key?(:impression_tracking_urls) - @html = args[:html] if args.key?(:html) - @detected_product_categories = args[:detected_product_categories] if args.key?(:detected_product_categories) - @deals_status = args[:deals_status] if args.key?(:deals_status) - @open_auction_status = args[:open_auction_status] if args.key?(:open_auction_status) - @advertiser_name = args[:advertiser_name] if args.key?(:advertiser_name) - @detected_advertiser_ids = args[:detected_advertiser_ids] if args.key?(:detected_advertiser_ids) - @detected_domains = args[:detected_domains] if args.key?(:detected_domains) - @filtering_stats = args[:filtering_stats] if args.key?(:filtering_stats) - end - end - - # @OutputOnly Filtering reasons for this creative during a period of a single - # day (from midnight to midnight Pacific). - class FilteringStats - include Google::Apis::Core::Hashable - - # The set of filtering reasons for this date. - # Corresponds to the JSON property `reasons` - # @return [Array] - attr_accessor :reasons - - # Represents a whole calendar date, e.g. date of birth. The time of day and - # time zone are either specified elsewhere or are not significant. The date - # is relative to the Proleptic Gregorian Calendar. The day may be 0 to - # represent a year and month where the day is not significant, e.g. credit card - # expiration date. The year may be 0 to represent a month and day independent - # of year, e.g. anniversary date. Related types are google.type.TimeOfDay - # and `google.protobuf.Timestamp`. - # Corresponds to the JSON property `date` - # @return [Google::Apis::Adexchangebuyer2V2beta1::Date] - attr_accessor :date - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @reasons = args[:reasons] if args.key?(:reasons) - @date = args[:date] if args.key?(:date) end end @@ -1013,6 +1013,11 @@ module Google class ListDealAssociationsResponse include Google::Apis::Core::Hashable + # The list of associations. + # Corresponds to the JSON property `associations` + # @return [Array] + attr_accessor :associations + # A token to retrieve the next page of results. # Pass this value in the # ListDealAssociationsRequest.page_token @@ -1022,19 +1027,14 @@ module Google # @return [String] attr_accessor :next_page_token - # The list of associations. - # Corresponds to the JSON property `associations` - # @return [Array] - attr_accessor :associations - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) @associations = args[:associations] if args.key?(:associations) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) end end @@ -1083,6 +1083,12 @@ module Google class ServingRestriction include Google::Apis::Core::Hashable + # The status of the creative in this context (for example, it has been + # explicitly disapproved or is pending review). + # Corresponds to the JSON property `status` + # @return [String] + attr_accessor :status + # Any disapprovals bound to this restriction. # Only present if status=DISAPPROVED. # Can be used to filter the response of the @@ -1097,21 +1103,15 @@ module Google # @return [Array] attr_accessor :contexts - # The status of the creative in this context (for example, it has been - # explicitly disapproved or is pending review). - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @status = args[:status] if args.key?(:status) @disapproval_reasons = args[:disapproval_reasons] if args.key?(:disapproval_reasons) @contexts = args[:contexts] if args.key?(:contexts) - @status = args[:status] if args.key?(:status) end end diff --git a/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb b/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb index b06064cda..b13e93032 100644 --- a/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +++ b/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb @@ -94,13 +94,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class ListClientUsersResponse + class ListClientUserInvitationsResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class ListClientUserInvitationsResponse + class ListClientUsersResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -130,13 +130,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class Creative + class FilteringStats class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class FilteringStats + class Creative class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -218,31 +218,31 @@ module Google class NativeContent # @private class Representation < Google::Apis::Core::JsonRepresentation + property :body, as: 'body' + property :star_rating, as: 'starRating' property :video_url, as: 'videoUrl' + property :click_link_url, as: 'clickLinkUrl' property :logo, as: 'logo', class: Google::Apis::Adexchangebuyer2V2beta1::Image, decorator: Google::Apis::Adexchangebuyer2V2beta1::Image::Representation - property :click_link_url, as: 'clickLinkUrl' property :price_display_text, as: 'priceDisplayText' + property :click_tracking_url, as: 'clickTrackingUrl' property :image, as: 'image', class: Google::Apis::Adexchangebuyer2V2beta1::Image, decorator: Google::Apis::Adexchangebuyer2V2beta1::Image::Representation - property :click_tracking_url, as: 'clickTrackingUrl' property :advertiser_name, as: 'advertiserName' property :store_url, as: 'storeUrl' property :headline, as: 'headline' property :app_icon, as: 'appIcon', class: Google::Apis::Adexchangebuyer2V2beta1::Image, decorator: Google::Apis::Adexchangebuyer2V2beta1::Image::Representation property :call_to_action, as: 'callToAction' - property :body, as: 'body' - property :star_rating, as: 'starRating' end end class ListClientsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' collection :clients, as: 'clients', class: Google::Apis::Adexchangebuyer2V2beta1::Client, decorator: Google::Apis::Adexchangebuyer2V2beta1::Client::Representation - property :next_page_token, as: 'nextPageToken' end end @@ -265,19 +265,15 @@ module Google class HtmlContent # @private class Representation < Google::Apis::Core::JsonRepresentation - property :height, as: 'height' property :width, as: 'width' property :snippet, as: 'snippet' + property :height, as: 'height' end end class ServingContext # @private class Representation < Google::Apis::Core::JsonRepresentation - property :platform, as: 'platform', class: Google::Apis::Adexchangebuyer2V2beta1::PlatformContext, decorator: Google::Apis::Adexchangebuyer2V2beta1::PlatformContext::Representation - - property :location, as: 'location', class: Google::Apis::Adexchangebuyer2V2beta1::LocationContext, decorator: Google::Apis::Adexchangebuyer2V2beta1::LocationContext::Representation - property :auction_type, as: 'auctionType', class: Google::Apis::Adexchangebuyer2V2beta1::AuctionContext, decorator: Google::Apis::Adexchangebuyer2V2beta1::AuctionContext::Representation property :all, as: 'all' @@ -285,6 +281,10 @@ module Google property :security_type, as: 'securityType', class: Google::Apis::Adexchangebuyer2V2beta1::SecurityContext, decorator: Google::Apis::Adexchangebuyer2V2beta1::SecurityContext::Representation + property :platform, as: 'platform', class: Google::Apis::Adexchangebuyer2V2beta1::PlatformContext, decorator: Google::Apis::Adexchangebuyer2V2beta1::PlatformContext::Representation + + property :location, as: 'location', class: Google::Apis::Adexchangebuyer2V2beta1::LocationContext, decorator: Google::Apis::Adexchangebuyer2V2beta1::LocationContext::Representation + end end @@ -300,8 +300,8 @@ module Google class Reason # @private class Representation < Google::Apis::Core::JsonRepresentation - property :count, :numeric_string => true, as: 'count' property :status, as: 'status' + property :count, :numeric_string => true, as: 'count' end end @@ -328,15 +328,6 @@ module Google end end - class ListClientUsersResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - collection :users, as: 'users', class: Google::Apis::Adexchangebuyer2V2beta1::ClientUser, decorator: Google::Apis::Adexchangebuyer2V2beta1::ClientUser::Representation - - end - end - class ListClientUserInvitationsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -346,6 +337,15 @@ module Google end end + class ListClientUsersResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :users, as: 'users', class: Google::Apis::Adexchangebuyer2V2beta1::ClientUser, decorator: Google::Apis::Adexchangebuyer2V2beta1::ClientUser::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + class LocationContext # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -363,10 +363,10 @@ module Google class ClientUser # @private class Representation < Google::Apis::Core::JsonRepresentation - property :user_id, :numeric_string => true, as: 'userId' - property :email, as: 'email' property :client_account_id, :numeric_string => true, as: 'clientAccountId' property :status, as: 'status' + property :user_id, :numeric_string => true, as: 'userId' + property :email, as: 'email' end end @@ -379,9 +379,29 @@ module Google end end + class FilteringStats + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :reasons, as: 'reasons', class: Google::Apis::Adexchangebuyer2V2beta1::Reason, decorator: Google::Apis::Adexchangebuyer2V2beta1::Reason::Representation + + property :date, as: 'date', class: Google::Apis::Adexchangebuyer2V2beta1::Date, decorator: Google::Apis::Adexchangebuyer2V2beta1::Date::Representation + + end + end + class Creative # @private class Representation < Google::Apis::Core::JsonRepresentation + property :html, as: 'html', class: Google::Apis::Adexchangebuyer2V2beta1::HtmlContent, decorator: Google::Apis::Adexchangebuyer2V2beta1::HtmlContent::Representation + + property :deals_status, as: 'dealsStatus' + collection :detected_product_categories, as: 'detectedProductCategories' + property :open_auction_status, as: 'openAuctionStatus' + property :advertiser_name, as: 'advertiserName' + collection :detected_advertiser_ids, as: 'detectedAdvertiserIds' + collection :detected_domains, as: 'detectedDomains' + property :filtering_stats, as: 'filteringStats', class: Google::Apis::Adexchangebuyer2V2beta1::FilteringStats, decorator: Google::Apis::Adexchangebuyer2V2beta1::FilteringStats::Representation + collection :attributes, as: 'attributes' property :api_update_time, as: 'apiUpdateTime' collection :detected_languages, as: 'detectedLanguages' @@ -389,10 +409,10 @@ module Google property :account_id, as: 'accountId' property :native, as: 'native', class: Google::Apis::Adexchangebuyer2V2beta1::NativeContent, decorator: Google::Apis::Adexchangebuyer2V2beta1::NativeContent::Representation - collection :serving_restrictions, as: 'servingRestrictions', class: Google::Apis::Adexchangebuyer2V2beta1::ServingRestriction, decorator: Google::Apis::Adexchangebuyer2V2beta1::ServingRestriction::Representation - property :video, as: 'video', class: Google::Apis::Adexchangebuyer2V2beta1::VideoContent, decorator: Google::Apis::Adexchangebuyer2V2beta1::VideoContent::Representation + collection :serving_restrictions, as: 'servingRestrictions', class: Google::Apis::Adexchangebuyer2V2beta1::ServingRestriction, decorator: Google::Apis::Adexchangebuyer2V2beta1::ServingRestriction::Representation + property :agency_id, :numeric_string => true, as: 'agencyId' collection :click_through_urls, as: 'clickThroughUrls' property :ad_choices_destination_url, as: 'adChoicesDestinationUrl' @@ -403,26 +423,6 @@ module Google property :version, as: 'version' collection :vendor_ids, as: 'vendorIds' collection :impression_tracking_urls, as: 'impressionTrackingUrls' - property :html, as: 'html', class: Google::Apis::Adexchangebuyer2V2beta1::HtmlContent, decorator: Google::Apis::Adexchangebuyer2V2beta1::HtmlContent::Representation - - collection :detected_product_categories, as: 'detectedProductCategories' - property :deals_status, as: 'dealsStatus' - property :open_auction_status, as: 'openAuctionStatus' - property :advertiser_name, as: 'advertiserName' - collection :detected_advertiser_ids, as: 'detectedAdvertiserIds' - collection :detected_domains, as: 'detectedDomains' - property :filtering_stats, as: 'filteringStats', class: Google::Apis::Adexchangebuyer2V2beta1::FilteringStats, decorator: Google::Apis::Adexchangebuyer2V2beta1::FilteringStats::Representation - - end - end - - class FilteringStats - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :reasons, as: 'reasons', class: Google::Apis::Adexchangebuyer2V2beta1::Reason, decorator: Google::Apis::Adexchangebuyer2V2beta1::Reason::Representation - - property :date, as: 'date', class: Google::Apis::Adexchangebuyer2V2beta1::Date, decorator: Google::Apis::Adexchangebuyer2V2beta1::Date::Representation - end end @@ -469,9 +469,9 @@ module Google class ListDealAssociationsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' collection :associations, as: 'associations', class: Google::Apis::Adexchangebuyer2V2beta1::CreativeDealAssociation, decorator: Google::Apis::Adexchangebuyer2V2beta1::CreativeDealAssociation::Representation + property :next_page_token, as: 'nextPageToken' end end @@ -492,11 +492,11 @@ module Google class ServingRestriction # @private class Representation < Google::Apis::Core::JsonRepresentation + property :status, as: 'status' collection :disapproval_reasons, as: 'disapprovalReasons', class: Google::Apis::Adexchangebuyer2V2beta1::Disapproval, decorator: Google::Apis::Adexchangebuyer2V2beta1::Disapproval::Representation collection :contexts, as: 'contexts', class: Google::Apis::Adexchangebuyer2V2beta1::ServingContext, decorator: Google::Apis::Adexchangebuyer2V2beta1::ServingContext::Representation - property :status, as: 'status' end end diff --git a/generated/google/apis/adexchangebuyer2_v2beta1/service.rb b/generated/google/apis/adexchangebuyer2_v2beta1/service.rb index 1229237f0..0290819cd 100644 --- a/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +++ b/generated/google/apis/adexchangebuyer2_v2beta1/service.rb @@ -53,11 +53,11 @@ module Google # Numerical account ID of the client's sponsor buyer. (required) # @param [Fixnum] client_account_id # Numerical account ID of the client buyer to retrieve. (required) + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -70,14 +70,14 @@ 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 get_account_client(account_id, client_account_id, quota_user: nil, fields: nil, options: nil, &block) + def get_account_client(account_id, client_account_id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta1/accounts/{accountId}/clients/{clientAccountId}', options) command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::Client::Representation command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Client command.params['accountId'] = account_id unless account_id.nil? command.params['clientAccountId'] = client_account_id unless client_account_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -93,11 +93,11 @@ module Google # @param [Fixnum] page_size # Requested page size. The server may return fewer clients than requested. # If unspecified, the server will pick an appropriate default. + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -110,15 +110,15 @@ 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_account_clients(account_id, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_account_clients(account_id, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta1/accounts/{accountId}/clients', options) command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::ListClientsResponse::Representation command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ListClientsResponse command.params['accountId'] = account_id unless account_id.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -129,11 +129,11 @@ module Google # @param [Fixnum] client_account_id # Unique numerical account ID of the client to update. (required) # @param [Google::Apis::Adexchangebuyer2V2beta1::Client] client_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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -146,7 +146,7 @@ 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 update_account_client(account_id, client_account_id, client_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def update_account_client(account_id, client_account_id, client_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:put, 'v2beta1/accounts/{accountId}/clients/{clientAccountId}', options) command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::Client::Representation command.request_object = client_object @@ -154,8 +154,8 @@ module Google command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Client command.params['accountId'] = account_id unless account_id.nil? command.params['clientAccountId'] = client_account_id unless client_account_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -164,11 +164,11 @@ module Google # Unique numerical account ID for the buyer of which the client buyer # is a customer; the sponsor buyer to create a client for. (required) # @param [Google::Apis::Adexchangebuyer2V2beta1::Client] client_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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -181,15 +181,15 @@ 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 create_account_client(account_id, client_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def create_account_client(account_id, client_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2beta1/accounts/{accountId}/clients', options) command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::Client::Representation command.request_object = client_object command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::Client::Representation command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Client command.params['accountId'] = account_id unless account_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -201,11 +201,11 @@ module Google # to be retrieved is associated with. (required) # @param [Fixnum] invitation_id # Numerical identifier of the user invitation to retrieve. (required) + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -218,15 +218,15 @@ 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 get_account_client_invitation(account_id, client_account_id, invitation_id, quota_user: nil, fields: nil, options: nil, &block) + def get_account_client_invitation(account_id, client_account_id, invitation_id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations/{invitationId}', options) command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation::Representation command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation command.params['accountId'] = account_id unless account_id.nil? command.params['clientAccountId'] = client_account_id unless client_account_id.nil? command.params['invitationId'] = invitation_id unless invitation_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -241,6 +241,9 @@ module Google # numerical account identifier or the `-` character # to list all the invitations for all the clients # of a given sponsor buyer. + # @param [Fixnum] page_size + # Requested page size. Server may return fewer clients than requested. + # If unspecified, server will pick an appropriate default. # @param [String] page_token # A token identifying a page of results the server should return. # Typically, this is the value of @@ -248,14 +251,11 @@ module Google # returned from the previous call to the # clients.invitations.list # method. - # @param [Fixnum] page_size - # Requested page size. Server may return fewer clients than requested. - # If unspecified, server will pick an appropriate default. + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -268,16 +268,16 @@ 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_account_client_invitations(account_id, client_account_id, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_account_client_invitations(account_id, client_account_id, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations', options) command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::ListClientUserInvitationsResponse::Representation command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ListClientUserInvitationsResponse command.params['accountId'] = account_id unless account_id.nil? command.params['clientAccountId'] = client_account_id unless client_account_id.nil? - command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -289,11 +289,11 @@ module Google # Numerical account ID of the client buyer that the user # should be associated with. (required) # @param [Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation] client_user_invitation_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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -306,7 +306,7 @@ 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 create_account_client_invitation(account_id, client_account_id, client_user_invitation_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def create_account_client_invitation(account_id, client_account_id, client_user_invitation_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations', options) command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation::Representation command.request_object = client_user_invitation_object @@ -314,49 +314,8 @@ module Google command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation command.params['accountId'] = account_id unless account_id.nil? command.params['clientAccountId'] = client_account_id unless client_account_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Updates an existing client user. - # Only the user status can be changed on update. - # @param [Fixnum] account_id - # Numerical account ID of the client's sponsor buyer. (required) - # @param [Fixnum] client_account_id - # Numerical account ID of the client buyer that the user to be retrieved - # is associated with. (required) - # @param [Fixnum] user_id - # Numerical identifier of the user to retrieve. (required) - # @param [Google::Apis::Adexchangebuyer2V2beta1::ClientUser] client_user_object - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::Adexchangebuyer2V2beta1::ClientUser] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::Adexchangebuyer2V2beta1::ClientUser] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_account_client_user(account_id, client_account_id, user_id, client_user_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:put, 'v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}', options) - command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::ClientUser::Representation - command.request_object = client_user_object - command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::ClientUser::Representation - command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ClientUser - command.params['accountId'] = account_id unless account_id.nil? - command.params['clientAccountId'] = client_account_id unless client_account_id.nil? - command.params['userId'] = user_id unless user_id.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -371,20 +330,20 @@ module Google # numerical account identifier or the `-` character # to list all the client users for all the clients # of a given sponsor buyer. + # @param [Fixnum] page_size + # Requested page size. The server may return fewer clients than requested. + # If unspecified, the server will pick an appropriate default. # @param [String] page_token # A token identifying a page of results the server should return. # Typically, this is the value of # ListClientUsersResponse.nextPageToken # returned from the previous call to the # accounts.clients.users.list method. - # @param [Fixnum] page_size - # Requested page size. The server may return fewer clients than requested. - # If unspecified, the server will pick an appropriate default. + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -397,16 +356,16 @@ 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_account_client_users(account_id, client_account_id, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_account_client_users(account_id, client_account_id, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta1/accounts/{accountId}/clients/{clientAccountId}/users', options) command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::ListClientUsersResponse::Representation command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ListClientUsersResponse command.params['accountId'] = account_id unless account_id.nil? command.params['clientAccountId'] = client_account_id unless client_account_id.nil? - command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -418,11 +377,11 @@ module Google # that the user to be retrieved is associated with. (required) # @param [Fixnum] user_id # Numerical identifier of the user to retrieve. (required) + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -435,15 +394,56 @@ 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 get_account_client_user(account_id, client_account_id, user_id, quota_user: nil, fields: nil, options: nil, &block) + def get_account_client_user(account_id, client_account_id, user_id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}', options) command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::ClientUser::Representation command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ClientUser command.params['accountId'] = account_id unless account_id.nil? command.params['clientAccountId'] = client_account_id unless client_account_id.nil? command.params['userId'] = user_id unless user_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates an existing client user. + # Only the user status can be changed on update. + # @param [Fixnum] account_id + # Numerical account ID of the client's sponsor buyer. (required) + # @param [Fixnum] client_account_id + # Numerical account ID of the client buyer that the user to be retrieved + # is associated with. (required) + # @param [Fixnum] user_id + # Numerical identifier of the user to retrieve. (required) + # @param [Google::Apis::Adexchangebuyer2V2beta1::ClientUser] client_user_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::Adexchangebuyer2V2beta1::ClientUser] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::Adexchangebuyer2V2beta1::ClientUser] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_account_client_user(account_id, client_account_id, user_id, client_user_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:put, 'v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}', options) + command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::ClientUser::Representation + command.request_object = client_user_object + command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::ClientUser::Representation + command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ClientUser + command.params['accountId'] = account_id unless account_id.nil? + command.params['clientAccountId'] = client_account_id unless client_account_id.nil? + command.params['userId'] = user_id unless user_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -477,11 +477,11 @@ module Google # # Example: 'accountId=12345 AND (dealsStatus:disapproved AND disapprovalReason: # unacceptable_content) OR attribute:47' + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -494,7 +494,7 @@ 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_account_creatives(account_id, page_token: nil, page_size: nil, query: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_account_creatives(account_id, page_token: nil, page_size: nil, query: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta1/accounts/{accountId}/creatives', options) command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::ListCreativesResponse::Representation command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ListCreativesResponse @@ -502,8 +502,8 @@ module Google command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['query'] = query unless query.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -517,11 +517,11 @@ module Google # @param [String] duplicate_id_mode # Indicates if multiple creatives can share an ID or not. Default is # NO_DUPLICATES (one ID per creative). + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -534,7 +534,7 @@ 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 create_account_creative(account_id, creative_object = nil, duplicate_id_mode: nil, quota_user: nil, fields: nil, options: nil, &block) + def create_account_creative(account_id, creative_object = nil, duplicate_id_mode: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2beta1/accounts/{accountId}/creatives', options) command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::Creative::Representation command.request_object = creative_object @@ -542,8 +542,8 @@ module Google command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Creative command.params['accountId'] = account_id unless account_id.nil? command.query['duplicateIdMode'] = duplicate_id_mode unless duplicate_id_mode.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -555,11 +555,11 @@ module Google # The creative ID of the creative to stop notifications for. # Specify "-" to specify stopping account level notifications. # @param [Google::Apis::Adexchangebuyer2V2beta1::StopWatchingCreativeRequest] stop_watching_creative_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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -572,7 +572,7 @@ 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 stop_watching_creative(account_id, creative_id, stop_watching_creative_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def stop_watching_creative(account_id, creative_id, stop_watching_creative_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2beta1/accounts/{accountId}/creatives/{creativeId}:stopWatching', options) command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::StopWatchingCreativeRequest::Representation command.request_object = stop_watching_creative_request_object @@ -580,8 +580,8 @@ module Google command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Empty command.params['accountId'] = account_id unless account_id.nil? command.params['creativeId'] = creative_id unless creative_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -590,11 +590,11 @@ module Google # The account the creative belongs to. # @param [String] creative_id # The ID of the creative to retrieve. + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -607,14 +607,14 @@ 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 get_account_creative(account_id, creative_id, quota_user: nil, fields: nil, options: nil, &block) + def get_account_creative(account_id, creative_id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta1/accounts/{accountId}/creatives/{creativeId}', options) command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::Creative::Representation command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Creative command.params['accountId'] = account_id unless account_id.nil? command.params['creativeId'] = creative_id unless creative_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -629,11 +629,11 @@ module Google # sent, only a single notification will be sent to the # creative-level notification topic. # @param [Google::Apis::Adexchangebuyer2V2beta1::WatchCreativeRequest] watch_creative_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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -646,7 +646,7 @@ 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 watch_creative(account_id, creative_id, watch_creative_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def watch_creative(account_id, creative_id, watch_creative_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2beta1/accounts/{accountId}/creatives/{creativeId}:watch', options) command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::WatchCreativeRequest::Representation command.request_object = watch_creative_request_object @@ -654,8 +654,8 @@ module Google command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Empty command.params['accountId'] = account_id unless account_id.nil? command.params['creativeId'] = creative_id unless creative_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -671,11 +671,11 @@ module Google # creatives.list # method. # @param [Google::Apis::Adexchangebuyer2V2beta1::Creative] creative_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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -688,7 +688,7 @@ 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 update_account_creative(account_id, creative_id, creative_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def update_account_creative(account_id, creative_id, creative_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:put, 'v2beta1/accounts/{accountId}/creatives/{creativeId}', options) command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::Creative::Representation command.request_object = creative_object @@ -696,8 +696,8 @@ module Google command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Creative command.params['accountId'] = account_id unless account_id.nil? command.params['creativeId'] = creative_id unless creative_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -730,11 +730,11 @@ module Google # not_checked` # # Example: 'dealsId=12345 AND dealsStatus:disapproved' + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -747,7 +747,7 @@ 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_account_creative_deal_associations(account_id, creative_id, page_token: nil, page_size: nil, query: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_account_creative_deal_associations(account_id, creative_id, page_token: nil, page_size: nil, query: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations', options) command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::ListDealAssociationsResponse::Representation command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ListDealAssociationsResponse @@ -756,8 +756,8 @@ module Google command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['query'] = query unless query.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -767,11 +767,11 @@ module Google # @param [String] creative_id # The ID of the creative associated with the deal. # @param [Google::Apis::Adexchangebuyer2V2beta1::AddDealAssociationRequest] add_deal_association_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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -784,7 +784,7 @@ 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 add_deal_association(account_id, creative_id, add_deal_association_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def add_deal_association(account_id, creative_id, add_deal_association_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:add', options) command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::AddDealAssociationRequest::Representation command.request_object = add_deal_association_request_object @@ -792,8 +792,8 @@ module Google command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Empty command.params['accountId'] = account_id unless account_id.nil? command.params['creativeId'] = creative_id unless creative_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -803,11 +803,11 @@ module Google # @param [String] creative_id # The ID of the creative associated with the deal. # @param [Google::Apis::Adexchangebuyer2V2beta1::RemoveDealAssociationRequest] remove_deal_association_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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -820,7 +820,7 @@ 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 remove_deal_association(account_id, creative_id, remove_deal_association_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def remove_deal_association(account_id, creative_id, remove_deal_association_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:remove', options) command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::RemoveDealAssociationRequest::Representation command.request_object = remove_deal_association_request_object @@ -828,8 +828,8 @@ module Google command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Empty command.params['accountId'] = account_id unless account_id.nil? command.params['creativeId'] = creative_id unless creative_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end diff --git a/generated/google/apis/adexchangebuyer_v1_4.rb b/generated/google/apis/adexchangebuyer_v1_4.rb index 5a89a6482..3e1b96d3d 100644 --- a/generated/google/apis/adexchangebuyer_v1_4.rb +++ b/generated/google/apis/adexchangebuyer_v1_4.rb @@ -26,7 +26,7 @@ module Google # @see https://developers.google.com/ad-exchange/buyer-rest module AdexchangebuyerV1_4 VERSION = 'V1_4' - REVISION = '20170215' + REVISION = '20170504' # Manage your Ad Exchange buyer account configuration AUTH_ADEXCHANGE_BUYER = 'https://www.googleapis.com/auth/adexchange.buyer' diff --git a/generated/google/apis/adexchangebuyer_v1_4/classes.rb b/generated/google/apis/adexchangebuyer_v1_4/classes.rb index 8ebdc82b9..9792bfd75 100644 --- a/generated/google/apis/adexchangebuyer_v1_4/classes.rb +++ b/generated/google/apis/adexchangebuyer_v1_4/classes.rb @@ -98,8 +98,10 @@ module Google # - PROTOCOL_OPENRTB_2_2 # - PROTOCOL_OPENRTB_2_3 # - PROTOCOL_OPENRTB_2_4 + # - PROTOCOL_OPENRTB_2_5 # - PROTOCOL_OPENRTB_PROTOBUF_2_3 # - PROTOCOL_OPENRTB_PROTOBUF_2_4 + # - PROTOCOL_OPENRTB_PROTOBUF_2_5 # Corresponds to the JSON property `bidProtocol` # @return [String] attr_accessor :bid_protocol @@ -611,7 +613,8 @@ module Google # The granular status of this ad in specific contexts. A context here relates to # where something ultimately serves (for example, a physical location, a # platform, an HTTPS vs HTTP request, or the type of auction). Read-only. This - # field should not be set in requests. + # field should not be set in requests. See the examples in the Creatives guide + # for more details. # Corresponds to the JSON property `servingRestrictions` # @return [Array] attr_accessor :serving_restrictions @@ -1392,7 +1395,7 @@ module Google # The timestamp (in ms since epoch) when the original reservation price for the # deal was first converted to DFP currency. This is used to convert the - # contracted price into advertiser's currency without discrepancy. + # contracted price into buyer's currency without discrepancy. # Corresponds to the JSON property `currencyConversionTimeMs` # @return [Fixnum] attr_accessor :currency_conversion_time_ms @@ -1930,6 +1933,13 @@ module Google attr_accessor :is_rfp_template alias_method :is_rfp_template?, :is_rfp_template + # True, if the buyside inventory setup is complete for this deal. (readonly, + # except via OrderSetupCompleted action) + # Corresponds to the JSON property `isSetupComplete` + # @return [Boolean] + attr_accessor :is_setup_complete + alias_method :is_setup_complete?, :is_setup_complete + # Identifies what kind of resource this is. Value: the fixed string " # adexchangebuyer#marketplaceDeal". # Corresponds to the JSON property `kind` @@ -2013,6 +2023,7 @@ module Google @flight_start_time_ms = args[:flight_start_time_ms] if args.key?(:flight_start_time_ms) @inventory_description = args[:inventory_description] if args.key?(:inventory_description) @is_rfp_template = args[:is_rfp_template] if args.key?(:is_rfp_template) + @is_setup_complete = args[:is_setup_complete] if args.key?(:is_setup_complete) @kind = args[:kind] if args.key?(:kind) @last_update_time_ms = args[:last_update_time_ms] if args.key?(:last_update_time_ms) @name = args[:name] if args.key?(:name) @@ -2698,12 +2709,11 @@ module Google end end - # Used to specify pricing rules for buyers/advertisers. Each PricePerBuyer in an - # product can become [0,1] deals. To check if there is a PricePerBuyer for a - # particular buyer or buyer/advertiser pair, we look for the most specific - # matching rule - we first look for a rule matching the buyer and advertiser, - # next a rule with the buyer but an empty advertiser list, and otherwise look - # for a matching rule where no buyer is set. + # Used to specify pricing rules for buyers. Each PricePerBuyer in a product can + # become [0,1] deals. To check if there is a PricePerBuyer for a particular + # buyer we look for the most specific matching rule - we first look for a rule + # matching the buyer and otherwise look for a matching rule where no buyer is + # set. class PricePerBuyer include Google::Apis::Core::Hashable @@ -2712,6 +2722,11 @@ module Google # @return [String] attr_accessor :auction_tier + # Reference to the buyer that will get billed. + # Corresponds to the JSON property `billedBuyer` + # @return [Google::Apis::AdexchangebuyerV1_4::Buyer] + attr_accessor :billed_buyer + # The buyer who will pay this price. If unset, all buyers can pay this price (if # the advertisers match, and there's no more specific rule matching the buyer). # Corresponds to the JSON property `buyer` @@ -2730,6 +2745,7 @@ module Google # Update properties of this object def update!(**args) @auction_tier = args[:auction_tier] if args.key?(:auction_tier) + @billed_buyer = args[:billed_buyer] if args.key?(:billed_buyer) @buyer = args[:buyer] if args.key?(:buyer) @price = args[:price] if args.key?(:price) end @@ -2772,6 +2788,18 @@ module Google class Product include Google::Apis::Core::Hashable + # The billed buyer corresponding to the buyer that created the offer. (readonly, + # except on create) + # Corresponds to the JSON property `billedBuyer` + # @return [Google::Apis::AdexchangebuyerV1_4::Buyer] + attr_accessor :billed_buyer + + # The buyer that created the offer if this is a buyer initiated offer (readonly, + # except on create) + # Corresponds to the JSON property `buyer` + # @return [Google::Apis::AdexchangebuyerV1_4::Buyer] + attr_accessor :buyer + # Creation time in ms. since epoch (readonly) # Corresponds to the JSON property `creationTimeMs` # @return [Fixnum] @@ -2782,6 +2810,11 @@ module Google # @return [Array] attr_accessor :creator_contacts + # The role that created the offer. Set to BUYER for buyer initiated offers. + # Corresponds to the JSON property `creatorRole` + # @return [String] + attr_accessor :creator_role + # The set of fields around delivery control that are interesting for a buyer to # see but are non-negotiable. These are set by the publisher. This message is # assigned an id of 100 since some day we would want to model this as a protobuf @@ -2917,8 +2950,11 @@ module Google # Update properties of this object def update!(**args) + @billed_buyer = args[:billed_buyer] if args.key?(:billed_buyer) + @buyer = args[:buyer] if args.key?(:buyer) @creation_time_ms = args[:creation_time_ms] if args.key?(:creation_time_ms) @creator_contacts = args[:creator_contacts] if args.key?(:creator_contacts) + @creator_role = args[:creator_role] if args.key?(:creator_role) @delivery_control = args[:delivery_control] if args.key?(:delivery_control) @flight_end_time_ms = args[:flight_end_time_ms] if args.key?(:flight_end_time_ms) @flight_start_time_ms = args[:flight_start_time_ms] if args.key?(:flight_start_time_ms) @@ -3007,7 +3043,8 @@ module Google alias_method :is_renegotiating?, :is_renegotiating # True, if the buyside inventory setup is complete for this proposal. (readonly, - # except via OrderSetupCompleted action) + # except via OrderSetupCompleted action) Deprecated in favor of deal level setup + # complete flag. # Corresponds to the JSON property `isSetupComplete` # @return [Boolean] attr_accessor :is_setup_complete @@ -3410,6 +3447,11 @@ module Google # @return [String] attr_accessor :creative_size_type + # The native template for native ad. + # Corresponds to the JSON property `nativeTemplate` + # @return [String] + attr_accessor :native_template + # For regular or video creative size type, specifies the size of the creative. # Corresponds to the JSON property `size` # @return [Google::Apis::AdexchangebuyerV1_4::TargetingValueSize] @@ -3428,6 +3470,7 @@ module Google def update!(**args) @companion_sizes = args[:companion_sizes] if args.key?(:companion_sizes) @creative_size_type = args[:creative_size_type] if args.key?(:creative_size_type) + @native_template = args[:native_template] if args.key?(:native_template) @size = args[:size] if args.key?(:size) @skippable_ad_type = args[:skippable_ad_type] if args.key?(:skippable_ad_type) end diff --git a/generated/google/apis/adexchangebuyer_v1_4/representations.rb b/generated/google/apis/adexchangebuyer_v1_4/representations.rb index ce642c6c2..845d010b0 100644 --- a/generated/google/apis/adexchangebuyer_v1_4/representations.rb +++ b/generated/google/apis/adexchangebuyer_v1_4/representations.rb @@ -1025,6 +1025,7 @@ module Google property :flight_start_time_ms, :numeric_string => true, as: 'flightStartTimeMs' property :inventory_description, as: 'inventoryDescription' property :is_rfp_template, as: 'isRfpTemplate' + property :is_setup_complete, as: 'isSetupComplete' property :kind, as: 'kind' property :last_update_time_ms, :numeric_string => true, as: 'lastUpdateTimeMs' property :name, as: 'name' @@ -1207,6 +1208,8 @@ module Google # @private class Representation < Google::Apis::Core::JsonRepresentation property :auction_tier, as: 'auctionTier' + property :billed_buyer, as: 'billedBuyer', class: Google::Apis::AdexchangebuyerV1_4::Buyer, decorator: Google::Apis::AdexchangebuyerV1_4::Buyer::Representation + property :buyer, as: 'buyer', class: Google::Apis::AdexchangebuyerV1_4::Buyer, decorator: Google::Apis::AdexchangebuyerV1_4::Buyer::Representation property :price, as: 'price', class: Google::Apis::AdexchangebuyerV1_4::Price, decorator: Google::Apis::AdexchangebuyerV1_4::Price::Representation @@ -1225,9 +1228,14 @@ module Google class Product # @private class Representation < Google::Apis::Core::JsonRepresentation + property :billed_buyer, as: 'billedBuyer', class: Google::Apis::AdexchangebuyerV1_4::Buyer, decorator: Google::Apis::AdexchangebuyerV1_4::Buyer::Representation + + property :buyer, as: 'buyer', class: Google::Apis::AdexchangebuyerV1_4::Buyer, decorator: Google::Apis::AdexchangebuyerV1_4::Buyer::Representation + property :creation_time_ms, :numeric_string => true, as: 'creationTimeMs' collection :creator_contacts, as: 'creatorContacts', class: Google::Apis::AdexchangebuyerV1_4::ContactInformation, decorator: Google::Apis::AdexchangebuyerV1_4::ContactInformation::Representation + property :creator_role, as: 'creatorRole' property :delivery_control, as: 'deliveryControl', class: Google::Apis::AdexchangebuyerV1_4::DeliveryControl, decorator: Google::Apis::AdexchangebuyerV1_4::DeliveryControl::Representation property :flight_end_time_ms, :numeric_string => true, as: 'flightEndTimeMs' @@ -1373,6 +1381,7 @@ module Google collection :companion_sizes, as: 'companionSizes', class: Google::Apis::AdexchangebuyerV1_4::TargetingValueSize, decorator: Google::Apis::AdexchangebuyerV1_4::TargetingValueSize::Representation property :creative_size_type, as: 'creativeSizeType' + property :native_template, as: 'nativeTemplate' property :size, as: 'size', class: Google::Apis::AdexchangebuyerV1_4::TargetingValueSize, decorator: Google::Apis::AdexchangebuyerV1_4::TargetingValueSize::Representation property :skippable_ad_type, as: 'skippableAdType' diff --git a/generated/google/apis/adsense_v1_4.rb b/generated/google/apis/adsense_v1_4.rb index 7a71950ed..998c86d49 100644 --- a/generated/google/apis/adsense_v1_4.rb +++ b/generated/google/apis/adsense_v1_4.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/adsense/management/ module AdsenseV1_4 VERSION = 'V1_4' - REVISION = '20170503' + REVISION = '20170524' # View and manage your AdSense data AUTH_ADSENSE = 'https://www.googleapis.com/auth/adsense' diff --git a/generated/google/apis/adsensehost_v4_1.rb b/generated/google/apis/adsensehost_v4_1.rb index 23906a289..89169fd12 100644 --- a/generated/google/apis/adsensehost_v4_1.rb +++ b/generated/google/apis/adsensehost_v4_1.rb @@ -26,7 +26,7 @@ module Google # @see https://developers.google.com/adsense/host/ module AdsensehostV4_1 VERSION = 'V4_1' - REVISION = '20170502' + REVISION = '20170524' # View and manage your AdSense host data and associated accounts AUTH_ADSENSEHOST = 'https://www.googleapis.com/auth/adsensehost' diff --git a/generated/google/apis/analyticsreporting_v4/classes.rb b/generated/google/apis/analyticsreporting_v4/classes.rb index f75d6d0fd..48e836a44 100644 --- a/generated/google/apis/analyticsreporting_v4/classes.rb +++ b/generated/google/apis/analyticsreporting_v4/classes.rb @@ -22,1065 +22,6 @@ module Google module Apis module AnalyticsreportingV4 - # SegmentFilter defines the segment to be either a simple or a sequence - # segment. A simple segment condition contains dimension and metric conditions - # to select the sessions or users. A sequence segment condition can be used to - # select users or sessions based on sequential conditions. - class SegmentFilter - include Google::Apis::Core::Hashable - - # If true, match the complement of simple or sequence segment. - # For example, to match all visits not from "New York", we can define the - # segment as follows: - # "sessionSegment": ` - # "segmentFilters": [` - # "simpleSegment" :` - # "orFiltersForSegment": [` - # "segmentFilterClauses":[` - # "dimensionFilter": ` - # "dimensionName": "ga:city", - # "expressions": ["New York"] - # ` - # `] - # `] - # `, - # "not": "True" - # `] - # `, - # Corresponds to the JSON property `not` - # @return [Boolean] - attr_accessor :not - alias_method :not?, :not - - # A Simple segment conditions consist of one or more dimension/metric - # conditions that can be combined. - # Corresponds to the JSON property `simpleSegment` - # @return [Google::Apis::AnalyticsreportingV4::SimpleSegment] - attr_accessor :simple_segment - - # Sequence conditions consist of one or more steps, where each step is defined - # by one or more dimension/metric conditions. Multiple steps can be combined - # with special sequence operators. - # Corresponds to the JSON property `sequenceSegment` - # @return [Google::Apis::AnalyticsreportingV4::SequenceSegment] - attr_accessor :sequence_segment - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @not = args[:not] if args.key?(:not) - @simple_segment = args[:simple_segment] if args.key?(:simple_segment) - @sequence_segment = args[:sequence_segment] if args.key?(:sequence_segment) - end - end - - # SegmentDefinition defines the segment to be a set of SegmentFilters which - # are combined together with a logical `AND` operation. - class SegmentDefinition - include Google::Apis::Core::Hashable - - # A segment is defined by a set of segment filters which are combined - # together with a logical `AND` operation. - # Corresponds to the JSON property `segmentFilters` - # @return [Array] - attr_accessor :segment_filters - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @segment_filters = args[:segment_filters] if args.key?(:segment_filters) - end - end - - # Header for the metrics. - class MetricHeaderEntry - include Google::Apis::Core::Hashable - - # The name of the header. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The type of the metric, for example `INTEGER`. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @name = args[:name] if args.key?(:name) - @type = args[:type] if args.key?(:type) - end - end - - # The data part of the report. - class ReportData - include Google::Apis::Core::Hashable - - # The last time the data in the report was refreshed. All the hits received - # before this timestamp are included in the calculation of the report. - # Corresponds to the JSON property `dataLastRefreshed` - # @return [String] - attr_accessor :data_last_refreshed - - # Minimum and maximum values seen over all matching rows. These are both - # empty when `hideValueRanges` in the request is false, or when - # rowCount is zero. - # Corresponds to the JSON property `maximums` - # @return [Array] - attr_accessor :maximums - - # If the results are - # [sampled](https://support.google.com/analytics/answer/2637192), - # this returns the total number of - # samples present, one entry per date range. If the results are not sampled - # this field will not be defined. See - # [developer guide](/analytics/devguides/reporting/core/v4/basics#sampling) - # for details. - # Corresponds to the JSON property `samplingSpaceSizes` - # @return [Array] - attr_accessor :sampling_space_sizes - - # Minimum and maximum values seen over all matching rows. These are both - # empty when `hideValueRanges` in the request is false, or when - # rowCount is zero. - # Corresponds to the JSON property `minimums` - # @return [Array] - attr_accessor :minimums - - # For each requested date range, for the set of all rows that match - # the query, every requested value format gets a total. The total - # for a value format is computed by first totaling the metrics - # mentioned in the value format and then evaluating the value - # format as a scalar expression. E.g., The "totals" for - # `3 / (ga:sessions + 2)` we compute - # `3 / ((sum of all relevant ga:sessions) + 2)`. - # Totals are computed before pagination. - # Corresponds to the JSON property `totals` - # @return [Array] - attr_accessor :totals - - # If the results are - # [sampled](https://support.google.com/analytics/answer/2637192), - # this returns the total number of samples read, one entry per date range. - # If the results are not sampled this field will not be defined. See - # [developer guide](/analytics/devguides/reporting/core/v4/basics#sampling) - # for details. - # Corresponds to the JSON property `samplesReadCounts` - # @return [Array] - attr_accessor :samples_read_counts - - # Total number of matching rows for this query. - # Corresponds to the JSON property `rowCount` - # @return [Fixnum] - attr_accessor :row_count - - # There's one ReportRow for every unique combination of dimensions. - # Corresponds to the JSON property `rows` - # @return [Array] - attr_accessor :rows - - # Indicates if response to this request is golden or not. Data is - # golden when the exact same request will not produce any new results if - # asked at a later point in time. - # Corresponds to the JSON property `isDataGolden` - # @return [Boolean] - attr_accessor :is_data_golden - alias_method :is_data_golden?, :is_data_golden - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @data_last_refreshed = args[:data_last_refreshed] if args.key?(:data_last_refreshed) - @maximums = args[:maximums] if args.key?(:maximums) - @sampling_space_sizes = args[:sampling_space_sizes] if args.key?(:sampling_space_sizes) - @minimums = args[:minimums] if args.key?(:minimums) - @totals = args[:totals] if args.key?(:totals) - @samples_read_counts = args[:samples_read_counts] if args.key?(:samples_read_counts) - @row_count = args[:row_count] if args.key?(:row_count) - @rows = args[:rows] if args.key?(:rows) - @is_data_golden = args[:is_data_golden] if args.key?(:is_data_golden) - end - end - - # Dimension filter specifies the filtering options on a dimension. - class DimensionFilter - include Google::Apis::Core::Hashable - - # Logical `NOT` operator. If this boolean is set to true, then the matching - # dimension values will be excluded in the report. The default is false. - # Corresponds to the JSON property `not` - # @return [Boolean] - attr_accessor :not - alias_method :not?, :not - - # Strings or regular expression to match against. Only the first value of - # the list is used for comparison unless the operator is `IN_LIST`. - # If `IN_LIST` operator, then the entire list is used to filter the - # dimensions as explained in the description of the `IN_LIST` operator. - # Corresponds to the JSON property `expressions` - # @return [Array] - attr_accessor :expressions - - # Should the match be case sensitive? Default is false. - # Corresponds to the JSON property `caseSensitive` - # @return [Boolean] - attr_accessor :case_sensitive - alias_method :case_sensitive?, :case_sensitive - - # The dimension to filter on. A DimensionFilter must contain a dimension. - # Corresponds to the JSON property `dimensionName` - # @return [String] - attr_accessor :dimension_name - - # How to match the dimension to the expression. The default is REGEXP. - # Corresponds to the JSON property `operator` - # @return [String] - attr_accessor :operator - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @not = args[:not] if args.key?(:not) - @expressions = args[:expressions] if args.key?(:expressions) - @case_sensitive = args[:case_sensitive] if args.key?(:case_sensitive) - @dimension_name = args[:dimension_name] if args.key?(:dimension_name) - @operator = args[:operator] if args.key?(:operator) - end - end - - # Dimension filter specifies the filtering options on a dimension. - class SegmentDimensionFilter - include Google::Apis::Core::Hashable - - # The list of expressions, only the first element is used for all operators - # Corresponds to the JSON property `expressions` - # @return [Array] - attr_accessor :expressions - - # Should the match be case sensitive, ignored for `IN_LIST` operator. - # Corresponds to the JSON property `caseSensitive` - # @return [Boolean] - attr_accessor :case_sensitive - alias_method :case_sensitive?, :case_sensitive - - # Minimum comparison values for `BETWEEN` match type. - # Corresponds to the JSON property `minComparisonValue` - # @return [String] - attr_accessor :min_comparison_value - - # Maximum comparison values for `BETWEEN` match type. - # Corresponds to the JSON property `maxComparisonValue` - # @return [String] - attr_accessor :max_comparison_value - - # Name of the dimension for which the filter is being applied. - # Corresponds to the JSON property `dimensionName` - # @return [String] - attr_accessor :dimension_name - - # The operator to use to match the dimension with the expressions. - # Corresponds to the JSON property `operator` - # @return [String] - attr_accessor :operator - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @expressions = args[:expressions] if args.key?(:expressions) - @case_sensitive = args[:case_sensitive] if args.key?(:case_sensitive) - @min_comparison_value = args[:min_comparison_value] if args.key?(:min_comparison_value) - @max_comparison_value = args[:max_comparison_value] if args.key?(:max_comparison_value) - @dimension_name = args[:dimension_name] if args.key?(:dimension_name) - @operator = args[:operator] if args.key?(:operator) - end - end - - # Specifies the sorting options. - class OrderBy - include Google::Apis::Core::Hashable - - # The field which to sort by. The default sort order is ascending. Example: - # `ga:browser`. - # Note, that you can only specify one field for sort here. For example, - # `ga:browser, ga:city` is not valid. - # Corresponds to the JSON property `fieldName` - # @return [String] - attr_accessor :field_name - - # The order type. The default orderType is `VALUE`. - # Corresponds to the JSON property `orderType` - # @return [String] - attr_accessor :order_type - - # The sorting order for the field. - # Corresponds to the JSON property `sortOrder` - # @return [String] - attr_accessor :sort_order - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @field_name = args[:field_name] if args.key?(:field_name) - @order_type = args[:order_type] if args.key?(:order_type) - @sort_order = args[:sort_order] if args.key?(:sort_order) - end - end - - # The segment definition, if the report needs to be segmented. - # A Segment is a subset of the Analytics data. For example, of the entire - # set of users, one Segment might be users from a particular country or city. - class Segment - include Google::Apis::Core::Hashable - - # Dynamic segment definition for defining the segment within the request. - # A segment can select users, sessions or both. - # Corresponds to the JSON property `dynamicSegment` - # @return [Google::Apis::AnalyticsreportingV4::DynamicSegment] - attr_accessor :dynamic_segment - - # The segment ID of a built-in or custom segment, for example `gaid::-3`. - # Corresponds to the JSON property `segmentId` - # @return [String] - attr_accessor :segment_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @dynamic_segment = args[:dynamic_segment] if args.key?(:dynamic_segment) - @segment_id = args[:segment_id] if args.key?(:segment_id) - end - end - - # A segment sequence definition. - class SegmentSequenceStep - include Google::Apis::Core::Hashable - - # A sequence is specified with a list of Or grouped filters which are - # combined with `AND` operator. - # Corresponds to the JSON property `orFiltersForSegment` - # @return [Array] - attr_accessor :or_filters_for_segment - - # Specifies if the step immediately precedes or can be any time before the - # next step. - # Corresponds to the JSON property `matchType` - # @return [String] - attr_accessor :match_type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @or_filters_for_segment = args[:or_filters_for_segment] if args.key?(:or_filters_for_segment) - @match_type = args[:match_type] if args.key?(:match_type) - end - end - - # [Metrics](https://support.google.com/analytics/answer/1033861) - # are the quantitative measurements. For example, the metric `ga:users` - # indicates the total number of users for the requested time period. - class Metric - include Google::Apis::Core::Hashable - - # An alias for the metric expression is an alternate name for the - # expression. The alias can be used for filtering and sorting. This field - # is optional and is useful if the expression is not a single metric but - # a complex expression which cannot be used in filtering and sorting. - # The alias is also used in the response column header. - # Corresponds to the JSON property `alias` - # @return [String] - attr_accessor :alias - - # A metric expression in the request. An expression is constructed from one - # or more metrics and numbers. Accepted operators include: Plus (+), Minus - # (-), Negation (Unary -), Divided by (/), Multiplied by (*), Parenthesis, - # Positive cardinal numbers (0-9), can include decimals and is limited to - # 1024 characters. Example `ga:totalRefunds/ga:users`, in most cases the - # metric expression is just a single metric name like `ga:users`. - # Adding mixed `MetricType` (E.g., `CURRENCY` + `PERCENTAGE`) metrics - # will result in unexpected results. - # Corresponds to the JSON property `expression` - # @return [String] - attr_accessor :expression - - # Specifies how the metric expression should be formatted, for example - # `INTEGER`. - # Corresponds to the JSON property `formattingType` - # @return [String] - attr_accessor :formatting_type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @alias = args[:alias] if args.key?(:alias) - @expression = args[:expression] if args.key?(:expression) - @formatting_type = args[:formatting_type] if args.key?(:formatting_type) - end - end - - # The metric values in the pivot region. - class PivotValueRegion - include Google::Apis::Core::Hashable - - # The values of the metrics in each of the pivot regions. - # Corresponds to the JSON property `values` - # @return [Array] - attr_accessor :values - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @values = args[:values] if args.key?(:values) - end - end - - # The data response corresponding to the request. - class Report - include Google::Apis::Core::Hashable - - # The data part of the report. - # Corresponds to the JSON property `data` - # @return [Google::Apis::AnalyticsreportingV4::ReportData] - attr_accessor :data - - # Page token to retrieve the next page of results in the list. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Column headers. - # Corresponds to the JSON property `columnHeader` - # @return [Google::Apis::AnalyticsreportingV4::ColumnHeader] - attr_accessor :column_header - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @data = args[:data] if args.key?(:data) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @column_header = args[:column_header] if args.key?(:column_header) - end - end - - # The headers for each of the pivot sections defined in the request. - class PivotHeader - include Google::Apis::Core::Hashable - - # A single pivot section header. - # Corresponds to the JSON property `pivotHeaderEntries` - # @return [Array] - attr_accessor :pivot_header_entries - - # The total number of groups for this pivot. - # Corresponds to the JSON property `totalPivotGroupsCount` - # @return [Fixnum] - attr_accessor :total_pivot_groups_count - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @pivot_header_entries = args[:pivot_header_entries] if args.key?(:pivot_header_entries) - @total_pivot_groups_count = args[:total_pivot_groups_count] if args.key?(:total_pivot_groups_count) - end - end - - # A contiguous set of days: startDate, startDate + 1 day, ..., endDate. - # The start and end dates are specified in - # [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) date format `YYYY-MM-DD`. - class DateRange - include Google::Apis::Core::Hashable - - # The start date for the query in the format `YYYY-MM-DD`. - # Corresponds to the JSON property `startDate` - # @return [String] - attr_accessor :start_date - - # The end date for the query in the format `YYYY-MM-DD`. - # Corresponds to the JSON property `endDate` - # @return [String] - attr_accessor :end_date - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @start_date = args[:start_date] if args.key?(:start_date) - @end_date = args[:end_date] if args.key?(:end_date) - end - end - - # MetricFilter specifies the filter on a metric. - class MetricFilter - include Google::Apis::Core::Hashable - - # Logical `NOT` operator. If this boolean is set to true, then the matching - # metric values will be excluded in the report. The default is false. - # Corresponds to the JSON property `not` - # @return [Boolean] - attr_accessor :not - alias_method :not?, :not - - # The metric that will be filtered on. A metricFilter must contain a metric - # name. A metric name can be an alias earlier defined as a metric or it can - # also be a metric expression. - # Corresponds to the JSON property `metricName` - # @return [String] - attr_accessor :metric_name - - # The value to compare against. - # Corresponds to the JSON property `comparisonValue` - # @return [String] - attr_accessor :comparison_value - - # Is the metric `EQUAL`, `LESS_THAN` or `GREATER_THAN` the - # comparisonValue, the default is `EQUAL`. If the operator is - # `IS_MISSING`, checks if the metric is missing and would ignore the - # comparisonValue. - # Corresponds to the JSON property `operator` - # @return [String] - attr_accessor :operator - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @not = args[:not] if args.key?(:not) - @metric_name = args[:metric_name] if args.key?(:metric_name) - @comparison_value = args[:comparison_value] if args.key?(:comparison_value) - @operator = args[:operator] if args.key?(:operator) - end - end - - # The main request class which specifies the Reporting API request. - class ReportRequest - include Google::Apis::Core::Hashable - - # The metric filter clauses. They are logically combined with the `AND` - # operator. Metric filters look at only the first date range and not the - # comparing date range. Note that filtering on metrics occurs after the - # metrics are aggregated. - # Corresponds to the JSON property `metricFilterClauses` - # @return [Array] - attr_accessor :metric_filter_clauses - - # Page size is for paging and specifies the maximum number of returned rows. - # Page size should be >= 0. A query returns the default of 1,000 rows. - # The Analytics Core Reporting API returns a maximum of 10,000 rows per - # request, no matter how many you ask for. It can also return fewer rows - # than requested, if there aren't as many dimension segments as you expect. - # For instance, there are fewer than 300 possible values for `ga:country`, - # so when segmenting only by country, you can't get more than 300 rows, - # even if you set `pageSize` to a higher value. - # Corresponds to the JSON property `pageSize` - # @return [Fixnum] - attr_accessor :page_size - - # If set to true, hides the total of all metrics for all the matching rows, - # for every date range. The default false and will return the totals. - # Corresponds to the JSON property `hideTotals` - # @return [Boolean] - attr_accessor :hide_totals - alias_method :hide_totals?, :hide_totals - - # If set to true, hides the minimum and maximum across all matching rows. - # The default is false and the value ranges are returned. - # Corresponds to the JSON property `hideValueRanges` - # @return [Boolean] - attr_accessor :hide_value_ranges - alias_method :hide_value_ranges?, :hide_value_ranges - - # Dimension or metric filters that restrict the data returned for your - # request. To use the `filtersExpression`, supply a dimension or metric on - # which to filter, followed by the filter expression. For example, the - # following expression selects `ga:browser` dimension which starts with - # Firefox; `ga:browser=~^Firefox`. For more information on dimensions - # and metric filters, see - # [Filters reference](https://developers.google.com/analytics/devguides/ - # reporting/core/v3/reference#filters). - # Corresponds to the JSON property `filtersExpression` - # @return [String] - attr_accessor :filters_expression - - # Defines a cohort group. - # For example: - # "cohortGroup": ` - # "cohorts": [` - # "name": "cohort 1", - # "type": "FIRST_VISIT_DATE", - # "dateRange": ` "startDate": "2015-08-01", "endDate": "2015-08-01" ` - # `,` - # "name": "cohort 2" - # "type": "FIRST_VISIT_DATE" - # "dateRange": ` "startDate": "2015-07-01", "endDate": "2015-07-01" ` - # `] - # ` - # Corresponds to the JSON property `cohortGroup` - # @return [Google::Apis::AnalyticsreportingV4::CohortGroup] - attr_accessor :cohort_group - - # The Analytics - # [view ID](https://support.google.com/analytics/answer/1009618) - # from which to retrieve data. Every [ReportRequest](#ReportRequest) - # within a `batchGet` method must contain the same `viewId`. - # Corresponds to the JSON property `viewId` - # @return [String] - attr_accessor :view_id - - # The metrics requested. - # Requests must specify at least one metric. Requests can have a - # total of 10 metrics. - # Corresponds to the JSON property `metrics` - # @return [Array] - attr_accessor :metrics - - # The dimension filter clauses for filtering Dimension Values. They are - # logically combined with the `AND` operator. Note that filtering occurs - # before any dimensions are aggregated, so that the returned metrics - # represent the total for only the relevant dimensions. - # Corresponds to the JSON property `dimensionFilterClauses` - # @return [Array] - attr_accessor :dimension_filter_clauses - - # Sort order on output rows. To compare two rows, the elements of the - # following are applied in order until a difference is found. All date - # ranges in the output get the same row order. - # Corresponds to the JSON property `orderBys` - # @return [Array] - attr_accessor :order_bys - - # Segment the data returned for the request. A segment definition helps look - # at a subset of the segment request. A request can contain up to four - # segments. Every [ReportRequest](#ReportRequest) within a - # `batchGet` method must contain the same `segments` definition. Requests - # with segments must have the `ga:segment` dimension. - # Corresponds to the JSON property `segments` - # @return [Array] - attr_accessor :segments - - # The desired report - # [sample](https://support.google.com/analytics/answer/2637192) size. - # If the the `samplingLevel` field is unspecified the `DEFAULT` sampling - # level is used. Every [ReportRequest](#ReportRequest) within a - # `batchGet` method must contain the same `samplingLevel` definition. See - # [developer guide](/analytics/devguides/reporting/core/v4/basics#sampling) - # for details. - # Corresponds to the JSON property `samplingLevel` - # @return [String] - attr_accessor :sampling_level - - # The dimensions requested. - # Requests can have a total of 7 dimensions. - # Corresponds to the JSON property `dimensions` - # @return [Array] - attr_accessor :dimensions - - # Date ranges in the request. The request can have a maximum of 2 date - # ranges. The response will contain a set of metric values for each - # combination of the dimensions for each date range in the request. So, if - # there are two date ranges, there will be two set of metric values, one for - # the original date range and one for the second date range. - # The `reportRequest.dateRanges` field should not be specified for cohorts - # or Lifetime value requests. - # If a date range is not provided, the default date range is (startDate: - # current date - 7 days, endDate: current date - 1 day). Every - # [ReportRequest](#ReportRequest) within a `batchGet` method must - # contain the same `dateRanges` definition. - # Corresponds to the JSON property `dateRanges` - # @return [Array] - attr_accessor :date_ranges - - # A continuation token to get the next page of the results. Adding this to - # the request will return the rows after the pageToken. The pageToken should - # be the value returned in the nextPageToken parameter in the response to - # the GetReports request. - # Corresponds to the JSON property `pageToken` - # @return [String] - attr_accessor :page_token - - # The pivot definitions. Requests can have a maximum of 2 pivots. - # Corresponds to the JSON property `pivots` - # @return [Array] - attr_accessor :pivots - - # If set to false, the response does not include rows if all the retrieved - # metrics are equal to zero. The default is false which will exclude these - # rows. - # Corresponds to the JSON property `includeEmptyRows` - # @return [Boolean] - attr_accessor :include_empty_rows - alias_method :include_empty_rows?, :include_empty_rows - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @metric_filter_clauses = args[:metric_filter_clauses] if args.key?(:metric_filter_clauses) - @page_size = args[:page_size] if args.key?(:page_size) - @hide_totals = args[:hide_totals] if args.key?(:hide_totals) - @hide_value_ranges = args[:hide_value_ranges] if args.key?(:hide_value_ranges) - @filters_expression = args[:filters_expression] if args.key?(:filters_expression) - @cohort_group = args[:cohort_group] if args.key?(:cohort_group) - @view_id = args[:view_id] if args.key?(:view_id) - @metrics = args[:metrics] if args.key?(:metrics) - @dimension_filter_clauses = args[:dimension_filter_clauses] if args.key?(:dimension_filter_clauses) - @order_bys = args[:order_bys] if args.key?(:order_bys) - @segments = args[:segments] if args.key?(:segments) - @sampling_level = args[:sampling_level] if args.key?(:sampling_level) - @dimensions = args[:dimensions] if args.key?(:dimensions) - @date_ranges = args[:date_ranges] if args.key?(:date_ranges) - @page_token = args[:page_token] if args.key?(:page_token) - @pivots = args[:pivots] if args.key?(:pivots) - @include_empty_rows = args[:include_empty_rows] if args.key?(:include_empty_rows) - end - end - - # [Dimensions](https://support.google.com/analytics/answer/1033861) - # are attributes of your data. For example, the dimension `ga:city` - # indicates the city, for example, "Paris" or "New York", from which - # a session originates. - class Dimension - include Google::Apis::Core::Hashable - - # If non-empty, we place dimension values into buckets after string to - # int64. Dimension values that are not the string representation of an - # integral value will be converted to zero. The bucket values have to be in - # increasing order. Each bucket is closed on the lower end, and open on the - # upper end. The "first" bucket includes all values less than the first - # boundary, the "last" bucket includes all values up to infinity. Dimension - # values that fall in a bucket get transformed to a new dimension value. For - # example, if one gives a list of "0, 1, 3, 4, 7", then we return the - # following buckets: - # - bucket #1: values < 0, dimension value "<0" - # - bucket #2: values in [0,1), dimension value "0" - # - bucket #3: values in [1,3), dimension value "1-2" - # - bucket #4: values in [3,4), dimension value "3" - # - bucket #5: values in [4,7), dimension value "4-6" - # - bucket #6: values >= 7, dimension value "7+" - # NOTE: If you are applying histogram mutation on any dimension, and using - # that dimension in sort, you will want to use the sort type - # `HISTOGRAM_BUCKET` for that purpose. Without that the dimension values - # will be sorted according to dictionary - # (lexicographic) order. For example the ascending dictionary order is: - # "<50", "1001+", "121-1000", "50-120" - # And the ascending `HISTOGRAM_BUCKET` order is: - # "<50", "50-120", "121-1000", "1001+" - # The client has to explicitly request `"orderType": "HISTOGRAM_BUCKET"` - # for a histogram-mutated dimension. - # Corresponds to the JSON property `histogramBuckets` - # @return [Array] - attr_accessor :histogram_buckets - - # Name of the dimension to fetch, for example `ga:browser`. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @histogram_buckets = args[:histogram_buckets] if args.key?(:histogram_buckets) - @name = args[:name] if args.key?(:name) - end - end - - # Dynamic segment definition for defining the segment within the request. - # A segment can select users, sessions or both. - class DynamicSegment - include Google::Apis::Core::Hashable - - # The name of the dynamic segment. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # SegmentDefinition defines the segment to be a set of SegmentFilters which - # are combined together with a logical `AND` operation. - # Corresponds to the JSON property `userSegment` - # @return [Google::Apis::AnalyticsreportingV4::SegmentDefinition] - attr_accessor :user_segment - - # SegmentDefinition defines the segment to be a set of SegmentFilters which - # are combined together with a logical `AND` operation. - # Corresponds to the JSON property `sessionSegment` - # @return [Google::Apis::AnalyticsreportingV4::SegmentDefinition] - attr_accessor :session_segment - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @name = args[:name] if args.key?(:name) - @user_segment = args[:user_segment] if args.key?(:user_segment) - @session_segment = args[:session_segment] if args.key?(:session_segment) - end - end - - # A Simple segment conditions consist of one or more dimension/metric - # conditions that can be combined. - class SimpleSegment - include Google::Apis::Core::Hashable - - # A list of segment filters groups which are combined with logical `AND` - # operator. - # Corresponds to the JSON property `orFiltersForSegment` - # @return [Array] - attr_accessor :or_filters_for_segment - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @or_filters_for_segment = args[:or_filters_for_segment] if args.key?(:or_filters_for_segment) - end - end - - # Column headers. - class ColumnHeader - include Google::Apis::Core::Hashable - - # The headers for the metrics. - # Corresponds to the JSON property `metricHeader` - # @return [Google::Apis::AnalyticsreportingV4::MetricHeader] - attr_accessor :metric_header - - # The dimension names in the response. - # Corresponds to the JSON property `dimensions` - # @return [Array] - attr_accessor :dimensions - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @metric_header = args[:metric_header] if args.key?(:metric_header) - @dimensions = args[:dimensions] if args.key?(:dimensions) - end - end - - # Filter Clause to be used in a segment definition, can be wither a metric or - # a dimension filter. - class SegmentFilterClause - include Google::Apis::Core::Hashable - - # Matches the complement (`!`) of the filter. - # Corresponds to the JSON property `not` - # @return [Boolean] - attr_accessor :not - alias_method :not?, :not - - # Dimension filter specifies the filtering options on a dimension. - # Corresponds to the JSON property `dimensionFilter` - # @return [Google::Apis::AnalyticsreportingV4::SegmentDimensionFilter] - attr_accessor :dimension_filter - - # Metric filter to be used in a segment filter clause. - # Corresponds to the JSON property `metricFilter` - # @return [Google::Apis::AnalyticsreportingV4::SegmentMetricFilter] - attr_accessor :metric_filter - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @not = args[:not] if args.key?(:not) - @dimension_filter = args[:dimension_filter] if args.key?(:dimension_filter) - @metric_filter = args[:metric_filter] if args.key?(:metric_filter) - end - end - - # Defines a cohort. A cohort is a group of users who share a common - # characteristic. For example, all users with the same acquisition date - # belong to the same cohort. - class Cohort - include Google::Apis::Core::Hashable - - # A unique name for the cohort. If not defined name will be auto-generated - # with values cohort_[1234...]. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # A contiguous set of days: startDate, startDate + 1 day, ..., endDate. - # The start and end dates are specified in - # [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) date format `YYYY-MM-DD`. - # Corresponds to the JSON property `dateRange` - # @return [Google::Apis::AnalyticsreportingV4::DateRange] - attr_accessor :date_range - - # Type of the cohort. The only supported type as of now is - # `FIRST_VISIT_DATE`. If this field is unspecified the cohort is treated - # as `FIRST_VISIT_DATE` type cohort. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @name = args[:name] if args.key?(:name) - @date_range = args[:date_range] if args.key?(:date_range) - @type = args[:type] if args.key?(:type) - end - end - - # Represents a group of metric filters. - # Set the operator value to specify how the filters are logically combined. - class MetricFilterClause - include Google::Apis::Core::Hashable - - # The operator for combining multiple metric filters. If unspecified, it is - # treated as an `OR`. - # Corresponds to the JSON property `operator` - # @return [String] - attr_accessor :operator - - # The repeated set of filters. They are logically combined based on the - # operator specified. - # Corresponds to the JSON property `filters` - # @return [Array] - attr_accessor :filters - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @operator = args[:operator] if args.key?(:operator) - @filters = args[:filters] if args.key?(:filters) - end - end - - # A row in the report. - class ReportRow - include Google::Apis::Core::Hashable - - # List of metrics for each requested DateRange. - # Corresponds to the JSON property `metrics` - # @return [Array] - attr_accessor :metrics - - # List of requested dimensions. - # Corresponds to the JSON property `dimensions` - # @return [Array] - attr_accessor :dimensions - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @metrics = args[:metrics] if args.key?(:metrics) - @dimensions = args[:dimensions] if args.key?(:dimensions) - end - end - - # A list of segment filters in the `OR` group are combined with the logical OR - # operator. - class OrFiltersForSegment - include Google::Apis::Core::Hashable - - # List of segment filters to be combined with a `OR` operator. - # Corresponds to the JSON property `segmentFilterClauses` - # @return [Array] - attr_accessor :segment_filter_clauses - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @segment_filter_clauses = args[:segment_filter_clauses] if args.key?(:segment_filter_clauses) - end - end - - # The headers for the metrics. - class MetricHeader - include Google::Apis::Core::Hashable - - # Headers for the pivots in the response. - # Corresponds to the JSON property `pivotHeaders` - # @return [Array] - attr_accessor :pivot_headers - - # Headers for the metrics in the response. - # Corresponds to the JSON property `metricHeaderEntries` - # @return [Array] - attr_accessor :metric_header_entries - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @pivot_headers = args[:pivot_headers] if args.key?(:pivot_headers) - @metric_header_entries = args[:metric_header_entries] if args.key?(:metric_header_entries) - end - end - # A group of dimension filters. Set the operator value to specify how # the filters are logically combined. class DimensionFilterClause @@ -1162,14 +103,6 @@ module Google class SegmentMetricFilter include Google::Apis::Core::Hashable - # Scope for a metric defines the level at which that metric is defined. The - # specified metric scope must be equal to or greater than its primary scope - # as defined in the data model. The primary scope is defined by if the - # segment is selecting users or sessions. - # Corresponds to the JSON property `scope` - # @return [String] - attr_accessor :scope - # Max comparison value is only used for `BETWEEN` operator. # Corresponds to the JSON property `maxComparisonValue` # @return [String] @@ -1193,17 +126,25 @@ module Google # @return [String] attr_accessor :metric_name + # Scope for a metric defines the level at which that metric is defined. The + # specified metric scope must be equal to or greater than its primary scope + # as defined in the data model. The primary scope is defined by if the + # segment is selecting users or sessions. + # Corresponds to the JSON property `scope` + # @return [String] + attr_accessor :scope + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @scope = args[:scope] if args.key?(:scope) @max_comparison_value = args[:max_comparison_value] if args.key?(:max_comparison_value) @comparison_value = args[:comparison_value] if args.key?(:comparison_value) @operator = args[:operator] if args.key?(:operator) @metric_name = args[:metric_name] if args.key?(:metric_name) + @scope = args[:scope] if args.key?(:scope) end end @@ -1212,24 +153,24 @@ module Google class DateRangeValues include Google::Apis::Core::Hashable - # The values of each pivot region. - # Corresponds to the JSON property `pivotValueRegions` - # @return [Array] - attr_accessor :pivot_value_regions - # Each value corresponds to each Metric in the request. # Corresponds to the JSON property `values` # @return [Array] attr_accessor :values + # The values of each pivot region. + # Corresponds to the JSON property `pivotValueRegions` + # @return [Array] + attr_accessor :pivot_value_regions + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @pivot_value_regions = args[:pivot_value_regions] if args.key?(:pivot_value_regions) @values = args[:values] if args.key?(:values) + @pivot_value_regions = args[:pivot_value_regions] if args.key?(:pivot_value_regions) end end @@ -1389,6 +330,11 @@ module Google class PivotHeaderEntry include Google::Apis::Core::Hashable + # The values for the dimensions in the pivot. + # Corresponds to the JSON property `dimensionValues` + # @return [Array] + attr_accessor :dimension_values + # The name of the dimensions in the pivot response. # Corresponds to the JSON property `dimensionNames` # @return [Array] @@ -1399,10 +345,60 @@ module Google # @return [Google::Apis::AnalyticsreportingV4::MetricHeaderEntry] attr_accessor :metric - # The values for the dimensions in the pivot. - # Corresponds to the JSON property `dimensionValues` - # @return [Array] - attr_accessor :dimension_values + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @dimension_values = args[:dimension_values] if args.key?(:dimension_values) + @dimension_names = args[:dimension_names] if args.key?(:dimension_names) + @metric = args[:metric] if args.key?(:metric) + end + end + + # SegmentFilter defines the segment to be either a simple or a sequence + # segment. A simple segment condition contains dimension and metric conditions + # to select the sessions or users. A sequence segment condition can be used to + # select users or sessions based on sequential conditions. + class SegmentFilter + include Google::Apis::Core::Hashable + + # Sequence conditions consist of one or more steps, where each step is defined + # by one or more dimension/metric conditions. Multiple steps can be combined + # with special sequence operators. + # Corresponds to the JSON property `sequenceSegment` + # @return [Google::Apis::AnalyticsreportingV4::SequenceSegment] + attr_accessor :sequence_segment + + # If true, match the complement of simple or sequence segment. + # For example, to match all visits not from "New York", we can define the + # segment as follows: + # "sessionSegment": ` + # "segmentFilters": [` + # "simpleSegment" :` + # "orFiltersForSegment": [` + # "segmentFilterClauses":[` + # "dimensionFilter": ` + # "dimensionName": "ga:city", + # "expressions": ["New York"] + # ` + # `] + # `] + # `, + # "not": "True" + # `] + # `, + # Corresponds to the JSON property `not` + # @return [Boolean] + attr_accessor :not + alias_method :not?, :not + + # A Simple segment conditions consist of one or more dimension/metric + # conditions that can be combined. + # Corresponds to the JSON property `simpleSegment` + # @return [Google::Apis::AnalyticsreportingV4::SimpleSegment] + attr_accessor :simple_segment def initialize(**args) update!(**args) @@ -1410,9 +406,1013 @@ module Google # Update properties of this object def update!(**args) - @dimension_names = args[:dimension_names] if args.key?(:dimension_names) - @metric = args[:metric] if args.key?(:metric) - @dimension_values = args[:dimension_values] if args.key?(:dimension_values) + @sequence_segment = args[:sequence_segment] if args.key?(:sequence_segment) + @not = args[:not] if args.key?(:not) + @simple_segment = args[:simple_segment] if args.key?(:simple_segment) + end + end + + # SegmentDefinition defines the segment to be a set of SegmentFilters which + # are combined together with a logical `AND` operation. + class SegmentDefinition + include Google::Apis::Core::Hashable + + # A segment is defined by a set of segment filters which are combined + # together with a logical `AND` operation. + # Corresponds to the JSON property `segmentFilters` + # @return [Array] + attr_accessor :segment_filters + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @segment_filters = args[:segment_filters] if args.key?(:segment_filters) + end + end + + # Header for the metrics. + class MetricHeaderEntry + include Google::Apis::Core::Hashable + + # The type of the metric, for example `INTEGER`. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # The name of the header. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @type = args[:type] if args.key?(:type) + @name = args[:name] if args.key?(:name) + end + end + + # The data part of the report. + class ReportData + include Google::Apis::Core::Hashable + + # For each requested date range, for the set of all rows that match + # the query, every requested value format gets a total. The total + # for a value format is computed by first totaling the metrics + # mentioned in the value format and then evaluating the value + # format as a scalar expression. E.g., The "totals" for + # `3 / (ga:sessions + 2)` we compute + # `3 / ((sum of all relevant ga:sessions) + 2)`. + # Totals are computed before pagination. + # Corresponds to the JSON property `totals` + # @return [Array] + attr_accessor :totals + + # If the results are + # [sampled](https://support.google.com/analytics/answer/2637192), + # this returns the total number of samples read, one entry per date range. + # If the results are not sampled this field will not be defined. See + # [developer guide](/analytics/devguides/reporting/core/v4/basics#sampling) + # for details. + # Corresponds to the JSON property `samplesReadCounts` + # @return [Array] + attr_accessor :samples_read_counts + + # Total number of matching rows for this query. + # Corresponds to the JSON property `rowCount` + # @return [Fixnum] + attr_accessor :row_count + + # There's one ReportRow for every unique combination of dimensions. + # Corresponds to the JSON property `rows` + # @return [Array] + attr_accessor :rows + + # Indicates if response to this request is golden or not. Data is + # golden when the exact same request will not produce any new results if + # asked at a later point in time. + # Corresponds to the JSON property `isDataGolden` + # @return [Boolean] + attr_accessor :is_data_golden + alias_method :is_data_golden?, :is_data_golden + + # The last time the data in the report was refreshed. All the hits received + # before this timestamp are included in the calculation of the report. + # Corresponds to the JSON property `dataLastRefreshed` + # @return [String] + attr_accessor :data_last_refreshed + + # Minimum and maximum values seen over all matching rows. These are both + # empty when `hideValueRanges` in the request is false, or when + # rowCount is zero. + # Corresponds to the JSON property `maximums` + # @return [Array] + attr_accessor :maximums + + # If the results are + # [sampled](https://support.google.com/analytics/answer/2637192), + # this returns the total number of + # samples present, one entry per date range. If the results are not sampled + # this field will not be defined. See + # [developer guide](/analytics/devguides/reporting/core/v4/basics#sampling) + # for details. + # Corresponds to the JSON property `samplingSpaceSizes` + # @return [Array] + attr_accessor :sampling_space_sizes + + # Minimum and maximum values seen over all matching rows. These are both + # empty when `hideValueRanges` in the request is false, or when + # rowCount is zero. + # Corresponds to the JSON property `minimums` + # @return [Array] + attr_accessor :minimums + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @totals = args[:totals] if args.key?(:totals) + @samples_read_counts = args[:samples_read_counts] if args.key?(:samples_read_counts) + @row_count = args[:row_count] if args.key?(:row_count) + @rows = args[:rows] if args.key?(:rows) + @is_data_golden = args[:is_data_golden] if args.key?(:is_data_golden) + @data_last_refreshed = args[:data_last_refreshed] if args.key?(:data_last_refreshed) + @maximums = args[:maximums] if args.key?(:maximums) + @sampling_space_sizes = args[:sampling_space_sizes] if args.key?(:sampling_space_sizes) + @minimums = args[:minimums] if args.key?(:minimums) + end + end + + # Dimension filter specifies the filtering options on a dimension. + class DimensionFilter + include Google::Apis::Core::Hashable + + # The dimension to filter on. A DimensionFilter must contain a dimension. + # Corresponds to the JSON property `dimensionName` + # @return [String] + attr_accessor :dimension_name + + # How to match the dimension to the expression. The default is REGEXP. + # Corresponds to the JSON property `operator` + # @return [String] + attr_accessor :operator + + # Logical `NOT` operator. If this boolean is set to true, then the matching + # dimension values will be excluded in the report. The default is false. + # Corresponds to the JSON property `not` + # @return [Boolean] + attr_accessor :not + alias_method :not?, :not + + # Strings or regular expression to match against. Only the first value of + # the list is used for comparison unless the operator is `IN_LIST`. + # If `IN_LIST` operator, then the entire list is used to filter the + # dimensions as explained in the description of the `IN_LIST` operator. + # Corresponds to the JSON property `expressions` + # @return [Array] + attr_accessor :expressions + + # Should the match be case sensitive? Default is false. + # Corresponds to the JSON property `caseSensitive` + # @return [Boolean] + attr_accessor :case_sensitive + alias_method :case_sensitive?, :case_sensitive + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @dimension_name = args[:dimension_name] if args.key?(:dimension_name) + @operator = args[:operator] if args.key?(:operator) + @not = args[:not] if args.key?(:not) + @expressions = args[:expressions] if args.key?(:expressions) + @case_sensitive = args[:case_sensitive] if args.key?(:case_sensitive) + end + end + + # Dimension filter specifies the filtering options on a dimension. + class SegmentDimensionFilter + include Google::Apis::Core::Hashable + + # Minimum comparison values for `BETWEEN` match type. + # Corresponds to the JSON property `minComparisonValue` + # @return [String] + attr_accessor :min_comparison_value + + # Maximum comparison values for `BETWEEN` match type. + # Corresponds to the JSON property `maxComparisonValue` + # @return [String] + attr_accessor :max_comparison_value + + # Name of the dimension for which the filter is being applied. + # Corresponds to the JSON property `dimensionName` + # @return [String] + attr_accessor :dimension_name + + # The operator to use to match the dimension with the expressions. + # Corresponds to the JSON property `operator` + # @return [String] + attr_accessor :operator + + # The list of expressions, only the first element is used for all operators + # Corresponds to the JSON property `expressions` + # @return [Array] + attr_accessor :expressions + + # Should the match be case sensitive, ignored for `IN_LIST` operator. + # Corresponds to the JSON property `caseSensitive` + # @return [Boolean] + attr_accessor :case_sensitive + alias_method :case_sensitive?, :case_sensitive + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @min_comparison_value = args[:min_comparison_value] if args.key?(:min_comparison_value) + @max_comparison_value = args[:max_comparison_value] if args.key?(:max_comparison_value) + @dimension_name = args[:dimension_name] if args.key?(:dimension_name) + @operator = args[:operator] if args.key?(:operator) + @expressions = args[:expressions] if args.key?(:expressions) + @case_sensitive = args[:case_sensitive] if args.key?(:case_sensitive) + end + end + + # Specifies the sorting options. + class OrderBy + include Google::Apis::Core::Hashable + + # The sorting order for the field. + # Corresponds to the JSON property `sortOrder` + # @return [String] + attr_accessor :sort_order + + # The field which to sort by. The default sort order is ascending. Example: + # `ga:browser`. + # Note, that you can only specify one field for sort here. For example, + # `ga:browser, ga:city` is not valid. + # Corresponds to the JSON property `fieldName` + # @return [String] + attr_accessor :field_name + + # The order type. The default orderType is `VALUE`. + # Corresponds to the JSON property `orderType` + # @return [String] + attr_accessor :order_type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @sort_order = args[:sort_order] if args.key?(:sort_order) + @field_name = args[:field_name] if args.key?(:field_name) + @order_type = args[:order_type] if args.key?(:order_type) + end + end + + # The segment definition, if the report needs to be segmented. + # A Segment is a subset of the Analytics data. For example, of the entire + # set of users, one Segment might be users from a particular country or city. + class Segment + include Google::Apis::Core::Hashable + + # Dynamic segment definition for defining the segment within the request. + # A segment can select users, sessions or both. + # Corresponds to the JSON property `dynamicSegment` + # @return [Google::Apis::AnalyticsreportingV4::DynamicSegment] + attr_accessor :dynamic_segment + + # The segment ID of a built-in or custom segment, for example `gaid::-3`. + # Corresponds to the JSON property `segmentId` + # @return [String] + attr_accessor :segment_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @dynamic_segment = args[:dynamic_segment] if args.key?(:dynamic_segment) + @segment_id = args[:segment_id] if args.key?(:segment_id) + end + end + + # A segment sequence definition. + class SegmentSequenceStep + include Google::Apis::Core::Hashable + + # A sequence is specified with a list of Or grouped filters which are + # combined with `AND` operator. + # Corresponds to the JSON property `orFiltersForSegment` + # @return [Array] + attr_accessor :or_filters_for_segment + + # Specifies if the step immediately precedes or can be any time before the + # next step. + # Corresponds to the JSON property `matchType` + # @return [String] + attr_accessor :match_type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @or_filters_for_segment = args[:or_filters_for_segment] if args.key?(:or_filters_for_segment) + @match_type = args[:match_type] if args.key?(:match_type) + end + end + + # [Metrics](https://support.google.com/analytics/answer/1033861) + # are the quantitative measurements. For example, the metric `ga:users` + # indicates the total number of users for the requested time period. + class Metric + include Google::Apis::Core::Hashable + + # A metric expression in the request. An expression is constructed from one + # or more metrics and numbers. Accepted operators include: Plus (+), Minus + # (-), Negation (Unary -), Divided by (/), Multiplied by (*), Parenthesis, + # Positive cardinal numbers (0-9), can include decimals and is limited to + # 1024 characters. Example `ga:totalRefunds/ga:users`, in most cases the + # metric expression is just a single metric name like `ga:users`. + # Adding mixed `MetricType` (E.g., `CURRENCY` + `PERCENTAGE`) metrics + # will result in unexpected results. + # Corresponds to the JSON property `expression` + # @return [String] + attr_accessor :expression + + # Specifies how the metric expression should be formatted, for example + # `INTEGER`. + # Corresponds to the JSON property `formattingType` + # @return [String] + attr_accessor :formatting_type + + # An alias for the metric expression is an alternate name for the + # expression. The alias can be used for filtering and sorting. This field + # is optional and is useful if the expression is not a single metric but + # a complex expression which cannot be used in filtering and sorting. + # The alias is also used in the response column header. + # Corresponds to the JSON property `alias` + # @return [String] + attr_accessor :alias + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @expression = args[:expression] if args.key?(:expression) + @formatting_type = args[:formatting_type] if args.key?(:formatting_type) + @alias = args[:alias] if args.key?(:alias) + end + end + + # The metric values in the pivot region. + class PivotValueRegion + include Google::Apis::Core::Hashable + + # The values of the metrics in each of the pivot regions. + # Corresponds to the JSON property `values` + # @return [Array] + attr_accessor :values + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @values = args[:values] if args.key?(:values) + end + end + + # The data response corresponding to the request. + class Report + include Google::Apis::Core::Hashable + + # Column headers. + # Corresponds to the JSON property `columnHeader` + # @return [Google::Apis::AnalyticsreportingV4::ColumnHeader] + attr_accessor :column_header + + # The data part of the report. + # Corresponds to the JSON property `data` + # @return [Google::Apis::AnalyticsreportingV4::ReportData] + attr_accessor :data + + # Page token to retrieve the next page of results in the list. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @column_header = args[:column_header] if args.key?(:column_header) + @data = args[:data] if args.key?(:data) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # The headers for each of the pivot sections defined in the request. + class PivotHeader + include Google::Apis::Core::Hashable + + # A single pivot section header. + # Corresponds to the JSON property `pivotHeaderEntries` + # @return [Array] + attr_accessor :pivot_header_entries + + # The total number of groups for this pivot. + # Corresponds to the JSON property `totalPivotGroupsCount` + # @return [Fixnum] + attr_accessor :total_pivot_groups_count + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @pivot_header_entries = args[:pivot_header_entries] if args.key?(:pivot_header_entries) + @total_pivot_groups_count = args[:total_pivot_groups_count] if args.key?(:total_pivot_groups_count) + end + end + + # A contiguous set of days: startDate, startDate + 1 day, ..., endDate. + # The start and end dates are specified in + # [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) date format `YYYY-MM-DD`. + class DateRange + include Google::Apis::Core::Hashable + + # The end date for the query in the format `YYYY-MM-DD`. + # Corresponds to the JSON property `endDate` + # @return [String] + attr_accessor :end_date + + # The start date for the query in the format `YYYY-MM-DD`. + # Corresponds to the JSON property `startDate` + # @return [String] + attr_accessor :start_date + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @end_date = args[:end_date] if args.key?(:end_date) + @start_date = args[:start_date] if args.key?(:start_date) + end + end + + # MetricFilter specifies the filter on a metric. + class MetricFilter + include Google::Apis::Core::Hashable + + # The metric that will be filtered on. A metricFilter must contain a metric + # name. A metric name can be an alias earlier defined as a metric or it can + # also be a metric expression. + # Corresponds to the JSON property `metricName` + # @return [String] + attr_accessor :metric_name + + # The value to compare against. + # Corresponds to the JSON property `comparisonValue` + # @return [String] + attr_accessor :comparison_value + + # Is the metric `EQUAL`, `LESS_THAN` or `GREATER_THAN` the + # comparisonValue, the default is `EQUAL`. If the operator is + # `IS_MISSING`, checks if the metric is missing and would ignore the + # comparisonValue. + # Corresponds to the JSON property `operator` + # @return [String] + attr_accessor :operator + + # Logical `NOT` operator. If this boolean is set to true, then the matching + # metric values will be excluded in the report. The default is false. + # Corresponds to the JSON property `not` + # @return [Boolean] + attr_accessor :not + alias_method :not?, :not + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @metric_name = args[:metric_name] if args.key?(:metric_name) + @comparison_value = args[:comparison_value] if args.key?(:comparison_value) + @operator = args[:operator] if args.key?(:operator) + @not = args[:not] if args.key?(:not) + end + end + + # The main request class which specifies the Reporting API request. + class ReportRequest + include Google::Apis::Core::Hashable + + # Page size is for paging and specifies the maximum number of returned rows. + # Page size should be >= 0. A query returns the default of 1,000 rows. + # The Analytics Core Reporting API returns a maximum of 10,000 rows per + # request, no matter how many you ask for. It can also return fewer rows + # than requested, if there aren't as many dimension segments as you expect. + # For instance, there are fewer than 300 possible values for `ga:country`, + # so when segmenting only by country, you can't get more than 300 rows, + # even if you set `pageSize` to a higher value. + # Corresponds to the JSON property `pageSize` + # @return [Fixnum] + attr_accessor :page_size + + # If set to true, hides the total of all metrics for all the matching rows, + # for every date range. The default false and will return the totals. + # Corresponds to the JSON property `hideTotals` + # @return [Boolean] + attr_accessor :hide_totals + alias_method :hide_totals?, :hide_totals + + # If set to true, hides the minimum and maximum across all matching rows. + # The default is false and the value ranges are returned. + # Corresponds to the JSON property `hideValueRanges` + # @return [Boolean] + attr_accessor :hide_value_ranges + alias_method :hide_value_ranges?, :hide_value_ranges + + # Defines a cohort group. + # For example: + # "cohortGroup": ` + # "cohorts": [` + # "name": "cohort 1", + # "type": "FIRST_VISIT_DATE", + # "dateRange": ` "startDate": "2015-08-01", "endDate": "2015-08-01" ` + # `,` + # "name": "cohort 2" + # "type": "FIRST_VISIT_DATE" + # "dateRange": ` "startDate": "2015-07-01", "endDate": "2015-07-01" ` + # `] + # ` + # Corresponds to the JSON property `cohortGroup` + # @return [Google::Apis::AnalyticsreportingV4::CohortGroup] + attr_accessor :cohort_group + + # Dimension or metric filters that restrict the data returned for your + # request. To use the `filtersExpression`, supply a dimension or metric on + # which to filter, followed by the filter expression. For example, the + # following expression selects `ga:browser` dimension which starts with + # Firefox; `ga:browser=~^Firefox`. For more information on dimensions + # and metric filters, see + # [Filters reference](https://developers.google.com/analytics/devguides/ + # reporting/core/v3/reference#filters). + # Corresponds to the JSON property `filtersExpression` + # @return [String] + attr_accessor :filters_expression + + # The Analytics + # [view ID](https://support.google.com/analytics/answer/1009618) + # from which to retrieve data. Every [ReportRequest](#ReportRequest) + # within a `batchGet` method must contain the same `viewId`. + # Corresponds to the JSON property `viewId` + # @return [String] + attr_accessor :view_id + + # The metrics requested. + # Requests must specify at least one metric. Requests can have a + # total of 10 metrics. + # Corresponds to the JSON property `metrics` + # @return [Array] + attr_accessor :metrics + + # The dimension filter clauses for filtering Dimension Values. They are + # logically combined with the `AND` operator. Note that filtering occurs + # before any dimensions are aggregated, so that the returned metrics + # represent the total for only the relevant dimensions. + # Corresponds to the JSON property `dimensionFilterClauses` + # @return [Array] + attr_accessor :dimension_filter_clauses + + # Sort order on output rows. To compare two rows, the elements of the + # following are applied in order until a difference is found. All date + # ranges in the output get the same row order. + # Corresponds to the JSON property `orderBys` + # @return [Array] + attr_accessor :order_bys + + # Segment the data returned for the request. A segment definition helps look + # at a subset of the segment request. A request can contain up to four + # segments. Every [ReportRequest](#ReportRequest) within a + # `batchGet` method must contain the same `segments` definition. Requests + # with segments must have the `ga:segment` dimension. + # Corresponds to the JSON property `segments` + # @return [Array] + attr_accessor :segments + + # The desired report + # [sample](https://support.google.com/analytics/answer/2637192) size. + # If the the `samplingLevel` field is unspecified the `DEFAULT` sampling + # level is used. Every [ReportRequest](#ReportRequest) within a + # `batchGet` method must contain the same `samplingLevel` definition. See + # [developer guide](/analytics/devguides/reporting/core/v4/basics#sampling) + # for details. + # Corresponds to the JSON property `samplingLevel` + # @return [String] + attr_accessor :sampling_level + + # The dimensions requested. + # Requests can have a total of 7 dimensions. + # Corresponds to the JSON property `dimensions` + # @return [Array] + attr_accessor :dimensions + + # Date ranges in the request. The request can have a maximum of 2 date + # ranges. The response will contain a set of metric values for each + # combination of the dimensions for each date range in the request. So, if + # there are two date ranges, there will be two set of metric values, one for + # the original date range and one for the second date range. + # The `reportRequest.dateRanges` field should not be specified for cohorts + # or Lifetime value requests. + # If a date range is not provided, the default date range is (startDate: + # current date - 7 days, endDate: current date - 1 day). Every + # [ReportRequest](#ReportRequest) within a `batchGet` method must + # contain the same `dateRanges` definition. + # Corresponds to the JSON property `dateRanges` + # @return [Array] + attr_accessor :date_ranges + + # A continuation token to get the next page of the results. Adding this to + # the request will return the rows after the pageToken. The pageToken should + # be the value returned in the nextPageToken parameter in the response to + # the GetReports request. + # Corresponds to the JSON property `pageToken` + # @return [String] + attr_accessor :page_token + + # The pivot definitions. Requests can have a maximum of 2 pivots. + # Corresponds to the JSON property `pivots` + # @return [Array] + attr_accessor :pivots + + # If set to false, the response does not include rows if all the retrieved + # metrics are equal to zero. The default is false which will exclude these + # rows. + # Corresponds to the JSON property `includeEmptyRows` + # @return [Boolean] + attr_accessor :include_empty_rows + alias_method :include_empty_rows?, :include_empty_rows + + # The metric filter clauses. They are logically combined with the `AND` + # operator. Metric filters look at only the first date range and not the + # comparing date range. Note that filtering on metrics occurs after the + # metrics are aggregated. + # Corresponds to the JSON property `metricFilterClauses` + # @return [Array] + attr_accessor :metric_filter_clauses + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @page_size = args[:page_size] if args.key?(:page_size) + @hide_totals = args[:hide_totals] if args.key?(:hide_totals) + @hide_value_ranges = args[:hide_value_ranges] if args.key?(:hide_value_ranges) + @cohort_group = args[:cohort_group] if args.key?(:cohort_group) + @filters_expression = args[:filters_expression] if args.key?(:filters_expression) + @view_id = args[:view_id] if args.key?(:view_id) + @metrics = args[:metrics] if args.key?(:metrics) + @dimension_filter_clauses = args[:dimension_filter_clauses] if args.key?(:dimension_filter_clauses) + @order_bys = args[:order_bys] if args.key?(:order_bys) + @segments = args[:segments] if args.key?(:segments) + @sampling_level = args[:sampling_level] if args.key?(:sampling_level) + @dimensions = args[:dimensions] if args.key?(:dimensions) + @date_ranges = args[:date_ranges] if args.key?(:date_ranges) + @page_token = args[:page_token] if args.key?(:page_token) + @pivots = args[:pivots] if args.key?(:pivots) + @include_empty_rows = args[:include_empty_rows] if args.key?(:include_empty_rows) + @metric_filter_clauses = args[:metric_filter_clauses] if args.key?(:metric_filter_clauses) + end + end + + # [Dimensions](https://support.google.com/analytics/answer/1033861) + # are attributes of your data. For example, the dimension `ga:city` + # indicates the city, for example, "Paris" or "New York", from which + # a session originates. + class Dimension + include Google::Apis::Core::Hashable + + # If non-empty, we place dimension values into buckets after string to + # int64. Dimension values that are not the string representation of an + # integral value will be converted to zero. The bucket values have to be in + # increasing order. Each bucket is closed on the lower end, and open on the + # upper end. The "first" bucket includes all values less than the first + # boundary, the "last" bucket includes all values up to infinity. Dimension + # values that fall in a bucket get transformed to a new dimension value. For + # example, if one gives a list of "0, 1, 3, 4, 7", then we return the + # following buckets: + # - bucket #1: values < 0, dimension value "<0" + # - bucket #2: values in [0,1), dimension value "0" + # - bucket #3: values in [1,3), dimension value "1-2" + # - bucket #4: values in [3,4), dimension value "3" + # - bucket #5: values in [4,7), dimension value "4-6" + # - bucket #6: values >= 7, dimension value "7+" + # NOTE: If you are applying histogram mutation on any dimension, and using + # that dimension in sort, you will want to use the sort type + # `HISTOGRAM_BUCKET` for that purpose. Without that the dimension values + # will be sorted according to dictionary + # (lexicographic) order. For example the ascending dictionary order is: + # "<50", "1001+", "121-1000", "50-120" + # And the ascending `HISTOGRAM_BUCKET` order is: + # "<50", "50-120", "121-1000", "1001+" + # The client has to explicitly request `"orderType": "HISTOGRAM_BUCKET"` + # for a histogram-mutated dimension. + # Corresponds to the JSON property `histogramBuckets` + # @return [Array] + attr_accessor :histogram_buckets + + # Name of the dimension to fetch, for example `ga:browser`. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @histogram_buckets = args[:histogram_buckets] if args.key?(:histogram_buckets) + @name = args[:name] if args.key?(:name) + end + end + + # A Simple segment conditions consist of one or more dimension/metric + # conditions that can be combined. + class SimpleSegment + include Google::Apis::Core::Hashable + + # A list of segment filters groups which are combined with logical `AND` + # operator. + # Corresponds to the JSON property `orFiltersForSegment` + # @return [Array] + attr_accessor :or_filters_for_segment + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @or_filters_for_segment = args[:or_filters_for_segment] if args.key?(:or_filters_for_segment) + end + end + + # Dynamic segment definition for defining the segment within the request. + # A segment can select users, sessions or both. + class DynamicSegment + include Google::Apis::Core::Hashable + + # SegmentDefinition defines the segment to be a set of SegmentFilters which + # are combined together with a logical `AND` operation. + # Corresponds to the JSON property `sessionSegment` + # @return [Google::Apis::AnalyticsreportingV4::SegmentDefinition] + attr_accessor :session_segment + + # The name of the dynamic segment. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # SegmentDefinition defines the segment to be a set of SegmentFilters which + # are combined together with a logical `AND` operation. + # Corresponds to the JSON property `userSegment` + # @return [Google::Apis::AnalyticsreportingV4::SegmentDefinition] + attr_accessor :user_segment + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @session_segment = args[:session_segment] if args.key?(:session_segment) + @name = args[:name] if args.key?(:name) + @user_segment = args[:user_segment] if args.key?(:user_segment) + end + end + + # Column headers. + class ColumnHeader + include Google::Apis::Core::Hashable + + # The dimension names in the response. + # Corresponds to the JSON property `dimensions` + # @return [Array] + attr_accessor :dimensions + + # The headers for the metrics. + # Corresponds to the JSON property `metricHeader` + # @return [Google::Apis::AnalyticsreportingV4::MetricHeader] + attr_accessor :metric_header + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @dimensions = args[:dimensions] if args.key?(:dimensions) + @metric_header = args[:metric_header] if args.key?(:metric_header) + end + end + + # Filter Clause to be used in a segment definition, can be wither a metric or + # a dimension filter. + class SegmentFilterClause + include Google::Apis::Core::Hashable + + # Metric filter to be used in a segment filter clause. + # Corresponds to the JSON property `metricFilter` + # @return [Google::Apis::AnalyticsreportingV4::SegmentMetricFilter] + attr_accessor :metric_filter + + # Matches the complement (`!`) of the filter. + # Corresponds to the JSON property `not` + # @return [Boolean] + attr_accessor :not + alias_method :not?, :not + + # Dimension filter specifies the filtering options on a dimension. + # Corresponds to the JSON property `dimensionFilter` + # @return [Google::Apis::AnalyticsreportingV4::SegmentDimensionFilter] + attr_accessor :dimension_filter + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @metric_filter = args[:metric_filter] if args.key?(:metric_filter) + @not = args[:not] if args.key?(:not) + @dimension_filter = args[:dimension_filter] if args.key?(:dimension_filter) + end + end + + # Represents a group of metric filters. + # Set the operator value to specify how the filters are logically combined. + class MetricFilterClause + include Google::Apis::Core::Hashable + + # The operator for combining multiple metric filters. If unspecified, it is + # treated as an `OR`. + # Corresponds to the JSON property `operator` + # @return [String] + attr_accessor :operator + + # The repeated set of filters. They are logically combined based on the + # operator specified. + # Corresponds to the JSON property `filters` + # @return [Array] + attr_accessor :filters + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @operator = args[:operator] if args.key?(:operator) + @filters = args[:filters] if args.key?(:filters) + end + end + + # Defines a cohort. A cohort is a group of users who share a common + # characteristic. For example, all users with the same acquisition date + # belong to the same cohort. + class Cohort + include Google::Apis::Core::Hashable + + # A unique name for the cohort. If not defined name will be auto-generated + # with values cohort_[1234...]. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # A contiguous set of days: startDate, startDate + 1 day, ..., endDate. + # The start and end dates are specified in + # [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) date format `YYYY-MM-DD`. + # Corresponds to the JSON property `dateRange` + # @return [Google::Apis::AnalyticsreportingV4::DateRange] + attr_accessor :date_range + + # Type of the cohort. The only supported type as of now is + # `FIRST_VISIT_DATE`. If this field is unspecified the cohort is treated + # as `FIRST_VISIT_DATE` type cohort. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @name = args[:name] if args.key?(:name) + @date_range = args[:date_range] if args.key?(:date_range) + @type = args[:type] if args.key?(:type) + end + end + + # A row in the report. + class ReportRow + include Google::Apis::Core::Hashable + + # List of metrics for each requested DateRange. + # Corresponds to the JSON property `metrics` + # @return [Array] + attr_accessor :metrics + + # List of requested dimensions. + # Corresponds to the JSON property `dimensions` + # @return [Array] + attr_accessor :dimensions + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @metrics = args[:metrics] if args.key?(:metrics) + @dimensions = args[:dimensions] if args.key?(:dimensions) + end + end + + # A list of segment filters in the `OR` group are combined with the logical OR + # operator. + class OrFiltersForSegment + include Google::Apis::Core::Hashable + + # List of segment filters to be combined with a `OR` operator. + # Corresponds to the JSON property `segmentFilterClauses` + # @return [Array] + attr_accessor :segment_filter_clauses + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @segment_filter_clauses = args[:segment_filter_clauses] if args.key?(:segment_filter_clauses) + end + end + + # The headers for the metrics. + class MetricHeader + include Google::Apis::Core::Hashable + + # Headers for the pivots in the response. + # Corresponds to the JSON property `pivotHeaders` + # @return [Array] + attr_accessor :pivot_headers + + # Headers for the metrics in the response. + # Corresponds to the JSON property `metricHeaderEntries` + # @return [Array] + attr_accessor :metric_header_entries + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @pivot_headers = args[:pivot_headers] if args.key?(:pivot_headers) + @metric_header_entries = args[:metric_header_entries] if args.key?(:metric_header_entries) end end end diff --git a/generated/google/apis/analyticsreporting_v4/representations.rb b/generated/google/apis/analyticsreporting_v4/representations.rb index c5c9a985c..f3082b3c4 100644 --- a/generated/google/apis/analyticsreporting_v4/representations.rb +++ b/generated/google/apis/analyticsreporting_v4/representations.rb @@ -22,162 +22,6 @@ module Google module Apis module AnalyticsreportingV4 - class SegmentFilter - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SegmentDefinition - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class MetricHeaderEntry - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ReportData - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DimensionFilter - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SegmentDimensionFilter - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class OrderBy - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Segment - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SegmentSequenceStep - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Metric - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class PivotValueRegion - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Report - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class PivotHeader - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DateRange - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class MetricFilter - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ReportRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Dimension - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DynamicSegment - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SimpleSegment - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ColumnHeader - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SegmentFilterClause - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Cohort - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class MetricFilterClause - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ReportRow - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class OrFiltersForSegment - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class MetricHeader - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class DimensionFilterClause class Representation < Google::Apis::Core::JsonRepresentation; end @@ -233,278 +77,159 @@ module Google end class SegmentFilter - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :not, as: 'not' - property :simple_segment, as: 'simpleSegment', class: Google::Apis::AnalyticsreportingV4::SimpleSegment, decorator: Google::Apis::AnalyticsreportingV4::SimpleSegment::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :sequence_segment, as: 'sequenceSegment', class: Google::Apis::AnalyticsreportingV4::SequenceSegment, decorator: Google::Apis::AnalyticsreportingV4::SequenceSegment::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class SegmentDefinition - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :segment_filters, as: 'segmentFilters', class: Google::Apis::AnalyticsreportingV4::SegmentFilter, decorator: Google::Apis::AnalyticsreportingV4::SegmentFilter::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class MetricHeaderEntry - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - property :type, as: 'type' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ReportData - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :data_last_refreshed, as: 'dataLastRefreshed' - collection :maximums, as: 'maximums', class: Google::Apis::AnalyticsreportingV4::DateRangeValues, decorator: Google::Apis::AnalyticsreportingV4::DateRangeValues::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - collection :sampling_space_sizes, as: 'samplingSpaceSizes' - collection :minimums, as: 'minimums', class: Google::Apis::AnalyticsreportingV4::DateRangeValues, decorator: Google::Apis::AnalyticsreportingV4::DateRangeValues::Representation - - collection :totals, as: 'totals', class: Google::Apis::AnalyticsreportingV4::DateRangeValues, decorator: Google::Apis::AnalyticsreportingV4::DateRangeValues::Representation - - collection :samples_read_counts, as: 'samplesReadCounts' - property :row_count, as: 'rowCount' - collection :rows, as: 'rows', class: Google::Apis::AnalyticsreportingV4::ReportRow, decorator: Google::Apis::AnalyticsreportingV4::ReportRow::Representation - - property :is_data_golden, as: 'isDataGolden' - end + include Google::Apis::Core::JsonObjectSupport end class DimensionFilter - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :not, as: 'not' - collection :expressions, as: 'expressions' - property :case_sensitive, as: 'caseSensitive' - property :dimension_name, as: 'dimensionName' - property :operator, as: 'operator' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class SegmentDimensionFilter - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :expressions, as: 'expressions' - property :case_sensitive, as: 'caseSensitive' - property :min_comparison_value, as: 'minComparisonValue' - property :max_comparison_value, as: 'maxComparisonValue' - property :dimension_name, as: 'dimensionName' - property :operator, as: 'operator' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class OrderBy - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :field_name, as: 'fieldName' - property :order_type, as: 'orderType' - property :sort_order, as: 'sortOrder' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class Segment - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :dynamic_segment, as: 'dynamicSegment', class: Google::Apis::AnalyticsreportingV4::DynamicSegment, decorator: Google::Apis::AnalyticsreportingV4::DynamicSegment::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :segment_id, as: 'segmentId' - end + include Google::Apis::Core::JsonObjectSupport end class SegmentSequenceStep - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :or_filters_for_segment, as: 'orFiltersForSegment', class: Google::Apis::AnalyticsreportingV4::OrFiltersForSegment, decorator: Google::Apis::AnalyticsreportingV4::OrFiltersForSegment::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :match_type, as: 'matchType' - end + include Google::Apis::Core::JsonObjectSupport end class Metric - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :alias, as: 'alias' - property :expression, as: 'expression' - property :formatting_type, as: 'formattingType' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class PivotValueRegion - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :values, as: 'values' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class Report - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :data, as: 'data', class: Google::Apis::AnalyticsreportingV4::ReportData, decorator: Google::Apis::AnalyticsreportingV4::ReportData::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :next_page_token, as: 'nextPageToken' - property :column_header, as: 'columnHeader', class: Google::Apis::AnalyticsreportingV4::ColumnHeader, decorator: Google::Apis::AnalyticsreportingV4::ColumnHeader::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class PivotHeader - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :pivot_header_entries, as: 'pivotHeaderEntries', class: Google::Apis::AnalyticsreportingV4::PivotHeaderEntry, decorator: Google::Apis::AnalyticsreportingV4::PivotHeaderEntry::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :total_pivot_groups_count, as: 'totalPivotGroupsCount' - end + include Google::Apis::Core::JsonObjectSupport end class DateRange - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :start_date, as: 'startDate' - property :end_date, as: 'endDate' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class MetricFilter - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :not, as: 'not' - property :metric_name, as: 'metricName' - property :comparison_value, as: 'comparisonValue' - property :operator, as: 'operator' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ReportRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :metric_filter_clauses, as: 'metricFilterClauses', class: Google::Apis::AnalyticsreportingV4::MetricFilterClause, decorator: Google::Apis::AnalyticsreportingV4::MetricFilterClause::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :page_size, as: 'pageSize' - property :hide_totals, as: 'hideTotals' - property :hide_value_ranges, as: 'hideValueRanges' - property :filters_expression, as: 'filtersExpression' - property :cohort_group, as: 'cohortGroup', class: Google::Apis::AnalyticsreportingV4::CohortGroup, decorator: Google::Apis::AnalyticsreportingV4::CohortGroup::Representation - - property :view_id, as: 'viewId' - collection :metrics, as: 'metrics', class: Google::Apis::AnalyticsreportingV4::Metric, decorator: Google::Apis::AnalyticsreportingV4::Metric::Representation - - collection :dimension_filter_clauses, as: 'dimensionFilterClauses', class: Google::Apis::AnalyticsreportingV4::DimensionFilterClause, decorator: Google::Apis::AnalyticsreportingV4::DimensionFilterClause::Representation - - collection :order_bys, as: 'orderBys', class: Google::Apis::AnalyticsreportingV4::OrderBy, decorator: Google::Apis::AnalyticsreportingV4::OrderBy::Representation - - collection :segments, as: 'segments', class: Google::Apis::AnalyticsreportingV4::Segment, decorator: Google::Apis::AnalyticsreportingV4::Segment::Representation - - property :sampling_level, as: 'samplingLevel' - collection :dimensions, as: 'dimensions', class: Google::Apis::AnalyticsreportingV4::Dimension, decorator: Google::Apis::AnalyticsreportingV4::Dimension::Representation - - collection :date_ranges, as: 'dateRanges', class: Google::Apis::AnalyticsreportingV4::DateRange, decorator: Google::Apis::AnalyticsreportingV4::DateRange::Representation - - property :page_token, as: 'pageToken' - collection :pivots, as: 'pivots', class: Google::Apis::AnalyticsreportingV4::Pivot, decorator: Google::Apis::AnalyticsreportingV4::Pivot::Representation - - property :include_empty_rows, as: 'includeEmptyRows' - end + include Google::Apis::Core::JsonObjectSupport end class Dimension - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :histogram_buckets, as: 'histogramBuckets' - property :name, as: 'name' - end - end + class Representation < Google::Apis::Core::JsonRepresentation; end - class DynamicSegment - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - property :user_segment, as: 'userSegment', class: Google::Apis::AnalyticsreportingV4::SegmentDefinition, decorator: Google::Apis::AnalyticsreportingV4::SegmentDefinition::Representation - - property :session_segment, as: 'sessionSegment', class: Google::Apis::AnalyticsreportingV4::SegmentDefinition, decorator: Google::Apis::AnalyticsreportingV4::SegmentDefinition::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class SimpleSegment - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :or_filters_for_segment, as: 'orFiltersForSegment', class: Google::Apis::AnalyticsreportingV4::OrFiltersForSegment, decorator: Google::Apis::AnalyticsreportingV4::OrFiltersForSegment::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport + end + + class DynamicSegment + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ColumnHeader - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :metric_header, as: 'metricHeader', class: Google::Apis::AnalyticsreportingV4::MetricHeader, decorator: Google::Apis::AnalyticsreportingV4::MetricHeader::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - collection :dimensions, as: 'dimensions' - end + include Google::Apis::Core::JsonObjectSupport end class SegmentFilterClause - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :not, as: 'not' - property :dimension_filter, as: 'dimensionFilter', class: Google::Apis::AnalyticsreportingV4::SegmentDimensionFilter, decorator: Google::Apis::AnalyticsreportingV4::SegmentDimensionFilter::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :metric_filter, as: 'metricFilter', class: Google::Apis::AnalyticsreportingV4::SegmentMetricFilter, decorator: Google::Apis::AnalyticsreportingV4::SegmentMetricFilter::Representation - - end - end - - class Cohort - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - property :date_range, as: 'dateRange', class: Google::Apis::AnalyticsreportingV4::DateRange, decorator: Google::Apis::AnalyticsreportingV4::DateRange::Representation - - property :type, as: 'type' - end + include Google::Apis::Core::JsonObjectSupport end class MetricFilterClause - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :operator, as: 'operator' - collection :filters, as: 'filters', class: Google::Apis::AnalyticsreportingV4::MetricFilter, decorator: Google::Apis::AnalyticsreportingV4::MetricFilter::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport + end + + class Cohort + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ReportRow - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :metrics, as: 'metrics', class: Google::Apis::AnalyticsreportingV4::DateRangeValues, decorator: Google::Apis::AnalyticsreportingV4::DateRangeValues::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - collection :dimensions, as: 'dimensions' - end + include Google::Apis::Core::JsonObjectSupport end class OrFiltersForSegment - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :segment_filter_clauses, as: 'segmentFilterClauses', class: Google::Apis::AnalyticsreportingV4::SegmentFilterClause, decorator: Google::Apis::AnalyticsreportingV4::SegmentFilterClause::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class MetricHeader - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :pivot_headers, as: 'pivotHeaders', class: Google::Apis::AnalyticsreportingV4::PivotHeader, decorator: Google::Apis::AnalyticsreportingV4::PivotHeader::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - collection :metric_header_entries, as: 'metricHeaderEntries', class: Google::Apis::AnalyticsreportingV4::MetricHeaderEntry, decorator: Google::Apis::AnalyticsreportingV4::MetricHeaderEntry::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class DimensionFilterClause @@ -536,20 +261,20 @@ module Google class SegmentMetricFilter # @private class Representation < Google::Apis::Core::JsonRepresentation - property :scope, as: 'scope' property :max_comparison_value, as: 'maxComparisonValue' property :comparison_value, as: 'comparisonValue' property :operator, as: 'operator' property :metric_name, as: 'metricName' + property :scope, as: 'scope' end end class DateRangeValues # @private class Representation < Google::Apis::Core::JsonRepresentation + collection :values, as: 'values' collection :pivot_value_regions, as: 'pivotValueRegions', class: Google::Apis::AnalyticsreportingV4::PivotValueRegion, decorator: Google::Apis::AnalyticsreportingV4::PivotValueRegion::Representation - collection :values, as: 'values' end end @@ -587,10 +312,285 @@ module Google class PivotHeaderEntry # @private class Representation < Google::Apis::Core::JsonRepresentation + collection :dimension_values, as: 'dimensionValues' collection :dimension_names, as: 'dimensionNames' property :metric, as: 'metric', class: Google::Apis::AnalyticsreportingV4::MetricHeaderEntry, decorator: Google::Apis::AnalyticsreportingV4::MetricHeaderEntry::Representation - collection :dimension_values, as: 'dimensionValues' + end + end + + class SegmentFilter + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :sequence_segment, as: 'sequenceSegment', class: Google::Apis::AnalyticsreportingV4::SequenceSegment, decorator: Google::Apis::AnalyticsreportingV4::SequenceSegment::Representation + + property :not, as: 'not' + property :simple_segment, as: 'simpleSegment', class: Google::Apis::AnalyticsreportingV4::SimpleSegment, decorator: Google::Apis::AnalyticsreportingV4::SimpleSegment::Representation + + end + end + + class SegmentDefinition + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :segment_filters, as: 'segmentFilters', class: Google::Apis::AnalyticsreportingV4::SegmentFilter, decorator: Google::Apis::AnalyticsreportingV4::SegmentFilter::Representation + + end + end + + class MetricHeaderEntry + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :type, as: 'type' + property :name, as: 'name' + end + end + + class ReportData + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :totals, as: 'totals', class: Google::Apis::AnalyticsreportingV4::DateRangeValues, decorator: Google::Apis::AnalyticsreportingV4::DateRangeValues::Representation + + collection :samples_read_counts, as: 'samplesReadCounts' + property :row_count, as: 'rowCount' + collection :rows, as: 'rows', class: Google::Apis::AnalyticsreportingV4::ReportRow, decorator: Google::Apis::AnalyticsreportingV4::ReportRow::Representation + + property :is_data_golden, as: 'isDataGolden' + property :data_last_refreshed, as: 'dataLastRefreshed' + collection :maximums, as: 'maximums', class: Google::Apis::AnalyticsreportingV4::DateRangeValues, decorator: Google::Apis::AnalyticsreportingV4::DateRangeValues::Representation + + collection :sampling_space_sizes, as: 'samplingSpaceSizes' + collection :minimums, as: 'minimums', class: Google::Apis::AnalyticsreportingV4::DateRangeValues, decorator: Google::Apis::AnalyticsreportingV4::DateRangeValues::Representation + + end + end + + class DimensionFilter + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :dimension_name, as: 'dimensionName' + property :operator, as: 'operator' + property :not, as: 'not' + collection :expressions, as: 'expressions' + property :case_sensitive, as: 'caseSensitive' + end + end + + class SegmentDimensionFilter + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :min_comparison_value, as: 'minComparisonValue' + property :max_comparison_value, as: 'maxComparisonValue' + property :dimension_name, as: 'dimensionName' + property :operator, as: 'operator' + collection :expressions, as: 'expressions' + property :case_sensitive, as: 'caseSensitive' + end + end + + class OrderBy + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :sort_order, as: 'sortOrder' + property :field_name, as: 'fieldName' + property :order_type, as: 'orderType' + end + end + + class Segment + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :dynamic_segment, as: 'dynamicSegment', class: Google::Apis::AnalyticsreportingV4::DynamicSegment, decorator: Google::Apis::AnalyticsreportingV4::DynamicSegment::Representation + + property :segment_id, as: 'segmentId' + end + end + + class SegmentSequenceStep + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :or_filters_for_segment, as: 'orFiltersForSegment', class: Google::Apis::AnalyticsreportingV4::OrFiltersForSegment, decorator: Google::Apis::AnalyticsreportingV4::OrFiltersForSegment::Representation + + property :match_type, as: 'matchType' + end + end + + class Metric + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :expression, as: 'expression' + property :formatting_type, as: 'formattingType' + property :alias, as: 'alias' + end + end + + class PivotValueRegion + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :values, as: 'values' + end + end + + class Report + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :column_header, as: 'columnHeader', class: Google::Apis::AnalyticsreportingV4::ColumnHeader, decorator: Google::Apis::AnalyticsreportingV4::ColumnHeader::Representation + + property :data, as: 'data', class: Google::Apis::AnalyticsreportingV4::ReportData, decorator: Google::Apis::AnalyticsreportingV4::ReportData::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class PivotHeader + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :pivot_header_entries, as: 'pivotHeaderEntries', class: Google::Apis::AnalyticsreportingV4::PivotHeaderEntry, decorator: Google::Apis::AnalyticsreportingV4::PivotHeaderEntry::Representation + + property :total_pivot_groups_count, as: 'totalPivotGroupsCount' + end + end + + class DateRange + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :end_date, as: 'endDate' + property :start_date, as: 'startDate' + end + end + + class MetricFilter + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :metric_name, as: 'metricName' + property :comparison_value, as: 'comparisonValue' + property :operator, as: 'operator' + property :not, as: 'not' + end + end + + class ReportRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :page_size, as: 'pageSize' + property :hide_totals, as: 'hideTotals' + property :hide_value_ranges, as: 'hideValueRanges' + property :cohort_group, as: 'cohortGroup', class: Google::Apis::AnalyticsreportingV4::CohortGroup, decorator: Google::Apis::AnalyticsreportingV4::CohortGroup::Representation + + property :filters_expression, as: 'filtersExpression' + property :view_id, as: 'viewId' + collection :metrics, as: 'metrics', class: Google::Apis::AnalyticsreportingV4::Metric, decorator: Google::Apis::AnalyticsreportingV4::Metric::Representation + + collection :dimension_filter_clauses, as: 'dimensionFilterClauses', class: Google::Apis::AnalyticsreportingV4::DimensionFilterClause, decorator: Google::Apis::AnalyticsreportingV4::DimensionFilterClause::Representation + + collection :order_bys, as: 'orderBys', class: Google::Apis::AnalyticsreportingV4::OrderBy, decorator: Google::Apis::AnalyticsreportingV4::OrderBy::Representation + + collection :segments, as: 'segments', class: Google::Apis::AnalyticsreportingV4::Segment, decorator: Google::Apis::AnalyticsreportingV4::Segment::Representation + + property :sampling_level, as: 'samplingLevel' + collection :dimensions, as: 'dimensions', class: Google::Apis::AnalyticsreportingV4::Dimension, decorator: Google::Apis::AnalyticsreportingV4::Dimension::Representation + + collection :date_ranges, as: 'dateRanges', class: Google::Apis::AnalyticsreportingV4::DateRange, decorator: Google::Apis::AnalyticsreportingV4::DateRange::Representation + + property :page_token, as: 'pageToken' + collection :pivots, as: 'pivots', class: Google::Apis::AnalyticsreportingV4::Pivot, decorator: Google::Apis::AnalyticsreportingV4::Pivot::Representation + + property :include_empty_rows, as: 'includeEmptyRows' + collection :metric_filter_clauses, as: 'metricFilterClauses', class: Google::Apis::AnalyticsreportingV4::MetricFilterClause, decorator: Google::Apis::AnalyticsreportingV4::MetricFilterClause::Representation + + end + end + + class Dimension + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :histogram_buckets, as: 'histogramBuckets' + property :name, as: 'name' + end + end + + class SimpleSegment + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :or_filters_for_segment, as: 'orFiltersForSegment', class: Google::Apis::AnalyticsreportingV4::OrFiltersForSegment, decorator: Google::Apis::AnalyticsreportingV4::OrFiltersForSegment::Representation + + end + end + + class DynamicSegment + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :session_segment, as: 'sessionSegment', class: Google::Apis::AnalyticsreportingV4::SegmentDefinition, decorator: Google::Apis::AnalyticsreportingV4::SegmentDefinition::Representation + + property :name, as: 'name' + property :user_segment, as: 'userSegment', class: Google::Apis::AnalyticsreportingV4::SegmentDefinition, decorator: Google::Apis::AnalyticsreportingV4::SegmentDefinition::Representation + + end + end + + class ColumnHeader + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :dimensions, as: 'dimensions' + property :metric_header, as: 'metricHeader', class: Google::Apis::AnalyticsreportingV4::MetricHeader, decorator: Google::Apis::AnalyticsreportingV4::MetricHeader::Representation + + end + end + + class SegmentFilterClause + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :metric_filter, as: 'metricFilter', class: Google::Apis::AnalyticsreportingV4::SegmentMetricFilter, decorator: Google::Apis::AnalyticsreportingV4::SegmentMetricFilter::Representation + + property :not, as: 'not' + property :dimension_filter, as: 'dimensionFilter', class: Google::Apis::AnalyticsreportingV4::SegmentDimensionFilter, decorator: Google::Apis::AnalyticsreportingV4::SegmentDimensionFilter::Representation + + end + end + + class MetricFilterClause + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :operator, as: 'operator' + collection :filters, as: 'filters', class: Google::Apis::AnalyticsreportingV4::MetricFilter, decorator: Google::Apis::AnalyticsreportingV4::MetricFilter::Representation + + end + end + + class Cohort + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :name, as: 'name' + property :date_range, as: 'dateRange', class: Google::Apis::AnalyticsreportingV4::DateRange, decorator: Google::Apis::AnalyticsreportingV4::DateRange::Representation + + property :type, as: 'type' + end + end + + class ReportRow + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :metrics, as: 'metrics', class: Google::Apis::AnalyticsreportingV4::DateRangeValues, decorator: Google::Apis::AnalyticsreportingV4::DateRangeValues::Representation + + collection :dimensions, as: 'dimensions' + end + end + + class OrFiltersForSegment + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :segment_filter_clauses, as: 'segmentFilterClauses', class: Google::Apis::AnalyticsreportingV4::SegmentFilterClause, decorator: Google::Apis::AnalyticsreportingV4::SegmentFilterClause::Representation + + end + end + + class MetricHeader + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :pivot_headers, as: 'pivotHeaders', class: Google::Apis::AnalyticsreportingV4::PivotHeader, decorator: Google::Apis::AnalyticsreportingV4::PivotHeader::Representation + + collection :metric_header_entries, as: 'metricHeaderEntries', class: Google::Apis::AnalyticsreportingV4::MetricHeaderEntry, decorator: Google::Apis::AnalyticsreportingV4::MetricHeaderEntry::Representation + end end end diff --git a/generated/google/apis/androidenterprise_v1.rb b/generated/google/apis/androidenterprise_v1.rb index fd5aedc80..4a2ab3271 100644 --- a/generated/google/apis/androidenterprise_v1.rb +++ b/generated/google/apis/androidenterprise_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/android/work/play/emm-api module AndroidenterpriseV1 VERSION = 'V1' - REVISION = '20170427' + REVISION = '20170518' # Manage corporate Android devices AUTH_ANDROIDENTERPRISE = 'https://www.googleapis.com/auth/androidenterprise' diff --git a/generated/google/apis/androidenterprise_v1/classes.rb b/generated/google/apis/androidenterprise_v1/classes.rb index b580d8311..1269409ae 100644 --- a/generated/google/apis/androidenterprise_v1/classes.rb +++ b/generated/google/apis/androidenterprise_v1/classes.rb @@ -748,14 +748,14 @@ module Google # @return [Fixnum] attr_accessor :num_purchased - # The state of permission acceptance with this product. This field is only set - # if the product is approved. Possible states are: + # The permission approval status of the product. This field is only set if the + # product is approved. Possible states are: # - "currentApproved", the current set of permissions is approved, but # additional permissions will require the administrator to reapprove the product - # (if the product was approved without specifying what to when the required - # permissions change, this is the default), - # - "needsReapproval", there are permissions which need to be accepted ( - # currently the product is not assignable), + # (If the product was approved without specifying the approved permissions + # setting, then this is the default behavior.), + # - "needsReapproval", the product has unapproved permissions. No additional + # product licenses can be assigned until the product is reapproved, # - "allCurrentAndFutureApproved", the current permissions are approved and any # future permission updates will be automatically approved without administrator # review. @@ -1273,6 +1273,11 @@ module Google # @return [Google::Apis::AndroidenterpriseV1::NewPermissionsEvent] attr_accessor :new_permissions_event + # Type of the notification. + # Corresponds to the JSON property `notificationType` + # @return [String] + attr_accessor :notification_type + # An event generated when a product's approval status is changed. # Corresponds to the JSON property `productApprovalEvent` # @return [Google::Apis::AndroidenterpriseV1::ProductApprovalEvent] @@ -1301,6 +1306,7 @@ module Google @install_failure_event = args[:install_failure_event] if args.key?(:install_failure_event) @new_device_event = args[:new_device_event] if args.key?(:new_device_event) @new_permissions_event = args[:new_permissions_event] if args.key?(:new_permissions_event) + @notification_type = args[:notification_type] if args.key?(:notification_type) @product_approval_event = args[:product_approval_event] if args.key?(:product_approval_event) @product_availability_change_event = args[:product_availability_change_event] if args.key?(:product_availability_change_event) @timestamp_millis = args[:timestamp_millis] if args.key?(:timestamp_millis) @@ -1687,11 +1693,12 @@ module Google # @return [Google::Apis::AndroidenterpriseV1::ApprovalUrlInfo] attr_accessor :approval_url_info - # The permissions being approved with this app. This can either be the current - # set of permissions only (additional permissions added to the app through - # updates will require review by the administrator) or all current and future - # permissions for the app. If not specified, only the current set of permissions - # will be approved. + # Sets how new permission requests for the product are handled. "allPermissions" + # automatically approves all current and future permissions for the product. " + # currentPermissionsOnly" approves the current set of permissions for the + # product, but any future permissions added through updates will require manual + # reapproval. If not specified, only the current set of permissions will be + # approved. # Corresponds to the JSON property `approvedPermissions` # @return [String] attr_accessor :approved_permissions diff --git a/generated/google/apis/androidenterprise_v1/representations.rb b/generated/google/apis/androidenterprise_v1/representations.rb index 9ef72ee8c..a8bd3fc42 100644 --- a/generated/google/apis/androidenterprise_v1/representations.rb +++ b/generated/google/apis/androidenterprise_v1/representations.rb @@ -713,6 +713,7 @@ module Google property :new_permissions_event, as: 'newPermissionsEvent', class: Google::Apis::AndroidenterpriseV1::NewPermissionsEvent, decorator: Google::Apis::AndroidenterpriseV1::NewPermissionsEvent::Representation + property :notification_type, as: 'notificationType' property :product_approval_event, as: 'productApprovalEvent', class: Google::Apis::AndroidenterpriseV1::ProductApprovalEvent, decorator: Google::Apis::AndroidenterpriseV1::ProductApprovalEvent::Representation property :product_availability_change_event, as: 'productAvailabilityChangeEvent', class: Google::Apis::AndroidenterpriseV1::ProductAvailabilityChangeEvent, decorator: Google::Apis::AndroidenterpriseV1::ProductAvailabilityChangeEvent::Representation diff --git a/generated/google/apis/androidpublisher_v2.rb b/generated/google/apis/androidpublisher_v2.rb index 671b15389..c0a1dc7fe 100644 --- a/generated/google/apis/androidpublisher_v2.rb +++ b/generated/google/apis/androidpublisher_v2.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/android-publisher module AndroidpublisherV2 VERSION = 'V2' - REVISION = '20170425' + REVISION = '20170504' # View and manage your Google Play Developer account AUTH_ANDROIDPUBLISHER = 'https://www.googleapis.com/auth/androidpublisher' diff --git a/generated/google/apis/appengine_v1.rb b/generated/google/apis/appengine_v1.rb index 350acb53f..5eb286acd 100644 --- a/generated/google/apis/appengine_v1.rb +++ b/generated/google/apis/appengine_v1.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/appengine/docs/admin-api/ module AppengineV1 VERSION = 'V1' - REVISION = '20170426' + REVISION = '20170522' # View and manage your applications deployed on Google App Engine AUTH_APPENGINE_ADMIN = 'https://www.googleapis.com/auth/appengine.admin' diff --git a/generated/google/apis/appengine_v1/classes.rb b/generated/google/apis/appengine_v1/classes.rb index bfdf74d71..d01e8a047 100644 --- a/generated/google/apis/appengine_v1/classes.rb +++ b/generated/google/apis/appengine_v1/classes.rb @@ -22,438 +22,6 @@ module Google module Apis module AppengineV1 - # Files served directly to the user for a given URL, such as images, CSS - # stylesheets, or JavaScript source files. Static file handlers describe which - # files in the application directory are static files, and which URLs serve them. - class StaticFilesHandler - include Google::Apis::Core::Hashable - - # Time a static file served by this handler should be cached by web proxies and - # browsers. - # Corresponds to the JSON property `expiration` - # @return [String] - attr_accessor :expiration - - # Whether files should also be uploaded as code data. By default, files declared - # in static file handlers are uploaded as static data and are only served to end - # users; they cannot be read by the application. If enabled, uploads are charged - # against both your code and static data storage resource quotas. - # Corresponds to the JSON property `applicationReadable` - # @return [Boolean] - attr_accessor :application_readable - alias_method :application_readable?, :application_readable - - # HTTP headers to use for all responses from these URLs. - # Corresponds to the JSON property `httpHeaders` - # @return [Hash] - attr_accessor :http_headers - - # Regular expression that matches the file paths for all files that should be - # referenced by this handler. - # Corresponds to the JSON property `uploadPathRegex` - # @return [String] - attr_accessor :upload_path_regex - - # Path to the static files matched by the URL pattern, from the application root - # directory. The path can refer to text matched in groupings in the URL pattern. - # Corresponds to the JSON property `path` - # @return [String] - attr_accessor :path - - # MIME type used to serve all files served by this handler.Defaults to file- - # specific MIME types, which are derived from each file's filename extension. - # Corresponds to the JSON property `mimeType` - # @return [String] - attr_accessor :mime_type - - # Whether this handler should match the request if the file referenced by the - # handler does not exist. - # Corresponds to the JSON property `requireMatchingFile` - # @return [Boolean] - attr_accessor :require_matching_file - alias_method :require_matching_file?, :require_matching_file - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @expiration = args[:expiration] if args.key?(:expiration) - @application_readable = args[:application_readable] if args.key?(:application_readable) - @http_headers = args[:http_headers] if args.key?(:http_headers) - @upload_path_regex = args[:upload_path_regex] if args.key?(:upload_path_regex) - @path = args[:path] if args.key?(:path) - @mime_type = args[:mime_type] if args.key?(:mime_type) - @require_matching_file = args[:require_matching_file] if args.key?(:require_matching_file) - end - end - - # Target scaling by disk usage. Only applicable for VM runtimes. - class DiskUtilization - include Google::Apis::Core::Hashable - - # Target bytes read per second. - # Corresponds to the JSON property `targetReadBytesPerSecond` - # @return [Fixnum] - attr_accessor :target_read_bytes_per_second - - # Target ops read per seconds. - # Corresponds to the JSON property `targetReadOpsPerSecond` - # @return [Fixnum] - attr_accessor :target_read_ops_per_second - - # Target ops written per second. - # Corresponds to the JSON property `targetWriteOpsPerSecond` - # @return [Fixnum] - attr_accessor :target_write_ops_per_second - - # Target bytes written per second. - # Corresponds to the JSON property `targetWriteBytesPerSecond` - # @return [Fixnum] - attr_accessor :target_write_bytes_per_second - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @target_read_bytes_per_second = args[:target_read_bytes_per_second] if args.key?(:target_read_bytes_per_second) - @target_read_ops_per_second = args[:target_read_ops_per_second] if args.key?(:target_read_ops_per_second) - @target_write_ops_per_second = args[:target_write_ops_per_second] if args.key?(:target_write_ops_per_second) - @target_write_bytes_per_second = args[:target_write_bytes_per_second] if args.key?(:target_write_bytes_per_second) - end - end - - # A service with basic scaling will create an instance when the application - # receives a request. The instance will be turned down when the app becomes idle. - # Basic scaling is ideal for work that is intermittent or driven by user - # activity. - class BasicScaling - include Google::Apis::Core::Hashable - - # Maximum number of instances to create for this version. - # Corresponds to the JSON property `maxInstances` - # @return [Fixnum] - attr_accessor :max_instances - - # Duration of time after the last request that an instance must wait before the - # instance is shut down. - # Corresponds to the JSON property `idleTimeout` - # @return [String] - attr_accessor :idle_timeout - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @max_instances = args[:max_instances] if args.key?(:max_instances) - @idle_timeout = args[:idle_timeout] if args.key?(:idle_timeout) - end - end - - # Target scaling by CPU usage. - class CpuUtilization - include Google::Apis::Core::Hashable - - # Period of time over which CPU utilization is calculated. - # Corresponds to the JSON property `aggregationWindowLength` - # @return [String] - attr_accessor :aggregation_window_length - - # Target CPU utilization ratio to maintain when scaling. Must be between 0 and 1. - # Corresponds to the JSON property `targetUtilization` - # @return [Float] - attr_accessor :target_utilization - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @aggregation_window_length = args[:aggregation_window_length] if args.key?(:aggregation_window_length) - @target_utilization = args[:target_utilization] if args.key?(:target_utilization) - end - end - - # The Status type defines a logical error model that is suitable for different - # programming environments, including REST APIs and RPC APIs. It is used by gRPC - # (https://github.com/grpc). The error model is designed to be: - # Simple to use and understand for most users - # Flexible enough to meet unexpected needsOverviewThe Status message contains - # three pieces of data: error code, error message, and error details. The error - # code should be an enum value of google.rpc.Code, but it may accept additional - # error codes if needed. The error message should be a developer-facing English - # message that helps developers understand and resolve the error. If a localized - # user-facing error message is needed, put the localized message in the error - # details or localize it in the client. The optional error details may contain - # arbitrary information about the error. There is a predefined set of error - # detail types in the package google.rpc which can be used for common error - # conditions.Language mappingThe Status message is the logical representation of - # the error model, but it is not necessarily the actual wire format. When the - # Status message is exposed in different client libraries and different wire - # protocols, it can be mapped differently. For example, it will likely be mapped - # to some exceptions in Java, but more likely mapped to some error codes in C. - # Other usesThe error model and the Status message can be used in a variety of - # environments, either with or without APIs, to provide a consistent developer - # experience across different environments.Example uses of this error model - # include: - # Partial errors. If a service needs to return partial errors to the client, it - # may embed the Status in the normal response to indicate the partial errors. - # Workflow errors. A typical workflow has multiple steps. Each step may have a - # Status message for error reporting purpose. - # Batch operations. If a client uses batch request and batch response, the - # Status message should be used directly inside batch response, one for each - # error sub-response. - # Asynchronous operations. If an API call embeds asynchronous operation results - # in its response, the status of those operations should be represented directly - # using the Status message. - # Logging. If some API errors are stored in logs, the message Status could be - # used directly after any stripping needed for security/privacy reasons. - class Status - include Google::Apis::Core::Hashable - - # The status code, which should be an enum value of google.rpc.Code. - # Corresponds to the JSON property `code` - # @return [Fixnum] - attr_accessor :code - - # A developer-facing error message, which should be in English. Any user-facing - # error message should be localized and sent in the google.rpc.Status.details - # field, or localized by the client. - # Corresponds to the JSON property `message` - # @return [String] - attr_accessor :message - - # A list of messages that carry the error details. There will be a common set of - # message types for APIs to use. - # Corresponds to the JSON property `details` - # @return [Array>] - attr_accessor :details - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @code = args[:code] if args.key?(:code) - @message = args[:message] if args.key?(:message) - @details = args[:details] if args.key?(:details) - end - end - - # Identity-Aware Proxy - class IdentityAwareProxy - include Google::Apis::Core::Hashable - - # OAuth2 client secret to use for the authentication flow.For security reasons, - # this value cannot be retrieved via the API. Instead, the SHA-256 hash of the - # value is returned in the oauth2_client_secret_sha256 field.@InputOnly - # Corresponds to the JSON property `oauth2ClientSecret` - # @return [String] - attr_accessor :oauth2_client_secret - - # OAuth2 client ID to use for the authentication flow. - # Corresponds to the JSON property `oauth2ClientId` - # @return [String] - attr_accessor :oauth2_client_id - - # Hex-encoded SHA-256 hash of the client secret.@OutputOnly - # Corresponds to the JSON property `oauth2ClientSecretSha256` - # @return [String] - attr_accessor :oauth2_client_secret_sha256 - - # Whether the serving infrastructure will authenticate and authorize all - # incoming requests.If true, the oauth2_client_id and oauth2_client_secret - # fields must be non-empty. - # Corresponds to the JSON property `enabled` - # @return [Boolean] - attr_accessor :enabled - alias_method :enabled?, :enabled - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @oauth2_client_secret = args[:oauth2_client_secret] if args.key?(:oauth2_client_secret) - @oauth2_client_id = args[:oauth2_client_id] if args.key?(:oauth2_client_id) - @oauth2_client_secret_sha256 = args[:oauth2_client_secret_sha256] if args.key?(:oauth2_client_secret_sha256) - @enabled = args[:enabled] if args.key?(:enabled) - end - end - - # A service with manual scaling runs continuously, allowing you to perform - # complex initialization and rely on the state of its memory over time. - class ManualScaling - include Google::Apis::Core::Hashable - - # Number of instances to assign to the service at the start. This number can - # later be altered by using the Modules API (https://cloud.google.com/appengine/ - # docs/python/modules/functions) set_num_instances() function. - # Corresponds to the JSON property `instances` - # @return [Fixnum] - attr_accessor :instances - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @instances = args[:instances] if args.key?(:instances) - end - end - - # Metadata for the given google.cloud.location.Location. - class LocationMetadata - include Google::Apis::Core::Hashable - - # App Engine Flexible Environment is available in the given location.@OutputOnly - # Corresponds to the JSON property `flexibleEnvironmentAvailable` - # @return [Boolean] - attr_accessor :flexible_environment_available - alias_method :flexible_environment_available?, :flexible_environment_available - - # App Engine Standard Environment is available in the given location.@OutputOnly - # Corresponds to the JSON property `standardEnvironmentAvailable` - # @return [Boolean] - attr_accessor :standard_environment_available - alias_method :standard_environment_available?, :standard_environment_available - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @flexible_environment_available = args[:flexible_environment_available] if args.key?(:flexible_environment_available) - @standard_environment_available = args[:standard_environment_available] if args.key?(:standard_environment_available) - end - end - - # A Service resource is a logical component of an application that can share - # state and communicate in a secure fashion with other services. For example, an - # application that handles customer requests might include separate services to - # handle tasks such as backend data analysis or API requests from mobile devices. - # Each service has a collection of versions that define a specific set of code - # used to implement the functionality of that service. - class Service - include Google::Apis::Core::Hashable - - # Full path to the Service resource in the API. Example: apps/myapp/services/ - # default.@OutputOnly - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Traffic routing configuration for versions within a single service. Traffic - # splits define how traffic directed to the service is assigned to versions. - # Corresponds to the JSON property `split` - # @return [Google::Apis::AppengineV1::TrafficSplit] - attr_accessor :split - - # Relative name of the service within the application. Example: default.@ - # OutputOnly - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @name = args[:name] if args.key?(:name) - @split = args[:split] if args.key?(:split) - @id = args[:id] if args.key?(:id) - end - end - - # The response message for Operations.ListOperations. - class ListOperationsResponse - include Google::Apis::Core::Hashable - - # The standard List next-page token. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # A list of operations that matches the specified filter in the request. - # Corresponds to the JSON property `operations` - # @return [Array] - attr_accessor :operations - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @operations = args[:operations] if args.key?(:operations) - end - end - - # Metadata for the given google.longrunning.Operation. - class OperationMetadata - include Google::Apis::Core::Hashable - - # Type of this operation. Deprecated, use method field instead. Example: " - # create_version".@OutputOnly - # Corresponds to the JSON property `operationType` - # @return [String] - attr_accessor :operation_type - - # Timestamp that this operation was created.@OutputOnly - # Corresponds to the JSON property `insertTime` - # @return [String] - attr_accessor :insert_time - - # User who requested this operation.@OutputOnly - # Corresponds to the JSON property `user` - # @return [String] - attr_accessor :user - - # Name of the resource that this operation is acting on. Example: apps/myapp/ - # modules/default.@OutputOnly - # Corresponds to the JSON property `target` - # @return [String] - attr_accessor :target - - # API method that initiated this operation. Example: google.appengine.v1beta4. - # Version.CreateVersion.@OutputOnly - # Corresponds to the JSON property `method` - # @return [String] - attr_accessor :method_prop - - # Timestamp that this operation completed.@OutputOnly - # Corresponds to the JSON property `endTime` - # @return [String] - attr_accessor :end_time - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @operation_type = args[:operation_type] if args.key?(:operation_type) - @insert_time = args[:insert_time] if args.key?(:insert_time) - @user = args[:user] if args.key?(:user) - @target = args[:target] if args.key?(:target) - @method_prop = args[:method_prop] if args.key?(:method_prop) - @end_time = args[:end_time] if args.key?(:end_time) - end - end - # Custom static error page to be served when an error occurs. class ErrorHandler include Google::Apis::Core::Hashable @@ -489,27 +57,6 @@ module Google class OperationMetadataV1 include Google::Apis::Core::Hashable - # API method that initiated this operation. Example: google.appengine.v1. - # Versions.CreateVersion.@OutputOnly - # Corresponds to the JSON property `method` - # @return [String] - attr_accessor :method_prop - - # Time that this operation completed.@OutputOnly - # Corresponds to the JSON property `endTime` - # @return [String] - attr_accessor :end_time - - # Time that this operation was created.@OutputOnly - # Corresponds to the JSON property `insertTime` - # @return [String] - attr_accessor :insert_time - - # Durable messages that persist on every operation poll. @OutputOnly - # Corresponds to the JSON property `warning` - # @return [Array] - attr_accessor :warning - # Name of the resource that this operation is acting on. Example: apps/myapp/ # services/default.@OutputOnly # Corresponds to the JSON property `target` @@ -527,19 +74,40 @@ module Google # @return [String] attr_accessor :ephemeral_message + # API method that initiated this operation. Example: google.appengine.v1. + # Versions.CreateVersion.@OutputOnly + # Corresponds to the JSON property `method` + # @return [String] + attr_accessor :method_prop + + # Time that this operation completed.@OutputOnly + # Corresponds to the JSON property `endTime` + # @return [String] + attr_accessor :end_time + + # Durable messages that persist on every operation poll. @OutputOnly + # Corresponds to the JSON property `warning` + # @return [Array] + attr_accessor :warning + + # Time that this operation was created.@OutputOnly + # Corresponds to the JSON property `insertTime` + # @return [String] + attr_accessor :insert_time + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @method_prop = args[:method_prop] if args.key?(:method_prop) - @end_time = args[:end_time] if args.key?(:end_time) - @insert_time = args[:insert_time] if args.key?(:insert_time) - @warning = args[:warning] if args.key?(:warning) @target = args[:target] if args.key?(:target) @user = args[:user] if args.key?(:user) @ephemeral_message = args[:ephemeral_message] if args.key?(:ephemeral_message) + @method_prop = args[:method_prop] if args.key?(:method_prop) + @end_time = args[:end_time] if args.key?(:end_time) + @warning = args[:warning] if args.key?(:warning) + @insert_time = args[:insert_time] if args.key?(:insert_time) end end @@ -600,6 +168,13 @@ module Google class Application include Google::Apis::Core::Hashable + # HTTP path dispatch rules for requests to the application that do not + # explicitly target a service or version. Rules are order-dependent. Up to 20 + # dispatch rules can be supported.@OutputOnly + # Corresponds to the JSON property `dispatchRules` + # @return [Array] + attr_accessor :dispatch_rules + # The Google Container Registry domain used for storing managed build docker # images for this application. # Corresponds to the JSON property `gcrDomain` @@ -612,6 +187,11 @@ module Google # @return [String] attr_accessor :name + # Cookie expiration policy for this application. + # Corresponds to the JSON property `defaultCookieExpiration` + # @return [String] + attr_accessor :default_cookie_expiration + # Identifier of the Application resource. This identifier is equivalent to the # project ID of the Google Cloud Platform project where you want to deploy your # application. Example: myapp. @@ -619,11 +199,6 @@ module Google # @return [String] attr_accessor :id - # Cookie expiration policy for this application. - # Corresponds to the JSON property `defaultCookieExpiration` - # @return [String] - attr_accessor :default_cookie_expiration - # Location from which this application will be run. Application instances will # run out of data centers in the chosen location, which is also where all of the # application's end user content is stored.Defaults to us-central.Options are:us- @@ -666,23 +241,17 @@ module Google # @return [String] attr_accessor :default_bucket - # HTTP path dispatch rules for requests to the application that do not - # explicitly target a service or version. Rules are order-dependent. Up to 20 - # dispatch rules can be supported.@OutputOnly - # Corresponds to the JSON property `dispatchRules` - # @return [Array] - attr_accessor :dispatch_rules - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @dispatch_rules = args[:dispatch_rules] if args.key?(:dispatch_rules) @gcr_domain = args[:gcr_domain] if args.key?(:gcr_domain) @name = args[:name] if args.key?(:name) - @id = args[:id] if args.key?(:id) @default_cookie_expiration = args[:default_cookie_expiration] if args.key?(:default_cookie_expiration) + @id = args[:id] if args.key?(:id) @location_id = args[:location_id] if args.key?(:location_id) @serving_status = args[:serving_status] if args.key?(:serving_status) @default_hostname = args[:default_hostname] if args.key?(:default_hostname) @@ -690,7 +259,6 @@ module Google @auth_domain = args[:auth_domain] if args.key?(:auth_domain) @code_bucket = args[:code_bucket] if args.key?(:code_bucket) @default_bucket = args[:default_bucket] if args.key?(:default_bucket) - @dispatch_rules = args[:dispatch_rules] if args.key?(:dispatch_rules) end end @@ -699,23 +267,40 @@ module Google class Instance include Google::Apis::Core::Hashable + # Whether this instance is in debug mode. Only applicable for instances in App + # Engine flexible environment.@OutputOnly + # Corresponds to the JSON property `vmDebugEnabled` + # @return [Boolean] + attr_accessor :vm_debug_enabled + alias_method :vm_debug_enabled?, :vm_debug_enabled + + # Number of requests since this instance was started.@OutputOnly + # Corresponds to the JSON property `requests` + # @return [Fixnum] + attr_accessor :requests + + # App Engine release this instance is running on.@OutputOnly + # Corresponds to the JSON property `appEngineRelease` + # @return [String] + attr_accessor :app_engine_release + # Name of the virtual machine where this instance lives. Only applicable for # instances in App Engine flexible environment.@OutputOnly # Corresponds to the JSON property `vmName` # @return [String] attr_accessor :vm_name + # Average queries per second (QPS) over the last minute.@OutputOnly + # Corresponds to the JSON property `qps` + # @return [Float] + attr_accessor :qps + # Virtual machine ID of this instance. Only applicable for instances in App # Engine flexible environment.@OutputOnly # Corresponds to the JSON property `vmId` # @return [String] attr_accessor :vm_id - # Average queries per second (QPS) over the last minute.@OutputOnly - # Corresponds to the JSON property `qps` - # @return [Float] - attr_accessor :qps - # Zone where the virtual machine is located. Only applicable for instances in # App Engine flexible environment.@OutputOnly # Corresponds to the JSON property `vmZoneName` @@ -739,22 +324,16 @@ module Google # @return [String] attr_accessor :vm_ip - # Relative name of the instance within the version. Example: instance-1.@ - # OutputOnly - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - # Total memory in use (bytes).@OutputOnly # Corresponds to the JSON property `memoryUsage` # @return [Fixnum] attr_accessor :memory_usage - # Status of the virtual machine where this instance lives. Only applicable for - # instances in App Engine flexible environment.@OutputOnly - # Corresponds to the JSON property `vmStatus` + # Relative name of the instance within the version. Example: instance-1.@ + # OutputOnly + # Corresponds to the JSON property `id` # @return [String] - attr_accessor :vm_status + attr_accessor :id # Availability of the instance.@OutputOnly # Corresponds to the JSON property `availability` @@ -766,50 +345,39 @@ module Google # @return [Fixnum] attr_accessor :errors + # Status of the virtual machine where this instance lives. Only applicable for + # instances in App Engine flexible environment.@OutputOnly + # Corresponds to the JSON property `vmStatus` + # @return [String] + attr_accessor :vm_status + # Time that this instance was started.@OutputOnly # Corresponds to the JSON property `startTime` # @return [String] attr_accessor :start_time - # Whether this instance is in debug mode. Only applicable for instances in App - # Engine flexible environment.@OutputOnly - # Corresponds to the JSON property `vmDebugEnabled` - # @return [Boolean] - attr_accessor :vm_debug_enabled - alias_method :vm_debug_enabled?, :vm_debug_enabled - - # Number of requests since this instance was started.@OutputOnly - # Corresponds to the JSON property `requests` - # @return [Fixnum] - attr_accessor :requests - - # App Engine release this instance is running on.@OutputOnly - # Corresponds to the JSON property `appEngineRelease` - # @return [String] - attr_accessor :app_engine_release - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @vm_debug_enabled = args[:vm_debug_enabled] if args.key?(:vm_debug_enabled) + @requests = args[:requests] if args.key?(:requests) + @app_engine_release = args[:app_engine_release] if args.key?(:app_engine_release) @vm_name = args[:vm_name] if args.key?(:vm_name) - @vm_id = args[:vm_id] if args.key?(:vm_id) @qps = args[:qps] if args.key?(:qps) + @vm_id = args[:vm_id] if args.key?(:vm_id) @vm_zone_name = args[:vm_zone_name] if args.key?(:vm_zone_name) @name = args[:name] if args.key?(:name) @average_latency = args[:average_latency] if args.key?(:average_latency) @vm_ip = args[:vm_ip] if args.key?(:vm_ip) - @id = args[:id] if args.key?(:id) @memory_usage = args[:memory_usage] if args.key?(:memory_usage) - @vm_status = args[:vm_status] if args.key?(:vm_status) + @id = args[:id] if args.key?(:id) @availability = args[:availability] if args.key?(:availability) @errors = args[:errors] if args.key?(:errors) + @vm_status = args[:vm_status] if args.key?(:vm_status) @start_time = args[:start_time] if args.key?(:start_time) - @vm_debug_enabled = args[:vm_debug_enabled] if args.key?(:vm_debug_enabled) - @requests = args[:requests] if args.key?(:requests) - @app_engine_release = args[:app_engine_release] if args.key?(:app_engine_release) end end @@ -818,6 +386,17 @@ module Google class LivenessCheck include Google::Apis::Core::Hashable + # Time before the check is considered failed. + # Corresponds to the JSON property `timeout` + # @return [String] + attr_accessor :timeout + + # Number of consecutive failed checks required before considering the VM + # unhealthy. + # Corresponds to the JSON property `failureThreshold` + # @return [Fixnum] + attr_accessor :failure_threshold + # The initial delay before starting to execute the checks. # Corresponds to the JSON property `initialDelay` # @return [String] @@ -845,16 +424,45 @@ module Google # @return [String] attr_accessor :check_interval - # Number of consecutive failed checks required before considering the VM - # unhealthy. - # Corresponds to the JSON property `failureThreshold` - # @return [Fixnum] - attr_accessor :failure_threshold + def initialize(**args) + update!(**args) + end - # Time before the check is considered failed. - # Corresponds to the JSON property `timeout` - # @return [String] - attr_accessor :timeout + # Update properties of this object + def update!(**args) + @timeout = args[:timeout] if args.key?(:timeout) + @failure_threshold = args[:failure_threshold] if args.key?(:failure_threshold) + @initial_delay = args[:initial_delay] if args.key?(:initial_delay) + @path = args[:path] if args.key?(:path) + @host = args[:host] if args.key?(:host) + @success_threshold = args[:success_threshold] if args.key?(:success_threshold) + @check_interval = args[:check_interval] if args.key?(:check_interval) + end + end + + # Target scaling by network usage. Only applicable for VM runtimes. + class NetworkUtilization + include Google::Apis::Core::Hashable + + # Target packets sent per second. + # Corresponds to the JSON property `targetSentPacketsPerSecond` + # @return [Fixnum] + attr_accessor :target_sent_packets_per_second + + # Target bytes received per second. + # Corresponds to the JSON property `targetReceivedBytesPerSecond` + # @return [Fixnum] + attr_accessor :target_received_bytes_per_second + + # Target packets received per second. + # Corresponds to the JSON property `targetReceivedPacketsPerSecond` + # @return [Fixnum] + attr_accessor :target_received_packets_per_second + + # Target bytes sent per second. + # Corresponds to the JSON property `targetSentBytesPerSecond` + # @return [Fixnum] + attr_accessor :target_sent_bytes_per_second def initialize(**args) update!(**args) @@ -862,13 +470,10 @@ module Google # Update properties of this object def update!(**args) - @initial_delay = args[:initial_delay] if args.key?(:initial_delay) - @path = args[:path] if args.key?(:path) - @host = args[:host] if args.key?(:host) - @success_threshold = args[:success_threshold] if args.key?(:success_threshold) - @check_interval = args[:check_interval] if args.key?(:check_interval) - @failure_threshold = args[:failure_threshold] if args.key?(:failure_threshold) - @timeout = args[:timeout] if args.key?(:timeout) + @target_sent_packets_per_second = args[:target_sent_packets_per_second] if args.key?(:target_sent_packets_per_second) + @target_received_bytes_per_second = args[:target_received_bytes_per_second] if args.key?(:target_received_bytes_per_second) + @target_received_packets_per_second = args[:target_received_packets_per_second] if args.key?(:target_received_packets_per_second) + @target_sent_bytes_per_second = args[:target_sent_bytes_per_second] if args.key?(:target_sent_bytes_per_second) end end @@ -876,12 +481,6 @@ module Google class Location include Google::Apis::Core::Hashable - # Resource name for the location, which may vary between implementations. For - # example: "projects/example-project/locations/us-east1" - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - # The canonical id for this location. For example: "us-east1". # Corresponds to the JSON property `locationId` # @return [String] @@ -899,53 +498,22 @@ module Google # @return [Hash] attr_accessor :labels + # Resource name for the location, which may vary between implementations. For + # example: "projects/example-project/locations/us-east1" + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @name = args[:name] if args.key?(:name) @location_id = args[:location_id] if args.key?(:location_id) @metadata = args[:metadata] if args.key?(:metadata) @labels = args[:labels] if args.key?(:labels) - end - end - - # Target scaling by network usage. Only applicable for VM runtimes. - class NetworkUtilization - include Google::Apis::Core::Hashable - - # Target bytes sent per second. - # Corresponds to the JSON property `targetSentBytesPerSecond` - # @return [Fixnum] - attr_accessor :target_sent_bytes_per_second - - # Target packets sent per second. - # Corresponds to the JSON property `targetSentPacketsPerSecond` - # @return [Fixnum] - attr_accessor :target_sent_packets_per_second - - # Target bytes received per second. - # Corresponds to the JSON property `targetReceivedBytesPerSecond` - # @return [Fixnum] - attr_accessor :target_received_bytes_per_second - - # Target packets received per second. - # Corresponds to the JSON property `targetReceivedPacketsPerSecond` - # @return [Fixnum] - attr_accessor :target_received_packets_per_second - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @target_sent_bytes_per_second = args[:target_sent_bytes_per_second] if args.key?(:target_sent_bytes_per_second) - @target_sent_packets_per_second = args[:target_sent_packets_per_second] if args.key?(:target_sent_packets_per_second) - @target_received_bytes_per_second = args[:target_received_bytes_per_second] if args.key?(:target_received_bytes_per_second) - @target_received_packets_per_second = args[:target_received_packets_per_second] if args.key?(:target_received_packets_per_second) + @name = args[:name] if args.key?(:name) end end @@ -955,6 +523,16 @@ module Google class HealthCheck include Google::Apis::Core::Hashable + # Interval between health checks. + # Corresponds to the JSON property `checkInterval` + # @return [String] + attr_accessor :check_interval + + # Time before the health check is considered failed. + # Corresponds to the JSON property `timeout` + # @return [String] + attr_accessor :timeout + # Number of consecutive failed health checks required before removing traffic. # Corresponds to the JSON property `unhealthyThreshold` # @return [Fixnum] @@ -984,29 +562,19 @@ module Google # @return [Fixnum] attr_accessor :healthy_threshold - # Interval between health checks. - # Corresponds to the JSON property `checkInterval` - # @return [String] - attr_accessor :check_interval - - # Time before the health check is considered failed. - # Corresponds to the JSON property `timeout` - # @return [String] - attr_accessor :timeout - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @check_interval = args[:check_interval] if args.key?(:check_interval) + @timeout = args[:timeout] if args.key?(:timeout) @unhealthy_threshold = args[:unhealthy_threshold] if args.key?(:unhealthy_threshold) @disable_health_check = args[:disable_health_check] if args.key?(:disable_health_check) @host = args[:host] if args.key?(:host) @restart_threshold = args[:restart_threshold] if args.key?(:restart_threshold) @healthy_threshold = args[:healthy_threshold] if args.key?(:healthy_threshold) - @check_interval = args[:check_interval] if args.key?(:check_interval) - @timeout = args[:timeout] if args.key?(:timeout) end end @@ -1015,21 +583,6 @@ module Google class ReadinessCheck include Google::Apis::Core::Hashable - # Interval between health checks. - # Corresponds to the JSON property `checkInterval` - # @return [String] - attr_accessor :check_interval - - # Time before the check is considered failed. - # Corresponds to the JSON property `timeout` - # @return [String] - attr_accessor :timeout - - # Number of consecutive failed checks required before removing traffic. - # Corresponds to the JSON property `failureThreshold` - # @return [Fixnum] - attr_accessor :failure_threshold - # The request path. # Corresponds to the JSON property `path` # @return [String] @@ -1046,18 +599,33 @@ module Google # @return [Fixnum] attr_accessor :success_threshold + # Interval between health checks. + # Corresponds to the JSON property `checkInterval` + # @return [String] + attr_accessor :check_interval + + # Time before the check is considered failed. + # Corresponds to the JSON property `timeout` + # @return [String] + attr_accessor :timeout + + # Number of consecutive failed checks required before removing traffic. + # Corresponds to the JSON property `failureThreshold` + # @return [Fixnum] + attr_accessor :failure_threshold + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @check_interval = args[:check_interval] if args.key?(:check_interval) - @timeout = args[:timeout] if args.key?(:timeout) - @failure_threshold = args[:failure_threshold] if args.key?(:failure_threshold) @path = args[:path] if args.key?(:path) @host = args[:host] if args.key?(:host) @success_threshold = args[:success_threshold] if args.key?(:success_threshold) + @check_interval = args[:check_interval] if args.key?(:check_interval) + @timeout = args[:timeout] if args.key?(:timeout) + @failure_threshold = args[:failure_threshold] if args.key?(:failure_threshold) end end @@ -1134,6 +702,129 @@ module Google class Version include Google::Apis::Core::Hashable + # Instance class that is used to run this version. Valid values are: + # AutomaticScaling: F1, F2, F4, F4_1G + # ManualScaling or BasicScaling: B1, B2, B4, B8, B4_1GDefaults to F1 for + # AutomaticScaling and B1 for ManualScaling or BasicScaling. + # Corresponds to the JSON property `instanceClass` + # @return [String] + attr_accessor :instance_class + + # Current serving status of this version. Only the versions with a SERVING + # status create instances and can be billed.SERVING_STATUS_UNSPECIFIED is an + # invalid value. Defaults to SERVING. + # Corresponds to the JSON property `servingStatus` + # @return [String] + attr_accessor :serving_status + + # Code and application artifacts used to deploy a version to App Engine. + # Corresponds to the JSON property `deployment` + # @return [Google::Apis::AppengineV1::Deployment] + attr_accessor :deployment + + # Time that this version was created.@OutputOnly + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # Machine resources for a version. + # Corresponds to the JSON property `resources` + # @return [Google::Apis::AppengineV1::Resources] + attr_accessor :resources + + # Before an application can receive email or XMPP messages, the application must + # be configured to enable the service. + # Corresponds to the JSON property `inboundServices` + # @return [Array] + attr_accessor :inbound_services + + # Custom static error pages. Limited to 10KB per page.Only returned in GET + # requests if view=FULL is set. + # Corresponds to the JSON property `errorHandlers` + # @return [Array] + attr_accessor :error_handlers + + # Duration that static files should be cached by web proxies and browsers. Only + # applicable if the corresponding StaticFilesHandler (https://cloud.google.com/ + # appengine/docs/admin-api/reference/rest/v1/apps.services.versions# + # staticfileshandler) does not specify its own expiration time.Only returned in + # GET requests if view=FULL is set. + # Corresponds to the JSON property `defaultExpiration` + # @return [String] + attr_accessor :default_expiration + + # Configuration for third-party Python runtime libraries that are required by + # the application.Only returned in GET requests if view=FULL is set. + # Corresponds to the JSON property `libraries` + # @return [Array] + attr_accessor :libraries + + # Files that match this pattern will not be built into this version. Only + # applicable for Go runtimes.Only returned in GET requests if view=FULL is set. + # Corresponds to the JSON property `nobuildFilesRegex` + # @return [String] + attr_accessor :nobuild_files_regex + + # A service with basic scaling will create an instance when the application + # receives a request. The instance will be turned down when the app becomes idle. + # Basic scaling is ideal for work that is intermittent or driven by user + # activity. + # Corresponds to the JSON property `basicScaling` + # @return [Google::Apis::AppengineV1::BasicScaling] + attr_accessor :basic_scaling + + # Desired runtime. Example: python27. + # Corresponds to the JSON property `runtime` + # @return [String] + attr_accessor :runtime + + # Email address of the user who created this version.@OutputOnly + # Corresponds to the JSON property `createdBy` + # @return [String] + attr_accessor :created_by + + # Relative name of the version within the service. Example: v1. Version names + # can contain only lowercase letters, numbers, or hyphens. Reserved names: " + # default", "latest", and any name with the prefix "ah-". + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # Environment variables available to the application.Only returned in GET + # requests if view=FULL is set. + # Corresponds to the JSON property `envVariables` + # @return [Hash] + attr_accessor :env_variables + + # Health checking configuration for VM instances. Unhealthy instances are killed + # and replaced with new instances. + # Corresponds to the JSON property `livenessCheck` + # @return [Google::Apis::AppengineV1::LivenessCheck] + attr_accessor :liveness_check + + # Extra network settings. Only applicable for VM runtimes. + # Corresponds to the JSON property `network` + # @return [Google::Apis::AppengineV1::Network] + attr_accessor :network + + # Metadata settings that are supplied to this version to enable beta runtime + # features. + # Corresponds to the JSON property `betaSettings` + # @return [Hash] + attr_accessor :beta_settings + + # App Engine execution environment for this version.Defaults to standard. + # Corresponds to the JSON property `env` + # @return [String] + attr_accessor :env + + # An ordered list of URL-matching patterns that should be applied to incoming + # requests. The first matching URL handles the request and other request + # handlers are not attempted.Only returned in GET requests if view=FULL is set. + # Corresponds to the JSON property `handlers` + # @return [Array] + attr_accessor :handlers + # Automatic scaling is based on request rate, response latencies, and other # application metrics. # Corresponds to the JSON property `automaticScaling` @@ -1204,135 +895,32 @@ module Google attr_accessor :vm alias_method :vm?, :vm - # Instance class that is used to run this version. Valid values are: - # AutomaticScaling: F1, F2, F4, F4_1G - # ManualScaling or BasicScaling: B1, B2, B4, B8, B4_1GDefaults to F1 for - # AutomaticScaling and B1 for ManualScaling or BasicScaling. - # Corresponds to the JSON property `instanceClass` - # @return [String] - attr_accessor :instance_class - - # Current serving status of this version. Only the versions with a SERVING - # status create instances and can be billed.SERVING_STATUS_UNSPECIFIED is an - # invalid value. Defaults to SERVING. - # Corresponds to the JSON property `servingStatus` - # @return [String] - attr_accessor :serving_status - - # Code and application artifacts used to deploy a version to App Engine. - # Corresponds to the JSON property `deployment` - # @return [Google::Apis::AppengineV1::Deployment] - attr_accessor :deployment - - # Time that this version was created.@OutputOnly - # Corresponds to the JSON property `createTime` - # @return [String] - attr_accessor :create_time - - # Before an application can receive email or XMPP messages, the application must - # be configured to enable the service. - # Corresponds to the JSON property `inboundServices` - # @return [Array] - attr_accessor :inbound_services - - # Machine resources for a version. - # Corresponds to the JSON property `resources` - # @return [Google::Apis::AppengineV1::Resources] - attr_accessor :resources - - # Custom static error pages. Limited to 10KB per page.Only returned in GET - # requests if view=FULL is set. - # Corresponds to the JSON property `errorHandlers` - # @return [Array] - attr_accessor :error_handlers - - # Duration that static files should be cached by web proxies and browsers. Only - # applicable if the corresponding StaticFilesHandler (https://cloud.google.com/ - # appengine/docs/admin-api/reference/rest/v1/apps.services.versions# - # staticfileshandler) does not specify its own expiration time.Only returned in - # GET requests if view=FULL is set. - # Corresponds to the JSON property `defaultExpiration` - # @return [String] - attr_accessor :default_expiration - - # Configuration for third-party Python runtime libraries that are required by - # the application.Only returned in GET requests if view=FULL is set. - # Corresponds to the JSON property `libraries` - # @return [Array] - attr_accessor :libraries - - # Files that match this pattern will not be built into this version. Only - # applicable for Go runtimes.Only returned in GET requests if view=FULL is set. - # Corresponds to the JSON property `nobuildFilesRegex` - # @return [String] - attr_accessor :nobuild_files_regex - - # A service with basic scaling will create an instance when the application - # receives a request. The instance will be turned down when the app becomes idle. - # Basic scaling is ideal for work that is intermittent or driven by user - # activity. - # Corresponds to the JSON property `basicScaling` - # @return [Google::Apis::AppengineV1::BasicScaling] - attr_accessor :basic_scaling - - # Desired runtime. Example: python27. - # Corresponds to the JSON property `runtime` - # @return [String] - attr_accessor :runtime - - # Relative name of the version within the service. Example: v1. Version names - # can contain only lowercase letters, numbers, or hyphens. Reserved names: " - # default", "latest", and any name with the prefix "ah-". - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Email address of the user who created this version.@OutputOnly - # Corresponds to the JSON property `createdBy` - # @return [String] - attr_accessor :created_by - - # Environment variables available to the application.Only returned in GET - # requests if view=FULL is set. - # Corresponds to the JSON property `envVariables` - # @return [Hash] - attr_accessor :env_variables - - # Health checking configuration for VM instances. Unhealthy instances are killed - # and replaced with new instances. - # Corresponds to the JSON property `livenessCheck` - # @return [Google::Apis::AppengineV1::LivenessCheck] - attr_accessor :liveness_check - - # Extra network settings. Only applicable for VM runtimes. - # Corresponds to the JSON property `network` - # @return [Google::Apis::AppengineV1::Network] - attr_accessor :network - - # Metadata settings that are supplied to this version to enable beta runtime - # features. - # Corresponds to the JSON property `betaSettings` - # @return [Hash] - attr_accessor :beta_settings - - # App Engine execution environment for this version.Defaults to standard. - # Corresponds to the JSON property `env` - # @return [String] - attr_accessor :env - - # An ordered list of URL-matching patterns that should be applied to incoming - # requests. The first matching URL handles the request and other request - # handlers are not attempted.Only returned in GET requests if view=FULL is set. - # Corresponds to the JSON property `handlers` - # @return [Array] - attr_accessor :handlers - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @instance_class = args[:instance_class] if args.key?(:instance_class) + @serving_status = args[:serving_status] if args.key?(:serving_status) + @deployment = args[:deployment] if args.key?(:deployment) + @create_time = args[:create_time] if args.key?(:create_time) + @resources = args[:resources] if args.key?(:resources) + @inbound_services = args[:inbound_services] if args.key?(:inbound_services) + @error_handlers = args[:error_handlers] if args.key?(:error_handlers) + @default_expiration = args[:default_expiration] if args.key?(:default_expiration) + @libraries = args[:libraries] if args.key?(:libraries) + @nobuild_files_regex = args[:nobuild_files_regex] if args.key?(:nobuild_files_regex) + @basic_scaling = args[:basic_scaling] if args.key?(:basic_scaling) + @runtime = args[:runtime] if args.key?(:runtime) + @created_by = args[:created_by] if args.key?(:created_by) + @id = args[:id] if args.key?(:id) + @env_variables = args[:env_variables] if args.key?(:env_variables) + @liveness_check = args[:liveness_check] if args.key?(:liveness_check) + @network = args[:network] if args.key?(:network) + @beta_settings = args[:beta_settings] if args.key?(:beta_settings) + @env = args[:env] if args.key?(:env) + @handlers = args[:handlers] if args.key?(:handlers) @automatic_scaling = args[:automatic_scaling] if args.key?(:automatic_scaling) @disk_usage_bytes = args[:disk_usage_bytes] if args.key?(:disk_usage_bytes) @health_check = args[:health_check] if args.key?(:health_check) @@ -1344,26 +932,6 @@ module Google @endpoints_api_service = args[:endpoints_api_service] if args.key?(:endpoints_api_service) @version_url = args[:version_url] if args.key?(:version_url) @vm = args[:vm] if args.key?(:vm) - @instance_class = args[:instance_class] if args.key?(:instance_class) - @serving_status = args[:serving_status] if args.key?(:serving_status) - @deployment = args[:deployment] if args.key?(:deployment) - @create_time = args[:create_time] if args.key?(:create_time) - @inbound_services = args[:inbound_services] if args.key?(:inbound_services) - @resources = args[:resources] if args.key?(:resources) - @error_handlers = args[:error_handlers] if args.key?(:error_handlers) - @default_expiration = args[:default_expiration] if args.key?(:default_expiration) - @libraries = args[:libraries] if args.key?(:libraries) - @nobuild_files_regex = args[:nobuild_files_regex] if args.key?(:nobuild_files_regex) - @basic_scaling = args[:basic_scaling] if args.key?(:basic_scaling) - @runtime = args[:runtime] if args.key?(:runtime) - @id = args[:id] if args.key?(:id) - @created_by = args[:created_by] if args.key?(:created_by) - @env_variables = args[:env_variables] if args.key?(:env_variables) - @liveness_check = args[:liveness_check] if args.key?(:liveness_check) - @network = args[:network] if args.key?(:network) - @beta_settings = args[:beta_settings] if args.key?(:beta_settings) - @env = args[:env] if args.key?(:env) - @handlers = args[:handlers] if args.key?(:handlers) end end @@ -1380,25 +948,6 @@ module Google end end - # Executes a script to handle the request that matches the URL pattern. - class ScriptHandler - include Google::Apis::Core::Hashable - - # Path to the script from the application root directory. - # Corresponds to the JSON property `scriptPath` - # @return [String] - attr_accessor :script_path - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @script_path = args[:script_path] if args.key?(:script_path) - end - end - # Single source file that is part of the version to be deployed. Each source # file that is deployed must be specified separately. class FileInfo @@ -1432,21 +981,29 @@ module Google end end + # Executes a script to handle the request that matches the URL pattern. + class ScriptHandler + include Google::Apis::Core::Hashable + + # Path to the script from the application root directory. + # Corresponds to the JSON property `scriptPath` + # @return [String] + attr_accessor :script_path + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @script_path = args[:script_path] if args.key?(:script_path) + end + end + # Metadata for the given google.longrunning.Operation. class OperationMetadataExperimental include Google::Apis::Core::Hashable - # User who requested this operation.@OutputOnly - # Corresponds to the JSON property `user` - # @return [String] - attr_accessor :user - - # Name of the resource that this operation is acting on. Example: apps/myapp/ - # customDomains/example.com.@OutputOnly - # Corresponds to the JSON property `target` - # @return [String] - attr_accessor :target - # API method that initiated this operation. Example: google.appengine. # experimental.CustomDomains.CreateCustomDomain.@OutputOnly # Corresponds to the JSON property `method` @@ -1463,17 +1020,28 @@ module Google # @return [String] attr_accessor :end_time + # User who requested this operation.@OutputOnly + # Corresponds to the JSON property `user` + # @return [String] + attr_accessor :user + + # Name of the resource that this operation is acting on. Example: apps/myapp/ + # customDomains/example.com.@OutputOnly + # Corresponds to the JSON property `target` + # @return [String] + attr_accessor :target + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @user = args[:user] if args.key?(:user) - @target = args[:target] if args.key?(:target) @method_prop = args[:method_prop] if args.key?(:method_prop) @insert_time = args[:insert_time] if args.key?(:insert_time) @end_time = args[:end_time] if args.key?(:end_time) + @user = args[:user] if args.key?(:user) + @target = args[:target] if args.key?(:target) end end @@ -1515,6 +1083,17 @@ module Google class OperationMetadataV1Beta include Google::Apis::Core::Hashable + # Name of the resource that this operation is acting on. Example: apps/myapp/ + # services/default.@OutputOnly + # Corresponds to the JSON property `target` + # @return [String] + attr_accessor :target + + # User who requested this operation.@OutputOnly + # Corresponds to the JSON property `user` + # @return [String] + attr_accessor :user + # Ephemeral message that may change every time the operation is polled. @ # OutputOnly # Corresponds to the JSON property `ephemeralMessage` @@ -1542,30 +1121,19 @@ module Google # @return [String] attr_accessor :insert_time - # User who requested this operation.@OutputOnly - # Corresponds to the JSON property `user` - # @return [String] - attr_accessor :user - - # Name of the resource that this operation is acting on. Example: apps/myapp/ - # services/default.@OutputOnly - # Corresponds to the JSON property `target` - # @return [String] - attr_accessor :target - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @target = args[:target] if args.key?(:target) + @user = args[:user] if args.key?(:user) @ephemeral_message = args[:ephemeral_message] if args.key?(:ephemeral_message) @method_prop = args[:method_prop] if args.key?(:method_prop) @end_time = args[:end_time] if args.key?(:end_time) @warning = args[:warning] if args.key?(:warning) @insert_time = args[:insert_time] if args.key?(:insert_time) - @user = args[:user] if args.key?(:user) - @target = args[:target] if args.key?(:target) end end @@ -1594,41 +1162,6 @@ module Google end end - # Code and application artifacts used to deploy a version to App Engine. - class Deployment - include Google::Apis::Core::Hashable - - # Manifest of the files stored in Google Cloud Storage that are included as part - # of this version. All files must be readable using the credentials supplied - # with this call. - # Corresponds to the JSON property `files` - # @return [Hash] - attr_accessor :files - - # The zip file information for a zip deployment. - # Corresponds to the JSON property `zip` - # @return [Google::Apis::AppengineV1::ZipInfo] - attr_accessor :zip - - # Docker image that is used to create a container and start a VM instance for - # the version that you deploy. Only applicable for instances running in the App - # Engine flexible environment. - # Corresponds to the JSON property `container` - # @return [Google::Apis::AppengineV1::ContainerInfo] - attr_accessor :container - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @files = args[:files] if args.key?(:files) - @zip = args[:zip] if args.key?(:zip) - @container = args[:container] if args.key?(:container) - end - end - # Machine resources for a version. class Resources include Google::Apis::Core::Hashable @@ -1666,6 +1199,41 @@ module Google end end + # Code and application artifacts used to deploy a version to App Engine. + class Deployment + include Google::Apis::Core::Hashable + + # The zip file information for a zip deployment. + # Corresponds to the JSON property `zip` + # @return [Google::Apis::AppengineV1::ZipInfo] + attr_accessor :zip + + # Docker image that is used to create a container and start a VM instance for + # the version that you deploy. Only applicable for instances running in the App + # Engine flexible environment. + # Corresponds to the JSON property `container` + # @return [Google::Apis::AppengineV1::ContainerInfo] + attr_accessor :container + + # Manifest of the files stored in Google Cloud Storage that are included as part + # of this version. All files must be readable using the credentials supplied + # with this call. + # Corresponds to the JSON property `files` + # @return [Hash] + attr_accessor :files + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @zip = args[:zip] if args.key?(:zip) + @container = args[:container] if args.key?(:container) + @files = args[:files] if args.key?(:files) + end + end + # Volumes mounted within the app container. Only applicable for VM runtimes. class Volume include Google::Apis::Core::Hashable @@ -1801,11 +1369,44 @@ module Google end end + # The zip file information for a zip deployment. + class ZipInfo + include Google::Apis::Core::Hashable + + # URL of the zip file to deploy from. Must be a URL to a resource in Google + # Cloud Storage in the form 'http(s)://storage.googleapis.com//'. + # Corresponds to the JSON property `sourceUrl` + # @return [String] + attr_accessor :source_url + + # An estimate of the number of files in a zip for a zip deployment. If set, must + # be greater than or equal to the actual number of files. Used for optimizing + # performance; if not provided, deployment may be slow. + # Corresponds to the JSON property `filesCount` + # @return [Fixnum] + attr_accessor :files_count + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @source_url = args[:source_url] if args.key?(:source_url) + @files_count = args[:files_count] if args.key?(:files_count) + end + end + # Automatic scaling is based on request rate, response latencies, and other # application metrics. class AutomaticScaling include Google::Apis::Core::Hashable + # Target scaling by disk usage. Only applicable for VM runtimes. + # Corresponds to the JSON property `diskUtilization` + # @return [Google::Apis::AppengineV1::DiskUtilization] + attr_accessor :disk_utilization + # Minimum amount of time a request should wait in the pending queue before # starting a new instance to handle it. # Corresponds to the JSON property `minPendingLatency` @@ -1867,17 +1468,13 @@ module Google # @return [Google::Apis::AppengineV1::CpuUtilization] attr_accessor :cpu_utilization - # Target scaling by disk usage. Only applicable for VM runtimes. - # Corresponds to the JSON property `diskUtilization` - # @return [Google::Apis::AppengineV1::DiskUtilization] - attr_accessor :disk_utilization - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @disk_utilization = args[:disk_utilization] if args.key?(:disk_utilization) @min_pending_latency = args[:min_pending_latency] if args.key?(:min_pending_latency) @request_utilization = args[:request_utilization] if args.key?(:request_utilization) @max_idle_instances = args[:max_idle_instances] if args.key?(:max_idle_instances) @@ -1889,35 +1486,6 @@ module Google @cool_down_period = args[:cool_down_period] if args.key?(:cool_down_period) @max_pending_latency = args[:max_pending_latency] if args.key?(:max_pending_latency) @cpu_utilization = args[:cpu_utilization] if args.key?(:cpu_utilization) - @disk_utilization = args[:disk_utilization] if args.key?(:disk_utilization) - end - end - - # The zip file information for a zip deployment. - class ZipInfo - include Google::Apis::Core::Hashable - - # URL of the zip file to deploy from. Must be a URL to a resource in Google - # Cloud Storage in the form 'http(s)://storage.googleapis.com//'. - # Corresponds to the JSON property `sourceUrl` - # @return [String] - attr_accessor :source_url - - # An estimate of the number of files in a zip for a zip deployment. If set, must - # be greater than or equal to the actual number of files. Used for optimizing - # performance; if not provided, deployment may be slow. - # Corresponds to the JSON property `filesCount` - # @return [Fixnum] - attr_accessor :files_count - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @source_url = args[:source_url] if args.key?(:source_url) - @files_count = args[:files_count] if args.key?(:files_count) end end @@ -1925,24 +1493,24 @@ module Google class Library include Google::Apis::Core::Hashable - # Name of the library. Example: "django". - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - # Version of the library to select, or "latest". # Corresponds to the JSON property `version` # @return [String] attr_accessor :version + # Name of the library. Example: "django". + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @name = args[:name] if args.key?(:name) @version = args[:version] if args.key?(:version) + @name = args[:name] if args.key?(:name) end end @@ -2056,6 +1624,11 @@ module Google class UrlMap include Google::Apis::Core::Hashable + # Level of login required to access this resource. + # Corresponds to the JSON property `login` + # @return [String] + attr_accessor :login + # Uses Google Cloud Endpoints to handle requests. # Corresponds to the JSON property `apiEndpoint` # @return [Google::Apis::AppengineV1::ApiEndpointHandler] @@ -2098,17 +1671,13 @@ module Google # @return [String] attr_accessor :url_regex - # Level of login required to access this resource. - # Corresponds to the JSON property `login` - # @return [String] - attr_accessor :login - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @login = args[:login] if args.key?(:login) @api_endpoint = args[:api_endpoint] if args.key?(:api_endpoint) @static_files = args[:static_files] if args.key?(:static_files) @redirect_http_response_code = args[:redirect_http_response_code] if args.key?(:redirect_http_response_code) @@ -2116,7 +1685,6 @@ module Google @auth_fail_action = args[:auth_fail_action] if args.key?(:auth_fail_action) @script = args[:script] if args.key?(:script) @url_regex = args[:url_regex] if args.key?(:url_regex) - @login = args[:login] if args.key?(:login) end end @@ -2170,6 +1738,24 @@ module Google class Operation include Google::Apis::Core::Hashable + # If the value is false, it means the operation is still in progress. If true, + # the operation is completed, and either error or response is available. + # Corresponds to the JSON property `done` + # @return [Boolean] + attr_accessor :done + alias_method :done?, :done + + # The normal response of the operation in case of success. If the original + # method returns no data on success, such as Delete, the response is google. + # protobuf.Empty. If the original method is standard Get/Create/Update, the + # response should be the resource. For other methods, the response should have + # the type XxxResponse, where Xxx is the original method name. For example, if + # the original method name is TakeSnapshot(), the inferred response type is + # TakeSnapshotResponse. + # Corresponds to the JSON property `response` + # @return [Hash] + attr_accessor :response + # The server-assigned name, which is only unique within the same service that # originally returns it. If you use the default HTTP mapping, the name should # have the format of operations/some/unique/name. @@ -2189,7 +1775,7 @@ module Google # user-facing error message is needed, put the localized message in the error # details or localize it in the client. The optional error details may contain # arbitrary information about the error. There is a predefined set of error - # detail types in the package google.rpc which can be used for common error + # detail types in the package google.rpc that can be used for common error # conditions.Language mappingThe Status message is the logical representation of # the error model, but it is not necessarily the actual wire format. When the # Status message is exposed in different client libraries and different wire @@ -2202,7 +1788,7 @@ module Google # Partial errors. If a service needs to return partial errors to the client, it # may embed the Status in the normal response to indicate the partial errors. # Workflow errors. A typical workflow has multiple steps. Each step may have a - # Status message for error reporting purpose. + # Status message for error reporting. # Batch operations. If a client uses batch request and batch response, the # Status message should be used directly inside batch response, one for each # error sub-response. @@ -2223,23 +1809,70 @@ module Google # @return [Hash] attr_accessor :metadata - # If the value is false, it means the operation is still in progress. If true, - # the operation is completed, and either error or response is available. - # Corresponds to the JSON property `done` - # @return [Boolean] - attr_accessor :done - alias_method :done?, :done + def initialize(**args) + update!(**args) + end - # The normal response of the operation in case of success. If the original - # method returns no data on success, such as Delete, the response is google. - # protobuf.Empty. If the original method is standard Get/Create/Update, the - # response should be the resource. For other methods, the response should have - # the type XxxResponse, where Xxx is the original method name. For example, if - # the original method name is TakeSnapshot(), the inferred response type is - # TakeSnapshotResponse. - # Corresponds to the JSON property `response` - # @return [Hash] - attr_accessor :response + # Update properties of this object + def update!(**args) + @done = args[:done] if args.key?(:done) + @response = args[:response] if args.key?(:response) + @name = args[:name] if args.key?(:name) + @error = args[:error] if args.key?(:error) + @metadata = args[:metadata] if args.key?(:metadata) + end + end + + # Files served directly to the user for a given URL, such as images, CSS + # stylesheets, or JavaScript source files. Static file handlers describe which + # files in the application directory are static files, and which URLs serve them. + class StaticFilesHandler + include Google::Apis::Core::Hashable + + # Time a static file served by this handler should be cached by web proxies and + # browsers. + # Corresponds to the JSON property `expiration` + # @return [String] + attr_accessor :expiration + + # Whether files should also be uploaded as code data. By default, files declared + # in static file handlers are uploaded as static data and are only served to end + # users; they cannot be read by the application. If enabled, uploads are charged + # against both your code and static data storage resource quotas. + # Corresponds to the JSON property `applicationReadable` + # @return [Boolean] + attr_accessor :application_readable + alias_method :application_readable?, :application_readable + + # HTTP headers to use for all responses from these URLs. + # Corresponds to the JSON property `httpHeaders` + # @return [Hash] + attr_accessor :http_headers + + # Regular expression that matches the file paths for all files that should be + # referenced by this handler. + # Corresponds to the JSON property `uploadPathRegex` + # @return [String] + attr_accessor :upload_path_regex + + # Path to the static files matched by the URL pattern, from the application root + # directory. The path can refer to text matched in groupings in the URL pattern. + # Corresponds to the JSON property `path` + # @return [String] + attr_accessor :path + + # MIME type used to serve all files served by this handler.Defaults to file- + # specific MIME types, which are derived from each file's filename extension. + # Corresponds to the JSON property `mimeType` + # @return [String] + attr_accessor :mime_type + + # Whether this handler should match the request if the file referenced by the + # handler does not exist. + # Corresponds to the JSON property `requireMatchingFile` + # @return [Boolean] + attr_accessor :require_matching_file + alias_method :require_matching_file?, :require_matching_file def initialize(**args) update!(**args) @@ -2247,11 +1880,378 @@ module Google # Update properties of this object def update!(**args) + @expiration = args[:expiration] if args.key?(:expiration) + @application_readable = args[:application_readable] if args.key?(:application_readable) + @http_headers = args[:http_headers] if args.key?(:http_headers) + @upload_path_regex = args[:upload_path_regex] if args.key?(:upload_path_regex) + @path = args[:path] if args.key?(:path) + @mime_type = args[:mime_type] if args.key?(:mime_type) + @require_matching_file = args[:require_matching_file] if args.key?(:require_matching_file) + end + end + + # A service with basic scaling will create an instance when the application + # receives a request. The instance will be turned down when the app becomes idle. + # Basic scaling is ideal for work that is intermittent or driven by user + # activity. + class BasicScaling + include Google::Apis::Core::Hashable + + # Maximum number of instances to create for this version. + # Corresponds to the JSON property `maxInstances` + # @return [Fixnum] + attr_accessor :max_instances + + # Duration of time after the last request that an instance must wait before the + # instance is shut down. + # Corresponds to the JSON property `idleTimeout` + # @return [String] + attr_accessor :idle_timeout + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @max_instances = args[:max_instances] if args.key?(:max_instances) + @idle_timeout = args[:idle_timeout] if args.key?(:idle_timeout) + end + end + + # Target scaling by disk usage. Only applicable for VM runtimes. + class DiskUtilization + include Google::Apis::Core::Hashable + + # Target bytes written per second. + # Corresponds to the JSON property `targetWriteBytesPerSecond` + # @return [Fixnum] + attr_accessor :target_write_bytes_per_second + + # Target bytes read per second. + # Corresponds to the JSON property `targetReadBytesPerSecond` + # @return [Fixnum] + attr_accessor :target_read_bytes_per_second + + # Target ops read per seconds. + # Corresponds to the JSON property `targetReadOpsPerSecond` + # @return [Fixnum] + attr_accessor :target_read_ops_per_second + + # Target ops written per second. + # Corresponds to the JSON property `targetWriteOpsPerSecond` + # @return [Fixnum] + attr_accessor :target_write_ops_per_second + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @target_write_bytes_per_second = args[:target_write_bytes_per_second] if args.key?(:target_write_bytes_per_second) + @target_read_bytes_per_second = args[:target_read_bytes_per_second] if args.key?(:target_read_bytes_per_second) + @target_read_ops_per_second = args[:target_read_ops_per_second] if args.key?(:target_read_ops_per_second) + @target_write_ops_per_second = args[:target_write_ops_per_second] if args.key?(:target_write_ops_per_second) + end + end + + # Target scaling by CPU usage. + class CpuUtilization + include Google::Apis::Core::Hashable + + # Period of time over which CPU utilization is calculated. + # Corresponds to the JSON property `aggregationWindowLength` + # @return [String] + attr_accessor :aggregation_window_length + + # Target CPU utilization ratio to maintain when scaling. Must be between 0 and 1. + # Corresponds to the JSON property `targetUtilization` + # @return [Float] + attr_accessor :target_utilization + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @aggregation_window_length = args[:aggregation_window_length] if args.key?(:aggregation_window_length) + @target_utilization = args[:target_utilization] if args.key?(:target_utilization) + end + end + + # The Status type defines a logical error model that is suitable for different + # programming environments, including REST APIs and RPC APIs. It is used by gRPC + # (https://github.com/grpc). The error model is designed to be: + # Simple to use and understand for most users + # Flexible enough to meet unexpected needsOverviewThe Status message contains + # three pieces of data: error code, error message, and error details. The error + # code should be an enum value of google.rpc.Code, but it may accept additional + # error codes if needed. The error message should be a developer-facing English + # message that helps developers understand and resolve the error. If a localized + # user-facing error message is needed, put the localized message in the error + # details or localize it in the client. The optional error details may contain + # arbitrary information about the error. There is a predefined set of error + # detail types in the package google.rpc that can be used for common error + # conditions.Language mappingThe Status message is the logical representation of + # the error model, but it is not necessarily the actual wire format. When the + # Status message is exposed in different client libraries and different wire + # protocols, it can be mapped differently. For example, it will likely be mapped + # to some exceptions in Java, but more likely mapped to some error codes in C. + # Other usesThe error model and the Status message can be used in a variety of + # environments, either with or without APIs, to provide a consistent developer + # experience across different environments.Example uses of this error model + # include: + # Partial errors. If a service needs to return partial errors to the client, it + # may embed the Status in the normal response to indicate the partial errors. + # Workflow errors. A typical workflow has multiple steps. Each step may have a + # Status message for error reporting. + # Batch operations. If a client uses batch request and batch response, the + # Status message should be used directly inside batch response, one for each + # error sub-response. + # Asynchronous operations. If an API call embeds asynchronous operation results + # in its response, the status of those operations should be represented directly + # using the Status message. + # Logging. If some API errors are stored in logs, the message Status could be + # used directly after any stripping needed for security/privacy reasons. + class Status + include Google::Apis::Core::Hashable + + # The status code, which should be an enum value of google.rpc.Code. + # Corresponds to the JSON property `code` + # @return [Fixnum] + attr_accessor :code + + # A developer-facing error message, which should be in English. Any user-facing + # error message should be localized and sent in the google.rpc.Status.details + # field, or localized by the client. + # Corresponds to the JSON property `message` + # @return [String] + attr_accessor :message + + # A list of messages that carry the error details. There will be a common set of + # message types for APIs to use. + # Corresponds to the JSON property `details` + # @return [Array>] + attr_accessor :details + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @code = args[:code] if args.key?(:code) + @message = args[:message] if args.key?(:message) + @details = args[:details] if args.key?(:details) + end + end + + # Identity-Aware Proxy + class IdentityAwareProxy + include Google::Apis::Core::Hashable + + # OAuth2 client secret to use for the authentication flow.For security reasons, + # this value cannot be retrieved via the API. Instead, the SHA-256 hash of the + # value is returned in the oauth2_client_secret_sha256 field.@InputOnly + # Corresponds to the JSON property `oauth2ClientSecret` + # @return [String] + attr_accessor :oauth2_client_secret + + # OAuth2 client ID to use for the authentication flow. + # Corresponds to the JSON property `oauth2ClientId` + # @return [String] + attr_accessor :oauth2_client_id + + # Hex-encoded SHA-256 hash of the client secret.@OutputOnly + # Corresponds to the JSON property `oauth2ClientSecretSha256` + # @return [String] + attr_accessor :oauth2_client_secret_sha256 + + # Whether the serving infrastructure will authenticate and authorize all + # incoming requests.If true, the oauth2_client_id and oauth2_client_secret + # fields must be non-empty. + # Corresponds to the JSON property `enabled` + # @return [Boolean] + attr_accessor :enabled + alias_method :enabled?, :enabled + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @oauth2_client_secret = args[:oauth2_client_secret] if args.key?(:oauth2_client_secret) + @oauth2_client_id = args[:oauth2_client_id] if args.key?(:oauth2_client_id) + @oauth2_client_secret_sha256 = args[:oauth2_client_secret_sha256] if args.key?(:oauth2_client_secret_sha256) + @enabled = args[:enabled] if args.key?(:enabled) + end + end + + # A service with manual scaling runs continuously, allowing you to perform + # complex initialization and rely on the state of its memory over time. + class ManualScaling + include Google::Apis::Core::Hashable + + # Number of instances to assign to the service at the start. This number can + # later be altered by using the Modules API (https://cloud.google.com/appengine/ + # docs/python/modules/functions) set_num_instances() function. + # Corresponds to the JSON property `instances` + # @return [Fixnum] + attr_accessor :instances + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @instances = args[:instances] if args.key?(:instances) + end + end + + # Metadata for the given google.cloud.location.Location. + class LocationMetadata + include Google::Apis::Core::Hashable + + # App Engine Standard Environment is available in the given location.@OutputOnly + # Corresponds to the JSON property `standardEnvironmentAvailable` + # @return [Boolean] + attr_accessor :standard_environment_available + alias_method :standard_environment_available?, :standard_environment_available + + # App Engine Flexible Environment is available in the given location.@OutputOnly + # Corresponds to the JSON property `flexibleEnvironmentAvailable` + # @return [Boolean] + attr_accessor :flexible_environment_available + alias_method :flexible_environment_available?, :flexible_environment_available + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @standard_environment_available = args[:standard_environment_available] if args.key?(:standard_environment_available) + @flexible_environment_available = args[:flexible_environment_available] if args.key?(:flexible_environment_available) + end + end + + # A Service resource is a logical component of an application that can share + # state and communicate in a secure fashion with other services. For example, an + # application that handles customer requests might include separate services to + # handle tasks such as backend data analysis or API requests from mobile devices. + # Each service has a collection of versions that define a specific set of code + # used to implement the functionality of that service. + class Service + include Google::Apis::Core::Hashable + + # Relative name of the service within the application. Example: default.@ + # OutputOnly + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # Full path to the Service resource in the API. Example: apps/myapp/services/ + # default.@OutputOnly + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Traffic routing configuration for versions within a single service. Traffic + # splits define how traffic directed to the service is assigned to versions. + # Corresponds to the JSON property `split` + # @return [Google::Apis::AppengineV1::TrafficSplit] + attr_accessor :split + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @id = args[:id] if args.key?(:id) @name = args[:name] if args.key?(:name) - @error = args[:error] if args.key?(:error) - @metadata = args[:metadata] if args.key?(:metadata) - @done = args[:done] if args.key?(:done) - @response = args[:response] if args.key?(:response) + @split = args[:split] if args.key?(:split) + end + end + + # The response message for Operations.ListOperations. + class ListOperationsResponse + include Google::Apis::Core::Hashable + + # The standard List next-page token. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # A list of operations that matches the specified filter in the request. + # Corresponds to the JSON property `operations` + # @return [Array] + attr_accessor :operations + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @operations = args[:operations] if args.key?(:operations) + end + end + + # Metadata for the given google.longrunning.Operation. + class OperationMetadata + include Google::Apis::Core::Hashable + + # Timestamp that this operation was created.@OutputOnly + # Corresponds to the JSON property `insertTime` + # @return [String] + attr_accessor :insert_time + + # Name of the resource that this operation is acting on. Example: apps/myapp/ + # modules/default.@OutputOnly + # Corresponds to the JSON property `target` + # @return [String] + attr_accessor :target + + # User who requested this operation.@OutputOnly + # Corresponds to the JSON property `user` + # @return [String] + attr_accessor :user + + # API method that initiated this operation. Example: google.appengine.v1beta4. + # Version.CreateVersion.@OutputOnly + # Corresponds to the JSON property `method` + # @return [String] + attr_accessor :method_prop + + # Timestamp that this operation completed.@OutputOnly + # Corresponds to the JSON property `endTime` + # @return [String] + attr_accessor :end_time + + # Type of this operation. Deprecated, use method field instead. Example: " + # create_version".@OutputOnly + # Corresponds to the JSON property `operationType` + # @return [String] + attr_accessor :operation_type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @insert_time = args[:insert_time] if args.key?(:insert_time) + @target = args[:target] if args.key?(:target) + @user = args[:user] if args.key?(:user) + @method_prop = args[:method_prop] if args.key?(:method_prop) + @end_time = args[:end_time] if args.key?(:end_time) + @operation_type = args[:operation_type] if args.key?(:operation_type) end end end diff --git a/generated/google/apis/appengine_v1/representations.rb b/generated/google/apis/appengine_v1/representations.rb index cecf5b01b..aa4bdd5ff 100644 --- a/generated/google/apis/appengine_v1/representations.rb +++ b/generated/google/apis/appengine_v1/representations.rb @@ -22,72 +22,6 @@ module Google module Apis module AppengineV1 - class StaticFilesHandler - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DiskUtilization - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BasicScaling - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CpuUtilization - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Status - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class IdentityAwareProxy - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ManualScaling - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class LocationMetadata - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Service - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListOperationsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class OperationMetadata - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class ErrorHandler class Representation < Google::Apis::Core::JsonRepresentation; end @@ -124,13 +58,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class Location + class NetworkUtilization class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class NetworkUtilization + class Location class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -172,13 +106,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class ScriptHandler + class FileInfo class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class FileInfo + class ScriptHandler class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -208,13 +142,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class Deployment + class Resources class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class Resources + class Deployment class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -250,13 +184,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class AutomaticScaling + class ZipInfo class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class ZipInfo + class AutomaticScaling class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -311,107 +245,69 @@ module Google end class StaticFilesHandler - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :expiration, as: 'expiration' - property :application_readable, as: 'applicationReadable' - hash :http_headers, as: 'httpHeaders' - property :upload_path_regex, as: 'uploadPathRegex' - property :path, as: 'path' - property :mime_type, as: 'mimeType' - property :require_matching_file, as: 'requireMatchingFile' - end - end + class Representation < Google::Apis::Core::JsonRepresentation; end - class DiskUtilization - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :target_read_bytes_per_second, as: 'targetReadBytesPerSecond' - property :target_read_ops_per_second, as: 'targetReadOpsPerSecond' - property :target_write_ops_per_second, as: 'targetWriteOpsPerSecond' - property :target_write_bytes_per_second, as: 'targetWriteBytesPerSecond' - end + include Google::Apis::Core::JsonObjectSupport end class BasicScaling - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :max_instances, as: 'maxInstances' - property :idle_timeout, as: 'idleTimeout' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DiskUtilization + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class CpuUtilization - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :aggregation_window_length, as: 'aggregationWindowLength' - property :target_utilization, as: 'targetUtilization' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class Status - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :code, as: 'code' - property :message, as: 'message' - collection :details, as: 'details' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class IdentityAwareProxy - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :oauth2_client_secret, as: 'oauth2ClientSecret' - property :oauth2_client_id, as: 'oauth2ClientId' - property :oauth2_client_secret_sha256, as: 'oauth2ClientSecretSha256' - property :enabled, as: 'enabled' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ManualScaling - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :instances, as: 'instances' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class LocationMetadata - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :flexible_environment_available, as: 'flexibleEnvironmentAvailable' - property :standard_environment_available, as: 'standardEnvironmentAvailable' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class Service - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - property :split, as: 'split', class: Google::Apis::AppengineV1::TrafficSplit, decorator: Google::Apis::AppengineV1::TrafficSplit::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :id, as: 'id' - end + include Google::Apis::Core::JsonObjectSupport end class ListOperationsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - collection :operations, as: 'operations', class: Google::Apis::AppengineV1::Operation, decorator: Google::Apis::AppengineV1::Operation::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class OperationMetadata - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :operation_type, as: 'operationType' - property :insert_time, as: 'insertTime' - property :user, as: 'user' - property :target, as: 'target' - property :method_prop, as: 'method' - property :end_time, as: 'endTime' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ErrorHandler @@ -426,13 +322,13 @@ module Google class OperationMetadataV1 # @private class Representation < Google::Apis::Core::JsonRepresentation - property :method_prop, as: 'method' - property :end_time, as: 'endTime' - property :insert_time, as: 'insertTime' - collection :warning, as: 'warning' property :target, as: 'target' property :user, as: 'user' property :ephemeral_message, as: 'ephemeralMessage' + property :method_prop, as: 'method' + property :end_time, as: 'endTime' + collection :warning, as: 'warning' + property :insert_time, as: 'insertTime' end end @@ -449,10 +345,12 @@ module Google class Application # @private class Representation < Google::Apis::Core::JsonRepresentation + collection :dispatch_rules, as: 'dispatchRules', class: Google::Apis::AppengineV1::UrlDispatchRule, decorator: Google::Apis::AppengineV1::UrlDispatchRule::Representation + property :gcr_domain, as: 'gcrDomain' property :name, as: 'name' - property :id, as: 'id' property :default_cookie_expiration, as: 'defaultCookieExpiration' + property :id, as: 'id' property :location_id, as: 'locationId' property :serving_status, as: 'servingStatus' property :default_hostname, as: 'defaultHostname' @@ -461,88 +359,86 @@ module Google property :auth_domain, as: 'authDomain' property :code_bucket, as: 'codeBucket' property :default_bucket, as: 'defaultBucket' - collection :dispatch_rules, as: 'dispatchRules', class: Google::Apis::AppengineV1::UrlDispatchRule, decorator: Google::Apis::AppengineV1::UrlDispatchRule::Representation - end end class Instance # @private class Representation < Google::Apis::Core::JsonRepresentation + property :vm_debug_enabled, as: 'vmDebugEnabled' + property :requests, as: 'requests' + property :app_engine_release, as: 'appEngineRelease' property :vm_name, as: 'vmName' - property :vm_id, as: 'vmId' property :qps, as: 'qps' + property :vm_id, as: 'vmId' property :vm_zone_name, as: 'vmZoneName' property :name, as: 'name' property :average_latency, as: 'averageLatency' property :vm_ip, as: 'vmIp' - property :id, as: 'id' property :memory_usage, :numeric_string => true, as: 'memoryUsage' - property :vm_status, as: 'vmStatus' + property :id, as: 'id' property :availability, as: 'availability' property :errors, as: 'errors' + property :vm_status, as: 'vmStatus' property :start_time, as: 'startTime' - property :vm_debug_enabled, as: 'vmDebugEnabled' - property :requests, as: 'requests' - property :app_engine_release, as: 'appEngineRelease' end end class LivenessCheck # @private class Representation < Google::Apis::Core::JsonRepresentation + property :timeout, as: 'timeout' + property :failure_threshold, as: 'failureThreshold' property :initial_delay, as: 'initialDelay' property :path, as: 'path' property :host, as: 'host' property :success_threshold, as: 'successThreshold' property :check_interval, as: 'checkInterval' - property :failure_threshold, as: 'failureThreshold' - property :timeout, as: 'timeout' - end - end - - class Location - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - property :location_id, as: 'locationId' - hash :metadata, as: 'metadata' - hash :labels, as: 'labels' end end class NetworkUtilization # @private class Representation < Google::Apis::Core::JsonRepresentation - property :target_sent_bytes_per_second, as: 'targetSentBytesPerSecond' property :target_sent_packets_per_second, as: 'targetSentPacketsPerSecond' property :target_received_bytes_per_second, as: 'targetReceivedBytesPerSecond' property :target_received_packets_per_second, as: 'targetReceivedPacketsPerSecond' + property :target_sent_bytes_per_second, as: 'targetSentBytesPerSecond' + end + end + + class Location + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :location_id, as: 'locationId' + hash :metadata, as: 'metadata' + hash :labels, as: 'labels' + property :name, as: 'name' end end class HealthCheck # @private class Representation < Google::Apis::Core::JsonRepresentation + property :check_interval, as: 'checkInterval' + property :timeout, as: 'timeout' property :unhealthy_threshold, as: 'unhealthyThreshold' property :disable_health_check, as: 'disableHealthCheck' property :host, as: 'host' property :restart_threshold, as: 'restartThreshold' property :healthy_threshold, as: 'healthyThreshold' - property :check_interval, as: 'checkInterval' - property :timeout, as: 'timeout' end end class ReadinessCheck # @private class Representation < Google::Apis::Core::JsonRepresentation - property :check_interval, as: 'checkInterval' - property :timeout, as: 'timeout' - property :failure_threshold, as: 'failureThreshold' property :path, as: 'path' property :host, as: 'host' property :success_threshold, as: 'successThreshold' + property :check_interval, as: 'checkInterval' + property :timeout, as: 'timeout' + property :failure_threshold, as: 'failureThreshold' end end @@ -567,6 +463,34 @@ module Google class Version # @private class Representation < Google::Apis::Core::JsonRepresentation + property :instance_class, as: 'instanceClass' + property :serving_status, as: 'servingStatus' + property :deployment, as: 'deployment', class: Google::Apis::AppengineV1::Deployment, decorator: Google::Apis::AppengineV1::Deployment::Representation + + property :create_time, as: 'createTime' + property :resources, as: 'resources', class: Google::Apis::AppengineV1::Resources, decorator: Google::Apis::AppengineV1::Resources::Representation + + collection :inbound_services, as: 'inboundServices' + collection :error_handlers, as: 'errorHandlers', class: Google::Apis::AppengineV1::ErrorHandler, decorator: Google::Apis::AppengineV1::ErrorHandler::Representation + + property :default_expiration, as: 'defaultExpiration' + collection :libraries, as: 'libraries', class: Google::Apis::AppengineV1::Library, decorator: Google::Apis::AppengineV1::Library::Representation + + property :nobuild_files_regex, as: 'nobuildFilesRegex' + property :basic_scaling, as: 'basicScaling', class: Google::Apis::AppengineV1::BasicScaling, decorator: Google::Apis::AppengineV1::BasicScaling::Representation + + property :runtime, as: 'runtime' + property :created_by, as: 'createdBy' + property :id, as: 'id' + hash :env_variables, as: 'envVariables' + property :liveness_check, as: 'livenessCheck', class: Google::Apis::AppengineV1::LivenessCheck, decorator: Google::Apis::AppengineV1::LivenessCheck::Representation + + property :network, as: 'network', class: Google::Apis::AppengineV1::Network, decorator: Google::Apis::AppengineV1::Network::Representation + + hash :beta_settings, as: 'betaSettings' + property :env, as: 'env' + collection :handlers, as: 'handlers', class: Google::Apis::AppengineV1::UrlMap, decorator: Google::Apis::AppengineV1::UrlMap::Representation + property :automatic_scaling, as: 'automaticScaling', class: Google::Apis::AppengineV1::AutomaticScaling, decorator: Google::Apis::AppengineV1::AutomaticScaling::Representation property :disk_usage_bytes, :numeric_string => true, as: 'diskUsageBytes' @@ -584,34 +508,6 @@ module Google property :version_url, as: 'versionUrl' property :vm, as: 'vm' - property :instance_class, as: 'instanceClass' - property :serving_status, as: 'servingStatus' - property :deployment, as: 'deployment', class: Google::Apis::AppengineV1::Deployment, decorator: Google::Apis::AppengineV1::Deployment::Representation - - property :create_time, as: 'createTime' - collection :inbound_services, as: 'inboundServices' - property :resources, as: 'resources', class: Google::Apis::AppengineV1::Resources, decorator: Google::Apis::AppengineV1::Resources::Representation - - collection :error_handlers, as: 'errorHandlers', class: Google::Apis::AppengineV1::ErrorHandler, decorator: Google::Apis::AppengineV1::ErrorHandler::Representation - - property :default_expiration, as: 'defaultExpiration' - collection :libraries, as: 'libraries', class: Google::Apis::AppengineV1::Library, decorator: Google::Apis::AppengineV1::Library::Representation - - property :nobuild_files_regex, as: 'nobuildFilesRegex' - property :basic_scaling, as: 'basicScaling', class: Google::Apis::AppengineV1::BasicScaling, decorator: Google::Apis::AppengineV1::BasicScaling::Representation - - property :runtime, as: 'runtime' - property :id, as: 'id' - property :created_by, as: 'createdBy' - hash :env_variables, as: 'envVariables' - property :liveness_check, as: 'livenessCheck', class: Google::Apis::AppengineV1::LivenessCheck, decorator: Google::Apis::AppengineV1::LivenessCheck::Representation - - property :network, as: 'network', class: Google::Apis::AppengineV1::Network, decorator: Google::Apis::AppengineV1::Network::Representation - - hash :beta_settings, as: 'betaSettings' - property :env, as: 'env' - collection :handlers, as: 'handlers', class: Google::Apis::AppengineV1::UrlMap, decorator: Google::Apis::AppengineV1::UrlMap::Representation - end end @@ -621,13 +517,6 @@ module Google end end - class ScriptHandler - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :script_path, as: 'scriptPath' - end - end - class FileInfo # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -637,14 +526,21 @@ module Google end end + class ScriptHandler + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :script_path, as: 'scriptPath' + end + end + class OperationMetadataExperimental # @private class Representation < Google::Apis::Core::JsonRepresentation - property :user, as: 'user' - property :target, as: 'target' property :method_prop, as: 'method' property :insert_time, as: 'insertTime' property :end_time, as: 'endTime' + property :user, as: 'user' + property :target, as: 'target' end end @@ -659,13 +555,13 @@ module Google class OperationMetadataV1Beta # @private class Representation < Google::Apis::Core::JsonRepresentation + property :target, as: 'target' + property :user, as: 'user' property :ephemeral_message, as: 'ephemeralMessage' property :method_prop, as: 'method' property :end_time, as: 'endTime' collection :warning, as: 'warning' property :insert_time, as: 'insertTime' - property :user, as: 'user' - property :target, as: 'target' end end @@ -678,18 +574,6 @@ module Google end end - class Deployment - # @private - class Representation < Google::Apis::Core::JsonRepresentation - hash :files, as: 'files', class: Google::Apis::AppengineV1::FileInfo, decorator: Google::Apis::AppengineV1::FileInfo::Representation - - property :zip, as: 'zip', class: Google::Apis::AppengineV1::ZipInfo, decorator: Google::Apis::AppengineV1::ZipInfo::Representation - - property :container, as: 'container', class: Google::Apis::AppengineV1::ContainerInfo, decorator: Google::Apis::AppengineV1::ContainerInfo::Representation - - end - end - class Resources # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -701,6 +585,18 @@ module Google end end + class Deployment + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :zip, as: 'zip', class: Google::Apis::AppengineV1::ZipInfo, decorator: Google::Apis::AppengineV1::ZipInfo::Representation + + property :container, as: 'container', class: Google::Apis::AppengineV1::ContainerInfo, decorator: Google::Apis::AppengineV1::ContainerInfo::Representation + + hash :files, as: 'files', class: Google::Apis::AppengineV1::FileInfo, decorator: Google::Apis::AppengineV1::FileInfo::Representation + + end + end + class Volume # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -744,9 +640,19 @@ module Google end end + class ZipInfo + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :source_url, as: 'sourceUrl' + property :files_count, as: 'filesCount' + end + end + class AutomaticScaling # @private class Representation < Google::Apis::Core::JsonRepresentation + property :disk_utilization, as: 'diskUtilization', class: Google::Apis::AppengineV1::DiskUtilization, decorator: Google::Apis::AppengineV1::DiskUtilization::Representation + property :min_pending_latency, as: 'minPendingLatency' property :request_utilization, as: 'requestUtilization', class: Google::Apis::AppengineV1::RequestUtilization, decorator: Google::Apis::AppengineV1::RequestUtilization::Representation @@ -761,24 +667,14 @@ module Google property :max_pending_latency, as: 'maxPendingLatency' property :cpu_utilization, as: 'cpuUtilization', class: Google::Apis::AppengineV1::CpuUtilization, decorator: Google::Apis::AppengineV1::CpuUtilization::Representation - property :disk_utilization, as: 'diskUtilization', class: Google::Apis::AppengineV1::DiskUtilization, decorator: Google::Apis::AppengineV1::DiskUtilization::Representation - - end - end - - class ZipInfo - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :source_url, as: 'sourceUrl' - property :files_count, as: 'filesCount' end end class Library # @private class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' property :version, as: 'version' + property :name, as: 'name' end end @@ -817,6 +713,7 @@ module Google class UrlMap # @private class Representation < Google::Apis::Core::JsonRepresentation + property :login, as: 'login' property :api_endpoint, as: 'apiEndpoint', class: Google::Apis::AppengineV1::ApiEndpointHandler, decorator: Google::Apis::AppengineV1::ApiEndpointHandler::Representation property :static_files, as: 'staticFiles', class: Google::Apis::AppengineV1::StaticFilesHandler, decorator: Google::Apis::AppengineV1::StaticFilesHandler::Representation @@ -827,7 +724,6 @@ module Google property :script, as: 'script', class: Google::Apis::AppengineV1::ScriptHandler, decorator: Google::Apis::AppengineV1::ScriptHandler::Representation property :url_regex, as: 'urlRegex' - property :login, as: 'login' end end @@ -845,12 +741,116 @@ module Google class Operation # @private class Representation < Google::Apis::Core::JsonRepresentation + property :done, as: 'done' + hash :response, as: 'response' property :name, as: 'name' property :error, as: 'error', class: Google::Apis::AppengineV1::Status, decorator: Google::Apis::AppengineV1::Status::Representation hash :metadata, as: 'metadata' - property :done, as: 'done' - hash :response, as: 'response' + end + end + + class StaticFilesHandler + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :expiration, as: 'expiration' + property :application_readable, as: 'applicationReadable' + hash :http_headers, as: 'httpHeaders' + property :upload_path_regex, as: 'uploadPathRegex' + property :path, as: 'path' + property :mime_type, as: 'mimeType' + property :require_matching_file, as: 'requireMatchingFile' + end + end + + class BasicScaling + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :max_instances, as: 'maxInstances' + property :idle_timeout, as: 'idleTimeout' + end + end + + class DiskUtilization + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :target_write_bytes_per_second, as: 'targetWriteBytesPerSecond' + property :target_read_bytes_per_second, as: 'targetReadBytesPerSecond' + property :target_read_ops_per_second, as: 'targetReadOpsPerSecond' + property :target_write_ops_per_second, as: 'targetWriteOpsPerSecond' + end + end + + class CpuUtilization + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :aggregation_window_length, as: 'aggregationWindowLength' + property :target_utilization, as: 'targetUtilization' + end + end + + class Status + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :code, as: 'code' + property :message, as: 'message' + collection :details, as: 'details' + end + end + + class IdentityAwareProxy + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :oauth2_client_secret, as: 'oauth2ClientSecret' + property :oauth2_client_id, as: 'oauth2ClientId' + property :oauth2_client_secret_sha256, as: 'oauth2ClientSecretSha256' + property :enabled, as: 'enabled' + end + end + + class ManualScaling + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :instances, as: 'instances' + end + end + + class LocationMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :standard_environment_available, as: 'standardEnvironmentAvailable' + property :flexible_environment_available, as: 'flexibleEnvironmentAvailable' + end + end + + class Service + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :id, as: 'id' + property :name, as: 'name' + property :split, as: 'split', class: Google::Apis::AppengineV1::TrafficSplit, decorator: Google::Apis::AppengineV1::TrafficSplit::Representation + + end + end + + class ListOperationsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :operations, as: 'operations', class: Google::Apis::AppengineV1::Operation, decorator: Google::Apis::AppengineV1::Operation::Representation + + end + end + + class OperationMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :insert_time, as: 'insertTime' + property :target, as: 'target' + property :user, as: 'user' + property :method_prop, as: 'method' + property :end_time, as: 'endTime' + property :operation_type, as: 'operationType' end end end diff --git a/generated/google/apis/appengine_v1/service.rb b/generated/google/apis/appengine_v1/service.rb index 75fc5f510..ca8a1a5ef 100644 --- a/generated/google/apis/appengine_v1/service.rb +++ b/generated/google/apis/appengine_v1/service.rb @@ -48,42 +48,6 @@ module Google @batch_path = 'batch' end - # Recreates the required App Engine features for the specified App Engine - # application, for example a Cloud Storage bucket or App Engine service account. - # Use this method if you receive an error message about a missing feature, for - # example, Error retrieving the App Engine service account. - # @param [String] apps_id - # Part of `name`. Name of the application to repair. Example: apps/myapp - # @param [Google::Apis::AppengineV1::RepairApplicationRequest] repair_application_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::AppengineV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AppengineV1::Operation] - # - # @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 repair_application(apps_id, repair_application_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/apps/{appsId}:repair', options) - command.request_representation = Google::Apis::AppengineV1::RepairApplicationRequest::Representation - command.request_object = repair_application_request_object - command.response_representation = Google::Apis::AppengineV1::Operation::Representation - command.response_class = Google::Apis::AppengineV1::Operation - command.params['appsId'] = apps_id unless apps_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - # Gets information about an application. # @param [String] apps_id # Part of `name`. Name of the Application resource to get. Example: apps/myapp. @@ -191,6 +155,190 @@ module Google execute_or_queue_command(command, &block) end + # Recreates the required App Engine features for the specified App Engine + # application, for example a Cloud Storage bucket or App Engine service account. + # Use this method if you receive an error message about a missing feature, for + # example, Error retrieving the App Engine service account. + # @param [String] apps_id + # Part of `name`. Name of the application to repair. Example: apps/myapp + # @param [Google::Apis::AppengineV1::RepairApplicationRequest] repair_application_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::AppengineV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AppengineV1::Operation] + # + # @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 repair_application(apps_id, repair_application_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/apps/{appsId}:repair', options) + command.request_representation = Google::Apis::AppengineV1::RepairApplicationRequest::Representation + command.request_object = repair_application_request_object + command.response_representation = Google::Apis::AppengineV1::Operation::Representation + command.response_class = Google::Apis::AppengineV1::Operation + command.params['appsId'] = apps_id unless apps_id.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 operations that match the specified filter in the request. If the server + # doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding + # below allows API services to override the binding to use different resource + # name schemes, such as users/*/operations. + # @param [String] apps_id + # Part of `name`. The name of the operation collection. + # @param [String] page_token + # The standard list page token. + # @param [Fixnum] page_size + # The standard list page size. + # @param [String] filter + # The standard list filter. + # @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::AppengineV1::ListOperationsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AppengineV1::ListOperationsResponse] + # + # @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_app_operations(apps_id, page_token: nil, page_size: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/apps/{appsId}/operations', options) + command.response_representation = Google::Apis::AppengineV1::ListOperationsResponse::Representation + command.response_class = Google::Apis::AppengineV1::ListOperationsResponse + command.params['appsId'] = apps_id unless apps_id.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['filter'] = filter unless filter.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets the latest state of a long-running operation. Clients can use this method + # to poll the operation result at intervals as recommended by the API service. + # @param [String] apps_id + # Part of `name`. The name of the operation resource. + # @param [String] operations_id + # Part of `name`. See documentation of `appsId`. + # @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::AppengineV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AppengineV1::Operation] + # + # @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_app_operation(apps_id, operations_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/apps/{appsId}/operations/{operationsId}', options) + command.response_representation = Google::Apis::AppengineV1::Operation::Representation + command.response_class = Google::Apis::AppengineV1::Operation + command.params['appsId'] = apps_id unless apps_id.nil? + command.params['operationsId'] = operations_id unless operations_id.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 information about the supported locations for this service. + # @param [String] apps_id + # Part of `name`. The resource that owns the locations collection, if applicable. + # @param [String] filter + # The standard list filter. + # @param [String] page_token + # The standard list page token. + # @param [Fixnum] page_size + # The standard list page size. + # @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::AppengineV1::ListLocationsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AppengineV1::ListLocationsResponse] + # + # @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_app_locations(apps_id, filter: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/apps/{appsId}/locations', options) + command.response_representation = Google::Apis::AppengineV1::ListLocationsResponse::Representation + command.response_class = Google::Apis::AppengineV1::ListLocationsResponse + command.params['appsId'] = apps_id unless apps_id.nil? + command.query['filter'] = filter unless filter.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Get information about a location. + # @param [String] apps_id + # Part of `name`. Resource name for the location. + # @param [String] locations_id + # Part of `name`. See documentation of `appsId`. + # @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::AppengineV1::Location] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::AppengineV1::Location] + # + # @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_app_location(apps_id, locations_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/apps/{appsId}/locations/{locationsId}', options) + command.response_representation = Google::Apis::AppengineV1::Location::Representation + command.response_class = Google::Apis::AppengineV1::Location + command.params['appsId'] = apps_id unless apps_id.nil? + command.params['locationsId'] = locations_id unless locations_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Deletes the specified service and all enclosed versions. # @param [String] apps_id # Part of `name`. Name of the resource requested. Example: apps/myapp/services/ @@ -228,10 +376,10 @@ module Google # Lists all the services in the application. # @param [String] apps_id # Part of `parent`. Name of the parent Application resource. Example: apps/myapp. - # @param [Fixnum] page_size - # Maximum results to return per page. # @param [String] page_token # Continuation token for fetching the next page of results. + # @param [Fixnum] page_size + # Maximum results to return per page. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -249,13 +397,13 @@ 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_app_services(apps_id, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_app_services(apps_id, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/apps/{appsId}/services', options) command.response_representation = Google::Apis::AppengineV1::ListServicesResponse::Representation command.response_class = Google::Apis::AppengineV1::ListServicesResponse command.params['appsId'] = apps_id unless apps_id.nil? - command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) @@ -739,154 +887,6 @@ module Google command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end - - # Lists operations that match the specified filter in the request. If the server - # doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding - # below allows API services to override the binding to use different resource - # name schemes, such as users/*/operations. - # @param [String] apps_id - # Part of `name`. The name of the operation collection. - # @param [Fixnum] page_size - # The standard list page size. - # @param [String] filter - # The standard list filter. - # @param [String] page_token - # The standard list page token. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::AppengineV1::ListOperationsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AppengineV1::ListOperationsResponse] - # - # @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_app_operations(apps_id, page_size: nil, filter: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/apps/{appsId}/operations', options) - command.response_representation = Google::Apis::AppengineV1::ListOperationsResponse::Representation - command.response_class = Google::Apis::AppengineV1::ListOperationsResponse - command.params['appsId'] = apps_id unless apps_id.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['filter'] = filter unless filter.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets the latest state of a long-running operation. Clients can use this method - # to poll the operation result at intervals as recommended by the API service. - # @param [String] apps_id - # Part of `name`. The name of the operation resource. - # @param [String] operations_id - # Part of `name`. See documentation of `appsId`. - # @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::AppengineV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AppengineV1::Operation] - # - # @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_app_operation(apps_id, operations_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/apps/{appsId}/operations/{operationsId}', options) - command.response_representation = Google::Apis::AppengineV1::Operation::Representation - command.response_class = Google::Apis::AppengineV1::Operation - command.params['appsId'] = apps_id unless apps_id.nil? - command.params['operationsId'] = operations_id unless operations_id.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 information about the supported locations for this service. - # @param [String] apps_id - # Part of `name`. The resource that owns the locations collection, if applicable. - # @param [String] filter - # The standard list filter. - # @param [String] page_token - # The standard list page token. - # @param [Fixnum] page_size - # The standard list page size. - # @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::AppengineV1::ListLocationsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AppengineV1::ListLocationsResponse] - # - # @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_app_locations(apps_id, filter: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/apps/{appsId}/locations', options) - command.response_representation = Google::Apis::AppengineV1::ListLocationsResponse::Representation - command.response_class = Google::Apis::AppengineV1::ListLocationsResponse - command.params['appsId'] = apps_id unless apps_id.nil? - command.query['filter'] = filter unless filter.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Get information about a location. - # @param [String] apps_id - # Part of `name`. Resource name for the location. - # @param [String] locations_id - # Part of `name`. See documentation of `appsId`. - # @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::AppengineV1::Location] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::AppengineV1::Location] - # - # @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_app_location(apps_id, locations_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/apps/{appsId}/locations/{locationsId}', options) - command.response_representation = Google::Apis::AppengineV1::Location::Representation - command.response_class = Google::Apis::AppengineV1::Location - command.params['appsId'] = apps_id unless apps_id.nil? - command.params['locationsId'] = locations_id unless locations_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end protected diff --git a/generated/google/apis/appstate_v1.rb b/generated/google/apis/appstate_v1.rb index 968e311df..07b84f691 100644 --- a/generated/google/apis/appstate_v1.rb +++ b/generated/google/apis/appstate_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/games/services/web/api/states module AppstateV1 VERSION = 'V1' - REVISION = '20170427' + REVISION = '20170518' # View and manage your data for this application AUTH_APPSTATE = 'https://www.googleapis.com/auth/appstate' diff --git a/generated/google/apis/bigquery_v2.rb b/generated/google/apis/bigquery_v2.rb index 764cbeeb9..a9cf3e063 100644 --- a/generated/google/apis/bigquery_v2.rb +++ b/generated/google/apis/bigquery_v2.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/bigquery/ module BigqueryV2 VERSION = 'V2' - REVISION = '20170423' + REVISION = '20170520' # View and manage your data in Google BigQuery AUTH_BIGQUERY = 'https://www.googleapis.com/auth/bigquery' diff --git a/generated/google/apis/bigquery_v2/classes.rb b/generated/google/apis/bigquery_v2/classes.rb index c240cd4bd..f36a40aa8 100644 --- a/generated/google/apis/bigquery_v2/classes.rb +++ b/generated/google/apis/bigquery_v2/classes.rb @@ -830,9 +830,10 @@ module Google attr_accessor :cache_hit alias_method :cache_hit?, :cache_hit - # [Output-only] All errors and warnings encountered during the running of the - # job. Errors here do not necessarily mean that the job has completed or was - # unsuccessful. + # [Output-only] The first errors or warnings encountered during the running of + # the job. The final message includes the number of errors that caused the + # process to stop. Errors here do not necessarily mean that the job has + # completed or was unsuccessful. # Corresponds to the JSON property `errors` # @return [Array] attr_accessor :errors @@ -1443,7 +1444,8 @@ module Google # @return [String] attr_accessor :priority - # [Required] BigQuery SQL query to execute. + # [Required] SQL query text to execute. The useLegacySql field can be used to + # indicate whether the query uses legacy SQL or standard SQL. # Corresponds to the JSON property `query` # @return [String] attr_accessor :query @@ -1933,8 +1935,10 @@ module Google # @return [Google::Apis::BigqueryV2::ErrorProto] attr_accessor :error_result - # [Output-only] All errors encountered during the running of the job. Errors - # here do not necessarily mean that the job has completed or was unsuccessful. + # [Output-only] The first errors encountered during the running of the job. The + # final message includes the number of errors that caused the process to stop. + # Errors here do not necessarily mean that the job has completed or was + # unsuccessful. # Corresponds to the JSON property `errors` # @return [Array] attr_accessor :errors @@ -2304,9 +2308,10 @@ module Google attr_accessor :cache_hit alias_method :cache_hit?, :cache_hit - # [Output-only] All errors and warnings encountered during the running of the - # job. Errors here do not necessarily mean that the job has completed or was - # unsuccessful. + # [Output-only] The first errors or warnings encountered during the running of + # the job. The final message includes the number of errors that caused the + # process to stop. Errors here do not necessarily mean that the job has + # completed or was unsuccessful. # Corresponds to the JSON property `errors` # @return [Array] attr_accessor :errors @@ -2778,7 +2783,7 @@ module Google class TableFieldSchema include Google::Apis::Core::Hashable - # [Optional] The field description. The maximum length is 16K characters. + # [Optional] The field description. The maximum length is 1,024 characters. # Corresponds to the JSON property `description` # @return [String] attr_accessor :description diff --git a/generated/google/apis/calendar_v3.rb b/generated/google/apis/calendar_v3.rb index ba77916ff..f6a1fe0e0 100644 --- a/generated/google/apis/calendar_v3.rb +++ b/generated/google/apis/calendar_v3.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/google-apps/calendar/firstapp module CalendarV3 VERSION = 'V3' - REVISION = '20170402' + REVISION = '20170521' # Manage your calendars AUTH_CALENDAR = 'https://www.googleapis.com/auth/calendar' diff --git a/generated/google/apis/calendar_v3/service.rb b/generated/google/apis/calendar_v3/service.rb index 90f77ce5c..f6e896b2f 100644 --- a/generated/google/apis/calendar_v3/service.rb +++ b/generated/google/apis/calendar_v3/service.rb @@ -1308,8 +1308,11 @@ module Google # than the specified number of attendees, only the participant is returned. # Optional. # @param [Fixnum] max_results - # Maximum number of events returned on one result page. By default the value is - # 250 events. The page size can never be larger than 2500 events. Optional. + # Maximum number of events returned on one result page. The number of events in + # the resulting page may be less than this value, or none at all, even if there + # are more events matching the query. Incomplete pages can be detected by a non- + # empty nextPageToken field in the response. By default the value is 250 events. + # The page size can never be larger than 2500 events. Optional. # @param [String] order_by # The order of the events returned in the result. Optional. The default is an # unspecified, stable order. @@ -1663,8 +1666,11 @@ module Google # than the specified number of attendees, only the participant is returned. # Optional. # @param [Fixnum] max_results - # Maximum number of events returned on one result page. By default the value is - # 250 events. The page size can never be larger than 2500 events. Optional. + # Maximum number of events returned on one result page. The number of events in + # the resulting page may be less than this value, or none at all, even if there + # are more events matching the query. Incomplete pages can be detected by a non- + # empty nextPageToken field in the response. By default the value is 250 events. + # The page size can never be larger than 2500 events. Optional. # @param [String] order_by # The order of the events returned in the result. Optional. The default is an # unspecified, stable order. diff --git a/generated/google/apis/classroom_v1.rb b/generated/google/apis/classroom_v1.rb index 32a4592f2..aa4433290 100644 --- a/generated/google/apis/classroom_v1.rb +++ b/generated/google/apis/classroom_v1.rb @@ -25,43 +25,52 @@ module Google # @see https://developers.google.com/classroom/ module ClassroomV1 VERSION = 'V1' - REVISION = '20170502' - - # View your Google Classroom class rosters - AUTH_CLASSROOM_ROSTERS_READONLY = 'https://www.googleapis.com/auth/classroom.rosters.readonly' - - # View your course work and grades in Google Classroom - AUTH_CLASSROOM_STUDENT_SUBMISSIONS_ME_READONLY = 'https://www.googleapis.com/auth/classroom.student-submissions.me.readonly' - - # View course work and grades for students in the Google Classroom classes you teach or administer - AUTH_CLASSROOM_COURSEWORK_STUDENTS_READONLY = 'https://www.googleapis.com/auth/classroom.coursework.students.readonly' - - # View course work and grades for students in the Google Classroom classes you teach or administer - AUTH_CLASSROOM_STUDENT_SUBMISSIONS_STUDENTS_READONLY = 'https://www.googleapis.com/auth/classroom.student-submissions.students.readonly' - - # Manage your Google Classroom class rosters - AUTH_CLASSROOM_ROSTERS = 'https://www.googleapis.com/auth/classroom.rosters' - - # View your course work and grades in Google Classroom - AUTH_CLASSROOM_COURSEWORK_ME_READONLY = 'https://www.googleapis.com/auth/classroom.coursework.me.readonly' - - # View your Google Classroom classes - AUTH_CLASSROOM_COURSES_READONLY = 'https://www.googleapis.com/auth/classroom.courses.readonly' - - # Manage your Google Classroom classes - AUTH_CLASSROOM_COURSES = 'https://www.googleapis.com/auth/classroom.courses' - - # Manage your course work and view your grades in Google Classroom - AUTH_CLASSROOM_COURSEWORK_ME = 'https://www.googleapis.com/auth/classroom.coursework.me' - - # Manage course work and grades for students in the Google Classroom classes you teach and view the course work and grades for classes you administer - AUTH_CLASSROOM_COURSEWORK_STUDENTS = 'https://www.googleapis.com/auth/classroom.coursework.students' + REVISION = '20170523' # View the profile photos of people in your classes AUTH_CLASSROOM_PROFILE_PHOTOS = 'https://www.googleapis.com/auth/classroom.profile.photos' + # View your Google Classroom class rosters + AUTH_CLASSROOM_ROSTERS_READONLY = 'https://www.googleapis.com/auth/classroom.rosters.readonly' + + # View and manage guardians for students in your Google Classroom classes + AUTH_CLASSROOM_GUARDIANLINKS_STUDENTS = 'https://www.googleapis.com/auth/classroom.guardianlinks.students' + + # View your course work and grades in Google Classroom + AUTH_CLASSROOM_STUDENT_SUBMISSIONS_ME_READONLY = 'https://www.googleapis.com/auth/classroom.student-submissions.me.readonly' + + # Manage course work and grades for students in the Google Classroom classes you teach and view the course work and grades for classes you administer + AUTH_CLASSROOM_COURSEWORK_STUDENTS = 'https://www.googleapis.com/auth/classroom.coursework.students' + + # View course work and grades for students in the Google Classroom classes you teach or administer + AUTH_CLASSROOM_COURSEWORK_STUDENTS_READONLY = 'https://www.googleapis.com/auth/classroom.coursework.students.readonly' + + # View your Google Classroom guardians + AUTH_CLASSROOM_GUARDIANLINKS_ME_READONLY = 'https://www.googleapis.com/auth/classroom.guardianlinks.me.readonly' + + # View your course work and grades in Google Classroom + AUTH_CLASSROOM_COURSEWORK_ME_READONLY = 'https://www.googleapis.com/auth/classroom.coursework.me.readonly' + # View the email addresses of people in your classes AUTH_CLASSROOM_PROFILE_EMAILS = 'https://www.googleapis.com/auth/classroom.profile.emails' + + # Manage your course work and view your grades in Google Classroom + AUTH_CLASSROOM_COURSEWORK_ME = 'https://www.googleapis.com/auth/classroom.coursework.me' + + # Manage your Google Classroom class rosters + AUTH_CLASSROOM_ROSTERS = 'https://www.googleapis.com/auth/classroom.rosters' + + # View course work and grades for students in the Google Classroom classes you teach or administer + AUTH_CLASSROOM_STUDENT_SUBMISSIONS_STUDENTS_READONLY = 'https://www.googleapis.com/auth/classroom.student-submissions.students.readonly' + + # View guardians for students in your Google Classroom classes + AUTH_CLASSROOM_GUARDIANLINKS_STUDENTS_READONLY = 'https://www.googleapis.com/auth/classroom.guardianlinks.students.readonly' + + # Manage your Google Classroom classes + AUTH_CLASSROOM_COURSES = 'https://www.googleapis.com/auth/classroom.courses' + + # View your Google Classroom classes + AUTH_CLASSROOM_COURSES_READONLY = 'https://www.googleapis.com/auth/classroom.courses.readonly' end end end diff --git a/generated/google/apis/classroom_v1/classes.rb b/generated/google/apis/classroom_v1/classes.rb index e308cc5a4..0fac14bc5 100644 --- a/generated/google/apis/classroom_v1/classes.rb +++ b/generated/google/apis/classroom_v1/classes.rb @@ -22,80 +22,10 @@ module Google module Apis module ClassroomV1 - # Attachment added to student assignment work. - # When creating attachments, setting the `form` field is not supported. - class Attachment - include Google::Apis::Core::Hashable - - # Representation of a Google Drive file. - # Corresponds to the JSON property `driveFile` - # @return [Google::Apis::ClassroomV1::DriveFile] - attr_accessor :drive_file - - # YouTube video item. - # Corresponds to the JSON property `youTubeVideo` - # @return [Google::Apis::ClassroomV1::YouTubeVideo] - attr_accessor :you_tube_video - - # URL item. - # Corresponds to the JSON property `link` - # @return [Google::Apis::ClassroomV1::Link] - attr_accessor :link - - # Google Forms item. - # Corresponds to the JSON property `form` - # @return [Google::Apis::ClassroomV1::Form] - attr_accessor :form - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @drive_file = args[:drive_file] if args.key?(:drive_file) - @you_tube_video = args[:you_tube_video] if args.key?(:you_tube_video) - @link = args[:link] if args.key?(:link) - @form = args[:form] if args.key?(:form) - end - end - - # Response when listing guardian invitations. - class ListGuardianInvitationsResponse - include Google::Apis::Core::Hashable - - # Token identifying the next page of results to return. If empty, no further - # results are available. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Guardian invitations that matched the list request. - # Corresponds to the JSON property `guardianInvitations` - # @return [Array] - attr_accessor :guardian_invitations - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @guardian_invitations = args[:guardian_invitations] if args.key?(:guardian_invitations) - end - end - # Course work created by a teacher for students of the course. class CourseWork include Google::Apis::Core::Hashable - # Classroom-assigned identifier of this course work, unique per course. - # Read-only. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - # Optional description of this course work. # If set, the description must be a valid UTF-8 string containing no more # than 30,000 characters. @@ -103,12 +33,67 @@ module Google # @return [String] attr_accessor :description + # Timestamp when this course work was created. + # Read-only. + # Corresponds to the JSON property `creationTime` + # @return [String] + attr_accessor :creation_time + + # Represents a whole calendar date, e.g. date of birth. The time of day and + # time zone are either specified elsewhere or are not significant. The date + # is relative to the Proleptic Gregorian Calendar. The day may be 0 to + # represent a year and month where the day is not significant, e.g. credit card + # expiration date. The year may be 0 to represent a month and day independent + # of year, e.g. anniversary date. Related types are google.type.TimeOfDay + # and `google.protobuf.Timestamp`. + # Corresponds to the JSON property `dueDate` + # @return [Google::Apis::ClassroomV1::Date] + attr_accessor :due_date + + # Status of this course work. + # If unspecified, the default state is `DRAFT`. + # Corresponds to the JSON property `state` + # @return [String] + attr_accessor :state + # Setting to determine when students are allowed to modify submissions. # If unspecified, the default value is `MODIFIABLE_UNTIL_TURNED_IN`. # Corresponds to the JSON property `submissionModificationMode` # @return [String] attr_accessor :submission_modification_mode + # Identifier of the course. + # Read-only. + # Corresponds to the JSON property `courseId` + # @return [String] + attr_accessor :course_id + + # Classroom-assigned identifier of this course work, unique per course. + # Read-only. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # Represents a time of day. The date and time zone are either not significant + # or are specified elsewhere. An API may choose to allow leap seconds. Related + # types are google.type.Date and `google.protobuf.Timestamp`. + # Corresponds to the JSON property `dueTime` + # @return [Google::Apis::ClassroomV1::TimeOfDay] + attr_accessor :due_time + + # Title of this course work. + # The title must be a valid UTF-8 string containing between 1 and 3000 + # characters. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + # Additional materials. + # CourseWork must have no more than 20 material items. + # Corresponds to the JSON property `materials` + # @return [Array] + attr_accessor :materials + # Whether this course work item is associated with the Developer Console # project making the request. # See google.classroom.Work.CreateCourseWork for more @@ -125,13 +110,6 @@ module Google # @return [String] attr_accessor :update_time - # Title of this course work. - # The title must be a valid UTF-8 string containing between 1 and 3000 - # characters. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - # Absolute link to this course work in the Classroom web UI. # This is only populated if `state` is `PUBLISHED`. # Read-only. @@ -139,52 +117,6 @@ module Google # @return [String] attr_accessor :alternate_link - # Type of this course work. - # The type is set when the course work is created and cannot be changed. - # Corresponds to the JSON property `workType` - # @return [String] - attr_accessor :work_type - - # Additional materials. - # CourseWork must have no more than 20 material items. - # Corresponds to the JSON property `materials` - # @return [Array] - attr_accessor :materials - - # Status of this course work. - # If unspecified, the default state is `DRAFT`. - # Corresponds to the JSON property `state` - # @return [String] - attr_accessor :state - - # Represents a whole calendar date, e.g. date of birth. The time of day and - # time zone are either specified elsewhere or are not significant. The date - # is relative to the Proleptic Gregorian Calendar. The day may be 0 to - # represent a year and month where the day is not significant, e.g. credit card - # expiration date. The year may be 0 to represent a month and day independent - # of year, e.g. anniversary date. Related types are google.type.TimeOfDay - # and `google.protobuf.Timestamp`. - # Corresponds to the JSON property `dueDate` - # @return [Google::Apis::ClassroomV1::Date] - attr_accessor :due_date - - # Additional details for multiple-choice questions. - # Corresponds to the JSON property `multipleChoiceQuestion` - # @return [Google::Apis::ClassroomV1::MultipleChoiceQuestion] - attr_accessor :multiple_choice_question - - # Timestamp when this course work was created. - # Read-only. - # Corresponds to the JSON property `creationTime` - # @return [String] - attr_accessor :creation_time - - # Identifier of the course. - # Read-only. - # Corresponds to the JSON property `courseId` - # @return [String] - attr_accessor :course_id - # Maximum grade for this course work. # If zero or unspecified, this assignment is considered ungraded. # This must be a non-negative integer value. @@ -192,17 +124,73 @@ module Google # @return [Float] attr_accessor :max_points + # Additional details for multiple-choice questions. + # Corresponds to the JSON property `multipleChoiceQuestion` + # @return [Google::Apis::ClassroomV1::MultipleChoiceQuestion] + attr_accessor :multiple_choice_question + + # Type of this course work. + # The type is set when the course work is created and cannot be changed. + # Corresponds to the JSON property `workType` + # @return [String] + attr_accessor :work_type + # Additional details for assignments. # Corresponds to the JSON property `assignment` # @return [Google::Apis::ClassroomV1::Assignment] attr_accessor :assignment - # Represents a time of day. The date and time zone are either not significant - # or are specified elsewhere. An API may choose to allow leap seconds. Related - # types are google.type.Date and `google.protobuf.Timestamp`. - # Corresponds to the JSON property `dueTime` - # @return [Google::Apis::ClassroomV1::TimeOfDay] - attr_accessor :due_time + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @description = args[:description] if args.key?(:description) + @creation_time = args[:creation_time] if args.key?(:creation_time) + @due_date = args[:due_date] if args.key?(:due_date) + @state = args[:state] if args.key?(:state) + @submission_modification_mode = args[:submission_modification_mode] if args.key?(:submission_modification_mode) + @course_id = args[:course_id] if args.key?(:course_id) + @id = args[:id] if args.key?(:id) + @due_time = args[:due_time] if args.key?(:due_time) + @title = args[:title] if args.key?(:title) + @materials = args[:materials] if args.key?(:materials) + @associated_with_developer = args[:associated_with_developer] if args.key?(:associated_with_developer) + @update_time = args[:update_time] if args.key?(:update_time) + @alternate_link = args[:alternate_link] if args.key?(:alternate_link) + @max_points = args[:max_points] if args.key?(:max_points) + @multiple_choice_question = args[:multiple_choice_question] if args.key?(:multiple_choice_question) + @work_type = args[:work_type] if args.key?(:work_type) + @assignment = args[:assignment] if args.key?(:assignment) + end + end + + # Association between a student and a guardian of that student. The guardian + # may receive information about the student's course work. + class Guardian + include Google::Apis::Core::Hashable + + # Identifier for the student to whom the guardian relationship applies. + # Corresponds to the JSON property `studentId` + # @return [String] + attr_accessor :student_id + + # Identifier for the guardian. + # Corresponds to the JSON property `guardianId` + # @return [String] + attr_accessor :guardian_id + + # The email address to which the initial guardian invitation was sent. + # This field is only visible to domain administrators. + # Corresponds to the JSON property `invitedEmailAddress` + # @return [String] + attr_accessor :invited_email_address + + # Global information for a user. + # Corresponds to the JSON property `guardianProfile` + # @return [Google::Apis::ClassroomV1::UserProfile] + attr_accessor :guardian_profile def initialize(**args) update!(**args) @@ -210,63 +198,170 @@ module Google # Update properties of this object def update!(**args) - @id = args[:id] if args.key?(:id) - @description = args[:description] if args.key?(:description) - @submission_modification_mode = args[:submission_modification_mode] if args.key?(:submission_modification_mode) - @associated_with_developer = args[:associated_with_developer] if args.key?(:associated_with_developer) - @update_time = args[:update_time] if args.key?(:update_time) - @title = args[:title] if args.key?(:title) - @alternate_link = args[:alternate_link] if args.key?(:alternate_link) - @work_type = args[:work_type] if args.key?(:work_type) - @materials = args[:materials] if args.key?(:materials) - @state = args[:state] if args.key?(:state) - @due_date = args[:due_date] if args.key?(:due_date) - @multiple_choice_question = args[:multiple_choice_question] if args.key?(:multiple_choice_question) - @creation_time = args[:creation_time] if args.key?(:creation_time) - @course_id = args[:course_id] if args.key?(:course_id) - @max_points = args[:max_points] if args.key?(:max_points) - @assignment = args[:assignment] if args.key?(:assignment) - @due_time = args[:due_time] if args.key?(:due_time) + @student_id = args[:student_id] if args.key?(:student_id) + @guardian_id = args[:guardian_id] if args.key?(:guardian_id) + @invited_email_address = args[:invited_email_address] if args.key?(:invited_email_address) + @guardian_profile = args[:guardian_profile] if args.key?(:guardian_profile) end end - # Representation of a Google Drive file. - class DriveFile + # Global information for a user. + class UserProfile include Google::Apis::Core::Hashable - # URL of a thumbnail image of the Drive item. + # Identifier of the user. # Read-only. - # Corresponds to the JSON property `thumbnailUrl` - # @return [String] - attr_accessor :thumbnail_url - - # Title of the Drive item. - # Read-only. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # URL that can be used to access the Drive item. - # Read-only. - # Corresponds to the JSON property `alternateLink` - # @return [String] - attr_accessor :alternate_link - - # Drive API resource ID. # Corresponds to the JSON property `id` # @return [String] attr_accessor :id + # Email address of the user. + # Read-only. + # Corresponds to the JSON property `emailAddress` + # @return [String] + attr_accessor :email_address + + # URL of user's profile photo. + # Read-only. + # Corresponds to the JSON property `photoUrl` + # @return [String] + attr_accessor :photo_url + + # Global permissions of the user. + # Read-only. + # Corresponds to the JSON property `permissions` + # @return [Array] + attr_accessor :permissions + + # Details of the user's name. + # Corresponds to the JSON property `name` + # @return [Google::Apis::ClassroomV1::Name] + attr_accessor :name + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @thumbnail_url = args[:thumbnail_url] if args.key?(:thumbnail_url) - @title = args[:title] if args.key?(:title) - @alternate_link = args[:alternate_link] if args.key?(:alternate_link) @id = args[:id] if args.key?(:id) + @email_address = args[:email_address] if args.key?(:email_address) + @photo_url = args[:photo_url] if args.key?(:photo_url) + @permissions = args[:permissions] if args.key?(:permissions) + @name = args[:name] if args.key?(:name) + end + end + + # Response when listing students. + class ListStudentsResponse + include Google::Apis::Core::Hashable + + # Students who match the list request. + # Corresponds to the JSON property `students` + # @return [Array] + attr_accessor :students + + # Token identifying the next page of results to return. If empty, no further + # results are available. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @students = args[:students] if args.key?(:students) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # Student in a course. + class Student + include Google::Apis::Core::Hashable + + # Global information for a user. + # Corresponds to the JSON property `profile` + # @return [Google::Apis::ClassroomV1::UserProfile] + attr_accessor :profile + + # Representation of a Google Drive folder. + # Corresponds to the JSON property `studentWorkFolder` + # @return [Google::Apis::ClassroomV1::DriveFolder] + attr_accessor :student_work_folder + + # Identifier of the user. + # When specified as a parameter of a request, this identifier can be one of + # the following: + # * the numeric identifier for the user + # * the email address of the user + # * the string literal `"me"`, indicating the requesting user + # Corresponds to the JSON property `userId` + # @return [String] + attr_accessor :user_id + + # Identifier of the course. + # Read-only. + # Corresponds to the JSON property `courseId` + # @return [String] + attr_accessor :course_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @profile = args[:profile] if args.key?(:profile) + @student_work_folder = args[:student_work_folder] if args.key?(:student_work_folder) + @user_id = args[:user_id] if args.key?(:user_id) + @course_id = args[:course_id] if args.key?(:course_id) + end + end + + # An invitation to join a course. + class Invitation + include Google::Apis::Core::Hashable + + # Identifier assigned by Classroom. + # Read-only. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # Role to invite the user to have. + # Must not be `COURSE_ROLE_UNSPECIFIED`. + # Corresponds to the JSON property `role` + # @return [String] + attr_accessor :role + + # Identifier of the invited user. + # When specified as a parameter of a request, this identifier can be set to + # one of the following: + # * the numeric identifier for the user + # * the email address of the user + # * the string literal `"me"`, indicating the requesting user + # Corresponds to the JSON property `userId` + # @return [String] + attr_accessor :user_id + + # Identifier of the course to invite the user to. + # Corresponds to the JSON property `courseId` + # @return [String] + attr_accessor :course_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @id = args[:id] if args.key?(:id) + @role = args[:role] if args.key?(:role) + @user_id = args[:user_id] if args.key?(:user_id) + @course_id = args[:course_id] if args.key?(:course_id) end end @@ -303,32 +398,6 @@ module Google end end - # Response when listing course aliases. - class ListCourseAliasesResponse - include Google::Apis::Core::Hashable - - # Token identifying the next page of results to return. If empty, no further - # results are available. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # The course aliases. - # Corresponds to the JSON property `aliases` - # @return [Array] - attr_accessor :aliases - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @aliases = args[:aliases] if args.key?(:aliases) - end - end - # Student work for a short answer question. class ShortAnswerSubmission include Google::Apis::Core::Hashable @@ -348,29 +417,115 @@ module Google end end - # A material attached to a course as part of a material set. - class CourseMaterial + # Student submission for course work. + # StudentSubmission items are generated when a CourseWork item is created. + # StudentSubmissions that have never been accessed (i.e. with `state` = NEW) + # may not have a creation time or update time. + class StudentSubmission include Google::Apis::Core::Hashable - # Representation of a Google Drive file. - # Corresponds to the JSON property `driveFile` - # @return [Google::Apis::ClassroomV1::DriveFile] - attr_accessor :drive_file + # Optional grade. If unset, no grade was set. + # This must be a non-negative integer value. + # This may be modified only by course teachers. + # Corresponds to the JSON property `assignedGrade` + # @return [Float] + attr_accessor :assigned_grade - # YouTube video item. - # Corresponds to the JSON property `youTubeVideo` - # @return [Google::Apis::ClassroomV1::YouTubeVideo] - attr_accessor :you_tube_video + # Student work for a multiple-choice question. + # Corresponds to the JSON property `multipleChoiceSubmission` + # @return [Google::Apis::ClassroomV1::MultipleChoiceSubmission] + attr_accessor :multiple_choice_submission - # URL item. - # Corresponds to the JSON property `link` - # @return [Google::Apis::ClassroomV1::Link] - attr_accessor :link + # Student work for an assignment. + # Corresponds to the JSON property `assignmentSubmission` + # @return [Google::Apis::ClassroomV1::AssignmentSubmission] + attr_accessor :assignment_submission - # Google Forms item. - # Corresponds to the JSON property `form` - # @return [Google::Apis::ClassroomV1::Form] - attr_accessor :form + # Whether this student submission is associated with the Developer Console + # project making the request. + # See google.classroom.Work.CreateCourseWork for more + # details. + # Read-only. + # Corresponds to the JSON property `associatedWithDeveloper` + # @return [Boolean] + attr_accessor :associated_with_developer + alias_method :associated_with_developer?, :associated_with_developer + + # Student work for a short answer question. + # Corresponds to the JSON property `shortAnswerSubmission` + # @return [Google::Apis::ClassroomV1::ShortAnswerSubmission] + attr_accessor :short_answer_submission + + # Last update time of this submission. + # This may be unset if the student has not accessed this item. + # Read-only. + # Corresponds to the JSON property `updateTime` + # @return [String] + attr_accessor :update_time + + # Absolute link to the submission in the Classroom web UI. + # Read-only. + # Corresponds to the JSON property `alternateLink` + # @return [String] + attr_accessor :alternate_link + + # Whether this submission is late. + # Read-only. + # Corresponds to the JSON property `late` + # @return [Boolean] + attr_accessor :late + alias_method :late?, :late + + # Optional pending grade. If unset, no grade was set. + # This must be a non-negative integer value. + # This is only visible to and modifiable by course teachers. + # Corresponds to the JSON property `draftGrade` + # @return [Float] + attr_accessor :draft_grade + + # Type of course work this submission is for. + # Read-only. + # Corresponds to the JSON property `courseWorkType` + # @return [String] + attr_accessor :course_work_type + + # Creation time of this submission. + # This may be unset if the student has not accessed this item. + # Read-only. + # Corresponds to the JSON property `creationTime` + # @return [String] + attr_accessor :creation_time + + # State of this submission. + # Read-only. + # Corresponds to the JSON property `state` + # @return [String] + attr_accessor :state + + # Identifier for the student that owns this submission. + # Read-only. + # Corresponds to the JSON property `userId` + # @return [String] + attr_accessor :user_id + + # Identifier for the course work this corresponds to. + # Read-only. + # Corresponds to the JSON property `courseWorkId` + # @return [String] + attr_accessor :course_work_id + + # Identifier of the course. + # Read-only. + # Corresponds to the JSON property `courseId` + # @return [String] + attr_accessor :course_id + + # Classroom-assigned Identifier for the student submission. + # This is unique among submissions for the relevant course work. + # Read-only. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id def initialize(**args) update!(**args) @@ -378,21 +533,39 @@ module Google # Update properties of this object def update!(**args) - @drive_file = args[:drive_file] if args.key?(:drive_file) - @you_tube_video = args[:you_tube_video] if args.key?(:you_tube_video) - @link = args[:link] if args.key?(:link) - @form = args[:form] if args.key?(:form) + @assigned_grade = args[:assigned_grade] if args.key?(:assigned_grade) + @multiple_choice_submission = args[:multiple_choice_submission] if args.key?(:multiple_choice_submission) + @assignment_submission = args[:assignment_submission] if args.key?(:assignment_submission) + @associated_with_developer = args[:associated_with_developer] if args.key?(:associated_with_developer) + @short_answer_submission = args[:short_answer_submission] if args.key?(:short_answer_submission) + @update_time = args[:update_time] if args.key?(:update_time) + @alternate_link = args[:alternate_link] if args.key?(:alternate_link) + @late = args[:late] if args.key?(:late) + @draft_grade = args[:draft_grade] if args.key?(:draft_grade) + @course_work_type = args[:course_work_type] if args.key?(:course_work_type) + @creation_time = args[:creation_time] if args.key?(:creation_time) + @state = args[:state] if args.key?(:state) + @user_id = args[:user_id] if args.key?(:user_id) + @course_work_id = args[:course_work_id] if args.key?(:course_work_id) + @course_id = args[:course_id] if args.key?(:course_id) + @id = args[:id] if args.key?(:id) end end - # Student work for a multiple-choice question. - class MultipleChoiceSubmission + # Response when listing student submissions. + class ListStudentSubmissionsResponse include Google::Apis::Core::Hashable - # Student's select choice. - # Corresponds to the JSON property `answer` + # Token identifying the next page of results to return. If empty, no further + # results are available. + # Corresponds to the JSON property `nextPageToken` # @return [String] - attr_accessor :answer + attr_accessor :next_page_token + + # Student work that matches the request. + # Corresponds to the JSON property `studentSubmissions` + # @return [Array] + attr_accessor :student_submissions def initialize(**args) update!(**args) @@ -400,41 +573,21 @@ module Google # Update properties of this object def update!(**args) - @answer = args[:answer] if args.key?(:answer) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @student_submissions = args[:student_submissions] if args.key?(:student_submissions) end end - # URL item. - class Link + # Request to turn in a student submission. + class TurnInStudentSubmissionRequest include Google::Apis::Core::Hashable - # URL to link to. - # This must be a valid UTF-8 string containing between 1 and 2024 characters. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - # URL of a thumbnail image of the target URL. - # Read-only. - # Corresponds to the JSON property `thumbnailUrl` - # @return [String] - attr_accessor :thumbnail_url - - # Title of the target of the URL. - # Read-only. - # 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) - @url = args[:url] if args.key?(:url) - @thumbnail_url = args[:thumbnail_url] if args.key?(:thumbnail_url) - @title = args[:title] if args.key?(:title) end end @@ -459,33 +612,20 @@ module Google end end - # Represents a time of day. The date and time zone are either not significant - # or are specified elsewhere. An API may choose to allow leap seconds. Related - # types are google.type.Date and `google.protobuf.Timestamp`. - class TimeOfDay + # Response when listing course work. + class ListCourseWorkResponse include Google::Apis::Core::Hashable - # Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. - # Corresponds to the JSON property `nanos` - # @return [Fixnum] - attr_accessor :nanos + # Token identifying the next page of results to return. If empty, no further + # results are available. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token - # Hours of day in 24 hour format. Should be from 0 to 23. An API may choose - # to allow the value "24:00:00" for scenarios like business closing time. - # Corresponds to the JSON property `hours` - # @return [Fixnum] - attr_accessor :hours - - # Minutes of hour of day. Must be from 0 to 59. - # Corresponds to the JSON property `minutes` - # @return [Fixnum] - attr_accessor :minutes - - # Seconds of minutes of the time. Must normally be from 0 to 59. An API may - # allow the value 60 if it allows leap-seconds. - # Corresponds to the JSON property `seconds` - # @return [Fixnum] - attr_accessor :seconds + # Course work items that match the request. + # Corresponds to the JSON property `courseWork` + # @return [Array] + attr_accessor :course_work def initialize(**args) update!(**args) @@ -493,41 +633,37 @@ module Google # Update properties of this object def update!(**args) - @nanos = args[:nanos] if args.key?(:nanos) - @hours = args[:hours] if args.key?(:hours) - @minutes = args[:minutes] if args.key?(:minutes) - @seconds = args[:seconds] if args.key?(:seconds) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @course_work = args[:course_work] if args.key?(:course_work) end end - # Google Forms item. - class Form + # YouTube video item. + class YouTubeVideo include Google::Apis::Core::Hashable - # URL of a thumbnail image of the Form. + # URL of a thumbnail image of the YouTube video. # Read-only. # Corresponds to the JSON property `thumbnailUrl` # @return [String] attr_accessor :thumbnail_url - # URL of the form. - # Corresponds to the JSON property `formUrl` + # YouTube API resource ID. + # Corresponds to the JSON property `id` # @return [String] - attr_accessor :form_url + attr_accessor :id - # Title of the Form. + # Title of the YouTube video. # Read-only. # Corresponds to the JSON property `title` # @return [String] attr_accessor :title - # URL of the form responses document. - # Only set if respsonses have been recorded and only when the - # requesting user is an editor of the form. + # URL that can be used to view the YouTube video. # Read-only. - # Corresponds to the JSON property `responseUrl` + # Corresponds to the JSON property `alternateLink` # @return [String] - attr_accessor :response_url + attr_accessor :alternate_link def initialize(**args) update!(**args) @@ -536,20 +672,26 @@ module Google # Update properties of this object def update!(**args) @thumbnail_url = args[:thumbnail_url] if args.key?(:thumbnail_url) - @form_url = args[:form_url] if args.key?(:form_url) + @id = args[:id] if args.key?(:id) @title = args[:title] if args.key?(:title) - @response_url = args[:response_url] if args.key?(:response_url) + @alternate_link = args[:alternate_link] if args.key?(:alternate_link) end end - # Additional details for multiple-choice questions. - class MultipleChoiceQuestion + # Response when listing invitations. + class ListInvitationsResponse include Google::Apis::Core::Hashable - # Possible choices. - # Corresponds to the JSON property `choices` - # @return [Array] - attr_accessor :choices + # Token identifying the next page of results to return. If empty, no further + # results are available. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # Invitations that match the list request. + # Corresponds to the JSON property `invitations` + # @return [Array] + attr_accessor :invitations def initialize(**args) update!(**args) @@ -557,7 +699,93 @@ module Google # Update properties of this object def update!(**args) - @choices = args[:choices] if args.key?(:choices) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @invitations = args[:invitations] if args.key?(:invitations) + end + end + + # An invitation to become the guardian of a specified user, sent to a specified + # email address. + class GuardianInvitation + include Google::Apis::Core::Hashable + + # ID of the student (in standard format) + # Corresponds to the JSON property `studentId` + # @return [String] + attr_accessor :student_id + + # The state that this invitation is in. + # Corresponds to the JSON property `state` + # @return [String] + attr_accessor :state + + # Email address that the invitation was sent to. + # This field is only visible to domain administrators. + # Corresponds to the JSON property `invitedEmailAddress` + # @return [String] + attr_accessor :invited_email_address + + # The time that this invitation was created. + # Read-only. + # Corresponds to the JSON property `creationTime` + # @return [String] + attr_accessor :creation_time + + # Unique identifier for this invitation. + # Read-only. + # Corresponds to the JSON property `invitationId` + # @return [String] + attr_accessor :invitation_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @student_id = args[:student_id] if args.key?(:student_id) + @state = args[:state] if args.key?(:state) + @invited_email_address = args[:invited_email_address] if args.key?(:invited_email_address) + @creation_time = args[:creation_time] if args.key?(:creation_time) + @invitation_id = args[:invitation_id] if args.key?(:invitation_id) + end + end + + # Attachment added to student assignment work. + # When creating attachments, setting the `form` field is not supported. + class Attachment + include Google::Apis::Core::Hashable + + # Representation of a Google Drive file. + # Corresponds to the JSON property `driveFile` + # @return [Google::Apis::ClassroomV1::DriveFile] + attr_accessor :drive_file + + # YouTube video item. + # Corresponds to the JSON property `youTubeVideo` + # @return [Google::Apis::ClassroomV1::YouTubeVideo] + attr_accessor :you_tube_video + + # Google Forms item. + # Corresponds to the JSON property `form` + # @return [Google::Apis::ClassroomV1::Form] + attr_accessor :form + + # URL item. + # Corresponds to the JSON property `link` + # @return [Google::Apis::ClassroomV1::Link] + attr_accessor :link + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @drive_file = args[:drive_file] if args.key?(:drive_file) + @you_tube_video = args[:you_tube_video] if args.key?(:you_tube_video) + @form = args[:form] if args.key?(:form) + @link = args[:link] if args.key?(:link) end end @@ -567,136 +795,54 @@ module Google class CourseMaterialSet include Google::Apis::Core::Hashable - # Materials attached to this set. - # Corresponds to the JSON property `materials` - # @return [Array] - attr_accessor :materials - # Title for this set. # Corresponds to the JSON property `title` # @return [String] attr_accessor :title + # Materials attached to this set. + # Corresponds to the JSON property `materials` + # @return [Array] + attr_accessor :materials + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @materials = args[:materials] if args.key?(:materials) @title = args[:title] if args.key?(:title) + @materials = args[:materials] if args.key?(:materials) end end - # Student submission for course work. - # StudentSubmission items are generated when a CourseWork item is created. - # StudentSubmissions that have never been accessed (i.e. with `state` = NEW) - # may not have a creation time or update time. - class StudentSubmission + # Represents a time of day. The date and time zone are either not significant + # or are specified elsewhere. An API may choose to allow leap seconds. Related + # types are google.type.Date and `google.protobuf.Timestamp`. + class TimeOfDay include Google::Apis::Core::Hashable - # Classroom-assigned Identifier for the student submission. - # This is unique among submissions for the relevant course work. - # Read-only. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id + # Hours of day in 24 hour format. Should be from 0 to 23. An API may choose + # to allow the value "24:00:00" for scenarios like business closing time. + # Corresponds to the JSON property `hours` + # @return [Fixnum] + attr_accessor :hours - # Type of course work this submission is for. - # Read-only. - # Corresponds to the JSON property `courseWorkType` - # @return [String] - attr_accessor :course_work_type + # Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. + # Corresponds to the JSON property `nanos` + # @return [Fixnum] + attr_accessor :nanos - # Optional grade. If unset, no grade was set. - # This must be a non-negative integer value. - # This may be modified only by course teachers. - # Corresponds to the JSON property `assignedGrade` - # @return [Float] - attr_accessor :assigned_grade + # Seconds of minutes of the time. Must normally be from 0 to 59. An API may + # allow the value 60 if it allows leap-seconds. + # Corresponds to the JSON property `seconds` + # @return [Fixnum] + attr_accessor :seconds - # Whether this student submission is associated with the Developer Console - # project making the request. - # See google.classroom.Work.CreateCourseWork for more - # details. - # Read-only. - # Corresponds to the JSON property `associatedWithDeveloper` - # @return [Boolean] - attr_accessor :associated_with_developer - alias_method :associated_with_developer?, :associated_with_developer - - # Last update time of this submission. - # This may be unset if the student has not accessed this item. - # Read-only. - # Corresponds to the JSON property `updateTime` - # @return [String] - attr_accessor :update_time - - # Absolute link to the submission in the Classroom web UI. - # Read-only. - # Corresponds to the JSON property `alternateLink` - # @return [String] - attr_accessor :alternate_link - - # Optional pending grade. If unset, no grade was set. - # This must be a non-negative integer value. - # This is only visible to and modifiable by course teachers. - # Corresponds to the JSON property `draftGrade` - # @return [Float] - attr_accessor :draft_grade - - # Identifier for the student that owns this submission. - # Read-only. - # Corresponds to the JSON property `userId` - # @return [String] - attr_accessor :user_id - - # Student work for a multiple-choice question. - # Corresponds to the JSON property `multipleChoiceSubmission` - # @return [Google::Apis::ClassroomV1::MultipleChoiceSubmission] - attr_accessor :multiple_choice_submission - - # State of this submission. - # Read-only. - # Corresponds to the JSON property `state` - # @return [String] - attr_accessor :state - - # Student work for an assignment. - # Corresponds to the JSON property `assignmentSubmission` - # @return [Google::Apis::ClassroomV1::AssignmentSubmission] - attr_accessor :assignment_submission - - # Creation time of this submission. - # This may be unset if the student has not accessed this item. - # Read-only. - # Corresponds to the JSON property `creationTime` - # @return [String] - attr_accessor :creation_time - - # Identifier of the course. - # Read-only. - # Corresponds to the JSON property `courseId` - # @return [String] - attr_accessor :course_id - - # Student work for a short answer question. - # Corresponds to the JSON property `shortAnswerSubmission` - # @return [Google::Apis::ClassroomV1::ShortAnswerSubmission] - attr_accessor :short_answer_submission - - # Whether this submission is late. - # Read-only. - # Corresponds to the JSON property `late` - # @return [Boolean] - attr_accessor :late - alias_method :late?, :late - - # Identifier for the course work this corresponds to. - # Read-only. - # Corresponds to the JSON property `courseWorkId` - # @return [String] - attr_accessor :course_work_id + # Minutes of hour of day. Must be from 0 to 59. + # Corresponds to the JSON property `minutes` + # @return [Fixnum] + attr_accessor :minutes def initialize(**args) update!(**args) @@ -704,22 +850,165 @@ module Google # Update properties of this object def update!(**args) - @id = args[:id] if args.key?(:id) - @course_work_type = args[:course_work_type] if args.key?(:course_work_type) - @assigned_grade = args[:assigned_grade] if args.key?(:assigned_grade) - @associated_with_developer = args[:associated_with_developer] if args.key?(:associated_with_developer) - @update_time = args[:update_time] if args.key?(:update_time) - @alternate_link = args[:alternate_link] if args.key?(:alternate_link) - @draft_grade = args[:draft_grade] if args.key?(:draft_grade) - @user_id = args[:user_id] if args.key?(:user_id) - @multiple_choice_submission = args[:multiple_choice_submission] if args.key?(:multiple_choice_submission) - @state = args[:state] if args.key?(:state) - @assignment_submission = args[:assignment_submission] if args.key?(:assignment_submission) - @creation_time = args[:creation_time] if args.key?(:creation_time) - @course_id = args[:course_id] if args.key?(:course_id) - @short_answer_submission = args[:short_answer_submission] if args.key?(:short_answer_submission) - @late = args[:late] if args.key?(:late) - @course_work_id = args[:course_work_id] if args.key?(:course_work_id) + @hours = args[:hours] if args.key?(:hours) + @nanos = args[:nanos] if args.key?(:nanos) + @seconds = args[:seconds] if args.key?(:seconds) + @minutes = args[:minutes] if args.key?(:minutes) + end + end + + # Response when listing courses. + class ListCoursesResponse + include Google::Apis::Core::Hashable + + # Token identifying the next page of results to return. If empty, no further + # results are available. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # Courses that match the list request. + # Corresponds to the JSON property `courses` + # @return [Array] + attr_accessor :courses + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @courses = args[:courses] if args.key?(:courses) + end + end + + # Google Forms item. + class Form + include Google::Apis::Core::Hashable + + # Title of the Form. + # Read-only. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + # URL of a thumbnail image of the Form. + # Read-only. + # Corresponds to the JSON property `thumbnailUrl` + # @return [String] + attr_accessor :thumbnail_url + + # URL of the form responses document. + # Only set if respsonses have been recorded and only when the + # requesting user is an editor of the form. + # Read-only. + # Corresponds to the JSON property `responseUrl` + # @return [String] + attr_accessor :response_url + + # URL of the form. + # Corresponds to the JSON property `formUrl` + # @return [String] + attr_accessor :form_url + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @title = args[:title] if args.key?(:title) + @thumbnail_url = args[:thumbnail_url] if args.key?(:thumbnail_url) + @response_url = args[:response_url] if args.key?(:response_url) + @form_url = args[:form_url] if args.key?(:form_url) + end + end + + # Response when listing teachers. + class ListTeachersResponse + include Google::Apis::Core::Hashable + + # Token identifying the next page of results to return. If empty, no further + # results are available. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # Teachers who match the list request. + # Corresponds to the JSON property `teachers` + # @return [Array] + attr_accessor :teachers + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @teachers = args[:teachers] if args.key?(:teachers) + end + end + + # URL item. + class Link + include Google::Apis::Core::Hashable + + # URL to link to. + # This must be a valid UTF-8 string containing between 1 and 2024 characters. + # Corresponds to the JSON property `url` + # @return [String] + attr_accessor :url + + # Title of the target of the URL. + # Read-only. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + # URL of a thumbnail image of the target URL. + # Read-only. + # Corresponds to the JSON property `thumbnailUrl` + # @return [String] + attr_accessor :thumbnail_url + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @url = args[:url] if args.key?(:url) + @title = args[:title] if args.key?(:title) + @thumbnail_url = args[:thumbnail_url] if args.key?(:thumbnail_url) + end + end + + # Response when listing guardians. + class ListGuardiansResponse + include Google::Apis::Core::Hashable + + # Token identifying the next page of results to return. If empty, no further + # results are available. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # Guardians on this page of results that met the criteria specified in + # the request. + # Corresponds to the JSON property `guardians` + # @return [Array] + attr_accessor :guardians + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @guardians = args[:guardians] if args.key?(:guardians) end end @@ -758,15 +1047,14 @@ module Google end end - # Response when listing guardians. - class ListGuardiansResponse + # Response when listing course aliases. + class ListCourseAliasesResponse include Google::Apis::Core::Hashable - # Guardians on this page of results that met the criteria specified in - # the request. - # Corresponds to the JSON property `guardians` - # @return [Array] - attr_accessor :guardians + # The course aliases. + # Corresponds to the JSON property `aliases` + # @return [Array] + attr_accessor :aliases # Token identifying the next page of results to return. If empty, no further # results are available. @@ -780,36 +1068,474 @@ module Google # Update properties of this object def update!(**args) - @guardians = args[:guardians] if args.key?(:guardians) + @aliases = args[:aliases] if args.key?(:aliases) @next_page_token = args[:next_page_token] if args.key?(:next_page_token) end end - # Association between a student and a guardian of that student. The guardian - # may receive information about the student's course work. - class Guardian + # Response when listing guardian invitations. + class ListGuardianInvitationsResponse include Google::Apis::Core::Hashable - # Global information for a user. - # Corresponds to the JSON property `guardianProfile` - # @return [Google::Apis::ClassroomV1::UserProfile] - attr_accessor :guardian_profile - - # The email address to which the initial guardian invitation was sent. - # This field is only visible to domain administrators. - # Corresponds to the JSON property `invitedEmailAddress` + # Token identifying the next page of results to return. If empty, no further + # results are available. + # Corresponds to the JSON property `nextPageToken` # @return [String] - attr_accessor :invited_email_address + attr_accessor :next_page_token - # Identifier for the student to whom the guardian relationship applies. - # Corresponds to the JSON property `studentId` - # @return [String] - attr_accessor :student_id - - # Identifier for the guardian. - # Corresponds to the JSON property `guardianId` - # @return [String] - attr_accessor :guardian_id + # Guardian invitations that matched the list request. + # Corresponds to the JSON property `guardianInvitations` + # @return [Array] + attr_accessor :guardian_invitations + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @guardian_invitations = args[:guardian_invitations] if args.key?(:guardian_invitations) + end + end + + # Represents a whole calendar date, e.g. date of birth. The time of day and + # time zone are either specified elsewhere or are not significant. The date + # is relative to the Proleptic Gregorian Calendar. The day may be 0 to + # represent a year and month where the day is not significant, e.g. credit card + # expiration date. The year may be 0 to represent a month and day independent + # of year, e.g. anniversary date. Related types are google.type.TimeOfDay + # and `google.protobuf.Timestamp`. + class Date + include Google::Apis::Core::Hashable + + # Year of date. Must be from 1 to 9999, or 0 if specifying a date without + # a year. + # Corresponds to the JSON property `year` + # @return [Fixnum] + attr_accessor :year + + # Day of month. Must be from 1 to 31 and valid for the year and month, or 0 + # if specifying a year/month where the day is not significant. + # Corresponds to the JSON property `day` + # @return [Fixnum] + attr_accessor :day + + # Month of year. Must be from 1 to 12. + # Corresponds to the JSON property `month` + # @return [Fixnum] + attr_accessor :month + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @year = args[:year] if args.key?(:year) + @day = args[:day] if args.key?(:day) + @month = args[:month] if args.key?(:month) + end + end + + # Student work for a multiple-choice question. + class MultipleChoiceSubmission + include Google::Apis::Core::Hashable + + # Student's select choice. + # Corresponds to the JSON property `answer` + # @return [String] + attr_accessor :answer + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @answer = args[:answer] if args.key?(:answer) + end + end + + # A material attached to a course as part of a material set. + class CourseMaterial + include Google::Apis::Core::Hashable + + # Representation of a Google Drive file. + # Corresponds to the JSON property `driveFile` + # @return [Google::Apis::ClassroomV1::DriveFile] + attr_accessor :drive_file + + # YouTube video item. + # Corresponds to the JSON property `youTubeVideo` + # @return [Google::Apis::ClassroomV1::YouTubeVideo] + attr_accessor :you_tube_video + + # Google Forms item. + # Corresponds to the JSON property `form` + # @return [Google::Apis::ClassroomV1::Form] + attr_accessor :form + + # URL item. + # Corresponds to the JSON property `link` + # @return [Google::Apis::ClassroomV1::Link] + attr_accessor :link + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @drive_file = args[:drive_file] if args.key?(:drive_file) + @you_tube_video = args[:you_tube_video] if args.key?(:you_tube_video) + @form = args[:form] if args.key?(:form) + @link = args[:link] if args.key?(:link) + end + end + + # Details of the user's name. + class Name + include Google::Apis::Core::Hashable + + # The user's first name. + # Read-only. + # Corresponds to the JSON property `givenName` + # @return [String] + attr_accessor :given_name + + # The user's last name. + # Read-only. + # Corresponds to the JSON property `familyName` + # @return [String] + attr_accessor :family_name + + # The user's full name formed by concatenating the first and last name + # values. + # Read-only. + # Corresponds to the JSON property `fullName` + # @return [String] + attr_accessor :full_name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @given_name = args[:given_name] if args.key?(:given_name) + @family_name = args[:family_name] if args.key?(:family_name) + @full_name = args[:full_name] if args.key?(:full_name) + end + end + + # Additional details for assignments. + class Assignment + include Google::Apis::Core::Hashable + + # Representation of a Google Drive folder. + # Corresponds to the JSON property `studentWorkFolder` + # @return [Google::Apis::ClassroomV1::DriveFolder] + attr_accessor :student_work_folder + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @student_work_folder = args[:student_work_folder] if args.key?(:student_work_folder) + end + end + + # Drive file that is used as material for course work. + class SharedDriveFile + include Google::Apis::Core::Hashable + + # Representation of a Google Drive file. + # Corresponds to the JSON property `driveFile` + # @return [Google::Apis::ClassroomV1::DriveFile] + attr_accessor :drive_file + + # Mechanism by which students access the Drive item. + # Corresponds to the JSON property `shareMode` + # @return [String] + attr_accessor :share_mode + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @drive_file = args[:drive_file] if args.key?(:drive_file) + @share_mode = args[:share_mode] if args.key?(:share_mode) + end + end + + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # service Foo ` + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # ` + # The JSON representation for `Empty` is empty JSON object ````. + class Empty + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Additional details for multiple-choice questions. + class MultipleChoiceQuestion + include Google::Apis::Core::Hashable + + # Possible choices. + # Corresponds to the JSON property `choices` + # @return [Array] + attr_accessor :choices + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @choices = args[:choices] if args.key?(:choices) + end + end + + # A Course in Classroom. + class Course + include Google::Apis::Core::Hashable + + # Section of the course. + # For example, "Period 2". + # If set, this field must be a valid UTF-8 string and no longer than 2800 + # characters. + # Corresponds to the JSON property `section` + # @return [String] + attr_accessor :section + + # Identifier for this course assigned by Classroom. + # When + # creating a course, + # you may optionally set this identifier to an + # alias string in the + # request to create a corresponding alias. The `id` is still assigned by + # Classroom and cannot be updated after the course is created. + # Specifying this field in a course update mask results in an error. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # Optional room location. + # For example, "301". + # If set, this field must be a valid UTF-8 string and no longer than 650 + # characters. + # Corresponds to the JSON property `room` + # @return [String] + attr_accessor :room + + # The email address of a Google group containing all members of the course. + # This group does not accept email and can only be used for permissions. + # Read-only. + # Corresponds to the JSON property `courseGroupEmail` + # @return [String] + attr_accessor :course_group_email + + # Enrollment code to use when joining this course. + # Specifying this field in a course update mask results in an error. + # Read-only. + # Corresponds to the JSON property `enrollmentCode` + # @return [String] + attr_accessor :enrollment_code + + # Sets of materials that appear on the "about" page of this course. + # Read-only. + # Corresponds to the JSON property `courseMaterialSets` + # @return [Array] + attr_accessor :course_material_sets + + # Optional heading for the description. + # For example, "Welcome to 10th Grade Biology." + # If set, this field must be a valid UTF-8 string and no longer than 3600 + # characters. + # Corresponds to the JSON property `descriptionHeading` + # @return [String] + attr_accessor :description_heading + + # Time of the most recent update to this course. + # Specifying this field in a course update mask results in an error. + # Read-only. + # Corresponds to the JSON property `updateTime` + # @return [String] + attr_accessor :update_time + + # Absolute link to this course in the Classroom web UI. + # Read-only. + # Corresponds to the JSON property `alternateLink` + # @return [String] + attr_accessor :alternate_link + + # Whether or not guardian notifications are enabled for this course. + # Read-only. + # Corresponds to the JSON property `guardiansEnabled` + # @return [Boolean] + attr_accessor :guardians_enabled + alias_method :guardians_enabled?, :guardians_enabled + + # The identifier of the owner of a course. + # When specified as a parameter of a + # create course request, this + # field is required. + # The identifier can be one of the following: + # * the numeric identifier for the user + # * the email address of the user + # * the string literal `"me"`, indicating the requesting user + # This must be set in a create request. Specifying this field in a course + # update mask results in an `INVALID_ARGUMENT` error. + # Corresponds to the JSON property `ownerId` + # @return [String] + attr_accessor :owner_id + + # State of the course. + # If unspecified, the default state is `PROVISIONED`. + # Corresponds to the JSON property `courseState` + # @return [String] + attr_accessor :course_state + + # Optional description. + # For example, "We'll be learning about the structure of living + # creatures from a combination of textbooks, guest lectures, and lab work. + # Expect to be excited!" + # If set, this field must be a valid UTF-8 string and no longer than 30,000 + # characters. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # The email address of a Google group containing all teachers of the course. + # This group does not accept email and can only be used for permissions. + # Read-only. + # Corresponds to the JSON property `teacherGroupEmail` + # @return [String] + attr_accessor :teacher_group_email + + # Creation time of the course. + # Specifying this field in a course update mask results in an error. + # Read-only. + # Corresponds to the JSON property `creationTime` + # @return [String] + attr_accessor :creation_time + + # Name of the course. + # For example, "10th Grade Biology". + # The name is required. It must be between 1 and 750 characters and a valid + # UTF-8 string. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Representation of a Google Drive folder. + # Corresponds to the JSON property `teacherFolder` + # @return [Google::Apis::ClassroomV1::DriveFolder] + attr_accessor :teacher_folder + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @section = args[:section] if args.key?(:section) + @id = args[:id] if args.key?(:id) + @room = args[:room] if args.key?(:room) + @course_group_email = args[:course_group_email] if args.key?(:course_group_email) + @enrollment_code = args[:enrollment_code] if args.key?(:enrollment_code) + @course_material_sets = args[:course_material_sets] if args.key?(:course_material_sets) + @description_heading = args[:description_heading] if args.key?(:description_heading) + @update_time = args[:update_time] if args.key?(:update_time) + @alternate_link = args[:alternate_link] if args.key?(:alternate_link) + @guardians_enabled = args[:guardians_enabled] if args.key?(:guardians_enabled) + @owner_id = args[:owner_id] if args.key?(:owner_id) + @course_state = args[:course_state] if args.key?(:course_state) + @description = args[:description] if args.key?(:description) + @teacher_group_email = args[:teacher_group_email] if args.key?(:teacher_group_email) + @creation_time = args[:creation_time] if args.key?(:creation_time) + @name = args[:name] if args.key?(:name) + @teacher_folder = args[:teacher_folder] if args.key?(:teacher_folder) + end + end + + # Representation of a Google Drive file. + class DriveFile + include Google::Apis::Core::Hashable + + # URL that can be used to access the Drive item. + # Read-only. + # Corresponds to the JSON property `alternateLink` + # @return [String] + attr_accessor :alternate_link + + # URL of a thumbnail image of the Drive item. + # Read-only. + # Corresponds to the JSON property `thumbnailUrl` + # @return [String] + attr_accessor :thumbnail_url + + # Drive API resource ID. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # Title of the Drive item. + # Read-only. + # 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) + @alternate_link = args[:alternate_link] if args.key?(:alternate_link) + @thumbnail_url = args[:thumbnail_url] if args.key?(:thumbnail_url) + @id = args[:id] if args.key?(:id) + @title = args[:title] if args.key?(:title) + end + end + + # Global user permission description. + class GlobalPermission + include Google::Apis::Core::Hashable + + # Permission value. + # Corresponds to the JSON property `permission` + # @return [String] + attr_accessor :permission + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @permission = args[:permission] if args.key?(:permission) + end + end + + # Request to return a student submission. + class ReturnStudentSubmissionRequest + include Google::Apis::Core::Hashable def initialize(**args) update!(**args) @@ -817,10 +1543,6 @@ module Google # Update properties of this object def update!(**args) - @guardian_profile = args[:guardian_profile] if args.key?(:guardian_profile) - @invited_email_address = args[:invited_email_address] if args.key?(:invited_email_address) - @student_id = args[:student_id] if args.key?(:student_id) - @guardian_id = args[:guardian_id] if args.key?(:guardian_id) end end @@ -861,53 +1583,6 @@ module Google end end - # Global information for a user. - class UserProfile - include Google::Apis::Core::Hashable - - # Email address of the user. - # Read-only. - # Corresponds to the JSON property `emailAddress` - # @return [String] - attr_accessor :email_address - - # Global permissions of the user. - # Read-only. - # Corresponds to the JSON property `permissions` - # @return [Array] - attr_accessor :permissions - - # Identifier of the user. - # Read-only. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Details of the user's name. - # Corresponds to the JSON property `name` - # @return [Google::Apis::ClassroomV1::Name] - attr_accessor :name - - # URL of user's profile photo. - # Read-only. - # Corresponds to the JSON property `photoUrl` - # @return [String] - attr_accessor :photo_url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @email_address = args[:email_address] if args.key?(:email_address) - @permissions = args[:permissions] if args.key?(:permissions) - @id = args[:id] if args.key?(:id) - @name = args[:name] if args.key?(:name) - @photo_url = args[:photo_url] if args.key?(:photo_url) - end - end - # Request to reclaim a student submission. class ReclaimStudentSubmissionRequest include Google::Apis::Core::Hashable @@ -921,478 +1596,6 @@ module Google end end - # Student in a course. - class Student - include Google::Apis::Core::Hashable - - # Identifier of the course. - # Read-only. - # Corresponds to the JSON property `courseId` - # @return [String] - attr_accessor :course_id - - # Global information for a user. - # Corresponds to the JSON property `profile` - # @return [Google::Apis::ClassroomV1::UserProfile] - attr_accessor :profile - - # Representation of a Google Drive folder. - # Corresponds to the JSON property `studentWorkFolder` - # @return [Google::Apis::ClassroomV1::DriveFolder] - attr_accessor :student_work_folder - - # Identifier of the user. - # When specified as a parameter of a request, this identifier can be one of - # the following: - # * the numeric identifier for the user - # * the email address of the user - # * the string literal `"me"`, indicating the requesting user - # Corresponds to the JSON property `userId` - # @return [String] - attr_accessor :user_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @course_id = args[:course_id] if args.key?(:course_id) - @profile = args[:profile] if args.key?(:profile) - @student_work_folder = args[:student_work_folder] if args.key?(:student_work_folder) - @user_id = args[:user_id] if args.key?(:user_id) - end - end - - # Response when listing teachers. - class ListTeachersResponse - include Google::Apis::Core::Hashable - - # Token identifying the next page of results to return. If empty, no further - # results are available. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Teachers who match the list request. - # Corresponds to the JSON property `teachers` - # @return [Array] - attr_accessor :teachers - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @teachers = args[:teachers] if args.key?(:teachers) - end - end - - # A Course in Classroom. - class Course - include Google::Apis::Core::Hashable - - # Identifier for this course assigned by Classroom. - # When - # creating a course, - # you may optionally set this identifier to an - # alias string in the - # request to create a corresponding alias. The `id` is still assigned by - # Classroom and cannot be updated after the course is created. - # Specifying this field in a course update mask results in an error. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Optional description. - # For example, "We'll be learning about the structure of living - # creatures from a combination of textbooks, guest lectures, and lab work. - # Expect to be excited!" - # If set, this field must be a valid UTF-8 string and no longer than 30,000 - # characters. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Time of the most recent update to this course. - # Specifying this field in a course update mask results in an error. - # Read-only. - # Corresponds to the JSON property `updateTime` - # @return [String] - attr_accessor :update_time - - # Section of the course. - # For example, "Period 2". - # If set, this field must be a valid UTF-8 string and no longer than 2800 - # characters. - # Corresponds to the JSON property `section` - # @return [String] - attr_accessor :section - - # Absolute link to this course in the Classroom web UI. - # Read-only. - # Corresponds to the JSON property `alternateLink` - # @return [String] - attr_accessor :alternate_link - - # The email address of a Google group containing all teachers of the course. - # This group does not accept email and can only be used for permissions. - # Read-only. - # Corresponds to the JSON property `teacherGroupEmail` - # @return [String] - attr_accessor :teacher_group_email - - # Whether or not guardian notifications are enabled for this course. - # Read-only. - # Corresponds to the JSON property `guardiansEnabled` - # @return [Boolean] - attr_accessor :guardians_enabled - alias_method :guardians_enabled?, :guardians_enabled - - # The identifier of the owner of a course. - # When specified as a parameter of a - # create course request, this - # field is required. - # The identifier can be one of the following: - # * the numeric identifier for the user - # * the email address of the user - # * the string literal `"me"`, indicating the requesting user - # This must be set in a create request. Specifying this field in a course - # update mask results in an `INVALID_ARGUMENT` error. - # Corresponds to the JSON property `ownerId` - # @return [String] - attr_accessor :owner_id - - # Optional heading for the description. - # For example, "Welcome to 10th Grade Biology." - # If set, this field must be a valid UTF-8 string and no longer than 3600 - # characters. - # Corresponds to the JSON property `descriptionHeading` - # @return [String] - attr_accessor :description_heading - - # The email address of a Google group containing all members of the course. - # This group does not accept email and can only be used for permissions. - # Read-only. - # Corresponds to the JSON property `courseGroupEmail` - # @return [String] - attr_accessor :course_group_email - - # State of the course. - # If unspecified, the default state is `PROVISIONED`. - # Corresponds to the JSON property `courseState` - # @return [String] - attr_accessor :course_state - - # Optional room location. - # For example, "301". - # If set, this field must be a valid UTF-8 string and no longer than 650 - # characters. - # Corresponds to the JSON property `room` - # @return [String] - attr_accessor :room - - # Name of the course. - # For example, "10th Grade Biology". - # The name is required. It must be between 1 and 750 characters and a valid - # UTF-8 string. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Creation time of the course. - # Specifying this field in a course update mask results in an error. - # Read-only. - # Corresponds to the JSON property `creationTime` - # @return [String] - attr_accessor :creation_time - - # Enrollment code to use when joining this course. - # Specifying this field in a course update mask results in an error. - # Read-only. - # Corresponds to the JSON property `enrollmentCode` - # @return [String] - attr_accessor :enrollment_code - - # Representation of a Google Drive folder. - # Corresponds to the JSON property `teacherFolder` - # @return [Google::Apis::ClassroomV1::DriveFolder] - attr_accessor :teacher_folder - - # Sets of materials that appear on the "about" page of this course. - # Read-only. - # Corresponds to the JSON property `courseMaterialSets` - # @return [Array] - attr_accessor :course_material_sets - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] if args.key?(:id) - @description = args[:description] if args.key?(:description) - @update_time = args[:update_time] if args.key?(:update_time) - @section = args[:section] if args.key?(:section) - @alternate_link = args[:alternate_link] if args.key?(:alternate_link) - @teacher_group_email = args[:teacher_group_email] if args.key?(:teacher_group_email) - @guardians_enabled = args[:guardians_enabled] if args.key?(:guardians_enabled) - @owner_id = args[:owner_id] if args.key?(:owner_id) - @description_heading = args[:description_heading] if args.key?(:description_heading) - @course_group_email = args[:course_group_email] if args.key?(:course_group_email) - @course_state = args[:course_state] if args.key?(:course_state) - @room = args[:room] if args.key?(:room) - @name = args[:name] if args.key?(:name) - @creation_time = args[:creation_time] if args.key?(:creation_time) - @enrollment_code = args[:enrollment_code] if args.key?(:enrollment_code) - @teacher_folder = args[:teacher_folder] if args.key?(:teacher_folder) - @course_material_sets = args[:course_material_sets] if args.key?(:course_material_sets) - end - end - - # Request to return a student submission. - class ReturnStudentSubmissionRequest - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # An invitation to become the guardian of a specified user, sent to a specified - # email address. - class GuardianInvitation - include Google::Apis::Core::Hashable - - # The time that this invitation was created. - # Read-only. - # Corresponds to the JSON property `creationTime` - # @return [String] - attr_accessor :creation_time - - # Unique identifier for this invitation. - # Read-only. - # Corresponds to the JSON property `invitationId` - # @return [String] - attr_accessor :invitation_id - - # The state that this invitation is in. - # Corresponds to the JSON property `state` - # @return [String] - attr_accessor :state - - # Email address that the invitation was sent to. - # This field is only visible to domain administrators. - # Corresponds to the JSON property `invitedEmailAddress` - # @return [String] - attr_accessor :invited_email_address - - # ID of the student (in standard format) - # Corresponds to the JSON property `studentId` - # @return [String] - attr_accessor :student_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @creation_time = args[:creation_time] if args.key?(:creation_time) - @invitation_id = args[:invitation_id] if args.key?(:invitation_id) - @state = args[:state] if args.key?(:state) - @invited_email_address = args[:invited_email_address] if args.key?(:invited_email_address) - @student_id = args[:student_id] if args.key?(:student_id) - end - end - - # Request to turn in a student submission. - class TurnInStudentSubmissionRequest - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # YouTube video item. - class YouTubeVideo - include Google::Apis::Core::Hashable - - # URL of a thumbnail image of the YouTube video. - # Read-only. - # Corresponds to the JSON property `thumbnailUrl` - # @return [String] - attr_accessor :thumbnail_url - - # Title of the YouTube video. - # Read-only. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # URL that can be used to view the YouTube video. - # Read-only. - # Corresponds to the JSON property `alternateLink` - # @return [String] - attr_accessor :alternate_link - - # YouTube API resource ID. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @thumbnail_url = args[:thumbnail_url] if args.key?(:thumbnail_url) - @title = args[:title] if args.key?(:title) - @alternate_link = args[:alternate_link] if args.key?(:alternate_link) - @id = args[:id] if args.key?(:id) - end - end - - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # service Foo ` - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # ` - # The JSON representation for `Empty` is empty JSON object ````. - class Empty - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # Response when listing course work. - class ListCourseWorkResponse - include Google::Apis::Core::Hashable - - # Token identifying the next page of results to return. If empty, no further - # results are available. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Course work items that match the request. - # Corresponds to the JSON property `courseWork` - # @return [Array] - attr_accessor :course_work - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @course_work = args[:course_work] if args.key?(:course_work) - end - end - - # Drive file that is used as material for course work. - class SharedDriveFile - include Google::Apis::Core::Hashable - - # Representation of a Google Drive file. - # Corresponds to the JSON property `driveFile` - # @return [Google::Apis::ClassroomV1::DriveFile] - attr_accessor :drive_file - - # Mechanism by which students access the Drive item. - # Corresponds to the JSON property `shareMode` - # @return [String] - attr_accessor :share_mode - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @drive_file = args[:drive_file] if args.key?(:drive_file) - @share_mode = args[:share_mode] if args.key?(:share_mode) - end - end - - # Global user permission description. - class GlobalPermission - include Google::Apis::Core::Hashable - - # Permission value. - # Corresponds to the JSON property `permission` - # @return [String] - attr_accessor :permission - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @permission = args[:permission] if args.key?(:permission) - end - end - - # Material attached to course work. - # When creating attachments, setting the `form` field is not supported. - class Material - include Google::Apis::Core::Hashable - - # Drive file that is used as material for course work. - # Corresponds to the JSON property `driveFile` - # @return [Google::Apis::ClassroomV1::SharedDriveFile] - attr_accessor :drive_file - - # URL item. - # Corresponds to the JSON property `link` - # @return [Google::Apis::ClassroomV1::Link] - attr_accessor :link - - # YouTube video item. - # Corresponds to the JSON property `youtubeVideo` - # @return [Google::Apis::ClassroomV1::YouTubeVideo] - attr_accessor :youtube_video - - # Google Forms item. - # Corresponds to the JSON property `form` - # @return [Google::Apis::ClassroomV1::Form] - attr_accessor :form - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @drive_file = args[:drive_file] if args.key?(:drive_file) - @link = args[:link] if args.key?(:link) - @youtube_video = args[:youtube_video] if args.key?(:youtube_video) - @form = args[:form] if args.key?(:form) - end - end - # Student work for an assignment. class AssignmentSubmission include Google::Apis::Core::Hashable @@ -1418,32 +1621,30 @@ module Google end end - # Represents a whole calendar date, e.g. date of birth. The time of day and - # time zone are either specified elsewhere or are not significant. The date - # is relative to the Proleptic Gregorian Calendar. The day may be 0 to - # represent a year and month where the day is not significant, e.g. credit card - # expiration date. The year may be 0 to represent a month and day independent - # of year, e.g. anniversary date. Related types are google.type.TimeOfDay - # and `google.protobuf.Timestamp`. - class Date + # Material attached to course work. + # When creating attachments, setting the `form` field is not supported. + class Material include Google::Apis::Core::Hashable - # Month of year. Must be from 1 to 12. - # Corresponds to the JSON property `month` - # @return [Fixnum] - attr_accessor :month + # Drive file that is used as material for course work. + # Corresponds to the JSON property `driveFile` + # @return [Google::Apis::ClassroomV1::SharedDriveFile] + attr_accessor :drive_file - # Year of date. Must be from 1 to 9999, or 0 if specifying a date without - # a year. - # Corresponds to the JSON property `year` - # @return [Fixnum] - attr_accessor :year + # Google Forms item. + # Corresponds to the JSON property `form` + # @return [Google::Apis::ClassroomV1::Form] + attr_accessor :form - # Day of month. Must be from 1 to 31 and valid for the year and month, or 0 - # if specifying a year/month where the day is not significant. - # Corresponds to the JSON property `day` - # @return [Fixnum] - attr_accessor :day + # URL item. + # Corresponds to the JSON property `link` + # @return [Google::Apis::ClassroomV1::Link] + attr_accessor :link + + # YouTube video item. + # Corresponds to the JSON property `youtubeVideo` + # @return [Google::Apis::ClassroomV1::YouTubeVideo] + attr_accessor :youtube_video def initialize(**args) update!(**args) @@ -1451,211 +1652,10 @@ module Google # Update properties of this object def update!(**args) - @month = args[:month] if args.key?(:month) - @year = args[:year] if args.key?(:year) - @day = args[:day] if args.key?(:day) - end - end - - # Additional details for assignments. - class Assignment - include Google::Apis::Core::Hashable - - # Representation of a Google Drive folder. - # Corresponds to the JSON property `studentWorkFolder` - # @return [Google::Apis::ClassroomV1::DriveFolder] - attr_accessor :student_work_folder - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @student_work_folder = args[:student_work_folder] if args.key?(:student_work_folder) - end - end - - # Response when listing courses. - class ListCoursesResponse - include Google::Apis::Core::Hashable - - # Token identifying the next page of results to return. If empty, no further - # results are available. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Courses that match the list request. - # Corresponds to the JSON property `courses` - # @return [Array] - attr_accessor :courses - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @courses = args[:courses] if args.key?(:courses) - end - end - - # An invitation to join a course. - class Invitation - include Google::Apis::Core::Hashable - - # Identifier of the course to invite the user to. - # Corresponds to the JSON property `courseId` - # @return [String] - attr_accessor :course_id - - # Role to invite the user to have. - # Must not be `COURSE_ROLE_UNSPECIFIED`. - # Corresponds to the JSON property `role` - # @return [String] - attr_accessor :role - - # Identifier of the invited user. - # When specified as a parameter of a request, this identifier can be set to - # one of the following: - # * the numeric identifier for the user - # * the email address of the user - # * the string literal `"me"`, indicating the requesting user - # Corresponds to the JSON property `userId` - # @return [String] - attr_accessor :user_id - - # Identifier assigned by Classroom. - # Read-only. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @course_id = args[:course_id] if args.key?(:course_id) - @role = args[:role] if args.key?(:role) - @user_id = args[:user_id] if args.key?(:user_id) - @id = args[:id] if args.key?(:id) - end - end - - # Response when listing student submissions. - class ListStudentSubmissionsResponse - include Google::Apis::Core::Hashable - - # Token identifying the next page of results to return. If empty, no further - # results are available. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Student work that matches the request. - # Corresponds to the JSON property `studentSubmissions` - # @return [Array] - attr_accessor :student_submissions - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @student_submissions = args[:student_submissions] if args.key?(:student_submissions) - end - end - - # Details of the user's name. - class Name - include Google::Apis::Core::Hashable - - # The user's first name. - # Read-only. - # Corresponds to the JSON property `givenName` - # @return [String] - attr_accessor :given_name - - # The user's last name. - # Read-only. - # Corresponds to the JSON property `familyName` - # @return [String] - attr_accessor :family_name - - # The user's full name formed by concatenating the first and last name - # values. - # Read-only. - # Corresponds to the JSON property `fullName` - # @return [String] - attr_accessor :full_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @given_name = args[:given_name] if args.key?(:given_name) - @family_name = args[:family_name] if args.key?(:family_name) - @full_name = args[:full_name] if args.key?(:full_name) - end - end - - # Response when listing invitations. - class ListInvitationsResponse - include Google::Apis::Core::Hashable - - # Token identifying the next page of results to return. If empty, no further - # results are available. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Invitations that match the list request. - # Corresponds to the JSON property `invitations` - # @return [Array] - attr_accessor :invitations - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @invitations = args[:invitations] if args.key?(:invitations) - end - end - - # Response when listing students. - class ListStudentsResponse - include Google::Apis::Core::Hashable - - # Token identifying the next page of results to return. If empty, no further - # results are available. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Students who match the list request. - # Corresponds to the JSON property `students` - # @return [Array] - attr_accessor :students - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @students = args[:students] if args.key?(:students) + @drive_file = args[:drive_file] if args.key?(:drive_file) + @form = args[:form] if args.key?(:form) + @link = args[:link] if args.key?(:link) + @youtube_video = args[:youtube_video] if args.key?(:youtube_video) end end end diff --git a/generated/google/apis/classroom_v1/representations.rb b/generated/google/apis/classroom_v1/representations.rb index 361451453..43ea23666 100644 --- a/generated/google/apis/classroom_v1/representations.rb +++ b/generated/google/apis/classroom_v1/representations.rb @@ -22,322 +22,344 @@ module Google module Apis module ClassroomV1 - class Attachment - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListGuardianInvitationsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class CourseWork class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class DriveFile - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DriveFolder - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListCourseAliasesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ShortAnswerSubmission - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CourseMaterial - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class MultipleChoiceSubmission - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Link - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ModifyAttachmentsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class TimeOfDay - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Form - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class MultipleChoiceQuestion - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CourseMaterialSet - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class StudentSubmission - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CourseAlias - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListGuardiansResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class Guardian class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class Teacher - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class UserProfile class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class ReclaimStudentSubmissionRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Student - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListTeachersResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Course - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ReturnStudentSubmissionRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class GuardianInvitation - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class TurnInStudentSubmissionRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class YouTubeVideo - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Empty - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListCourseWorkResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SharedDriveFile - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class GlobalPermission - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Material - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AssignmentSubmission - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Date - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Assignment - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListCoursesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Invitation - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListStudentSubmissionsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Name - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListInvitationsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class ListStudentsResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class Student + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Invitation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DriveFolder + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ShortAnswerSubmission + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class StudentSubmission + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListStudentSubmissionsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TurnInStudentSubmissionRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ModifyAttachmentsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListCourseWorkResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class YouTubeVideo + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListInvitationsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GuardianInvitation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class Attachment - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :drive_file, as: 'driveFile', class: Google::Apis::ClassroomV1::DriveFile, decorator: Google::Apis::ClassroomV1::DriveFile::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :you_tube_video, as: 'youTubeVideo', class: Google::Apis::ClassroomV1::YouTubeVideo, decorator: Google::Apis::ClassroomV1::YouTubeVideo::Representation + include Google::Apis::Core::JsonObjectSupport + end - property :link, as: 'link', class: Google::Apis::ClassroomV1::Link, decorator: Google::Apis::ClassroomV1::Link::Representation + class CourseMaterialSet + class Representation < Google::Apis::Core::JsonRepresentation; end - property :form, as: 'form', class: Google::Apis::ClassroomV1::Form, decorator: Google::Apis::ClassroomV1::Form::Representation + include Google::Apis::Core::JsonObjectSupport + end - end + class TimeOfDay + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListCoursesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Form + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListTeachersResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Link + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListGuardiansResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CourseAlias + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListCourseAliasesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ListGuardianInvitationsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - collection :guardian_invitations, as: 'guardianInvitations', class: Google::Apis::ClassroomV1::GuardianInvitation, decorator: Google::Apis::ClassroomV1::GuardianInvitation::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport + end + + class Date + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class MultipleChoiceSubmission + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CourseMaterial + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Name + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Assignment + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SharedDriveFile + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Empty + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class MultipleChoiceQuestion + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Course + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DriveFile + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GlobalPermission + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ReturnStudentSubmissionRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Teacher + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ReclaimStudentSubmissionRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AssignmentSubmission + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Material + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class CourseWork # @private class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' property :description, as: 'description' - property :submission_modification_mode, as: 'submissionModificationMode' - property :associated_with_developer, as: 'associatedWithDeveloper' - property :update_time, as: 'updateTime' - property :title, as: 'title' - property :alternate_link, as: 'alternateLink' - property :work_type, as: 'workType' - collection :materials, as: 'materials', class: Google::Apis::ClassroomV1::Material, decorator: Google::Apis::ClassroomV1::Material::Representation - - property :state, as: 'state' + property :creation_time, as: 'creationTime' property :due_date, as: 'dueDate', class: Google::Apis::ClassroomV1::Date, decorator: Google::Apis::ClassroomV1::Date::Representation + property :state, as: 'state' + property :submission_modification_mode, as: 'submissionModificationMode' + property :course_id, as: 'courseId' + property :id, as: 'id' + property :due_time, as: 'dueTime', class: Google::Apis::ClassroomV1::TimeOfDay, decorator: Google::Apis::ClassroomV1::TimeOfDay::Representation + + property :title, as: 'title' + collection :materials, as: 'materials', class: Google::Apis::ClassroomV1::Material, decorator: Google::Apis::ClassroomV1::Material::Representation + + property :associated_with_developer, as: 'associatedWithDeveloper' + property :update_time, as: 'updateTime' + property :alternate_link, as: 'alternateLink' + property :max_points, as: 'maxPoints' property :multiple_choice_question, as: 'multipleChoiceQuestion', class: Google::Apis::ClassroomV1::MultipleChoiceQuestion, decorator: Google::Apis::ClassroomV1::MultipleChoiceQuestion::Representation - property :creation_time, as: 'creationTime' - property :course_id, as: 'courseId' - property :max_points, as: 'maxPoints' + property :work_type, as: 'workType' property :assignment, as: 'assignment', class: Google::Apis::ClassroomV1::Assignment, decorator: Google::Apis::ClassroomV1::Assignment::Representation - property :due_time, as: 'dueTime', class: Google::Apis::ClassroomV1::TimeOfDay, decorator: Google::Apis::ClassroomV1::TimeOfDay::Representation - end end - class DriveFile + class Guardian + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :student_id, as: 'studentId' + property :guardian_id, as: 'guardianId' + property :invited_email_address, as: 'invitedEmailAddress' + property :guardian_profile, as: 'guardianProfile', class: Google::Apis::ClassroomV1::UserProfile, decorator: Google::Apis::ClassroomV1::UserProfile::Representation + + end + end + + class UserProfile # @private class Representation < Google::Apis::Core::JsonRepresentation - property :thumbnail_url, as: 'thumbnailUrl' - property :title, as: 'title' - property :alternate_link, as: 'alternateLink' property :id, as: 'id' + property :email_address, as: 'emailAddress' + property :photo_url, as: 'photoUrl' + collection :permissions, as: 'permissions', class: Google::Apis::ClassroomV1::GlobalPermission, decorator: Google::Apis::ClassroomV1::GlobalPermission::Representation + + property :name, as: 'name', class: Google::Apis::ClassroomV1::Name, decorator: Google::Apis::ClassroomV1::Name::Representation + + end + end + + class ListStudentsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :students, as: 'students', class: Google::Apis::ClassroomV1::Student, decorator: Google::Apis::ClassroomV1::Student::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class Student + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :profile, as: 'profile', class: Google::Apis::ClassroomV1::UserProfile, decorator: Google::Apis::ClassroomV1::UserProfile::Representation + + property :student_work_folder, as: 'studentWorkFolder', class: Google::Apis::ClassroomV1::DriveFolder, decorator: Google::Apis::ClassroomV1::DriveFolder::Representation + + property :user_id, as: 'userId' + property :course_id, as: 'courseId' + end + end + + class Invitation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :id, as: 'id' + property :role, as: 'role' + property :user_id, as: 'userId' + property :course_id, as: 'courseId' end end @@ -350,15 +372,6 @@ module Google end end - class ListCourseAliasesResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - collection :aliases, as: 'aliases', class: Google::Apis::ClassroomV1::CourseAlias, decorator: Google::Apis::ClassroomV1::CourseAlias::Representation - - end - end - class ShortAnswerSubmission # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -366,325 +379,27 @@ module Google end end - class CourseMaterial - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :drive_file, as: 'driveFile', class: Google::Apis::ClassroomV1::DriveFile, decorator: Google::Apis::ClassroomV1::DriveFile::Representation - - property :you_tube_video, as: 'youTubeVideo', class: Google::Apis::ClassroomV1::YouTubeVideo, decorator: Google::Apis::ClassroomV1::YouTubeVideo::Representation - - property :link, as: 'link', class: Google::Apis::ClassroomV1::Link, decorator: Google::Apis::ClassroomV1::Link::Representation - - property :form, as: 'form', class: Google::Apis::ClassroomV1::Form, decorator: Google::Apis::ClassroomV1::Form::Representation - - end - end - - class MultipleChoiceSubmission - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :answer, as: 'answer' - end - end - - class Link - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :url, as: 'url' - property :thumbnail_url, as: 'thumbnailUrl' - property :title, as: 'title' - end - end - - class ModifyAttachmentsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :add_attachments, as: 'addAttachments', class: Google::Apis::ClassroomV1::Attachment, decorator: Google::Apis::ClassroomV1::Attachment::Representation - - end - end - - class TimeOfDay - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :nanos, as: 'nanos' - property :hours, as: 'hours' - property :minutes, as: 'minutes' - property :seconds, as: 'seconds' - end - end - - class Form - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :thumbnail_url, as: 'thumbnailUrl' - property :form_url, as: 'formUrl' - property :title, as: 'title' - property :response_url, as: 'responseUrl' - end - end - - class MultipleChoiceQuestion - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :choices, as: 'choices' - end - end - - class CourseMaterialSet - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :materials, as: 'materials', class: Google::Apis::ClassroomV1::CourseMaterial, decorator: Google::Apis::ClassroomV1::CourseMaterial::Representation - - property :title, as: 'title' - end - end - class StudentSubmission # @private class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :course_work_type, as: 'courseWorkType' property :assigned_grade, as: 'assignedGrade' - property :associated_with_developer, as: 'associatedWithDeveloper' - property :update_time, as: 'updateTime' - property :alternate_link, as: 'alternateLink' - property :draft_grade, as: 'draftGrade' - property :user_id, as: 'userId' property :multiple_choice_submission, as: 'multipleChoiceSubmission', class: Google::Apis::ClassroomV1::MultipleChoiceSubmission, decorator: Google::Apis::ClassroomV1::MultipleChoiceSubmission::Representation - property :state, as: 'state' property :assignment_submission, as: 'assignmentSubmission', class: Google::Apis::ClassroomV1::AssignmentSubmission, decorator: Google::Apis::ClassroomV1::AssignmentSubmission::Representation - property :creation_time, as: 'creationTime' - property :course_id, as: 'courseId' + property :associated_with_developer, as: 'associatedWithDeveloper' property :short_answer_submission, as: 'shortAnswerSubmission', class: Google::Apis::ClassroomV1::ShortAnswerSubmission, decorator: Google::Apis::ClassroomV1::ShortAnswerSubmission::Representation - property :late, as: 'late' - property :course_work_id, as: 'courseWorkId' - end - end - - class CourseAlias - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :alias, as: 'alias' - end - end - - class ListGuardiansResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :guardians, as: 'guardians', class: Google::Apis::ClassroomV1::Guardian, decorator: Google::Apis::ClassroomV1::Guardian::Representation - - property :next_page_token, as: 'nextPageToken' - end - end - - class Guardian - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :guardian_profile, as: 'guardianProfile', class: Google::Apis::ClassroomV1::UserProfile, decorator: Google::Apis::ClassroomV1::UserProfile::Representation - - property :invited_email_address, as: 'invitedEmailAddress' - property :student_id, as: 'studentId' - property :guardian_id, as: 'guardianId' - end - end - - class Teacher - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :course_id, as: 'courseId' - property :profile, as: 'profile', class: Google::Apis::ClassroomV1::UserProfile, decorator: Google::Apis::ClassroomV1::UserProfile::Representation - - property :user_id, as: 'userId' - end - end - - class UserProfile - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :email_address, as: 'emailAddress' - collection :permissions, as: 'permissions', class: Google::Apis::ClassroomV1::GlobalPermission, decorator: Google::Apis::ClassroomV1::GlobalPermission::Representation - - property :id, as: 'id' - property :name, as: 'name', class: Google::Apis::ClassroomV1::Name, decorator: Google::Apis::ClassroomV1::Name::Representation - - property :photo_url, as: 'photoUrl' - end - end - - class ReclaimStudentSubmissionRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end - end - - class Student - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :course_id, as: 'courseId' - property :profile, as: 'profile', class: Google::Apis::ClassroomV1::UserProfile, decorator: Google::Apis::ClassroomV1::UserProfile::Representation - - property :student_work_folder, as: 'studentWorkFolder', class: Google::Apis::ClassroomV1::DriveFolder, decorator: Google::Apis::ClassroomV1::DriveFolder::Representation - - property :user_id, as: 'userId' - end - end - - class ListTeachersResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - collection :teachers, as: 'teachers', class: Google::Apis::ClassroomV1::Teacher, decorator: Google::Apis::ClassroomV1::Teacher::Representation - - end - end - - class Course - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :description, as: 'description' property :update_time, as: 'updateTime' - property :section, as: 'section' property :alternate_link, as: 'alternateLink' - property :teacher_group_email, as: 'teacherGroupEmail' - property :guardians_enabled, as: 'guardiansEnabled' - property :owner_id, as: 'ownerId' - property :description_heading, as: 'descriptionHeading' - property :course_group_email, as: 'courseGroupEmail' - property :course_state, as: 'courseState' - property :room, as: 'room' - property :name, as: 'name' + property :late, as: 'late' + property :draft_grade, as: 'draftGrade' + property :course_work_type, as: 'courseWorkType' property :creation_time, as: 'creationTime' - property :enrollment_code, as: 'enrollmentCode' - property :teacher_folder, as: 'teacherFolder', class: Google::Apis::ClassroomV1::DriveFolder, decorator: Google::Apis::ClassroomV1::DriveFolder::Representation - - collection :course_material_sets, as: 'courseMaterialSets', class: Google::Apis::ClassroomV1::CourseMaterialSet, decorator: Google::Apis::ClassroomV1::CourseMaterialSet::Representation - - end - end - - class ReturnStudentSubmissionRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end - end - - class GuardianInvitation - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :creation_time, as: 'creationTime' - property :invitation_id, as: 'invitationId' property :state, as: 'state' - property :invited_email_address, as: 'invitedEmailAddress' - property :student_id, as: 'studentId' - end - end - - class TurnInStudentSubmissionRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end - end - - class YouTubeVideo - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :thumbnail_url, as: 'thumbnailUrl' - property :title, as: 'title' - property :alternate_link, as: 'alternateLink' - property :id, as: 'id' - end - end - - class Empty - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end - end - - class ListCourseWorkResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - collection :course_work, as: 'courseWork', class: Google::Apis::ClassroomV1::CourseWork, decorator: Google::Apis::ClassroomV1::CourseWork::Representation - - end - end - - class SharedDriveFile - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :drive_file, as: 'driveFile', class: Google::Apis::ClassroomV1::DriveFile, decorator: Google::Apis::ClassroomV1::DriveFile::Representation - - property :share_mode, as: 'shareMode' - end - end - - class GlobalPermission - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :permission, as: 'permission' - end - end - - class Material - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :drive_file, as: 'driveFile', class: Google::Apis::ClassroomV1::SharedDriveFile, decorator: Google::Apis::ClassroomV1::SharedDriveFile::Representation - - property :link, as: 'link', class: Google::Apis::ClassroomV1::Link, decorator: Google::Apis::ClassroomV1::Link::Representation - - property :youtube_video, as: 'youtubeVideo', class: Google::Apis::ClassroomV1::YouTubeVideo, decorator: Google::Apis::ClassroomV1::YouTubeVideo::Representation - - property :form, as: 'form', class: Google::Apis::ClassroomV1::Form, decorator: Google::Apis::ClassroomV1::Form::Representation - - end - end - - class AssignmentSubmission - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :attachments, as: 'attachments', class: Google::Apis::ClassroomV1::Attachment, decorator: Google::Apis::ClassroomV1::Attachment::Representation - - end - end - - class Date - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :month, as: 'month' - property :year, as: 'year' - property :day, as: 'day' - end - end - - class Assignment - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :student_work_folder, as: 'studentWorkFolder', class: Google::Apis::ClassroomV1::DriveFolder, decorator: Google::Apis::ClassroomV1::DriveFolder::Representation - - end - end - - class ListCoursesResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - collection :courses, as: 'courses', class: Google::Apis::ClassroomV1::Course, decorator: Google::Apis::ClassroomV1::Course::Representation - - end - end - - class Invitation - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :course_id, as: 'courseId' - property :role, as: 'role' property :user_id, as: 'userId' + property :course_work_id, as: 'courseWorkId' + property :course_id, as: 'courseId' property :id, as: 'id' end end @@ -698,12 +413,36 @@ module Google end end - class Name + class TurnInStudentSubmissionRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :given_name, as: 'givenName' - property :family_name, as: 'familyName' - property :full_name, as: 'fullName' + end + end + + class ModifyAttachmentsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :add_attachments, as: 'addAttachments', class: Google::Apis::ClassroomV1::Attachment, decorator: Google::Apis::ClassroomV1::Attachment::Representation + + end + end + + class ListCourseWorkResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :course_work, as: 'courseWork', class: Google::Apis::ClassroomV1::CourseWork, decorator: Google::Apis::ClassroomV1::CourseWork::Representation + + end + end + + class YouTubeVideo + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :thumbnail_url, as: 'thumbnailUrl' + property :id, as: 'id' + property :title, as: 'title' + property :alternate_link, as: 'alternateLink' end end @@ -716,11 +455,272 @@ module Google end end - class ListStudentsResponse + class GuardianInvitation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :student_id, as: 'studentId' + property :state, as: 'state' + property :invited_email_address, as: 'invitedEmailAddress' + property :creation_time, as: 'creationTime' + property :invitation_id, as: 'invitationId' + end + end + + class Attachment + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :drive_file, as: 'driveFile', class: Google::Apis::ClassroomV1::DriveFile, decorator: Google::Apis::ClassroomV1::DriveFile::Representation + + property :you_tube_video, as: 'youTubeVideo', class: Google::Apis::ClassroomV1::YouTubeVideo, decorator: Google::Apis::ClassroomV1::YouTubeVideo::Representation + + property :form, as: 'form', class: Google::Apis::ClassroomV1::Form, decorator: Google::Apis::ClassroomV1::Form::Representation + + property :link, as: 'link', class: Google::Apis::ClassroomV1::Link, decorator: Google::Apis::ClassroomV1::Link::Representation + + end + end + + class CourseMaterialSet + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :title, as: 'title' + collection :materials, as: 'materials', class: Google::Apis::ClassroomV1::CourseMaterial, decorator: Google::Apis::ClassroomV1::CourseMaterial::Representation + + end + end + + class TimeOfDay + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :hours, as: 'hours' + property :nanos, as: 'nanos' + property :seconds, as: 'seconds' + property :minutes, as: 'minutes' + end + end + + class ListCoursesResponse # @private class Representation < Google::Apis::Core::JsonRepresentation property :next_page_token, as: 'nextPageToken' - collection :students, as: 'students', class: Google::Apis::ClassroomV1::Student, decorator: Google::Apis::ClassroomV1::Student::Representation + collection :courses, as: 'courses', class: Google::Apis::ClassroomV1::Course, decorator: Google::Apis::ClassroomV1::Course::Representation + + end + end + + class Form + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :title, as: 'title' + property :thumbnail_url, as: 'thumbnailUrl' + property :response_url, as: 'responseUrl' + property :form_url, as: 'formUrl' + end + end + + class ListTeachersResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :teachers, as: 'teachers', class: Google::Apis::ClassroomV1::Teacher, decorator: Google::Apis::ClassroomV1::Teacher::Representation + + end + end + + class Link + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :url, as: 'url' + property :title, as: 'title' + property :thumbnail_url, as: 'thumbnailUrl' + end + end + + class ListGuardiansResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :guardians, as: 'guardians', class: Google::Apis::ClassroomV1::Guardian, decorator: Google::Apis::ClassroomV1::Guardian::Representation + + end + end + + class CourseAlias + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :alias, as: 'alias' + end + end + + class ListCourseAliasesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :aliases, as: 'aliases', class: Google::Apis::ClassroomV1::CourseAlias, decorator: Google::Apis::ClassroomV1::CourseAlias::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class ListGuardianInvitationsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :guardian_invitations, as: 'guardianInvitations', class: Google::Apis::ClassroomV1::GuardianInvitation, decorator: Google::Apis::ClassroomV1::GuardianInvitation::Representation + + end + end + + class Date + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :year, as: 'year' + property :day, as: 'day' + property :month, as: 'month' + end + end + + class MultipleChoiceSubmission + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :answer, as: 'answer' + end + end + + class CourseMaterial + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :drive_file, as: 'driveFile', class: Google::Apis::ClassroomV1::DriveFile, decorator: Google::Apis::ClassroomV1::DriveFile::Representation + + property :you_tube_video, as: 'youTubeVideo', class: Google::Apis::ClassroomV1::YouTubeVideo, decorator: Google::Apis::ClassroomV1::YouTubeVideo::Representation + + property :form, as: 'form', class: Google::Apis::ClassroomV1::Form, decorator: Google::Apis::ClassroomV1::Form::Representation + + property :link, as: 'link', class: Google::Apis::ClassroomV1::Link, decorator: Google::Apis::ClassroomV1::Link::Representation + + end + end + + class Name + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :given_name, as: 'givenName' + property :family_name, as: 'familyName' + property :full_name, as: 'fullName' + end + end + + class Assignment + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :student_work_folder, as: 'studentWorkFolder', class: Google::Apis::ClassroomV1::DriveFolder, decorator: Google::Apis::ClassroomV1::DriveFolder::Representation + + end + end + + class SharedDriveFile + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :drive_file, as: 'driveFile', class: Google::Apis::ClassroomV1::DriveFile, decorator: Google::Apis::ClassroomV1::DriveFile::Representation + + property :share_mode, as: 'shareMode' + end + end + + class Empty + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class MultipleChoiceQuestion + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :choices, as: 'choices' + end + end + + class Course + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :section, as: 'section' + property :id, as: 'id' + property :room, as: 'room' + property :course_group_email, as: 'courseGroupEmail' + property :enrollment_code, as: 'enrollmentCode' + collection :course_material_sets, as: 'courseMaterialSets', class: Google::Apis::ClassroomV1::CourseMaterialSet, decorator: Google::Apis::ClassroomV1::CourseMaterialSet::Representation + + property :description_heading, as: 'descriptionHeading' + property :update_time, as: 'updateTime' + property :alternate_link, as: 'alternateLink' + property :guardians_enabled, as: 'guardiansEnabled' + property :owner_id, as: 'ownerId' + property :course_state, as: 'courseState' + property :description, as: 'description' + property :teacher_group_email, as: 'teacherGroupEmail' + property :creation_time, as: 'creationTime' + property :name, as: 'name' + property :teacher_folder, as: 'teacherFolder', class: Google::Apis::ClassroomV1::DriveFolder, decorator: Google::Apis::ClassroomV1::DriveFolder::Representation + + end + end + + class DriveFile + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :alternate_link, as: 'alternateLink' + property :thumbnail_url, as: 'thumbnailUrl' + property :id, as: 'id' + property :title, as: 'title' + end + end + + class GlobalPermission + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :permission, as: 'permission' + end + end + + class ReturnStudentSubmissionRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class Teacher + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :course_id, as: 'courseId' + property :profile, as: 'profile', class: Google::Apis::ClassroomV1::UserProfile, decorator: Google::Apis::ClassroomV1::UserProfile::Representation + + property :user_id, as: 'userId' + end + end + + class ReclaimStudentSubmissionRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class AssignmentSubmission + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :attachments, as: 'attachments', class: Google::Apis::ClassroomV1::Attachment, decorator: Google::Apis::ClassroomV1::Attachment::Representation + + end + end + + class Material + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :drive_file, as: 'driveFile', class: Google::Apis::ClassroomV1::SharedDriveFile, decorator: Google::Apis::ClassroomV1::SharedDriveFile::Representation + + property :form, as: 'form', class: Google::Apis::ClassroomV1::Form, decorator: Google::Apis::ClassroomV1::Form::Representation + + property :link, as: 'link', class: Google::Apis::ClassroomV1::Link, decorator: Google::Apis::ClassroomV1::Link::Representation + + property :youtube_video, as: 'youtubeVideo', class: Google::Apis::ClassroomV1::YouTubeVideo, decorator: Google::Apis::ClassroomV1::YouTubeVideo::Representation end end diff --git a/generated/google/apis/classroom_v1/service.rb b/generated/google/apis/classroom_v1/service.rb index 2afb1f3e4..39bd4a18d 100644 --- a/generated/google/apis/classroom_v1/service.rb +++ b/generated/google/apis/classroom_v1/service.rb @@ -58,11 +58,11 @@ module Google # * `ALREADY_EXISTS` if an invitation for the specified user and course # already exists. # @param [Google::Apis::ClassroomV1::Invitation] invitation_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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -75,137 +75,14 @@ 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 create_invitation(invitation_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def create_invitation(invitation_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/invitations', options) command.request_representation = Google::Apis::ClassroomV1::Invitation::Representation command.request_object = invitation_object command.response_representation = Google::Apis::ClassroomV1::Invitation::Representation command.response_class = Google::Apis::ClassroomV1::Invitation - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Returns an invitation. - # This method returns the following error codes: - # * `PERMISSION_DENIED` if the requesting user is not permitted to view the - # requested invitation or for access errors. - # * `NOT_FOUND` if no invitation exists with the requested ID. - # @param [String] id - # Identifier of the invitation to return. - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::Invitation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::Invitation] - # - # @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_invitation(id, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/invitations/{id}', options) - command.response_representation = Google::Apis::ClassroomV1::Invitation::Representation - command.response_class = Google::Apis::ClassroomV1::Invitation - command.params['id'] = id unless id.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Returns a list of invitations that the requesting user is permitted to - # view, restricted to those that match the list request. - # *Note:* At least one of `user_id` or `course_id` must be supplied. Both - # fields can be supplied. - # This method returns the following error codes: - # * `PERMISSION_DENIED` for access errors. - # @param [String] course_id - # Restricts returned invitations to those for a course with the specified - # identifier. - # @param [Fixnum] page_size - # Maximum number of items to return. Zero means no maximum. - # The server may return fewer than the specified number of results. - # @param [String] user_id - # Restricts returned invitations to those for a specific user. The identifier - # can be one of the following: - # * the numeric identifier for the user - # * the email address of the user - # * the string literal `"me"`, indicating the requesting user - # @param [String] page_token - # nextPageToken - # value returned from a previous - # list call, indicating - # that the subsequent page of results should be returned. - # The list request must be - # otherwise identical to the one that resulted in this token. - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::ListInvitationsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::ListInvitationsResponse] - # - # @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_invitations(course_id: nil, page_size: nil, user_id: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/invitations', options) - command.response_representation = Google::Apis::ClassroomV1::ListInvitationsResponse::Representation - command.response_class = Google::Apis::ClassroomV1::ListInvitationsResponse - command.query['courseId'] = course_id unless course_id.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['userId'] = user_id unless user_id.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Deletes an invitation. - # This method returns the following error codes: - # * `PERMISSION_DENIED` if the requesting user is not permitted to delete the - # requested invitation or for access errors. - # * `NOT_FOUND` if no invitation exists with the requested ID. - # @param [String] id - # Identifier of the invitation to delete. - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_invitation(id, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1/invitations/{id}', options) - command.response_representation = Google::Apis::ClassroomV1::Empty::Representation - command.response_class = Google::Apis::ClassroomV1::Empty - command.params['id'] = id unless id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -223,11 +100,11 @@ module Google # * `NOT_FOUND` if no invitation exists with the requested ID. # @param [String] id # Identifier of the invitation to accept. + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -240,13 +117,172 @@ 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 accept_invitation(id, quota_user: nil, fields: nil, options: nil, &block) + def accept_invitation(id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/invitations/{id}:accept', options) command.response_representation = Google::Apis::ClassroomV1::Empty::Representation command.response_class = Google::Apis::ClassroomV1::Empty command.params['id'] = id unless id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes an invitation. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if the requesting user is not permitted to delete the + # requested invitation or for access errors. + # * `NOT_FOUND` if no invitation exists with the requested ID. + # @param [String] id + # Identifier of the invitation to delete. + # @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::ClassroomV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_invitation(id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/invitations/{id}', options) + command.response_representation = Google::Apis::ClassroomV1::Empty::Representation + command.response_class = Google::Apis::ClassroomV1::Empty + command.params['id'] = id unless id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Returns an invitation. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if the requesting user is not permitted to view the + # requested invitation or for access errors. + # * `NOT_FOUND` if no invitation exists with the requested ID. + # @param [String] id + # Identifier of the invitation to return. + # @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::ClassroomV1::Invitation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::Invitation] + # + # @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_invitation(id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/invitations/{id}', options) + command.response_representation = Google::Apis::ClassroomV1::Invitation::Representation + command.response_class = Google::Apis::ClassroomV1::Invitation + command.params['id'] = id unless id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Returns a list of invitations that the requesting user is permitted to + # view, restricted to those that match the list request. + # *Note:* At least one of `user_id` or `course_id` must be supplied. Both + # fields can be supplied. + # This method returns the following error codes: + # * `PERMISSION_DENIED` for access errors. + # @param [String] course_id + # Restricts returned invitations to those for a course with the specified + # identifier. + # @param [String] user_id + # Restricts returned invitations to those for a specific user. The identifier + # can be one of the following: + # * the numeric identifier for the user + # * the email address of the user + # * the string literal `"me"`, indicating the requesting user + # @param [String] page_token + # nextPageToken + # value returned from a previous + # list call, indicating + # that the subsequent page of results should be returned. + # The list request must be + # otherwise identical to the one that resulted in this token. + # @param [Fixnum] page_size + # Maximum number of items to return. Zero means no maximum. + # The server may return fewer than the specified number of results. + # @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::ClassroomV1::ListInvitationsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::ListInvitationsResponse] + # + # @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_invitations(course_id: nil, user_id: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/invitations', options) + command.response_representation = Google::Apis::ClassroomV1::ListInvitationsResponse::Representation + command.response_class = Google::Apis::ClassroomV1::ListInvitationsResponse + command.query['courseId'] = course_id unless course_id.nil? + command.query['userId'] = user_id unless user_id.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a course. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if the requesting user is not permitted to delete the + # requested course or for access errors. + # * `NOT_FOUND` if no course exists with the requested ID. + # @param [String] id + # Identifier of the course to delete. + # This identifier can be either the Classroom-assigned identifier or an + # alias. + # @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::ClassroomV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_course(id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/courses/{id}', options) + command.response_representation = Google::Apis::ClassroomV1::Empty::Representation + command.response_class = Google::Apis::ClassroomV1::Empty + command.params['id'] = id unless id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -256,19 +292,6 @@ module Google # * `PERMISSION_DENIED` for access errors. # * `INVALID_ARGUMENT` if the query argument is malformed. # * `NOT_FOUND` if any users specified in the query arguments do not exist. - # @param [Array, String] course_states - # Restricts returned courses to those in one of the specified states - # The default value is ACTIVE, ARCHIVED, PROVISIONED, DECLINED. - # @param [Fixnum] page_size - # Maximum number of items to return. Zero or unspecified indicates that the - # server may assign a maximum. - # The server may return fewer than the specified number of results. - # @param [String] teacher_id - # Restricts returned courses to those having a teacher with the specified - # identifier. The identifier can be one of the following: - # * the numeric identifier for the user - # * the email address of the user - # * the string literal `"me"`, indicating the requesting user # @param [String] student_id # Restricts returned courses to those having a student with the specified # identifier. The identifier can be one of the following: @@ -282,11 +305,24 @@ module Google # indicating that the subsequent page of results should be returned. # The list request must be # otherwise identical to the one that resulted in this token. + # @param [Fixnum] page_size + # Maximum number of items to return. Zero or unspecified indicates that the + # server may assign a maximum. + # The server may return fewer than the specified number of results. + # @param [String] teacher_id + # Restricts returned courses to those having a teacher with the specified + # identifier. The identifier can be one of the following: + # * the numeric identifier for the user + # * the email address of the user + # * the string literal `"me"`, indicating the requesting user + # @param [Array, String] course_states + # Restricts returned courses to those in one of the specified states + # The default value is ACTIVE, ARCHIVED, PROVISIONED, DECLINED. + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -299,53 +335,17 @@ 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_courses(course_states: nil, page_size: nil, teacher_id: nil, student_id: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_courses(student_id: nil, page_token: nil, page_size: nil, teacher_id: nil, course_states: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/courses', options) command.response_representation = Google::Apis::ClassroomV1::ListCoursesResponse::Representation command.response_class = Google::Apis::ClassroomV1::ListCoursesResponse - command.query['courseStates'] = course_states unless course_states.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['teacherId'] = teacher_id unless teacher_id.nil? command.query['studentId'] = student_id unless student_id.nil? command.query['pageToken'] = page_token unless page_token.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['teacherId'] = teacher_id unless teacher_id.nil? + command.query['courseStates'] = course_states unless course_states.nil? command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Returns a course. - # This method returns the following error codes: - # * `PERMISSION_DENIED` if the requesting user is not permitted to access the - # requested course or for access errors. - # * `NOT_FOUND` if no course exists with the requested ID. - # @param [String] id - # Identifier of the course to return. - # This identifier can be either the Classroom-assigned identifier or an - # alias. - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::Course] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::Course] - # - # @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_course(id, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/courses/{id}', options) - command.response_representation = Google::Apis::ClassroomV1::Course::Representation - command.response_class = Google::Apis::ClassroomV1::Course - command.params['id'] = id unless id.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -362,11 +362,11 @@ module Google # * `ALREADY_EXISTS` if an alias was specified in the `id` and # already exists. # @param [Google::Apis::ClassroomV1::Course] course_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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -379,55 +379,14 @@ 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 create_course(course_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def create_course(course_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/courses', options) command.request_representation = Google::Apis::ClassroomV1::Course::Representation command.request_object = course_object command.response_representation = Google::Apis::ClassroomV1::Course::Representation command.response_class = Google::Apis::ClassroomV1::Course - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Updates a course. - # This method returns the following error codes: - # * `PERMISSION_DENIED` if the requesting user is not permitted to modify the - # requested course or for access errors. - # * `NOT_FOUND` if no course exists with the requested ID. - # * `FAILED_PRECONDITION` for the following request errors: - # * CourseNotModifiable - # @param [String] id - # Identifier of the course to update. - # This identifier can be either the Classroom-assigned identifier or an - # alias. - # @param [Google::Apis::ClassroomV1::Course] course_object - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::Course] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::Course] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_course(id, course_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:put, 'v1/courses/{id}', options) - command.request_representation = Google::Apis::ClassroomV1::Course::Representation - command.request_object = course_object - command.response_representation = Google::Apis::ClassroomV1::Course::Representation - command.response_class = Google::Apis::ClassroomV1::Course - command.params['id'] = id unless id.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -457,11 +416,11 @@ module Google # * `courseState` # When set in a query parameter, this field should be specified as # `updateMask=,,...` + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -474,7 +433,7 @@ 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 patch_course(id, course_object = nil, update_mask: nil, quota_user: nil, fields: nil, options: nil, &block) + def patch_course(id, course_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/courses/{id}', options) command.request_representation = Google::Apis::ClassroomV1::Course::Representation command.request_object = course_object @@ -482,321 +441,85 @@ module Google command.response_class = Google::Apis::ClassroomV1::Course command.params['id'] = id unless id.nil? command.query['updateMask'] = update_mask unless update_mask.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end - # Deletes a course. + # Returns a course. # This method returns the following error codes: - # * `PERMISSION_DENIED` if the requesting user is not permitted to delete the + # * `PERMISSION_DENIED` if the requesting user is not permitted to access the # requested course or for access errors. # * `NOT_FOUND` if no course exists with the requested ID. # @param [String] id - # Identifier of the course to delete. + # Identifier of the course to return. # This identifier can be either the Classroom-assigned identifier or an # alias. + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object + # @yieldparam result [Google::Apis::ClassroomV1::Course] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::ClassroomV1::Empty] + # @return [Google::Apis::ClassroomV1::Course] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_course(id, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1/courses/{id}', options) - command.response_representation = Google::Apis::ClassroomV1::Empty::Representation - command.response_class = Google::Apis::ClassroomV1::Empty + def get_course(id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/courses/{id}', options) + command.response_representation = Google::Apis::ClassroomV1::Course::Representation + command.response_class = Google::Apis::ClassroomV1::Course command.params['id'] = id unless id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end - # Creates a teacher of a course. + # Updates a course. # This method returns the following error codes: - # * `PERMISSION_DENIED` if the requesting user is not permitted to create - # teachers in this course or for access errors. - # * `NOT_FOUND` if the requested course ID does not exist. - # * `FAILED_PRECONDITION` if the requested user's account is disabled, - # for the following request errors: - # * CourseMemberLimitReached + # * `PERMISSION_DENIED` if the requesting user is not permitted to modify the + # requested course or for access errors. + # * `NOT_FOUND` if no course exists with the requested ID. + # * `FAILED_PRECONDITION` for the following request errors: # * CourseNotModifiable - # * CourseTeacherLimitReached - # * UserGroupsMembershipLimitReached - # * `ALREADY_EXISTS` if the user is already a teacher or student in the - # course. - # @param [String] course_id - # Identifier of the course. + # @param [String] id + # Identifier of the course to update. # This identifier can be either the Classroom-assigned identifier or an # alias. - # @param [Google::Apis::ClassroomV1::Teacher] teacher_object + # @param [Google::Apis::ClassroomV1::Course] course_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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::Teacher] parsed result object + # @yieldparam result [Google::Apis::ClassroomV1::Course] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::ClassroomV1::Teacher] + # @return [Google::Apis::ClassroomV1::Course] # # @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_course_teacher(course_id, teacher_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/courses/{courseId}/teachers', options) - command.request_representation = Google::Apis::ClassroomV1::Teacher::Representation - command.request_object = teacher_object - command.response_representation = Google::Apis::ClassroomV1::Teacher::Representation - command.response_class = Google::Apis::ClassroomV1::Teacher - command.params['courseId'] = course_id unless course_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? + def update_course(id, course_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:put, 'v1/courses/{id}', options) + command.request_representation = Google::Apis::ClassroomV1::Course::Representation + command.request_object = course_object + command.response_representation = Google::Apis::ClassroomV1::Course::Representation + command.response_class = Google::Apis::ClassroomV1::Course + command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Returns a teacher of a course. - # This method returns the following error codes: - # * `PERMISSION_DENIED` if the requesting user is not permitted to view - # teachers of this course or for access errors. - # * `NOT_FOUND` if no teacher of this course has the requested ID or if the - # course does not exist. - # @param [String] course_id - # Identifier of the course. - # This identifier can be either the Classroom-assigned identifier or an - # alias. - # @param [String] user_id - # Identifier of the teacher to return. The identifier can be one of the - # following: - # * the numeric identifier for the user - # * the email address of the user - # * the string literal `"me"`, indicating the requesting user - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::Teacher] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::Teacher] - # - # @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_course_teacher(course_id, user_id, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/courses/{courseId}/teachers/{userId}', options) - command.response_representation = Google::Apis::ClassroomV1::Teacher::Representation - command.response_class = Google::Apis::ClassroomV1::Teacher - command.params['courseId'] = course_id unless course_id.nil? - command.params['userId'] = user_id unless user_id.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Returns a list of teachers of this course that the requester - # is permitted to view. - # This method returns the following error codes: - # * `NOT_FOUND` if the course does not exist. - # * `PERMISSION_DENIED` for access errors. - # @param [String] course_id - # Identifier of the course. - # This identifier can be either the Classroom-assigned identifier or an - # alias. - # @param [Fixnum] page_size - # Maximum number of items to return. Zero means no maximum. - # The server may return fewer than the specified number of results. - # @param [String] page_token - # nextPageToken - # value returned from a previous - # list call, indicating that - # the subsequent page of results should be returned. - # The list request must be - # otherwise identical to the one that resulted in this token. - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::ListTeachersResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::ListTeachersResponse] - # - # @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_course_teachers(course_id, page_size: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/courses/{courseId}/teachers', options) - command.response_representation = Google::Apis::ClassroomV1::ListTeachersResponse::Representation - command.response_class = Google::Apis::ClassroomV1::ListTeachersResponse - command.params['courseId'] = course_id unless course_id.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Deletes a teacher of a course. - # This method returns the following error codes: - # * `PERMISSION_DENIED` if the requesting user is not permitted to delete - # teachers of this course or for access errors. - # * `NOT_FOUND` if no teacher of this course has the requested ID or if the - # course does not exist. - # * `FAILED_PRECONDITION` if the requested ID belongs to the primary teacher - # of this course. - # @param [String] course_id - # Identifier of the course. - # This identifier can be either the Classroom-assigned identifier or an - # alias. - # @param [String] user_id - # Identifier of the teacher to delete. The identifier can be one of the - # following: - # * the numeric identifier for the user - # * the email address of the user - # * the string literal `"me"`, indicating the requesting user - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_course_teacher(course_id, user_id, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1/courses/{courseId}/teachers/{userId}', options) - command.response_representation = Google::Apis::ClassroomV1::Empty::Representation - command.response_class = Google::Apis::ClassroomV1::Empty - command.params['courseId'] = course_id unless course_id.nil? - command.params['userId'] = user_id unless user_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Creates an alias for a course. - # This method returns the following error codes: - # * `PERMISSION_DENIED` if the requesting user is not permitted to create the - # alias or for access errors. - # * `NOT_FOUND` if the course does not exist. - # * `ALREADY_EXISTS` if the alias already exists. - # * `FAILED_PRECONDITION` if the alias requested does not make sense for the - # requesting user or course (for example, if a user not in a domain - # attempts to access a domain-scoped alias). - # @param [String] course_id - # Identifier of the course to alias. - # This identifier can be either the Classroom-assigned identifier or an - # alias. - # @param [Google::Apis::ClassroomV1::CourseAlias] course_alias_object - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::CourseAlias] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::CourseAlias] - # - # @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_course_alias(course_id, course_alias_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/courses/{courseId}/aliases', options) - command.request_representation = Google::Apis::ClassroomV1::CourseAlias::Representation - command.request_object = course_alias_object - command.response_representation = Google::Apis::ClassroomV1::CourseAlias::Representation - command.response_class = Google::Apis::ClassroomV1::CourseAlias - command.params['courseId'] = course_id unless course_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Returns a list of aliases for a course. - # This method returns the following error codes: - # * `PERMISSION_DENIED` if the requesting user is not permitted to access the - # course or for access errors. - # * `NOT_FOUND` if the course does not exist. - # @param [String] course_id - # The identifier of the course. - # This identifier can be either the Classroom-assigned identifier or an - # alias. - # @param [Fixnum] page_size - # Maximum number of items to return. Zero or unspecified indicates that the - # server may assign a maximum. - # The server may return fewer than the specified number of results. - # @param [String] page_token - # nextPageToken - # value returned from a previous - # list call, - # indicating that the subsequent page of results should be returned. - # The list request - # must be otherwise identical to the one that resulted in this token. - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::ListCourseAliasesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::ListCourseAliasesResponse] - # - # @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_course_aliases(course_id, page_size: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/courses/{courseId}/aliases', options) - command.response_representation = Google::Apis::ClassroomV1::ListCourseAliasesResponse::Representation - command.response_class = Google::Apis::ClassroomV1::ListCourseAliasesResponse - command.params['courseId'] = course_id unless course_id.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -815,11 +538,11 @@ module Google # @param [String] alias_ # Alias to delete. # This may not be the Classroom-assigned identifier. + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -832,14 +555,198 @@ 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 delete_course_alias(course_id, alias_, quota_user: nil, fields: nil, options: nil, &block) + def delete_course_alias(course_id, alias_, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/courses/{courseId}/aliases/{alias}', options) command.response_representation = Google::Apis::ClassroomV1::Empty::Representation command.response_class = Google::Apis::ClassroomV1::Empty command.params['courseId'] = course_id unless course_id.nil? command.params['alias'] = alias_ unless alias_.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Returns a list of aliases for a course. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if the requesting user is not permitted to access the + # course or for access errors. + # * `NOT_FOUND` if the course does not exist. + # @param [String] course_id + # The identifier of the course. + # This identifier can be either the Classroom-assigned identifier or an + # alias. + # @param [String] page_token + # nextPageToken + # value returned from a previous + # list call, + # indicating that the subsequent page of results should be returned. + # The list request + # must be otherwise identical to the one that resulted in this token. + # @param [Fixnum] page_size + # Maximum number of items to return. Zero or unspecified indicates that the + # server may assign a maximum. + # The server may return fewer than the specified number of results. + # @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::ClassroomV1::ListCourseAliasesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::ListCourseAliasesResponse] + # + # @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_course_aliases(course_id, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/courses/{courseId}/aliases', options) + command.response_representation = Google::Apis::ClassroomV1::ListCourseAliasesResponse::Representation + command.response_class = Google::Apis::ClassroomV1::ListCourseAliasesResponse + command.params['courseId'] = course_id unless course_id.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates an alias for a course. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if the requesting user is not permitted to create the + # alias or for access errors. + # * `NOT_FOUND` if the course does not exist. + # * `ALREADY_EXISTS` if the alias already exists. + # * `FAILED_PRECONDITION` if the alias requested does not make sense for the + # requesting user or course (for example, if a user not in a domain + # attempts to access a domain-scoped alias). + # @param [String] course_id + # Identifier of the course to alias. + # This identifier can be either the Classroom-assigned identifier or an + # alias. + # @param [Google::Apis::ClassroomV1::CourseAlias] course_alias_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::ClassroomV1::CourseAlias] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::CourseAlias] + # + # @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_course_alias(course_id, course_alias_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/courses/{courseId}/aliases', options) + command.request_representation = Google::Apis::ClassroomV1::CourseAlias::Representation + command.request_object = course_alias_object + command.response_representation = Google::Apis::ClassroomV1::CourseAlias::Representation + command.response_class = Google::Apis::ClassroomV1::CourseAlias + command.params['courseId'] = course_id unless course_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Returns a student of a course. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if the requesting user is not permitted to view + # students of this course or for access errors. + # * `NOT_FOUND` if no student of this course has the requested ID or if the + # course does not exist. + # @param [String] course_id + # Identifier of the course. + # This identifier can be either the Classroom-assigned identifier or an + # alias. + # @param [String] user_id + # Identifier of the student to return. The identifier can be one of the + # following: + # * the numeric identifier for the user + # * the email address of the user + # * the string literal `"me"`, indicating the requesting user + # @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::ClassroomV1::Student] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::Student] + # + # @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_course_student(course_id, user_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/courses/{courseId}/students/{userId}', options) + command.response_representation = Google::Apis::ClassroomV1::Student::Representation + command.response_class = Google::Apis::ClassroomV1::Student + command.params['courseId'] = course_id unless course_id.nil? + command.params['userId'] = user_id unless user_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Returns a list of students of this course that the requester + # is permitted to view. + # This method returns the following error codes: + # * `NOT_FOUND` if the course does not exist. + # * `PERMISSION_DENIED` for access errors. + # @param [String] course_id + # Identifier of the course. + # This identifier can be either the Classroom-assigned identifier or an + # alias. + # @param [String] page_token + # nextPageToken + # value returned from a previous + # list call, indicating that + # the subsequent page of results should be returned. + # The list request must be + # otherwise identical to the one that resulted in this token. + # @param [Fixnum] page_size + # Maximum number of items to return. Zero means no maximum. + # The server may return fewer than the specified number of results. + # @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::ClassroomV1::ListStudentsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::ListStudentsResponse] + # + # @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_course_students(course_id, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/courses/{courseId}/students', options) + command.response_representation = Google::Apis::ClassroomV1::ListStudentsResponse::Representation + command.response_class = Google::Apis::ClassroomV1::ListStudentsResponse + command.params['courseId'] = course_id unless course_id.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -865,11 +772,11 @@ module Google # This code is required if userId # corresponds to the requesting user; it may be omitted if the requesting # user has administrative permissions to create students for any user. + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -882,7 +789,7 @@ 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 create_course_student(course_id, student_object = nil, enrollment_code: nil, quota_user: nil, fields: nil, options: nil, &block) + def create_course_student(course_id, student_object = nil, enrollment_code: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/courses/{courseId}/students', options) command.request_representation = Google::Apis::ClassroomV1::Student::Representation command.request_object = student_object @@ -890,100 +797,8 @@ module Google command.response_class = Google::Apis::ClassroomV1::Student command.params['courseId'] = course_id unless course_id.nil? command.query['enrollmentCode'] = enrollment_code unless enrollment_code.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Returns a student of a course. - # This method returns the following error codes: - # * `PERMISSION_DENIED` if the requesting user is not permitted to view - # students of this course or for access errors. - # * `NOT_FOUND` if no student of this course has the requested ID or if the - # course does not exist. - # @param [String] course_id - # Identifier of the course. - # This identifier can be either the Classroom-assigned identifier or an - # alias. - # @param [String] user_id - # Identifier of the student to return. The identifier can be one of the - # following: - # * the numeric identifier for the user - # * the email address of the user - # * the string literal `"me"`, indicating the requesting user - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::Student] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::Student] - # - # @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_course_student(course_id, user_id, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/courses/{courseId}/students/{userId}', options) - command.response_representation = Google::Apis::ClassroomV1::Student::Representation - command.response_class = Google::Apis::ClassroomV1::Student - command.params['courseId'] = course_id unless course_id.nil? - command.params['userId'] = user_id unless user_id.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Returns a list of students of this course that the requester - # is permitted to view. - # This method returns the following error codes: - # * `NOT_FOUND` if the course does not exist. - # * `PERMISSION_DENIED` for access errors. - # @param [String] course_id - # Identifier of the course. - # This identifier can be either the Classroom-assigned identifier or an - # alias. - # @param [Fixnum] page_size - # Maximum number of items to return. Zero means no maximum. - # The server may return fewer than the specified number of results. - # @param [String] page_token - # nextPageToken - # value returned from a previous - # list call, indicating that - # the subsequent page of results should be returned. - # The list request must be - # otherwise identical to the one that resulted in this token. - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::ListStudentsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::ListStudentsResponse] - # - # @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_course_students(course_id, page_size: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/courses/{courseId}/students', options) - command.response_representation = Google::Apis::ClassroomV1::ListStudentsResponse::Representation - command.response_class = Google::Apis::ClassroomV1::ListStudentsResponse - command.params['courseId'] = course_id unless course_id.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -1003,11 +818,11 @@ module Google # * the numeric identifier for the user # * the email address of the user # * the string literal `"me"`, indicating the requesting user + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -1020,167 +835,60 @@ 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 delete_course_student(course_id, user_id, quota_user: nil, fields: nil, options: nil, &block) + def delete_course_student(course_id, user_id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/courses/{courseId}/students/{userId}', options) command.response_representation = Google::Apis::ClassroomV1::Empty::Representation command.response_class = Google::Apis::ClassroomV1::Empty command.params['courseId'] = course_id unless course_id.nil? command.params['userId'] = user_id unless user_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end - # Creates course work. - # The resulting course work (and corresponding student submissions) are - # associated with the Developer Console project of the + # Deletes a course work. + # This request must be made by the Developer Console project of the # [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to - # make the request. Classroom API requests to modify course work and student - # submissions must be made with an OAuth client ID from the associated - # Developer Console project. + # create the corresponding course work item. # This method returns the following error codes: - # * `PERMISSION_DENIED` if the requesting user is not permitted to access the - # requested course, create course work in the requested course, share a - # Drive attachment, or for access errors. - # * `INVALID_ARGUMENT` if the request is malformed. - # * `NOT_FOUND` if the requested course does not exist. - # * `FAILED_PRECONDITION` for the following request error: - # * AttachmentNotVisible - # @param [String] course_id - # Identifier of the course. - # This identifier can be either the Classroom-assigned identifier or an - # alias. - # @param [Google::Apis::ClassroomV1::CourseWork] course_work_object - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::CourseWork] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::CourseWork] - # - # @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_course_work(course_id, course_work_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/courses/{courseId}/courseWork', options) - command.request_representation = Google::Apis::ClassroomV1::CourseWork::Representation - command.request_object = course_work_object - command.response_representation = Google::Apis::ClassroomV1::CourseWork::Representation - command.response_class = Google::Apis::ClassroomV1::CourseWork - command.params['courseId'] = course_id unless course_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Returns course work. - # This method returns the following error codes: - # * `PERMISSION_DENIED` if the requesting user is not permitted to access the - # requested course or course work, or for access errors. - # * `INVALID_ARGUMENT` if the request is malformed. - # * `NOT_FOUND` if the requested course or course work does not exist. + # * `PERMISSION_DENIED` if the requesting developer project did not create + # the corresponding course work, if the requesting user is not permitted + # to delete the requested course or for access errors. + # * `FAILED_PRECONDITION` if the requested course work has already been + # deleted. + # * `NOT_FOUND` if no course exists with the requested ID. # @param [String] course_id # Identifier of the course. # This identifier can be either the Classroom-assigned identifier or an # alias. # @param [String] id - # Identifier of the course work. + # Identifier of the course work to delete. + # This identifier is a Classroom-assigned identifier. + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::CourseWork] parsed result object + # @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::ClassroomV1::CourseWork] + # @return [Google::Apis::ClassroomV1::Empty] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_course_work(course_id, id, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/courses/{courseId}/courseWork/{id}', options) - command.response_representation = Google::Apis::ClassroomV1::CourseWork::Representation - command.response_class = Google::Apis::ClassroomV1::CourseWork + def delete_course_course_work(course_id, id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/courses/{courseId}/courseWork/{id}', options) + command.response_representation = Google::Apis::ClassroomV1::Empty::Representation + command.response_class = Google::Apis::ClassroomV1::Empty command.params['courseId'] = course_id unless course_id.nil? command.params['id'] = id unless id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Returns a list of course work that the requester is permitted to view. - # Course students may only view `PUBLISHED` course work. Course teachers - # and domain administrators may view all course work. - # This method returns the following error codes: - # * `PERMISSION_DENIED` if the requesting user is not permitted to access - # the requested course or for access errors. - # * `INVALID_ARGUMENT` if the request is malformed. - # * `NOT_FOUND` if the requested course does not exist. - # @param [String] course_id - # Identifier of the course. - # This identifier can be either the Classroom-assigned identifier or an - # alias. - # @param [Array, String] course_work_states - # Restriction on the work status to return. Only courseWork that matches - # is returned. If unspecified, items with a work status of `PUBLISHED` - # is returned. - # @param [Fixnum] page_size - # Maximum number of items to return. Zero or unspecified indicates that the - # server may assign a maximum. - # The server may return fewer than the specified number of results. - # @param [String] order_by - # Optional sort ordering for results. A comma-separated list of fields with - # an optional sort direction keyword. Supported fields are `updateTime` - # and `dueDate`. Supported direction keywords are `asc` and `desc`. - # If not specified, `updateTime desc` is the default behavior. - # Examples: `dueDate asc,updateTime desc`, `updateTime,dueDate desc` - # @param [String] page_token - # nextPageToken - # value returned from a previous - # list call, - # indicating that the subsequent page of results should be returned. - # The list request - # must be otherwise identical to the one that resulted in this token. - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::ListCourseWorkResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::ListCourseWorkResponse] - # - # @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_course_works(course_id, course_work_states: nil, page_size: nil, order_by: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/courses/{courseId}/courseWork', options) - command.response_representation = Google::Apis::ClassroomV1::ListCourseWorkResponse::Representation - command.response_class = Google::Apis::ClassroomV1::ListCourseWorkResponse - command.params['courseId'] = course_id unless course_id.nil? - command.query['courseWorkStates'] = course_work_states unless course_work_states.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['orderBy'] = order_by unless order_by.nil? - command.query['pageToken'] = page_token unless page_token.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -1223,11 +931,11 @@ module Google # * `due_time` # * `max_points` # * `submission_modification_mode` + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -1240,7 +948,7 @@ 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 patch_course_course_work(course_id, id, course_work_object = nil, update_mask: nil, quota_user: nil, fields: nil, options: nil, &block) + def patch_course_course_work(course_id, id, course_work_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/courses/{courseId}/courseWork/{id}', options) command.request_representation = Google::Apis::ClassroomV1::CourseWork::Representation command.request_object = course_work_object @@ -1249,108 +957,161 @@ module Google command.params['courseId'] = course_id unless course_id.nil? command.params['id'] = id unless id.nil? command.query['updateMask'] = update_mask unless update_mask.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end - # Deletes a course work. - # This request must be made by the Developer Console project of the - # [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to - # create the corresponding course work item. - # This method returns the following error codes: - # * `PERMISSION_DENIED` if the requesting developer project did not create - # the corresponding course work, if the requesting user is not permitted - # to delete the requested course or for access errors. - # * `FAILED_PRECONDITION` if the requested course work has already been - # deleted. - # * `NOT_FOUND` if no course exists with the requested ID. - # @param [String] course_id - # Identifier of the course. - # This identifier can be either the Classroom-assigned identifier or an - # alias. - # @param [String] id - # Identifier of the course work to delete. - # This identifier is a Classroom-assigned identifier. - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_course_course_work(course_id, id, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1/courses/{courseId}/courseWork/{id}', options) - command.response_representation = Google::Apis::ClassroomV1::Empty::Representation - command.response_class = Google::Apis::ClassroomV1::Empty - command.params['courseId'] = course_id unless course_id.nil? - command.params['id'] = id unless id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Modifies attachments of student submission. - # Attachments may only be added to student submissions belonging to course - # work objects with a `workType` of `ASSIGNMENT`. - # This request must be made by the Developer Console project of the - # [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to - # create the corresponding course work item. + # Returns course work. # This method returns the following error codes: # * `PERMISSION_DENIED` if the requesting user is not permitted to access the - # requested course or course work, if the user is not permitted to modify - # attachments on the requested student submission, or for - # access errors. + # requested course or course work, or for access errors. # * `INVALID_ARGUMENT` if the request is malformed. - # * `NOT_FOUND` if the requested course, course work, or student submission - # does not exist. + # * `NOT_FOUND` if the requested course or course work does not exist. # @param [String] course_id # Identifier of the course. # This identifier can be either the Classroom-assigned identifier or an # alias. - # @param [String] course_work_id - # Identifier of the course work. # @param [String] id - # Identifier of the student submission. - # @param [Google::Apis::ClassroomV1::ModifyAttachmentsRequest] modify_attachments_request_object + # Identifier of the course work. + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::StudentSubmission] parsed result object + # @yieldparam result [Google::Apis::ClassroomV1::CourseWork] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::ClassroomV1::StudentSubmission] + # @return [Google::Apis::ClassroomV1::CourseWork] # # @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 modify_student_submission_attachments(course_id, course_work_id, id, modify_attachments_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:modifyAttachments', options) - command.request_representation = Google::Apis::ClassroomV1::ModifyAttachmentsRequest::Representation - command.request_object = modify_attachments_request_object - command.response_representation = Google::Apis::ClassroomV1::StudentSubmission::Representation - command.response_class = Google::Apis::ClassroomV1::StudentSubmission + def get_course_work(course_id, id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/courses/{courseId}/courseWork/{id}', options) + command.response_representation = Google::Apis::ClassroomV1::CourseWork::Representation + command.response_class = Google::Apis::ClassroomV1::CourseWork command.params['courseId'] = course_id unless course_id.nil? - command.params['courseWorkId'] = course_work_id unless course_work_id.nil? command.params['id'] = id unless id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Returns a list of course work that the requester is permitted to view. + # Course students may only view `PUBLISHED` course work. Course teachers + # and domain administrators may view all course work. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if the requesting user is not permitted to access + # the requested course or for access errors. + # * `INVALID_ARGUMENT` if the request is malformed. + # * `NOT_FOUND` if the requested course does not exist. + # @param [String] course_id + # Identifier of the course. + # This identifier can be either the Classroom-assigned identifier or an + # alias. + # @param [String] order_by + # Optional sort ordering for results. A comma-separated list of fields with + # an optional sort direction keyword. Supported fields are `updateTime` + # and `dueDate`. Supported direction keywords are `asc` and `desc`. + # If not specified, `updateTime desc` is the default behavior. + # Examples: `dueDate asc,updateTime desc`, `updateTime,dueDate desc` + # @param [String] page_token + # nextPageToken + # value returned from a previous + # list call, + # indicating that the subsequent page of results should be returned. + # The list request + # must be otherwise identical to the one that resulted in this token. + # @param [Fixnum] page_size + # Maximum number of items to return. Zero or unspecified indicates that the + # server may assign a maximum. + # The server may return fewer than the specified number of results. + # @param [Array, String] course_work_states + # Restriction on the work status to return. Only courseWork that matches + # is returned. If unspecified, items with a work status of `PUBLISHED` + # is returned. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ClassroomV1::ListCourseWorkResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::ListCourseWorkResponse] + # + # @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_course_works(course_id, order_by: nil, page_token: nil, page_size: nil, course_work_states: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/courses/{courseId}/courseWork', options) + command.response_representation = Google::Apis::ClassroomV1::ListCourseWorkResponse::Representation + command.response_class = Google::Apis::ClassroomV1::ListCourseWorkResponse + command.params['courseId'] = course_id unless course_id.nil? + command.query['orderBy'] = order_by unless order_by.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['courseWorkStates'] = course_work_states unless course_work_states.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates course work. + # The resulting course work (and corresponding student submissions) are + # associated with the Developer Console project of the + # [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to + # make the request. Classroom API requests to modify course work and student + # submissions must be made with an OAuth client ID from the associated + # Developer Console project. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if the requesting user is not permitted to access the + # requested course, create course work in the requested course, share a + # Drive attachment, or for access errors. + # * `INVALID_ARGUMENT` if the request is malformed. + # * `NOT_FOUND` if the requested course does not exist. + # * `FAILED_PRECONDITION` for the following request error: + # * AttachmentNotVisible + # @param [String] course_id + # Identifier of the course. + # This identifier can be either the Classroom-assigned identifier or an + # alias. + # @param [Google::Apis::ClassroomV1::CourseWork] course_work_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::ClassroomV1::CourseWork] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::CourseWork] + # + # @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_course_work(course_id, course_work_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/courses/{courseId}/courseWork', options) + command.request_representation = Google::Apis::ClassroomV1::CourseWork::Representation + command.request_object = course_work_object + command.response_representation = Google::Apis::ClassroomV1::CourseWork::Representation + command.response_class = Google::Apis::ClassroomV1::CourseWork + command.params['courseId'] = course_id unless course_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -1379,11 +1140,11 @@ module Google # @param [String] id # Identifier of the student submission. # @param [Google::Apis::ClassroomV1::ReclaimStudentSubmissionRequest] reclaim_student_submission_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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -1396,7 +1157,7 @@ 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 reclaim_student_submission(course_id, course_work_id, id, reclaim_student_submission_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def reclaim_student_submission(course_id, course_work_id, id, reclaim_student_submission_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:reclaim', options) command.request_representation = Google::Apis::ClassroomV1::ReclaimStudentSubmissionRequest::Representation command.request_object = reclaim_student_submission_request_object @@ -1405,8 +1166,8 @@ module Google command.params['courseId'] = course_id unless course_id.nil? command.params['courseWorkId'] = course_work_id unless course_work_id.nil? command.params['id'] = id unless id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -1434,11 +1195,11 @@ module Google # @param [String] id # Identifier of the student submission. # @param [Google::Apis::ClassroomV1::TurnInStudentSubmissionRequest] turn_in_student_submission_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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -1451,7 +1212,7 @@ 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 turn_in_student_submission(course_id, course_work_id, id, turn_in_student_submission_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def turn_in_student_submission(course_id, course_work_id, id, turn_in_student_submission_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:turnIn', options) command.request_representation = Google::Apis::ClassroomV1::TurnInStudentSubmissionRequest::Representation command.request_object = turn_in_student_submission_request_object @@ -1460,8 +1221,62 @@ module Google command.params['courseId'] = course_id unless course_id.nil? command.params['courseWorkId'] = course_work_id unless course_work_id.nil? command.params['id'] = id unless id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Modifies attachments of student submission. + # Attachments may only be added to student submissions belonging to course + # work objects with a `workType` of `ASSIGNMENT`. + # This request must be made by the Developer Console project of the + # [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to + # create the corresponding course work item. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if the requesting user is not permitted to access the + # requested course or course work, if the user is not permitted to modify + # attachments on the requested student submission, or for + # access errors. + # * `INVALID_ARGUMENT` if the request is malformed. + # * `NOT_FOUND` if the requested course, course work, or student submission + # does not exist. + # @param [String] course_id + # Identifier of the course. + # This identifier can be either the Classroom-assigned identifier or an + # alias. + # @param [String] course_work_id + # Identifier of the course work. + # @param [String] id + # Identifier of the student submission. + # @param [Google::Apis::ClassroomV1::ModifyAttachmentsRequest] modify_attachments_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::ClassroomV1::StudentSubmission] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::StudentSubmission] + # + # @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 modify_student_submission_attachments(course_id, course_work_id, id, modify_attachments_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:modifyAttachments', options) + command.request_representation = Google::Apis::ClassroomV1::ModifyAttachmentsRequest::Representation + command.request_object = modify_attachments_request_object + command.response_representation = Google::Apis::ClassroomV1::StudentSubmission::Representation + command.response_class = Google::Apis::ClassroomV1::StudentSubmission + command.params['courseId'] = course_id unless course_id.nil? + command.params['courseWorkId'] = course_work_id unless course_work_id.nil? + command.params['id'] = id unless id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -1484,9 +1299,6 @@ module Google # Identifer of the student work to request. # This may be set to the string literal `"-"` to request student work for # all course work in the specified course. - # @param [Array, String] states - # Requested submission states. If specified, returned student submissions - # match one of the specified submission states. # @param [String] user_id # Optional argument to restrict returned student work to those owned by the # student with the specified identifier. The identifier can be one of the @@ -1494,10 +1306,6 @@ module Google # * the numeric identifier for the user # * the email address of the user # * the string literal `"me"`, indicating the requesting user - # @param [Fixnum] page_size - # Maximum number of items to return. Zero or unspecified indicates that the - # server may assign a maximum. - # The server may return fewer than the specified number of results. # @param [String] late # Requested lateness value. If specified, returned student submissions are # restricted by the requested value. @@ -1509,11 +1317,18 @@ module Google # indicating that the subsequent page of results should be returned. # The list request # must be otherwise identical to the one that resulted in this token. + # @param [Fixnum] page_size + # Maximum number of items to return. Zero or unspecified indicates that the + # server may assign a maximum. + # The server may return fewer than the specified number of results. + # @param [Array, String] states + # Requested submission states. If specified, returned student submissions + # match one of the specified submission states. + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -1526,19 +1341,19 @@ 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_student_submissions(course_id, course_work_id, states: nil, user_id: nil, page_size: nil, late: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_student_submissions(course_id, course_work_id, user_id: nil, late: nil, page_token: nil, page_size: nil, states: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions', options) command.response_representation = Google::Apis::ClassroomV1::ListStudentSubmissionsResponse::Representation command.response_class = Google::Apis::ClassroomV1::ListStudentSubmissionsResponse command.params['courseId'] = course_id unless course_id.nil? command.params['courseWorkId'] = course_work_id unless course_work_id.nil? - command.query['states'] = states unless states.nil? command.query['userId'] = user_id unless user_id.nil? - command.query['pageSize'] = page_size unless page_size.nil? command.query['late'] = late unless late.nil? command.query['pageToken'] = page_token unless page_token.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['states'] = states unless states.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -1557,11 +1372,11 @@ module Google # Identifier of the course work. # @param [String] id # Identifier of the student submission. + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -1574,72 +1389,15 @@ 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 get_student_submission(course_id, course_work_id, id, quota_user: nil, fields: nil, options: nil, &block) + def get_student_submission(course_id, course_work_id, id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}', options) command.response_representation = Google::Apis::ClassroomV1::StudentSubmission::Representation command.response_class = Google::Apis::ClassroomV1::StudentSubmission command.params['courseId'] = course_id unless course_id.nil? command.params['courseWorkId'] = course_work_id unless course_work_id.nil? command.params['id'] = id unless id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Returns a student submission. - # Returning a student submission transfers ownership of attached Drive - # files to the student and may also update the submission state. - # Unlike the Classroom application, returning a student submission does not - # set assignedGrade to the draftGrade value. - # Only a teacher of the course that contains the requested student submission - # may call this method. - # This request must be made by the Developer Console project of the - # [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to - # create the corresponding course work item. - # This method returns the following error codes: - # * `PERMISSION_DENIED` if the requesting user is not permitted to access the - # requested course or course work, return the requested student submission, - # or for access errors. - # * `INVALID_ARGUMENT` if the request is malformed. - # * `NOT_FOUND` if the requested course, course work, or student submission - # does not exist. - # @param [String] course_id - # Identifier of the course. - # This identifier can be either the Classroom-assigned identifier or an - # alias. - # @param [String] course_work_id - # Identifier of the course work. - # @param [String] id - # Identifier of the student submission. - # @param [Google::Apis::ClassroomV1::ReturnStudentSubmissionRequest] return_student_submission_request_object - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def return_student_submission(course_id, course_work_id, id, return_student_submission_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:return', options) - command.request_representation = Google::Apis::ClassroomV1::ReturnStudentSubmissionRequest::Representation - command.request_object = return_student_submission_request_object - command.response_representation = Google::Apis::ClassroomV1::Empty::Representation - command.response_class = Google::Apis::ClassroomV1::Empty - command.params['courseId'] = course_id unless course_id.nil? - command.params['courseWorkId'] = course_work_id unless course_work_id.nil? - command.params['id'] = id unless id.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -1673,11 +1431,11 @@ module Google # The following fields may be specified by teachers: # * `draft_grade` # * `assigned_grade` + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -1690,7 +1448,7 @@ 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 patch_student_submission(course_id, course_work_id, id, student_submission_object = nil, update_mask: nil, quota_user: nil, fields: nil, options: nil, &block) + def patch_student_submission(course_id, course_work_id, id, student_submission_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}', options) command.request_representation = Google::Apis::ClassroomV1::StudentSubmission::Representation command.request_object = student_submission_object @@ -1700,8 +1458,250 @@ module Google command.params['courseWorkId'] = course_work_id unless course_work_id.nil? command.params['id'] = id unless id.nil? command.query['updateMask'] = update_mask unless update_mask.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Returns a student submission. + # Returning a student submission transfers ownership of attached Drive + # files to the student and may also update the submission state. + # Unlike the Classroom application, returning a student submission does not + # set assignedGrade to the draftGrade value. + # Only a teacher of the course that contains the requested student submission + # may call this method. + # This request must be made by the Developer Console project of the + # [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to + # create the corresponding course work item. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if the requesting user is not permitted to access the + # requested course or course work, return the requested student submission, + # or for access errors. + # * `INVALID_ARGUMENT` if the request is malformed. + # * `NOT_FOUND` if the requested course, course work, or student submission + # does not exist. + # @param [String] course_id + # Identifier of the course. + # This identifier can be either the Classroom-assigned identifier or an + # alias. + # @param [String] course_work_id + # Identifier of the course work. + # @param [String] id + # Identifier of the student submission. + # @param [Google::Apis::ClassroomV1::ReturnStudentSubmissionRequest] return_student_submission_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::ClassroomV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def return_student_submission(course_id, course_work_id, id, return_student_submission_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:return', options) + command.request_representation = Google::Apis::ClassroomV1::ReturnStudentSubmissionRequest::Representation + command.request_object = return_student_submission_request_object + command.response_representation = Google::Apis::ClassroomV1::Empty::Representation + command.response_class = Google::Apis::ClassroomV1::Empty + command.params['courseId'] = course_id unless course_id.nil? + command.params['courseWorkId'] = course_work_id unless course_work_id.nil? + command.params['id'] = id unless id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a teacher of a course. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if the requesting user is not permitted to delete + # teachers of this course or for access errors. + # * `NOT_FOUND` if no teacher of this course has the requested ID or if the + # course does not exist. + # * `FAILED_PRECONDITION` if the requested ID belongs to the primary teacher + # of this course. + # @param [String] course_id + # Identifier of the course. + # This identifier can be either the Classroom-assigned identifier or an + # alias. + # @param [String] user_id + # Identifier of the teacher to delete. The identifier can be one of the + # following: + # * the numeric identifier for the user + # * the email address of the user + # * the string literal `"me"`, indicating the requesting user + # @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::ClassroomV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_course_teacher(course_id, user_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/courses/{courseId}/teachers/{userId}', options) + command.response_representation = Google::Apis::ClassroomV1::Empty::Representation + command.response_class = Google::Apis::ClassroomV1::Empty + command.params['courseId'] = course_id unless course_id.nil? + command.params['userId'] = user_id unless user_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Returns a teacher of a course. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if the requesting user is not permitted to view + # teachers of this course or for access errors. + # * `NOT_FOUND` if no teacher of this course has the requested ID or if the + # course does not exist. + # @param [String] course_id + # Identifier of the course. + # This identifier can be either the Classroom-assigned identifier or an + # alias. + # @param [String] user_id + # Identifier of the teacher to return. The identifier can be one of the + # following: + # * the numeric identifier for the user + # * the email address of the user + # * the string literal `"me"`, indicating the requesting user + # @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::ClassroomV1::Teacher] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::Teacher] + # + # @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_course_teacher(course_id, user_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/courses/{courseId}/teachers/{userId}', options) + command.response_representation = Google::Apis::ClassroomV1::Teacher::Representation + command.response_class = Google::Apis::ClassroomV1::Teacher + command.params['courseId'] = course_id unless course_id.nil? + command.params['userId'] = user_id unless user_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Returns a list of teachers of this course that the requester + # is permitted to view. + # This method returns the following error codes: + # * `NOT_FOUND` if the course does not exist. + # * `PERMISSION_DENIED` for access errors. + # @param [String] course_id + # Identifier of the course. + # This identifier can be either the Classroom-assigned identifier or an + # alias. + # @param [String] page_token + # nextPageToken + # value returned from a previous + # list call, indicating that + # the subsequent page of results should be returned. + # The list request must be + # otherwise identical to the one that resulted in this token. + # @param [Fixnum] page_size + # Maximum number of items to return. Zero means no maximum. + # The server may return fewer than the specified number of results. + # @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::ClassroomV1::ListTeachersResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::ListTeachersResponse] + # + # @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_course_teachers(course_id, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/courses/{courseId}/teachers', options) + command.response_representation = Google::Apis::ClassroomV1::ListTeachersResponse::Representation + command.response_class = Google::Apis::ClassroomV1::ListTeachersResponse + command.params['courseId'] = course_id unless course_id.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a teacher of a course. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if the requesting user is not permitted to create + # teachers in this course or for access errors. + # * `NOT_FOUND` if the requested course ID does not exist. + # * `FAILED_PRECONDITION` if the requested user's account is disabled, + # for the following request errors: + # * CourseMemberLimitReached + # * CourseNotModifiable + # * CourseTeacherLimitReached + # * UserGroupsMembershipLimitReached + # * `ALREADY_EXISTS` if the user is already a teacher or student in the + # course. + # @param [String] course_id + # Identifier of the course. + # This identifier can be either the Classroom-assigned identifier or an + # alias. + # @param [Google::Apis::ClassroomV1::Teacher] teacher_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::ClassroomV1::Teacher] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::Teacher] + # + # @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_course_teacher(course_id, teacher_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/courses/{courseId}/teachers', options) + command.request_representation = Google::Apis::ClassroomV1::Teacher::Representation + command.request_object = teacher_object + command.response_representation = Google::Apis::ClassroomV1::Teacher::Representation + command.response_class = Google::Apis::ClassroomV1::Teacher + command.params['courseId'] = course_id unless course_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -1716,11 +1716,11 @@ module Google # * the numeric identifier for the user # * the email address of the user # * the string literal `"me"`, indicating the requesting user + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -1733,225 +1733,13 @@ 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 get_user_profile(user_id, quota_user: nil, fields: nil, options: nil, &block) + def get_user_profile(user_id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/userProfiles/{userId}', options) command.response_representation = Google::Apis::ClassroomV1::UserProfile::Representation command.response_class = Google::Apis::ClassroomV1::UserProfile command.params['userId'] = user_id unless user_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Returns a specific guardian. - # This method returns the following error codes: - # * `PERMISSION_DENIED` if no user that matches the provided `student_id` - # is visible to the requesting user, if the requesting user is not - # permitted to view guardian information for the student identified by the - # `student_id`, if guardians are not enabled for the domain in question, - # or for other access errors. - # * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot - # be recognized (it is not an email address, nor a `student_id` from the - # API, nor the literal string `me`). - # * `NOT_FOUND` if the requesting user is permitted to view guardians for - # the requested `student_id`, but no `Guardian` record exists for that - # student that matches the provided `guardian_id`. - # @param [String] student_id - # The student whose guardian is being requested. One of the following: - # * the numeric identifier for the user - # * the email address of the user - # * the string literal `"me"`, indicating the requesting user - # @param [String] guardian_id - # The `id` field from a `Guardian`. - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::Guardian] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::Guardian] - # - # @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_user_profile_guardian(student_id, guardian_id, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/userProfiles/{studentId}/guardians/{guardianId}', options) - command.response_representation = Google::Apis::ClassroomV1::Guardian::Representation - command.response_class = Google::Apis::ClassroomV1::Guardian - command.params['studentId'] = student_id unless student_id.nil? - command.params['guardianId'] = guardian_id unless guardian_id.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Returns a list of guardians that the requesting user is permitted to - # view, restricted to those that match the request. - # To list guardians for any student that the requesting user may view - # guardians for, use the literal character `-` for the student ID. - # This method returns the following error codes: - # * `PERMISSION_DENIED` if a `student_id` is specified, and the requesting - # user is not permitted to view guardian information for that student, if - # `"-"` is specified as the `student_id` and the user is not a domain - # administrator, if guardians are not enabled for the domain in question, - # if the `invited_email_address` filter is set by a user who is not a - # domain administrator, or for other access errors. - # * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot - # be recognized (it is not an email address, nor a `student_id` from the - # API, nor the literal string `me`). May also be returned if an invalid - # `page_token` is provided. - # * `NOT_FOUND` if a `student_id` is specified, and its format can be - # recognized, but Classroom has no record of that student. - # @param [String] student_id - # Filter results by the student who the guardian is linked to. - # The identifier can be one of the following: - # * the numeric identifier for the user - # * the email address of the user - # * the string literal `"me"`, indicating the requesting user - # * the string literal `"-"`, indicating that results should be returned for - # all students that the requesting user has access to view. - # @param [Fixnum] page_size - # Maximum number of items to return. Zero or unspecified indicates that the - # server may assign a maximum. - # The server may return fewer than the specified number of results. - # @param [String] invited_email_address - # Filter results by the email address that the original invitation was sent - # to, resulting in this guardian link. - # This filter can only be used by domain administrators. - # @param [String] page_token - # nextPageToken - # value returned from a previous - # list call, - # indicating that the subsequent page of results should be returned. - # The list request - # must be otherwise identical to the one that resulted in this token. - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::ListGuardiansResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::ListGuardiansResponse] - # - # @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_user_profile_guardians(student_id, page_size: nil, invited_email_address: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/userProfiles/{studentId}/guardians', options) - command.response_representation = Google::Apis::ClassroomV1::ListGuardiansResponse::Representation - command.response_class = Google::Apis::ClassroomV1::ListGuardiansResponse - command.params['studentId'] = student_id unless student_id.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['invitedEmailAddress'] = invited_email_address unless invited_email_address.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Deletes a guardian. - # The guardian will no longer receive guardian notifications and the guardian - # will no longer be accessible via the API. - # This method returns the following error codes: - # * `PERMISSION_DENIED` if no user that matches the provided `student_id` - # is visible to the requesting user, if the requesting user is not - # permitted to manage guardians for the student identified by the - # `student_id`, if guardians are not enabled for the domain in question, - # or for other access errors. - # * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot - # be recognized (it is not an email address, nor a `student_id` from the - # API). - # * `NOT_FOUND` if the requesting user is permitted to modify guardians for - # the requested `student_id`, but no `Guardian` record exists for that - # student with the provided `guardian_id`. - # @param [String] student_id - # The student whose guardian is to be deleted. One of the following: - # * the numeric identifier for the user - # * the email address of the user - # * the string literal `"me"`, indicating the requesting user - # @param [String] guardian_id - # The `id` field from a `Guardian`. - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_user_profile_guardian(student_id, guardian_id, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1/userProfiles/{studentId}/guardians/{guardianId}', options) - command.response_representation = Google::Apis::ClassroomV1::Empty::Representation - command.response_class = Google::Apis::ClassroomV1::Empty - command.params['studentId'] = student_id unless student_id.nil? - command.params['guardianId'] = guardian_id unless guardian_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Returns a specific guardian invitation. - # This method returns the following error codes: - # * `PERMISSION_DENIED` if the requesting user is not permitted to view - # guardian invitations for the student identified by the `student_id`, if - # guardians are not enabled for the domain in question, or for other - # access errors. - # * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot - # be recognized (it is not an email address, nor a `student_id` from the - # API, nor the literal string `me`). - # * `NOT_FOUND` if Classroom cannot find any record of the given student or - # `invitation_id`. May also be returned if the student exists, but the - # requesting user does not have access to see that student. - # @param [String] student_id - # The ID of the student whose guardian invitation is being requested. - # @param [String] invitation_id - # The `id` field of the `GuardianInvitation` being requested. - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::GuardianInvitation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::GuardianInvitation] - # - # @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_user_profile_guardian_invitation(student_id, invitation_id, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/userProfiles/{studentId}/guardianInvitations/{invitationId}', options) - command.response_representation = Google::Apis::ClassroomV1::GuardianInvitation::Representation - command.response_class = Google::Apis::ClassroomV1::GuardianInvitation - command.params['studentId'] = student_id unless student_id.nil? - command.params['invitationId'] = invitation_id unless invitation_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -1984,11 +1772,11 @@ module Google # @param [String] student_id # ID of the student (in standard format) # @param [Google::Apis::ClassroomV1::GuardianInvitation] guardian_invitation_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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -2001,15 +1789,15 @@ 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 create_user_profile_guardian_invitation(student_id, guardian_invitation_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def create_user_profile_guardian_invitation(student_id, guardian_invitation_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/userProfiles/{studentId}/guardianInvitations', options) command.request_representation = Google::Apis::ClassroomV1::GuardianInvitation::Representation command.request_object = guardian_invitation_object command.response_representation = Google::Apis::ClassroomV1::GuardianInvitation::Representation command.response_class = Google::Apis::ClassroomV1::GuardianInvitation command.params['studentId'] = student_id unless student_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -2036,16 +1824,6 @@ module Google # * the string literal `"-"`, indicating that results should be returned for # all students that the requesting user is permitted to view guardian # invitations. - # @param [Fixnum] page_size - # Maximum number of items to return. Zero or unspecified indicates that the - # server may assign a maximum. - # The server may return fewer than the specified number of results. - # @param [String] invited_email_address - # If specified, only results with the specified `invited_email_address` - # will be returned. - # @param [Array, String] states - # If specified, only results with the specified `state` values will be - # returned. Otherwise, results with a `state` of `PENDING` will be returned. # @param [String] page_token # nextPageToken # value returned from a previous @@ -2053,11 +1831,21 @@ module Google # indicating that the subsequent page of results should be returned. # The list request # must be otherwise identical to the one that resulted in this token. + # @param [String] invited_email_address + # If specified, only results with the specified `invited_email_address` + # will be returned. + # @param [Array, String] states + # If specified, only results with the specified `state` values will be + # returned. Otherwise, results with a `state` of `PENDING` will be returned. + # @param [Fixnum] page_size + # Maximum number of items to return. Zero or unspecified indicates that the + # server may assign a maximum. + # The server may return fewer than the specified number of results. + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -2070,17 +1858,61 @@ 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_user_profile_guardian_invitations(student_id, page_size: nil, invited_email_address: nil, states: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_user_profile_guardian_invitations(student_id, page_token: nil, invited_email_address: nil, states: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/userProfiles/{studentId}/guardianInvitations', options) command.response_representation = Google::Apis::ClassroomV1::ListGuardianInvitationsResponse::Representation command.response_class = Google::Apis::ClassroomV1::ListGuardianInvitationsResponse command.params['studentId'] = student_id unless student_id.nil? - command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? command.query['invitedEmailAddress'] = invited_email_address unless invited_email_address.nil? command.query['states'] = states unless states.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['pageSize'] = page_size unless page_size.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Returns a specific guardian invitation. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if the requesting user is not permitted to view + # guardian invitations for the student identified by the `student_id`, if + # guardians are not enabled for the domain in question, or for other + # access errors. + # * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot + # be recognized (it is not an email address, nor a `student_id` from the + # API, nor the literal string `me`). + # * `NOT_FOUND` if Classroom cannot find any record of the given student or + # `invitation_id`. May also be returned if the student exists, but the + # requesting user does not have access to see that student. + # @param [String] student_id + # The ID of the student whose guardian invitation is being requested. + # @param [String] invitation_id + # The `id` field of the `GuardianInvitation` being requested. + # @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::ClassroomV1::GuardianInvitation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::GuardianInvitation] + # + # @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_user_profile_guardian_invitation(student_id, invitation_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/userProfiles/{studentId}/guardianInvitations/{invitationId}', options) + command.response_representation = Google::Apis::ClassroomV1::GuardianInvitation::Representation + command.response_class = Google::Apis::ClassroomV1::GuardianInvitation + command.params['studentId'] = student_id unless student_id.nil? + command.params['invitationId'] = invitation_id unless invitation_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -2111,11 +1943,11 @@ module Google # * `state` # When set in a query parameter, this field should be specified as # `updateMask=,,...` + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -2128,7 +1960,7 @@ 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 patch_user_profile_guardian_invitation(student_id, invitation_id, guardian_invitation_object = nil, update_mask: nil, quota_user: nil, fields: nil, options: nil, &block) + def patch_user_profile_guardian_invitation(student_id, invitation_id, guardian_invitation_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/userProfiles/{studentId}/guardianInvitations/{invitationId}', options) command.request_representation = Google::Apis::ClassroomV1::GuardianInvitation::Representation command.request_object = guardian_invitation_object @@ -2137,8 +1969,176 @@ module Google command.params['studentId'] = student_id unless student_id.nil? command.params['invitationId'] = invitation_id unless invitation_id.nil? command.query['updateMask'] = update_mask unless update_mask.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a guardian. + # The guardian will no longer receive guardian notifications and the guardian + # will no longer be accessible via the API. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if no user that matches the provided `student_id` + # is visible to the requesting user, if the requesting user is not + # permitted to manage guardians for the student identified by the + # `student_id`, if guardians are not enabled for the domain in question, + # or for other access errors. + # * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot + # be recognized (it is not an email address, nor a `student_id` from the + # API). + # * `NOT_FOUND` if the requesting user is permitted to modify guardians for + # the requested `student_id`, but no `Guardian` record exists for that + # student with the provided `guardian_id`. + # @param [String] student_id + # The student whose guardian is to be deleted. One of the following: + # * the numeric identifier for the user + # * the email address of the user + # * the string literal `"me"`, indicating the requesting user + # @param [String] guardian_id + # The `id` field from a `Guardian`. + # @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::ClassroomV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_user_profile_guardian(student_id, guardian_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/userProfiles/{studentId}/guardians/{guardianId}', options) + command.response_representation = Google::Apis::ClassroomV1::Empty::Representation + command.response_class = Google::Apis::ClassroomV1::Empty + command.params['studentId'] = student_id unless student_id.nil? + command.params['guardianId'] = guardian_id unless guardian_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Returns a list of guardians that the requesting user is permitted to + # view, restricted to those that match the request. + # To list guardians for any student that the requesting user may view + # guardians for, use the literal character `-` for the student ID. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if a `student_id` is specified, and the requesting + # user is not permitted to view guardian information for that student, if + # `"-"` is specified as the `student_id` and the user is not a domain + # administrator, if guardians are not enabled for the domain in question, + # if the `invited_email_address` filter is set by a user who is not a + # domain administrator, or for other access errors. + # * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot + # be recognized (it is not an email address, nor a `student_id` from the + # API, nor the literal string `me`). May also be returned if an invalid + # `page_token` is provided. + # * `NOT_FOUND` if a `student_id` is specified, and its format can be + # recognized, but Classroom has no record of that student. + # @param [String] student_id + # Filter results by the student who the guardian is linked to. + # The identifier can be one of the following: + # * the numeric identifier for the user + # * the email address of the user + # * the string literal `"me"`, indicating the requesting user + # * the string literal `"-"`, indicating that results should be returned for + # all students that the requesting user has access to view. + # @param [String] page_token + # nextPageToken + # value returned from a previous + # list call, + # indicating that the subsequent page of results should be returned. + # The list request + # must be otherwise identical to the one that resulted in this token. + # @param [String] invited_email_address + # Filter results by the email address that the original invitation was sent + # to, resulting in this guardian link. + # This filter can only be used by domain administrators. + # @param [Fixnum] page_size + # Maximum number of items to return. Zero or unspecified indicates that the + # server may assign a maximum. + # The server may return fewer than the specified number of results. + # @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::ClassroomV1::ListGuardiansResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::ListGuardiansResponse] + # + # @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_user_profile_guardians(student_id, page_token: nil, invited_email_address: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/userProfiles/{studentId}/guardians', options) + command.response_representation = Google::Apis::ClassroomV1::ListGuardiansResponse::Representation + command.response_class = Google::Apis::ClassroomV1::ListGuardiansResponse + command.params['studentId'] = student_id unless student_id.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['invitedEmailAddress'] = invited_email_address unless invited_email_address.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Returns a specific guardian. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if no user that matches the provided `student_id` + # is visible to the requesting user, if the requesting user is not + # permitted to view guardian information for the student identified by the + # `student_id`, if guardians are not enabled for the domain in question, + # or for other access errors. + # * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot + # be recognized (it is not an email address, nor a `student_id` from the + # API, nor the literal string `me`). + # * `NOT_FOUND` if the requesting user is permitted to view guardians for + # the requested `student_id`, but no `Guardian` record exists for that + # student that matches the provided `guardian_id`. + # @param [String] student_id + # The student whose guardian is being requested. One of the following: + # * the numeric identifier for the user + # * the email address of the user + # * the string literal `"me"`, indicating the requesting user + # @param [String] guardian_id + # The `id` field from a `Guardian`. + # @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::ClassroomV1::Guardian] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::Guardian] + # + # @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_user_profile_guardian(student_id, guardian_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/userProfiles/{studentId}/guardians/{guardianId}', options) + command.response_representation = Google::Apis::ClassroomV1::Guardian::Representation + command.response_class = Google::Apis::ClassroomV1::Guardian + command.params['studentId'] = student_id unless student_id.nil? + command.params['guardianId'] = guardian_id unless guardian_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end diff --git a/generated/google/apis/cloudbilling_v1.rb b/generated/google/apis/cloudbilling_v1.rb index 099387988..72f7e812a 100644 --- a/generated/google/apis/cloudbilling_v1.rb +++ b/generated/google/apis/cloudbilling_v1.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/billing/ module CloudbillingV1 VERSION = 'V1' - REVISION = '20170418' + REVISION = '20170524' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/cloudbuild_v1.rb b/generated/google/apis/cloudbuild_v1.rb index c2069aa71..6020f18de 100644 --- a/generated/google/apis/cloudbuild_v1.rb +++ b/generated/google/apis/cloudbuild_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/container-builder/docs/ module CloudbuildV1 VERSION = 'V1' - REVISION = '20170504' + REVISION = '20170525' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/cloudbuild_v1/classes.rb b/generated/google/apis/cloudbuild_v1/classes.rb index 57b5f6d44..78172f453 100644 --- a/generated/google/apis/cloudbuild_v1/classes.rb +++ b/generated/google/apis/cloudbuild_v1/classes.rb @@ -22,379 +22,6 @@ module Google module Apis module CloudbuildV1 - # The `Status` type defines a logical error model that is suitable for different - # programming environments, including REST APIs and RPC APIs. It is used by - # [gRPC](https://github.com/grpc). The error model is designed to be: - # - Simple to use and understand for most users - # - Flexible enough to meet unexpected needs - # # Overview - # The `Status` message contains three pieces of data: error code, error message, - # and error details. The error code should be an enum value of - # google.rpc.Code, but it may accept additional error codes if needed. The - # error message should be a developer-facing English message that helps - # developers *understand* and *resolve* the error. If a localized user-facing - # error message is needed, put the localized message in the error details or - # localize it in the client. The optional error details may contain arbitrary - # information about the error. There is a predefined set of error detail types - # in the package `google.rpc` which can be used for common error conditions. - # # Language mapping - # The `Status` message is the logical representation of the error model, but it - # is not necessarily the actual wire format. When the `Status` message is - # exposed in different client libraries and different wire protocols, it can be - # mapped differently. For example, it will likely be mapped to some exceptions - # in Java, but more likely mapped to some error codes in C. - # # Other uses - # The error model and the `Status` message can be used in a variety of - # environments, either with or without APIs, to provide a - # consistent developer experience across different environments. - # Example uses of this error model include: - # - Partial errors. If a service needs to return partial errors to the client, - # it may embed the `Status` in the normal response to indicate the partial - # errors. - # - Workflow errors. A typical workflow has multiple steps. Each step may - # have a `Status` message for error reporting. - # - Batch operations. If a client uses batch request and batch response, the - # `Status` message should be used directly inside batch response, one for - # each error sub-response. - # - Asynchronous operations. If an API call embeds asynchronous operation - # results in its response, the status of those operations should be - # represented directly using the `Status` message. - # - Logging. If some API errors are stored in logs, the message `Status` could - # be used directly after any stripping needed for security/privacy reasons. - class Status - include Google::Apis::Core::Hashable - - # A list of messages that carry the error details. There will be a - # common set of message types for APIs to use. - # Corresponds to the JSON property `details` - # @return [Array>] - attr_accessor :details - - # The status code, which should be an enum value of google.rpc.Code. - # Corresponds to the JSON property `code` - # @return [Fixnum] - attr_accessor :code - - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # google.rpc.Status.details field, or localized by the client. - # Corresponds to the JSON property `message` - # @return [String] - attr_accessor :message - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @details = args[:details] if args.key?(:details) - @code = args[:code] if args.key?(:code) - @message = args[:message] if args.key?(:message) - end - end - - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # service Foo ` - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # ` - # The JSON representation for `Empty` is empty JSON object ````. - class Empty - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # Configuration for an automated build in response to source repository - # changes. - class BuildTrigger - include Google::Apis::Core::Hashable - - # If true, the trigger will never result in a build. - # Corresponds to the JSON property `disabled` - # @return [Boolean] - attr_accessor :disabled - alias_method :disabled?, :disabled - - # Time when the trigger was created. - # @OutputOnly - # Corresponds to the JSON property `createTime` - # @return [String] - attr_accessor :create_time - - # RepoSource describes the location of the source in a Google Cloud Source - # Repository. - # Corresponds to the JSON property `triggerTemplate` - # @return [Google::Apis::CloudbuildV1::RepoSource] - attr_accessor :trigger_template - - # Path, from the source root, to a file whose contents is used for the - # template. - # Corresponds to the JSON property `filename` - # @return [String] - attr_accessor :filename - - # Unique identifier of the trigger. - # @OutputOnly - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # A build resource in the Container Builder API. - # At a high level, a Build describes where to find source code, how to build - # it (for example, the builder image to run on the source), and what tag to - # apply to the built image when it is pushed to Google Container Registry. - # Fields can include the following variables which will be expanded when the - # build is created: - # - $PROJECT_ID: the project ID of the build. - # - $BUILD_ID: the autogenerated ID of the build. - # - $REPO_NAME: the source repository name specified by RepoSource. - # - $BRANCH_NAME: the branch name specified by RepoSource. - # - $TAG_NAME: the tag name specified by RepoSource. - # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or - # resolved from the specified branch or tag. - # Corresponds to the JSON property `build` - # @return [Google::Apis::CloudbuildV1::Build] - attr_accessor :build - - # Substitutions data for Build resource. - # Corresponds to the JSON property `substitutions` - # @return [Hash] - attr_accessor :substitutions - - # Human-readable description of this trigger. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @disabled = args[:disabled] if args.key?(:disabled) - @create_time = args[:create_time] if args.key?(:create_time) - @trigger_template = args[:trigger_template] if args.key?(:trigger_template) - @filename = args[:filename] if args.key?(:filename) - @id = args[:id] if args.key?(:id) - @build = args[:build] if args.key?(:build) - @substitutions = args[:substitutions] if args.key?(:substitutions) - @description = args[:description] if args.key?(:description) - end - end - - # A build resource in the Container Builder API. - # At a high level, a Build describes where to find source code, how to build - # it (for example, the builder image to run on the source), and what tag to - # apply to the built image when it is pushed to Google Container Registry. - # Fields can include the following variables which will be expanded when the - # build is created: - # - $PROJECT_ID: the project ID of the build. - # - $BUILD_ID: the autogenerated ID of the build. - # - $REPO_NAME: the source repository name specified by RepoSource. - # - $BRANCH_NAME: the branch name specified by RepoSource. - # - $TAG_NAME: the tag name specified by RepoSource. - # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or - # resolved from the specified branch or tag. - class Build - include Google::Apis::Core::Hashable - - # Customer-readable message about the current status. - # @OutputOnly - # Corresponds to the JSON property `statusDetail` - # @return [String] - attr_accessor :status_detail - - # Status of the build. - # @OutputOnly - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # Amount of time that this build should be allowed to run, to second - # granularity. If this amount of time elapses, work on the build will cease - # and the build status will be TIMEOUT. - # Default time is ten minutes. - # Corresponds to the JSON property `timeout` - # @return [String] - attr_accessor :timeout - - # Google Cloud Storage bucket where logs should be written (see - # [Bucket Name - # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements) - # ). - # Logs file names will be of the format `$`logs_bucket`/log-$`build_id`.txt`. - # Corresponds to the JSON property `logsBucket` - # @return [String] - attr_accessor :logs_bucket - - # Results describes the artifacts created by the build pipeline. - # Corresponds to the JSON property `results` - # @return [Google::Apis::CloudbuildV1::Results] - attr_accessor :results - - # Describes the operations to be performed on the workspace. - # Corresponds to the JSON property `steps` - # @return [Array] - attr_accessor :steps - - # The ID of the BuildTrigger that triggered this build, if it was - # triggered automatically. - # @OutputOnly - # Corresponds to the JSON property `buildTriggerId` - # @return [String] - attr_accessor :build_trigger_id - - # Tags for annotation of a Build. These are not docker tags. - # Corresponds to the JSON property `tags` - # @return [Array] - attr_accessor :tags - - # Unique identifier of the build. - # @OutputOnly - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Substitutions data for Build resource. - # Corresponds to the JSON property `substitutions` - # @return [Hash] - attr_accessor :substitutions - - # Time at which execution of the build was started. - # @OutputOnly - # Corresponds to the JSON property `startTime` - # @return [String] - attr_accessor :start_time - - # Provenance of the source. Ways to find the original source, or verify that - # some source was used for this build. - # Corresponds to the JSON property `sourceProvenance` - # @return [Google::Apis::CloudbuildV1::SourceProvenance] - attr_accessor :source_provenance - - # Time at which the request to create the build was received. - # @OutputOnly - # Corresponds to the JSON property `createTime` - # @return [String] - attr_accessor :create_time - - # A list of images to be pushed upon the successful completion of all build - # steps. - # The images will be pushed using the builder service account's credentials. - # The digests of the pushed images will be stored in the Build resource's - # results field. - # If any of the images fail to be pushed, the build is marked FAILURE. - # Corresponds to the JSON property `images` - # @return [Array] - attr_accessor :images - - # ID of the project. - # @OutputOnly. - # Corresponds to the JSON property `projectId` - # @return [String] - attr_accessor :project_id - - # URL to logs for this build in Google Cloud Logging. - # @OutputOnly - # Corresponds to the JSON property `logUrl` - # @return [String] - attr_accessor :log_url - - # Time at which execution of the build was finished. - # The difference between finish_time and start_time is the duration of the - # build's execution. - # @OutputOnly - # Corresponds to the JSON property `finishTime` - # @return [String] - attr_accessor :finish_time - - # Source describes the location of the source in a supported storage - # service. - # Corresponds to the JSON property `source` - # @return [Google::Apis::CloudbuildV1::Source] - attr_accessor :source - - # Optional arguments to enable specific features of builds. - # Corresponds to the JSON property `options` - # @return [Google::Apis::CloudbuildV1::BuildOptions] - attr_accessor :options - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @status_detail = args[:status_detail] if args.key?(:status_detail) - @status = args[:status] if args.key?(:status) - @timeout = args[:timeout] if args.key?(:timeout) - @logs_bucket = args[:logs_bucket] if args.key?(:logs_bucket) - @results = args[:results] if args.key?(:results) - @steps = args[:steps] if args.key?(:steps) - @build_trigger_id = args[:build_trigger_id] if args.key?(:build_trigger_id) - @tags = args[:tags] if args.key?(:tags) - @id = args[:id] if args.key?(:id) - @substitutions = args[:substitutions] if args.key?(:substitutions) - @start_time = args[:start_time] if args.key?(:start_time) - @source_provenance = args[:source_provenance] if args.key?(:source_provenance) - @create_time = args[:create_time] if args.key?(:create_time) - @images = args[:images] if args.key?(:images) - @project_id = args[:project_id] if args.key?(:project_id) - @log_url = args[:log_url] if args.key?(:log_url) - @finish_time = args[:finish_time] if args.key?(:finish_time) - @source = args[:source] if args.key?(:source) - @options = args[:options] if args.key?(:options) - end - end - - # Request to cancel an ongoing build. - class CancelBuildRequest - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # Response including listed builds. - class ListBuildsResponse - include Google::Apis::Core::Hashable - - # Token to receive the next page of results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Builds will be sorted by create_time, descending. - # Corresponds to the JSON property `builds` - # @return [Array] - attr_accessor :builds - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @builds = args[:builds] if args.key?(:builds) - end - end - # The response message for Operations.ListOperations. class ListOperationsResponse include Google::Apis::Core::Hashable @@ -452,24 +79,24 @@ module Google class BuildOptions include Google::Apis::Core::Hashable - # Requested verifiability options. - # Corresponds to the JSON property `requestedVerifyOption` - # @return [String] - attr_accessor :requested_verify_option - # Requested hash for SourceProvenance. # Corresponds to the JSON property `sourceProvenanceHash` # @return [Array] attr_accessor :source_provenance_hash + # Requested verifiability options. + # Corresponds to the JSON property `requestedVerifyOption` + # @return [String] + attr_accessor :requested_verify_option + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @requested_verify_option = args[:requested_verify_option] if args.key?(:requested_verify_option) @source_provenance_hash = args[:source_provenance_hash] if args.key?(:source_provenance_hash) + @requested_verify_option = args[:requested_verify_option] if args.key?(:requested_verify_option) end end @@ -478,6 +105,14 @@ module Google class StorageSource include Google::Apis::Core::Hashable + # Google Cloud Storage bucket containing source (see + # [Bucket Name + # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements) + # ). + # Corresponds to the JSON property `bucket` + # @return [String] + attr_accessor :bucket + # Google Cloud Storage object containing source. # This object must be a gzipped archive file (.tar.gz) containing source to # build. @@ -491,23 +126,15 @@ module Google # @return [Fixnum] attr_accessor :generation - # Google Cloud Storage bucket containing source (see - # [Bucket Name - # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements) - # ). - # Corresponds to the JSON property `bucket` - # @return [String] - attr_accessor :bucket - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @bucket = args[:bucket] if args.key?(:bucket) @object = args[:object] if args.key?(:object) @generation = args[:generation] if args.key?(:generation) - @bucket = args[:bucket] if args.key?(:bucket) end end @@ -572,6 +199,12 @@ module Google class SourceProvenance include Google::Apis::Core::Hashable + # StorageSource describes the location of the source in an archive file in + # Google Cloud Storage. + # Corresponds to the JSON property `resolvedStorageSource` + # @return [Google::Apis::CloudbuildV1::StorageSource] + attr_accessor :resolved_storage_source + # Hash(es) of the build source, which can be used to verify that the original # source integrity was maintained in the build. Note that FileHashes will # only be populated if BuildOptions has requested a SourceProvenanceHash. @@ -590,21 +223,15 @@ module Google # @return [Google::Apis::CloudbuildV1::RepoSource] attr_accessor :resolved_repo_source - # StorageSource describes the location of the source in an archive file in - # Google Cloud Storage. - # Corresponds to the JSON property `resolvedStorageSource` - # @return [Google::Apis::CloudbuildV1::StorageSource] - attr_accessor :resolved_storage_source - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @resolved_storage_source = args[:resolved_storage_source] if args.key?(:resolved_storage_source) @file_hashes = args[:file_hashes] if args.key?(:file_hashes) @resolved_repo_source = args[:resolved_repo_source] if args.key?(:resolved_repo_source) - @resolved_storage_source = args[:resolved_storage_source] if args.key?(:resolved_storage_source) end end @@ -621,11 +248,38 @@ module Google end end + # Response containing existing BuildTriggers. + class ListBuildTriggersResponse + include Google::Apis::Core::Hashable + + # BuildTriggers for the project, sorted by create_time descending. + # Corresponds to the JSON property `triggers` + # @return [Array] + attr_accessor :triggers + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @triggers = args[:triggers] if args.key?(:triggers) + end + end + # This resource represents a long-running operation that is the result of a # network API call. class Operation include Google::Apis::Core::Hashable + # If the value is `false`, it means the operation is still in progress. + # If true, the operation is completed, and either `error` or `response` is + # available. + # Corresponds to the JSON property `done` + # @return [Boolean] + attr_accessor :done + alias_method :done?, :done + # The normal response of the operation in case of success. If the original # method returns no data on success, such as `Delete`, the response is # `google.protobuf.Empty`. If the original method is standard @@ -659,7 +313,7 @@ module Google # error message is needed, put the localized message in the error details or # localize it in the client. The optional error details may contain arbitrary # information about the error. There is a predefined set of error detail types - # in the package `google.rpc` which can be used for common error conditions. + # in the package `google.rpc` that can be used for common error conditions. # # Language mapping # The `Status` message is the logical representation of the error model, but it # is not necessarily the actual wire format. When the `Status` message is @@ -696,44 +350,17 @@ module Google # @return [Hash] attr_accessor :metadata - # If the value is `false`, it means the operation is still in progress. - # If true, the operation is completed, and either `error` or `response` is - # available. - # Corresponds to the JSON property `done` - # @return [Boolean] - attr_accessor :done - alias_method :done?, :done - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @done = args[:done] if args.key?(:done) @response = args[:response] if args.key?(:response) @name = args[:name] if args.key?(:name) @error = args[:error] if args.key?(:error) @metadata = args[:metadata] if args.key?(:metadata) - @done = args[:done] if args.key?(:done) - end - end - - # Response containing existing BuildTriggers. - class ListBuildTriggersResponse - include Google::Apis::Core::Hashable - - # BuildTriggers for the project, sorted by create_time descending. - # Corresponds to the JSON property `triggers` - # @return [Array] - attr_accessor :triggers - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @triggers = args[:triggers] if args.key?(:triggers) end end @@ -789,87 +416,6 @@ module Google end end - # BuildStep describes a step to perform in the build pipeline. - class BuildStep - include Google::Apis::Core::Hashable - - # Optional entrypoint to be used instead of the build step image's default - # If unset, the image's default will be used. - # Corresponds to the JSON property `entrypoint` - # @return [String] - attr_accessor :entrypoint - - # Optional unique identifier for this build step, used in wait_for to - # reference this build step as a dependency. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Working directory (relative to project source root) to use when running - # this operation's container. - # Corresponds to the JSON property `dir` - # @return [String] - attr_accessor :dir - - # The ID(s) of the step(s) that this build step depends on. - # This build step will not start until all the build steps in wait_for - # have completed successfully. If wait_for is empty, this build step will - # start when all previous build steps in the Build.Steps list have completed - # successfully. - # Corresponds to the JSON property `waitFor` - # @return [Array] - attr_accessor :wait_for - - # A list of environment variable definitions to be used when running a step. - # The elements are of the form "KEY=VALUE" for the environment variable "KEY" - # being given the value "VALUE". - # Corresponds to the JSON property `env` - # @return [Array] - attr_accessor :env - - # A list of arguments that will be presented to the step when it is started. - # If the image used to run the step's container has an entrypoint, these args - # will be used as arguments to that entrypoint. If the image does not define - # an entrypoint, the first element in args will be used as the entrypoint, - # and the remainder will be used as arguments. - # Corresponds to the JSON property `args` - # @return [Array] - attr_accessor :args - - # The name of the container image that will run this particular build step. - # If the image is already available in the host's Docker daemon's cache, it - # will be run directly. If not, the host will attempt to pull the image - # first, using the builder service account's credentials if necessary. - # The Docker daemon's cache will already have the latest versions of all of - # the officially supported build steps - # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/ - # GoogleCloudPlatform/cloud-builders)). - # The Docker daemon will also have cached many of the layers for some popular - # images, like "ubuntu", "debian", but they will be refreshed at the time you - # attempt to use them. - # If you built an image in a previous build step, it will be stored in the - # host's Docker daemon's cache and is available to use as the name for a - # later build step. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @entrypoint = args[:entrypoint] if args.key?(:entrypoint) - @id = args[:id] if args.key?(:id) - @dir = args[:dir] if args.key?(:dir) - @wait_for = args[:wait_for] if args.key?(:wait_for) - @env = args[:env] if args.key?(:env) - @args = args[:args] if args.key?(:args) - @name = args[:name] if args.key?(:name) - end - end - # RepoSource describes the location of the source in a Google Cloud Source # Repository. class RepoSource @@ -915,6 +461,87 @@ module Google end end + # BuildStep describes a step to perform in the build pipeline. + class BuildStep + include Google::Apis::Core::Hashable + + # The name of the container image that will run this particular build step. + # If the image is already available in the host's Docker daemon's cache, it + # will be run directly. If not, the host will attempt to pull the image + # first, using the builder service account's credentials if necessary. + # The Docker daemon's cache will already have the latest versions of all of + # the officially supported build steps + # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/ + # GoogleCloudPlatform/cloud-builders)). + # The Docker daemon will also have cached many of the layers for some popular + # images, like "ubuntu", "debian", but they will be refreshed at the time you + # attempt to use them. + # If you built an image in a previous build step, it will be stored in the + # host's Docker daemon's cache and is available to use as the name for a + # later build step. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Optional entrypoint to be used instead of the build step image's default + # If unset, the image's default will be used. + # Corresponds to the JSON property `entrypoint` + # @return [String] + attr_accessor :entrypoint + + # Optional unique identifier for this build step, used in wait_for to + # reference this build step as a dependency. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # Working directory (relative to project source root) to use when running + # this operation's container. + # Corresponds to the JSON property `dir` + # @return [String] + attr_accessor :dir + + # A list of environment variable definitions to be used when running a step. + # The elements are of the form "KEY=VALUE" for the environment variable "KEY" + # being given the value "VALUE". + # Corresponds to the JSON property `env` + # @return [Array] + attr_accessor :env + + # The ID(s) of the step(s) that this build step depends on. + # This build step will not start until all the build steps in wait_for + # have completed successfully. If wait_for is empty, this build step will + # start when all previous build steps in the Build.Steps list have completed + # successfully. + # Corresponds to the JSON property `waitFor` + # @return [Array] + attr_accessor :wait_for + + # A list of arguments that will be presented to the step when it is started. + # If the image used to run the step's container has an entrypoint, these args + # will be used as arguments to that entrypoint. If the image does not define + # an entrypoint, the first element in args will be used as the entrypoint, + # and the remainder will be used as arguments. + # Corresponds to the JSON property `args` + # @return [Array] + attr_accessor :args + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @name = args[:name] if args.key?(:name) + @entrypoint = args[:entrypoint] if args.key?(:entrypoint) + @id = args[:id] if args.key?(:id) + @dir = args[:dir] if args.key?(:dir) + @env = args[:env] if args.key?(:env) + @wait_for = args[:wait_for] if args.key?(:wait_for) + @args = args[:args] if args.key?(:args) + end + end + # Container message for hashes of byte content of files, used in # SourceProvenance messages to verify integrity of source input to the build. class FileHashes @@ -934,6 +561,379 @@ module Google @file_hash = args[:file_hash] if args.key?(:file_hash) end end + + # The `Status` type defines a logical error model that is suitable for different + # programming environments, including REST APIs and RPC APIs. It is used by + # [gRPC](https://github.com/grpc). The error model is designed to be: + # - Simple to use and understand for most users + # - Flexible enough to meet unexpected needs + # # Overview + # The `Status` message contains three pieces of data: error code, error message, + # and error details. The error code should be an enum value of + # google.rpc.Code, but it may accept additional error codes if needed. The + # error message should be a developer-facing English message that helps + # developers *understand* and *resolve* the error. If a localized user-facing + # error message is needed, put the localized message in the error details or + # localize it in the client. The optional error details may contain arbitrary + # information about the error. There is a predefined set of error detail types + # in the package `google.rpc` that can be used for common error conditions. + # # Language mapping + # The `Status` message is the logical representation of the error model, but it + # is not necessarily the actual wire format. When the `Status` message is + # exposed in different client libraries and different wire protocols, it can be + # mapped differently. For example, it will likely be mapped to some exceptions + # in Java, but more likely mapped to some error codes in C. + # # Other uses + # The error model and the `Status` message can be used in a variety of + # environments, either with or without APIs, to provide a + # consistent developer experience across different environments. + # Example uses of this error model include: + # - Partial errors. If a service needs to return partial errors to the client, + # it may embed the `Status` in the normal response to indicate the partial + # errors. + # - Workflow errors. A typical workflow has multiple steps. Each step may + # have a `Status` message for error reporting. + # - Batch operations. If a client uses batch request and batch response, the + # `Status` message should be used directly inside batch response, one for + # each error sub-response. + # - Asynchronous operations. If an API call embeds asynchronous operation + # results in its response, the status of those operations should be + # represented directly using the `Status` message. + # - Logging. If some API errors are stored in logs, the message `Status` could + # be used directly after any stripping needed for security/privacy reasons. + class Status + include Google::Apis::Core::Hashable + + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # google.rpc.Status.details field, or localized by the client. + # Corresponds to the JSON property `message` + # @return [String] + attr_accessor :message + + # A list of messages that carry the error details. There will be a + # common set of message types for APIs to use. + # Corresponds to the JSON property `details` + # @return [Array>] + attr_accessor :details + + # The status code, which should be an enum value of google.rpc.Code. + # Corresponds to the JSON property `code` + # @return [Fixnum] + attr_accessor :code + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @message = args[:message] if args.key?(:message) + @details = args[:details] if args.key?(:details) + @code = args[:code] if args.key?(:code) + end + end + + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # service Foo ` + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # ` + # The JSON representation for `Empty` is empty JSON object ````. + class Empty + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Configuration for an automated build in response to source repository + # changes. + class BuildTrigger + include Google::Apis::Core::Hashable + + # Time when the trigger was created. + # @OutputOnly + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # If true, the trigger will never result in a build. + # Corresponds to the JSON property `disabled` + # @return [Boolean] + attr_accessor :disabled + alias_method :disabled?, :disabled + + # RepoSource describes the location of the source in a Google Cloud Source + # Repository. + # Corresponds to the JSON property `triggerTemplate` + # @return [Google::Apis::CloudbuildV1::RepoSource] + attr_accessor :trigger_template + + # Path, from the source root, to a file whose contents is used for the + # template. + # Corresponds to the JSON property `filename` + # @return [String] + attr_accessor :filename + + # Unique identifier of the trigger. + # @OutputOnly + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # A build resource in the Container Builder API. + # At a high level, a Build describes where to find source code, how to build + # it (for example, the builder image to run on the source), and what tag to + # apply to the built image when it is pushed to Google Container Registry. + # Fields can include the following variables which will be expanded when the + # build is created: + # - $PROJECT_ID: the project ID of the build. + # - $BUILD_ID: the autogenerated ID of the build. + # - $REPO_NAME: the source repository name specified by RepoSource. + # - $BRANCH_NAME: the branch name specified by RepoSource. + # - $TAG_NAME: the tag name specified by RepoSource. + # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or + # resolved from the specified branch or tag. + # Corresponds to the JSON property `build` + # @return [Google::Apis::CloudbuildV1::Build] + attr_accessor :build + + # Substitutions data for Build resource. + # Corresponds to the JSON property `substitutions` + # @return [Hash] + attr_accessor :substitutions + + # Human-readable description of this trigger. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @create_time = args[:create_time] if args.key?(:create_time) + @disabled = args[:disabled] if args.key?(:disabled) + @trigger_template = args[:trigger_template] if args.key?(:trigger_template) + @filename = args[:filename] if args.key?(:filename) + @id = args[:id] if args.key?(:id) + @build = args[:build] if args.key?(:build) + @substitutions = args[:substitutions] if args.key?(:substitutions) + @description = args[:description] if args.key?(:description) + end + end + + # A build resource in the Container Builder API. + # At a high level, a Build describes where to find source code, how to build + # it (for example, the builder image to run on the source), and what tag to + # apply to the built image when it is pushed to Google Container Registry. + # Fields can include the following variables which will be expanded when the + # build is created: + # - $PROJECT_ID: the project ID of the build. + # - $BUILD_ID: the autogenerated ID of the build. + # - $REPO_NAME: the source repository name specified by RepoSource. + # - $BRANCH_NAME: the branch name specified by RepoSource. + # - $TAG_NAME: the tag name specified by RepoSource. + # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or + # resolved from the specified branch or tag. + class Build + include Google::Apis::Core::Hashable + + # Optional arguments to enable specific features of builds. + # Corresponds to the JSON property `options` + # @return [Google::Apis::CloudbuildV1::BuildOptions] + attr_accessor :options + + # Source describes the location of the source in a supported storage + # service. + # Corresponds to the JSON property `source` + # @return [Google::Apis::CloudbuildV1::Source] + attr_accessor :source + + # Customer-readable message about the current status. + # @OutputOnly + # Corresponds to the JSON property `statusDetail` + # @return [String] + attr_accessor :status_detail + + # Status of the build. + # @OutputOnly + # Corresponds to the JSON property `status` + # @return [String] + attr_accessor :status + + # Amount of time that this build should be allowed to run, to second + # granularity. If this amount of time elapses, work on the build will cease + # and the build status will be TIMEOUT. + # Default time is ten minutes. + # Corresponds to the JSON property `timeout` + # @return [String] + attr_accessor :timeout + + # Results describes the artifacts created by the build pipeline. + # Corresponds to the JSON property `results` + # @return [Google::Apis::CloudbuildV1::Results] + attr_accessor :results + + # Google Cloud Storage bucket where logs should be written (see + # [Bucket Name + # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements) + # ). + # Logs file names will be of the format `$`logs_bucket`/log-$`build_id`.txt`. + # Corresponds to the JSON property `logsBucket` + # @return [String] + attr_accessor :logs_bucket + + # Describes the operations to be performed on the workspace. + # Corresponds to the JSON property `steps` + # @return [Array] + attr_accessor :steps + + # The ID of the BuildTrigger that triggered this build, if it was + # triggered automatically. + # @OutputOnly + # Corresponds to the JSON property `buildTriggerId` + # @return [String] + attr_accessor :build_trigger_id + + # Tags for annotation of a Build. These are not docker tags. + # Corresponds to the JSON property `tags` + # @return [Array] + attr_accessor :tags + + # Unique identifier of the build. + # @OutputOnly + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # Time at which execution of the build was started. + # @OutputOnly + # Corresponds to the JSON property `startTime` + # @return [String] + attr_accessor :start_time + + # Substitutions data for Build resource. + # Corresponds to the JSON property `substitutions` + # @return [Hash] + attr_accessor :substitutions + + # Provenance of the source. Ways to find the original source, or verify that + # some source was used for this build. + # Corresponds to the JSON property `sourceProvenance` + # @return [Google::Apis::CloudbuildV1::SourceProvenance] + attr_accessor :source_provenance + + # Time at which the request to create the build was received. + # @OutputOnly + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # A list of images to be pushed upon the successful completion of all build + # steps. + # The images will be pushed using the builder service account's credentials. + # The digests of the pushed images will be stored in the Build resource's + # results field. + # If any of the images fail to be pushed, the build is marked FAILURE. + # Corresponds to the JSON property `images` + # @return [Array] + attr_accessor :images + + # ID of the project. + # @OutputOnly. + # Corresponds to the JSON property `projectId` + # @return [String] + attr_accessor :project_id + + # URL to logs for this build in Google Cloud Logging. + # @OutputOnly + # Corresponds to the JSON property `logUrl` + # @return [String] + attr_accessor :log_url + + # Time at which execution of the build was finished. + # The difference between finish_time and start_time is the duration of the + # build's execution. + # @OutputOnly + # Corresponds to the JSON property `finishTime` + # @return [String] + attr_accessor :finish_time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @options = args[:options] if args.key?(:options) + @source = args[:source] if args.key?(:source) + @status_detail = args[:status_detail] if args.key?(:status_detail) + @status = args[:status] if args.key?(:status) + @timeout = args[:timeout] if args.key?(:timeout) + @results = args[:results] if args.key?(:results) + @logs_bucket = args[:logs_bucket] if args.key?(:logs_bucket) + @steps = args[:steps] if args.key?(:steps) + @build_trigger_id = args[:build_trigger_id] if args.key?(:build_trigger_id) + @tags = args[:tags] if args.key?(:tags) + @id = args[:id] if args.key?(:id) + @start_time = args[:start_time] if args.key?(:start_time) + @substitutions = args[:substitutions] if args.key?(:substitutions) + @source_provenance = args[:source_provenance] if args.key?(:source_provenance) + @create_time = args[:create_time] if args.key?(:create_time) + @images = args[:images] if args.key?(:images) + @project_id = args[:project_id] if args.key?(:project_id) + @log_url = args[:log_url] if args.key?(:log_url) + @finish_time = args[:finish_time] if args.key?(:finish_time) + end + end + + # Request to cancel an ongoing build. + class CancelBuildRequest + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Response including listed builds. + class ListBuildsResponse + include Google::Apis::Core::Hashable + + # Token to receive the next page of results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # Builds will be sorted by create_time, descending. + # Corresponds to the JSON property `builds` + # @return [Array] + attr_accessor :builds + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @builds = args[:builds] if args.key?(:builds) + end + end end end end diff --git a/generated/google/apis/cloudbuild_v1/representations.rb b/generated/google/apis/cloudbuild_v1/representations.rb index 26e2d49e6..ba1a99071 100644 --- a/generated/google/apis/cloudbuild_v1/representations.rb +++ b/generated/google/apis/cloudbuild_v1/representations.rb @@ -22,42 +22,6 @@ module Google module Apis module CloudbuildV1 - class Status - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Empty - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BuildTrigger - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Build - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CancelBuildRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListBuildsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class ListOperationsResponse class Representation < Google::Apis::Core::JsonRepresentation; end @@ -106,13 +70,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class Operation + class ListBuildTriggersResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class ListBuildTriggersResponse + class Operation class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -130,13 +94,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class BuildStep + class RepoSource class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class RepoSource + class BuildStep class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -149,79 +113,39 @@ module Google end class Status - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :details, as: 'details' - property :code, as: 'code' - property :message, as: 'message' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class Empty - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class BuildTrigger - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :disabled, as: 'disabled' - property :create_time, as: 'createTime' - property :trigger_template, as: 'triggerTemplate', class: Google::Apis::CloudbuildV1::RepoSource, decorator: Google::Apis::CloudbuildV1::RepoSource::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :filename, as: 'filename' - property :id, as: 'id' - property :build, as: 'build', class: Google::Apis::CloudbuildV1::Build, decorator: Google::Apis::CloudbuildV1::Build::Representation - - hash :substitutions, as: 'substitutions' - property :description, as: 'description' - end + include Google::Apis::Core::JsonObjectSupport end class Build - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :status_detail, as: 'statusDetail' - property :status, as: 'status' - property :timeout, as: 'timeout' - property :logs_bucket, as: 'logsBucket' - property :results, as: 'results', class: Google::Apis::CloudbuildV1::Results, decorator: Google::Apis::CloudbuildV1::Results::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - collection :steps, as: 'steps', class: Google::Apis::CloudbuildV1::BuildStep, decorator: Google::Apis::CloudbuildV1::BuildStep::Representation - - property :build_trigger_id, as: 'buildTriggerId' - collection :tags, as: 'tags' - property :id, as: 'id' - hash :substitutions, as: 'substitutions' - property :start_time, as: 'startTime' - property :source_provenance, as: 'sourceProvenance', class: Google::Apis::CloudbuildV1::SourceProvenance, decorator: Google::Apis::CloudbuildV1::SourceProvenance::Representation - - property :create_time, as: 'createTime' - collection :images, as: 'images' - property :project_id, as: 'projectId' - property :log_url, as: 'logUrl' - property :finish_time, as: 'finishTime' - property :source, as: 'source', class: Google::Apis::CloudbuildV1::Source, decorator: Google::Apis::CloudbuildV1::Source::Representation - - property :options, as: 'options', class: Google::Apis::CloudbuildV1::BuildOptions, decorator: Google::Apis::CloudbuildV1::BuildOptions::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class CancelBuildRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ListBuildsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - collection :builds, as: 'builds', class: Google::Apis::CloudbuildV1::Build, decorator: Google::Apis::CloudbuildV1::Build::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class ListOperationsResponse @@ -246,17 +170,17 @@ module Google class BuildOptions # @private class Representation < Google::Apis::Core::JsonRepresentation - property :requested_verify_option, as: 'requestedVerifyOption' collection :source_provenance_hash, as: 'sourceProvenanceHash' + property :requested_verify_option, as: 'requestedVerifyOption' end end class StorageSource # @private class Representation < Google::Apis::Core::JsonRepresentation + property :bucket, as: 'bucket' property :object, as: 'object' property :generation, :numeric_string => true, as: 'generation' - property :bucket, as: 'bucket' end end @@ -280,12 +204,12 @@ module Google class SourceProvenance # @private class Representation < Google::Apis::Core::JsonRepresentation + property :resolved_storage_source, as: 'resolvedStorageSource', class: Google::Apis::CloudbuildV1::StorageSource, decorator: Google::Apis::CloudbuildV1::StorageSource::Representation + hash :file_hashes, as: 'fileHashes', class: Google::Apis::CloudbuildV1::FileHashes, decorator: Google::Apis::CloudbuildV1::FileHashes::Representation property :resolved_repo_source, as: 'resolvedRepoSource', class: Google::Apis::CloudbuildV1::RepoSource, decorator: Google::Apis::CloudbuildV1::RepoSource::Representation - property :resolved_storage_source, as: 'resolvedStorageSource', class: Google::Apis::CloudbuildV1::StorageSource, decorator: Google::Apis::CloudbuildV1::StorageSource::Representation - end end @@ -295,18 +219,6 @@ module Google end end - class Operation - # @private - class Representation < Google::Apis::Core::JsonRepresentation - hash :response, as: 'response' - property :name, as: 'name' - property :error, as: 'error', class: Google::Apis::CloudbuildV1::Status, decorator: Google::Apis::CloudbuildV1::Status::Representation - - hash :metadata, as: 'metadata' - property :done, as: 'done' - end - end - class ListBuildTriggersResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -315,6 +227,18 @@ module Google end end + class Operation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :done, as: 'done' + hash :response, as: 'response' + property :name, as: 'name' + property :error, as: 'error', class: Google::Apis::CloudbuildV1::Status, decorator: Google::Apis::CloudbuildV1::Status::Representation + + hash :metadata, as: 'metadata' + end + end + class BuiltImage # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -331,19 +255,6 @@ module Google end end - class BuildStep - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :entrypoint, as: 'entrypoint' - property :id, as: 'id' - property :dir, as: 'dir' - collection :wait_for, as: 'waitFor' - collection :env, as: 'env' - collection :args, as: 'args' - property :name, as: 'name' - end - end - class RepoSource # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -355,6 +266,19 @@ module Google end end + class BuildStep + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :name, as: 'name' + property :entrypoint, as: 'entrypoint' + property :id, as: 'id' + property :dir, as: 'dir' + collection :env, as: 'env' + collection :wait_for, as: 'waitFor' + collection :args, as: 'args' + end + end + class FileHashes # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -362,6 +286,82 @@ module Google end end + + class Status + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :message, as: 'message' + collection :details, as: 'details' + property :code, as: 'code' + end + end + + class Empty + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class BuildTrigger + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :create_time, as: 'createTime' + property :disabled, as: 'disabled' + property :trigger_template, as: 'triggerTemplate', class: Google::Apis::CloudbuildV1::RepoSource, decorator: Google::Apis::CloudbuildV1::RepoSource::Representation + + property :filename, as: 'filename' + property :id, as: 'id' + property :build, as: 'build', class: Google::Apis::CloudbuildV1::Build, decorator: Google::Apis::CloudbuildV1::Build::Representation + + hash :substitutions, as: 'substitutions' + property :description, as: 'description' + end + end + + class Build + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :options, as: 'options', class: Google::Apis::CloudbuildV1::BuildOptions, decorator: Google::Apis::CloudbuildV1::BuildOptions::Representation + + property :source, as: 'source', class: Google::Apis::CloudbuildV1::Source, decorator: Google::Apis::CloudbuildV1::Source::Representation + + property :status_detail, as: 'statusDetail' + property :status, as: 'status' + property :timeout, as: 'timeout' + property :results, as: 'results', class: Google::Apis::CloudbuildV1::Results, decorator: Google::Apis::CloudbuildV1::Results::Representation + + property :logs_bucket, as: 'logsBucket' + collection :steps, as: 'steps', class: Google::Apis::CloudbuildV1::BuildStep, decorator: Google::Apis::CloudbuildV1::BuildStep::Representation + + property :build_trigger_id, as: 'buildTriggerId' + collection :tags, as: 'tags' + property :id, as: 'id' + property :start_time, as: 'startTime' + hash :substitutions, as: 'substitutions' + property :source_provenance, as: 'sourceProvenance', class: Google::Apis::CloudbuildV1::SourceProvenance, decorator: Google::Apis::CloudbuildV1::SourceProvenance::Representation + + property :create_time, as: 'createTime' + collection :images, as: 'images' + property :project_id, as: 'projectId' + property :log_url, as: 'logUrl' + property :finish_time, as: 'finishTime' + end + end + + class CancelBuildRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class ListBuildsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :builds, as: 'builds', class: Google::Apis::CloudbuildV1::Build, decorator: Google::Apis::CloudbuildV1::Build::Representation + + end + end end end end diff --git a/generated/google/apis/cloudbuild_v1/service.rb b/generated/google/apis/cloudbuild_v1/service.rb index 3fc837b88..163c732a4 100644 --- a/generated/google/apis/cloudbuild_v1/service.rb +++ b/generated/google/apis/cloudbuild_v1/service.rb @@ -47,12 +47,13 @@ module Google @batch_path = 'batch' end - # Deletes an BuildTrigger by its project ID and trigger ID. - # This API is experimental. + # Returns information about a previously requested build. + # The Build that is returned includes its status (e.g., success or failure, + # or in-progress), and timing information. # @param [String] project_id - # ID of the project that owns the trigger. - # @param [String] trigger_id - # ID of the BuildTrigger to delete. + # ID of the project. + # @param [String] id + # ID of the build. # @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. @@ -62,20 +63,133 @@ module Google # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CloudbuildV1::Empty] parsed result object + # @yieldparam result [Google::Apis::CloudbuildV1::Build] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::CloudbuildV1::Empty] + # @return [Google::Apis::CloudbuildV1::Build] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_project_trigger(project_id, trigger_id, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1/projects/{projectId}/triggers/{triggerId}', options) - command.response_representation = Google::Apis::CloudbuildV1::Empty::Representation - command.response_class = Google::Apis::CloudbuildV1::Empty + def get_project_build(project_id, id, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/projects/{projectId}/builds/{id}', options) + command.response_representation = Google::Apis::CloudbuildV1::Build::Representation + command.response_class = Google::Apis::CloudbuildV1::Build command.params['projectId'] = project_id unless project_id.nil? - command.params['triggerId'] = trigger_id unless trigger_id.nil? + command.params['id'] = id unless id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Lists previously requested builds. + # Previously requested builds may still be in-progress, or may have finished + # successfully or unsuccessfully. + # @param [String] project_id + # ID of the project. + # @param [String] page_token + # Token to provide to skip to a particular spot in the list. + # @param [Fixnum] page_size + # Number of results to return in the list. + # @param [String] filter + # The raw filter text to constrain the results. + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudbuildV1::ListBuildsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudbuildV1::ListBuildsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_builds(project_id, page_token: nil, page_size: nil, filter: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/projects/{projectId}/builds', options) + command.response_representation = Google::Apis::CloudbuildV1::ListBuildsResponse::Representation + command.response_class = Google::Apis::CloudbuildV1::ListBuildsResponse + command.params['projectId'] = project_id unless project_id.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['filter'] = filter unless filter.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Starts a build with the specified configuration. + # The long-running Operation returned by this method will include the ID of + # the build, which can be passed to GetBuild to determine its status (e.g., + # success or failure). + # @param [String] project_id + # ID of the project. + # @param [Google::Apis::CloudbuildV1::Build] build_object + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudbuildV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudbuildV1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_project_build(project_id, build_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/projects/{projectId}/builds', options) + command.request_representation = Google::Apis::CloudbuildV1::Build::Representation + command.request_object = build_object + command.response_representation = Google::Apis::CloudbuildV1::Operation::Representation + command.response_class = Google::Apis::CloudbuildV1::Operation + command.params['projectId'] = project_id unless project_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Cancels a requested build in progress. + # @param [String] project_id + # ID of the project. + # @param [String] id + # ID of the build. + # @param [Google::Apis::CloudbuildV1::CancelBuildRequest] cancel_build_request_object + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudbuildV1::Build] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudbuildV1::Build] + # + # @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 cancel_build(project_id, id, cancel_build_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/projects/{projectId}/builds/{id}:cancel', options) + command.request_representation = Google::Apis::CloudbuildV1::CancelBuildRequest::Representation + command.request_object = cancel_build_request_object + command.response_representation = Google::Apis::CloudbuildV1::Build::Representation + command.response_class = Google::Apis::CloudbuildV1::Build + command.params['projectId'] = project_id unless project_id.nil? + command.params['id'] = id unless id.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) @@ -217,167 +331,12 @@ module Google execute_or_queue_command(command, &block) end - # Starts a build with the specified configuration. - # The long-running Operation returned by this method will include the ID of - # the build, which can be passed to GetBuild to determine its status (e.g., - # success or failure). + # Deletes an BuildTrigger by its project ID and trigger ID. + # This API is experimental. # @param [String] project_id - # ID of the project. - # @param [Google::Apis::CloudbuildV1::Build] build_object - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CloudbuildV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudbuildV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_project_build(project_id, build_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/projects/{projectId}/builds', options) - command.request_representation = Google::Apis::CloudbuildV1::Build::Representation - command.request_object = build_object - command.response_representation = Google::Apis::CloudbuildV1::Operation::Representation - command.response_class = Google::Apis::CloudbuildV1::Operation - command.params['projectId'] = project_id unless project_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Cancels a requested build in progress. - # @param [String] project_id - # ID of the project. - # @param [String] id - # ID of the build. - # @param [Google::Apis::CloudbuildV1::CancelBuildRequest] cancel_build_request_object - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CloudbuildV1::Build] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudbuildV1::Build] - # - # @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 cancel_build(project_id, id, cancel_build_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/projects/{projectId}/builds/{id}:cancel', options) - command.request_representation = Google::Apis::CloudbuildV1::CancelBuildRequest::Representation - command.request_object = cancel_build_request_object - command.response_representation = Google::Apis::CloudbuildV1::Build::Representation - command.response_class = Google::Apis::CloudbuildV1::Build - command.params['projectId'] = project_id unless project_id.nil? - command.params['id'] = id unless id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Returns information about a previously requested build. - # The Build that is returned includes its status (e.g., success or failure, - # or in-progress), and timing information. - # @param [String] project_id - # ID of the project. - # @param [String] id - # ID of the build. - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CloudbuildV1::Build] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudbuildV1::Build] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_project_build(project_id, id, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/projects/{projectId}/builds/{id}', options) - command.response_representation = Google::Apis::CloudbuildV1::Build::Representation - command.response_class = Google::Apis::CloudbuildV1::Build - command.params['projectId'] = project_id unless project_id.nil? - command.params['id'] = id unless id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Lists previously requested builds. - # Previously requested builds may still be in-progress, or may have finished - # successfully or unsuccessfully. - # @param [String] project_id - # ID of the project. - # @param [String] page_token - # Token to provide to skip to a particular spot in the list. - # @param [Fixnum] page_size - # Number of results to return in the list. - # @param [String] filter - # The raw filter text to constrain the results. - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CloudbuildV1::ListBuildsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudbuildV1::ListBuildsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_project_builds(project_id, page_token: nil, page_size: nil, filter: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/projects/{projectId}/builds', options) - command.response_representation = Google::Apis::CloudbuildV1::ListBuildsResponse::Representation - command.response_class = Google::Apis::CloudbuildV1::ListBuildsResponse - command.params['projectId'] = project_id unless project_id.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['filter'] = filter unless filter.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an Operation.error value with a google.rpc.Status.code of 1, - # corresponding to `Code.CANCELLED`. - # @param [String] name - # The name of the operation resource to be cancelled. - # @param [Google::Apis::CloudbuildV1::CancelOperationRequest] cancel_operation_request_object + # ID of the project that owns the trigger. + # @param [String] trigger_id + # ID of the BuildTrigger to delete. # @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. @@ -395,13 +354,12 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def cancel_operation(name, cancel_operation_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+name}:cancel', options) - command.request_representation = Google::Apis::CloudbuildV1::CancelOperationRequest::Representation - command.request_object = cancel_operation_request_object + def delete_project_trigger(project_id, trigger_id, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/projects/{projectId}/triggers/{triggerId}', options) command.response_representation = Google::Apis::CloudbuildV1::Empty::Representation command.response_class = Google::Apis::CloudbuildV1::Empty - command.params['name'] = name unless name.nil? + command.params['projectId'] = project_id unless project_id.nil? + command.params['triggerId'] = trigger_id unless trigger_id.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) @@ -409,10 +367,15 @@ module Google # Lists operations that match the specified filter in the request. If the # server doesn't support this method, it returns `UNIMPLEMENTED`. - # NOTE: the `name` binding below allows API services to override the binding - # to use different resource name schemes, such as `users/*/operations`. + # NOTE: the `name` binding allows API services to override the binding + # to use different resource name schemes, such as `users/*/operations`. To + # override the binding, API services can add a binding such as + # `"/v1/`name=users/*`/operations"` to their service configuration. + # For backwards compatibility, the default name includes the operations + # collection id, however overriding users must ensure the name binding + # is the parent resource, without the operations collection id. # @param [String] name - # The name of the operation collection. + # The name of the operation's parent resource. # @param [String] filter # The standard list filter. # @param [String] page_token @@ -480,6 +443,48 @@ module Google command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end + + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an Operation.error value with a google.rpc.Status.code of 1, + # corresponding to `Code.CANCELLED`. + # @param [String] name + # The name of the operation resource to be cancelled. + # @param [Google::Apis::CloudbuildV1::CancelOperationRequest] cancel_operation_request_object + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudbuildV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudbuildV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def cancel_operation(name, cancel_operation_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+name}:cancel', options) + command.request_representation = Google::Apis::CloudbuildV1::CancelOperationRequest::Representation + command.request_object = cancel_operation_request_object + command.response_representation = Google::Apis::CloudbuildV1::Empty::Representation + command.response_class = Google::Apis::CloudbuildV1::Empty + command.params['name'] = name unless name.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end protected diff --git a/generated/google/apis/clouddebugger_v2/classes.rb b/generated/google/apis/clouddebugger_v2/classes.rb index a169234fb..aa80c8eff 100644 --- a/generated/google/apis/clouddebugger_v2/classes.rb +++ b/generated/google/apis/clouddebugger_v2/classes.rb @@ -22,154 +22,6 @@ module Google module Apis module ClouddebuggerV2 - # Response for listing active breakpoints. - class ListActiveBreakpointsResponse - include Google::Apis::Core::Hashable - - # List of all active breakpoints. - # The fields `id` and `location` are guaranteed to be set on each breakpoint. - # Corresponds to the JSON property `breakpoints` - # @return [Array] - attr_accessor :breakpoints - - # The `wait_expired` field is set to true by the server when the - # request times out and the field `success_on_timeout` is set to true. - # Corresponds to the JSON property `waitExpired` - # @return [Boolean] - attr_accessor :wait_expired - alias_method :wait_expired?, :wait_expired - - # A wait token that can be used in the next method call to block until - # the list of breakpoints changes. - # Corresponds to the JSON property `nextWaitToken` - # @return [String] - attr_accessor :next_wait_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @breakpoints = args[:breakpoints] if args.key?(:breakpoints) - @wait_expired = args[:wait_expired] if args.key?(:wait_expired) - @next_wait_token = args[:next_wait_token] if args.key?(:next_wait_token) - end - end - - # Selects a repo using a Google Cloud Platform project ID - # (e.g. winged-cargo-31) and a repo name within that project. - class ProjectRepoId - include Google::Apis::Core::Hashable - - # The ID of the project. - # Corresponds to the JSON property `projectId` - # @return [String] - attr_accessor :project_id - - # The name of the repo. Leave empty for the default repo. - # Corresponds to the JSON property `repoName` - # @return [String] - attr_accessor :repo_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @project_id = args[:project_id] if args.key?(:project_id) - @repo_name = args[:repo_name] if args.key?(:repo_name) - end - end - - # A CloudWorkspaceSourceContext denotes a workspace at a particular snapshot. - class CloudWorkspaceSourceContext - include Google::Apis::Core::Hashable - - # The ID of the snapshot. - # An empty snapshot_id refers to the most recent snapshot. - # Corresponds to the JSON property `snapshotId` - # @return [String] - attr_accessor :snapshot_id - - # A CloudWorkspaceId is a unique identifier for a cloud workspace. - # A cloud workspace is a place associated with a repo where modified files - # can be stored before they are committed. - # Corresponds to the JSON property `workspaceId` - # @return [Google::Apis::ClouddebuggerV2::CloudWorkspaceId] - attr_accessor :workspace_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @snapshot_id = args[:snapshot_id] if args.key?(:snapshot_id) - @workspace_id = args[:workspace_id] if args.key?(:workspace_id) - end - end - - # Response for updating an active breakpoint. - # The message is defined to allow future extensions. - class UpdateActiveBreakpointResponse - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # A SourceContext referring to a Gerrit project. - class GerritSourceContext - include Google::Apis::Core::Hashable - - # The URI of a running Gerrit instance. - # Corresponds to the JSON property `hostUri` - # @return [String] - attr_accessor :host_uri - - # A revision (commit) ID. - # Corresponds to the JSON property `revisionId` - # @return [String] - attr_accessor :revision_id - - # The name of an alias (branch, tag, etc.). - # Corresponds to the JSON property `aliasName` - # @return [String] - attr_accessor :alias_name - - # The full project name within the host. Projects may be nested, so - # "project/subproject" is a valid project name. - # The "repo name" is hostURI/project. - # Corresponds to the JSON property `gerritProject` - # @return [String] - attr_accessor :gerrit_project - - # An alias to a repo revision. - # Corresponds to the JSON property `aliasContext` - # @return [Google::Apis::ClouddebuggerV2::AliasContext] - attr_accessor :alias_context - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @host_uri = args[:host_uri] if args.key?(:host_uri) - @revision_id = args[:revision_id] if args.key?(:revision_id) - @alias_name = args[:alias_name] if args.key?(:alias_name) - @gerrit_project = args[:gerrit_project] if args.key?(:gerrit_project) - @alias_context = args[:alias_context] if args.key?(:alias_context) - end - end - # A CloudWorkspaceId is a unique identifier for a cloud workspace. # A cloud workspace is a place associated with a repo where modified files # can be stored before they are committed. @@ -202,6 +54,12 @@ module Google class ListBreakpointsResponse include Google::Apis::Core::Hashable + # A wait token that can be used in the next call to `list` (REST) or + # `ListBreakpoints` (RPC) to block until the list of breakpoints has changes. + # Corresponds to the JSON property `nextWaitToken` + # @return [String] + attr_accessor :next_wait_token + # List of breakpoints matching the request. # The fields `id` and `location` are guaranteed to be set on each breakpoint. # The fields: `stack_frames`, `evaluated_expressions` and `variable_table` @@ -210,20 +68,14 @@ module Google # @return [Array] attr_accessor :breakpoints - # A wait token that can be used in the next call to `list` (REST) or - # `ListBreakpoints` (RPC) to block until the list of breakpoints has changes. - # Corresponds to the JSON property `nextWaitToken` - # @return [String] - attr_accessor :next_wait_token - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @breakpoints = args[:breakpoints] if args.key?(:breakpoints) @next_wait_token = args[:next_wait_token] if args.key?(:next_wait_token) + @breakpoints = args[:breakpoints] if args.key?(:breakpoints) end end @@ -231,6 +83,17 @@ module Google class Breakpoint include Google::Apis::Core::Hashable + # Represents a location in the source code. + # Corresponds to the JSON property `location` + # @return [Google::Apis::ClouddebuggerV2::SourceLocation] + attr_accessor :location + + # Time this breakpoint was finalized as seen by the server in seconds + # resolution. + # Corresponds to the JSON property `finalTime` + # @return [String] + attr_accessor :final_time + # The `variable_table` exists to aid with computation, memory and network # traffic optimization. It enables storing a variable once and reference # it from multiple variables, including variables stored in the @@ -336,23 +199,14 @@ module Google # @return [String] attr_accessor :id - # Represents a location in the source code. - # Corresponds to the JSON property `location` - # @return [Google::Apis::ClouddebuggerV2::SourceLocation] - attr_accessor :location - - # Time this breakpoint was finalized as seen by the server in seconds - # resolution. - # Corresponds to the JSON property `finalTime` - # @return [String] - attr_accessor :final_time - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @location = args[:location] if args.key?(:location) + @final_time = args[:final_time] if args.key?(:final_time) @variable_table = args[:variable_table] if args.key?(:variable_table) @labels = args[:labels] if args.key?(:labels) @log_message_format = args[:log_message_format] if args.key?(:log_message_format) @@ -367,8 +221,6 @@ module Google @action = args[:action] if args.key?(:action) @log_level = args[:log_level] if args.key?(:log_level) @id = args[:id] if args.key?(:id) - @location = args[:location] if args.key?(:location) - @final_time = args[:final_time] if args.key?(:final_time) end end @@ -415,12 +267,6 @@ module Google class SourceContext include Google::Apis::Core::Hashable - # A GitSourceContext denotes a particular revision in a third party Git - # repository (e.g. GitHub). - # Corresponds to the JSON property `git` - # @return [Google::Apis::ClouddebuggerV2::GitSourceContext] - attr_accessor :git - # A SourceContext referring to a Gerrit project. # Corresponds to the JSON property `gerrit` # @return [Google::Apis::ClouddebuggerV2::GerritSourceContext] @@ -437,16 +283,22 @@ module Google # @return [Google::Apis::ClouddebuggerV2::CloudWorkspaceSourceContext] attr_accessor :cloud_workspace + # A GitSourceContext denotes a particular revision in a third party Git + # repository (e.g. GitHub). + # Corresponds to the JSON property `git` + # @return [Google::Apis::ClouddebuggerV2::GitSourceContext] + attr_accessor :git + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @git = args[:git] if args.key?(:git) @gerrit = args[:gerrit] if args.key?(:gerrit) @cloud_repo = args[:cloud_repo] if args.key?(:cloud_repo) @cloud_workspace = args[:cloud_workspace] if args.key?(:cloud_workspace) + @git = args[:git] if args.key?(:git) end end @@ -455,11 +307,6 @@ module Google class CloudRepoSourceContext include Google::Apis::Core::Hashable - # The name of an alias (branch, tag, etc.). - # Corresponds to the JSON property `aliasName` - # @return [String] - attr_accessor :alias_name - # A unique identifier for a cloud repo. # Corresponds to the JSON property `repoId` # @return [Google::Apis::ClouddebuggerV2::RepoId] @@ -475,21 +322,26 @@ module Google # @return [String] attr_accessor :revision_id + # The name of an alias (branch, tag, etc.). + # Corresponds to the JSON property `aliasName` + # @return [String] + attr_accessor :alias_name + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @alias_name = args[:alias_name] if args.key?(:alias_name) @repo_id = args[:repo_id] if args.key?(:repo_id) @alias_context = args[:alias_context] if args.key?(:alias_context) @revision_id = args[:revision_id] if args.key?(:revision_id) + @alias_name = args[:alias_name] if args.key?(:alias_name) end end - # Request to register a debuggee. - class RegisterDebuggeeRequest + # Response for registering a debuggee. + class RegisterDebuggeeResponse include Google::Apis::Core::Hashable # Represents the application to debug. The application may include one or more @@ -511,8 +363,8 @@ module Google end end - # Response for registering a debuggee. - class RegisterDebuggeeResponse + # Request to register a debuggee. + class RegisterDebuggeeRequest include Google::Apis::Core::Hashable # Represents the application to debug. The application may include one or more @@ -594,25 +446,25 @@ module Google class GitSourceContext include Google::Apis::Core::Hashable - # Git repository URL. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - # Git commit hash. # required. # Corresponds to the JSON property `revisionId` # @return [String] attr_accessor :revision_id + # Git repository URL. + # Corresponds to the JSON property `url` + # @return [String] + attr_accessor :url + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @url = args[:url] if args.key?(:url) @revision_id = args[:revision_id] if args.key?(:revision_id) + @url = args[:url] if args.key?(:url) end end @@ -759,12 +611,6 @@ module Google class StackFrame include Google::Apis::Core::Hashable - # Set of local variables at the stack frame location. - # Note that this might not be populated for all stack frames. - # Corresponds to the JSON property `locals` - # @return [Array] - attr_accessor :locals - # Represents a location in the source code. # Corresponds to the JSON property `location` # @return [Google::Apis::ClouddebuggerV2::SourceLocation] @@ -781,16 +627,22 @@ module Google # @return [Array] attr_accessor :arguments + # Set of local variables at the stack frame location. + # Note that this might not be populated for all stack frames. + # Corresponds to the JSON property `locals` + # @return [Array] + attr_accessor :locals + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @locals = args[:locals] if args.key?(:locals) @location = args[:location] if args.key?(:location) @function = args[:function] if args.key?(:function) @arguments = args[:arguments] if args.key?(:arguments) + @locals = args[:locals] if args.key?(:locals) end end @@ -798,25 +650,25 @@ module Google class RepoId include Google::Apis::Core::Hashable + # A server-assigned, globally unique identifier. + # Corresponds to the JSON property `uid` + # @return [String] + attr_accessor :uid + # Selects a repo using a Google Cloud Platform project ID # (e.g. winged-cargo-31) and a repo name within that project. # Corresponds to the JSON property `projectRepoId` # @return [Google::Apis::ClouddebuggerV2::ProjectRepoId] attr_accessor :project_repo_id - # A server-assigned, globally unique identifier. - # Corresponds to the JSON property `uid` - # @return [String] - attr_accessor :uid - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @project_repo_id = args[:project_repo_id] if args.key?(:project_repo_id) @uid = args[:uid] if args.key?(:uid) + @project_repo_id = args[:project_repo_id] if args.key?(:project_repo_id) end end @@ -949,24 +801,24 @@ module Google class SourceLocation include Google::Apis::Core::Hashable - # Line inside the file. The first line in the file has the value `1`. - # Corresponds to the JSON property `line` - # @return [Fixnum] - attr_accessor :line - # Path to the source file within the source context of the target binary. # Corresponds to the JSON property `path` # @return [String] attr_accessor :path + # Line inside the file. The first line in the file has the value `1`. + # Corresponds to the JSON property `line` + # @return [Fixnum] + attr_accessor :line + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @line = args[:line] if args.key?(:line) @path = args[:path] if args.key?(:path) + @line = args[:line] if args.key?(:line) end end @@ -978,12 +830,38 @@ module Google class Debuggee include Google::Apis::Core::Hashable - # If set to `true`, indicates that the agent should disable itself and - # detach from the debuggee. - # Corresponds to the JSON property `isDisabled` + # A set of custom debuggee properties, populated by the agent, to be + # displayed to the user. + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # If set to `true`, indicates that the debuggee is considered as inactive by + # the Controller service. + # Corresponds to the JSON property `isInactive` # @return [Boolean] - attr_accessor :is_disabled - alias_method :is_disabled?, :is_disabled + attr_accessor :is_inactive + alias_method :is_inactive?, :is_inactive + + # Represents a contextual status message. + # The message can indicate an error or informational status, and refer to + # specific parts of the containing object. + # For example, the `Breakpoint.status` field can indicate an error referring + # to the `BREAKPOINT_SOURCE_LOCATION` with the message `Location not found`. + # Corresponds to the JSON property `status` + # @return [Google::Apis::ClouddebuggerV2::StatusMessage] + attr_accessor :status + + # Project the debuggee is associated with. + # Use the project number when registering a Google Cloud Platform project. + # Corresponds to the JSON property `project` + # @return [String] + attr_accessor :project + + # Unique identifier for the debuggee generated by the controller service. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id # Version ID of the agent release. The version ID is structured as # following: `domain/type/vmajor.minor` (for example @@ -992,17 +870,12 @@ module Google # @return [String] attr_accessor :agent_version - # Unique identifier for the debuggee generated by the controller service. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Human readable description of the debuggee. - # Including a human-readable project name, environment name and version - # information is recommended. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description + # If set to `true`, indicates that the agent should disable itself and + # detach from the debuggee. + # Corresponds to the JSON property `isDisabled` + # @return [Boolean] + attr_accessor :is_disabled + alias_method :is_disabled?, :is_disabled # Debuggee uniquifier within the project. # Any string that identifies the application within the project can be used. @@ -1011,6 +884,13 @@ module Google # @return [String] attr_accessor :uniquifier + # Human readable description of the debuggee. + # Including a human-readable project name, environment name and version + # information is recommended. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + # References to the locations and revisions of the source code used in the # deployed application. # NOTE: This field is deprecated. Consumers should use @@ -1029,33 +909,48 @@ module Google # @return [Array] attr_accessor :ext_source_contexts - # A set of custom debuggee properties, populated by the agent, to be - # displayed to the user. - # Corresponds to the JSON property `labels` - # @return [Hash] - attr_accessor :labels + def initialize(**args) + update!(**args) + end - # Represents a contextual status message. - # The message can indicate an error or informational status, and refer to - # specific parts of the containing object. - # For example, the `Breakpoint.status` field can indicate an error referring - # to the `BREAKPOINT_SOURCE_LOCATION` with the message `Location not found`. - # Corresponds to the JSON property `status` - # @return [Google::Apis::ClouddebuggerV2::StatusMessage] - attr_accessor :status + # Update properties of this object + def update!(**args) + @labels = args[:labels] if args.key?(:labels) + @is_inactive = args[:is_inactive] if args.key?(:is_inactive) + @status = args[:status] if args.key?(:status) + @project = args[:project] if args.key?(:project) + @id = args[:id] if args.key?(:id) + @agent_version = args[:agent_version] if args.key?(:agent_version) + @is_disabled = args[:is_disabled] if args.key?(:is_disabled) + @uniquifier = args[:uniquifier] if args.key?(:uniquifier) + @description = args[:description] if args.key?(:description) + @source_contexts = args[:source_contexts] if args.key?(:source_contexts) + @ext_source_contexts = args[:ext_source_contexts] if args.key?(:ext_source_contexts) + end + end - # If set to `true`, indicates that the debuggee is considered as inactive by - # the Controller service. - # Corresponds to the JSON property `isInactive` - # @return [Boolean] - attr_accessor :is_inactive - alias_method :is_inactive?, :is_inactive + # Response for listing active breakpoints. + class ListActiveBreakpointsResponse + include Google::Apis::Core::Hashable - # Project the debuggee is associated with. - # Use the project number when registering a Google Cloud Platform project. - # Corresponds to the JSON property `project` + # A wait token that can be used in the next method call to block until + # the list of breakpoints changes. + # Corresponds to the JSON property `nextWaitToken` # @return [String] - attr_accessor :project + attr_accessor :next_wait_token + + # List of all active breakpoints. + # The fields `id` and `location` are guaranteed to be set on each breakpoint. + # Corresponds to the JSON property `breakpoints` + # @return [Array] + attr_accessor :breakpoints + + # The `wait_expired` field is set to true by the server when the + # request times out and the field `success_on_timeout` is set to true. + # Corresponds to the JSON property `waitExpired` + # @return [Boolean] + attr_accessor :wait_expired + alias_method :wait_expired?, :wait_expired def initialize(**args) update!(**args) @@ -1063,17 +958,122 @@ module Google # Update properties of this object def update!(**args) - @is_disabled = args[:is_disabled] if args.key?(:is_disabled) - @agent_version = args[:agent_version] if args.key?(:agent_version) - @id = args[:id] if args.key?(:id) - @description = args[:description] if args.key?(:description) - @uniquifier = args[:uniquifier] if args.key?(:uniquifier) - @source_contexts = args[:source_contexts] if args.key?(:source_contexts) - @ext_source_contexts = args[:ext_source_contexts] if args.key?(:ext_source_contexts) - @labels = args[:labels] if args.key?(:labels) - @status = args[:status] if args.key?(:status) - @is_inactive = args[:is_inactive] if args.key?(:is_inactive) - @project = args[:project] if args.key?(:project) + @next_wait_token = args[:next_wait_token] if args.key?(:next_wait_token) + @breakpoints = args[:breakpoints] if args.key?(:breakpoints) + @wait_expired = args[:wait_expired] if args.key?(:wait_expired) + end + end + + # Selects a repo using a Google Cloud Platform project ID + # (e.g. winged-cargo-31) and a repo name within that project. + class ProjectRepoId + include Google::Apis::Core::Hashable + + # The ID of the project. + # Corresponds to the JSON property `projectId` + # @return [String] + attr_accessor :project_id + + # The name of the repo. Leave empty for the default repo. + # Corresponds to the JSON property `repoName` + # @return [String] + attr_accessor :repo_name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @project_id = args[:project_id] if args.key?(:project_id) + @repo_name = args[:repo_name] if args.key?(:repo_name) + end + end + + # A CloudWorkspaceSourceContext denotes a workspace at a particular snapshot. + class CloudWorkspaceSourceContext + include Google::Apis::Core::Hashable + + # A CloudWorkspaceId is a unique identifier for a cloud workspace. + # A cloud workspace is a place associated with a repo where modified files + # can be stored before they are committed. + # Corresponds to the JSON property `workspaceId` + # @return [Google::Apis::ClouddebuggerV2::CloudWorkspaceId] + attr_accessor :workspace_id + + # The ID of the snapshot. + # An empty snapshot_id refers to the most recent snapshot. + # Corresponds to the JSON property `snapshotId` + # @return [String] + attr_accessor :snapshot_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @workspace_id = args[:workspace_id] if args.key?(:workspace_id) + @snapshot_id = args[:snapshot_id] if args.key?(:snapshot_id) + end + end + + # Response for updating an active breakpoint. + # The message is defined to allow future extensions. + class UpdateActiveBreakpointResponse + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # A SourceContext referring to a Gerrit project. + class GerritSourceContext + include Google::Apis::Core::Hashable + + # The URI of a running Gerrit instance. + # Corresponds to the JSON property `hostUri` + # @return [String] + attr_accessor :host_uri + + # A revision (commit) ID. + # Corresponds to the JSON property `revisionId` + # @return [String] + attr_accessor :revision_id + + # The name of an alias (branch, tag, etc.). + # Corresponds to the JSON property `aliasName` + # @return [String] + attr_accessor :alias_name + + # The full project name within the host. Projects may be nested, so + # "project/subproject" is a valid project name. + # The "repo name" is hostURI/project. + # Corresponds to the JSON property `gerritProject` + # @return [String] + attr_accessor :gerrit_project + + # An alias to a repo revision. + # Corresponds to the JSON property `aliasContext` + # @return [Google::Apis::ClouddebuggerV2::AliasContext] + attr_accessor :alias_context + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @host_uri = args[:host_uri] if args.key?(:host_uri) + @revision_id = args[:revision_id] if args.key?(:revision_id) + @alias_name = args[:alias_name] if args.key?(:alias_name) + @gerrit_project = args[:gerrit_project] if args.key?(:gerrit_project) + @alias_context = args[:alias_context] if args.key?(:alias_context) end end end diff --git a/generated/google/apis/clouddebugger_v2/representations.rb b/generated/google/apis/clouddebugger_v2/representations.rb index 99a6ebab7..9c4a931e9 100644 --- a/generated/google/apis/clouddebugger_v2/representations.rb +++ b/generated/google/apis/clouddebugger_v2/representations.rb @@ -22,36 +22,6 @@ module Google module Apis module ClouddebuggerV2 - class ListActiveBreakpointsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ProjectRepoId - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CloudWorkspaceSourceContext - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateActiveBreakpointResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class GerritSourceContext - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class CloudWorkspaceId class Representation < Google::Apis::Core::JsonRepresentation; end @@ -94,13 +64,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class RegisterDebuggeeRequest + class RegisterDebuggeeResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class RegisterDebuggeeResponse + class RegisterDebuggeeRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -185,48 +155,33 @@ module Google end class ListActiveBreakpointsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :breakpoints, as: 'breakpoints', class: Google::Apis::ClouddebuggerV2::Breakpoint, decorator: Google::Apis::ClouddebuggerV2::Breakpoint::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :wait_expired, as: 'waitExpired' - property :next_wait_token, as: 'nextWaitToken' - end + include Google::Apis::Core::JsonObjectSupport end class ProjectRepoId - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :project_id, as: 'projectId' - property :repo_name, as: 'repoName' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class CloudWorkspaceSourceContext - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :snapshot_id, as: 'snapshotId' - property :workspace_id, as: 'workspaceId', class: Google::Apis::ClouddebuggerV2::CloudWorkspaceId, decorator: Google::Apis::ClouddebuggerV2::CloudWorkspaceId::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class UpdateActiveBreakpointResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class GerritSourceContext - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :host_uri, as: 'hostUri' - property :revision_id, as: 'revisionId' - property :alias_name, as: 'aliasName' - property :gerrit_project, as: 'gerritProject' - property :alias_context, as: 'aliasContext', class: Google::Apis::ClouddebuggerV2::AliasContext, decorator: Google::Apis::ClouddebuggerV2::AliasContext::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class CloudWorkspaceId @@ -241,15 +196,18 @@ module Google class ListBreakpointsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation + property :next_wait_token, as: 'nextWaitToken' collection :breakpoints, as: 'breakpoints', class: Google::Apis::ClouddebuggerV2::Breakpoint, decorator: Google::Apis::ClouddebuggerV2::Breakpoint::Representation - property :next_wait_token, as: 'nextWaitToken' end end class Breakpoint # @private class Representation < Google::Apis::Core::JsonRepresentation + property :location, as: 'location', class: Google::Apis::ClouddebuggerV2::SourceLocation, decorator: Google::Apis::ClouddebuggerV2::SourceLocation::Representation + + property :final_time, as: 'finalTime' collection :variable_table, as: 'variableTable', class: Google::Apis::ClouddebuggerV2::Variable, decorator: Google::Apis::ClouddebuggerV2::Variable::Representation hash :labels, as: 'labels' @@ -268,9 +226,6 @@ module Google property :action, as: 'action' property :log_level, as: 'logLevel' property :id, as: 'id' - property :location, as: 'location', class: Google::Apis::ClouddebuggerV2::SourceLocation, decorator: Google::Apis::ClouddebuggerV2::SourceLocation::Representation - - property :final_time, as: 'finalTime' end end @@ -293,30 +248,30 @@ module Google class SourceContext # @private class Representation < Google::Apis::Core::JsonRepresentation - property :git, as: 'git', class: Google::Apis::ClouddebuggerV2::GitSourceContext, decorator: Google::Apis::ClouddebuggerV2::GitSourceContext::Representation - property :gerrit, as: 'gerrit', class: Google::Apis::ClouddebuggerV2::GerritSourceContext, decorator: Google::Apis::ClouddebuggerV2::GerritSourceContext::Representation property :cloud_repo, as: 'cloudRepo', class: Google::Apis::ClouddebuggerV2::CloudRepoSourceContext, decorator: Google::Apis::ClouddebuggerV2::CloudRepoSourceContext::Representation property :cloud_workspace, as: 'cloudWorkspace', class: Google::Apis::ClouddebuggerV2::CloudWorkspaceSourceContext, decorator: Google::Apis::ClouddebuggerV2::CloudWorkspaceSourceContext::Representation + property :git, as: 'git', class: Google::Apis::ClouddebuggerV2::GitSourceContext, decorator: Google::Apis::ClouddebuggerV2::GitSourceContext::Representation + end end class CloudRepoSourceContext # @private class Representation < Google::Apis::Core::JsonRepresentation - property :alias_name, as: 'aliasName' property :repo_id, as: 'repoId', class: Google::Apis::ClouddebuggerV2::RepoId, decorator: Google::Apis::ClouddebuggerV2::RepoId::Representation property :alias_context, as: 'aliasContext', class: Google::Apis::ClouddebuggerV2::AliasContext, decorator: Google::Apis::ClouddebuggerV2::AliasContext::Representation property :revision_id, as: 'revisionId' + property :alias_name, as: 'aliasName' end end - class RegisterDebuggeeRequest + class RegisterDebuggeeResponse # @private class Representation < Google::Apis::Core::JsonRepresentation property :debuggee, as: 'debuggee', class: Google::Apis::ClouddebuggerV2::Debuggee, decorator: Google::Apis::ClouddebuggerV2::Debuggee::Representation @@ -324,7 +279,7 @@ module Google end end - class RegisterDebuggeeResponse + class RegisterDebuggeeRequest # @private class Representation < Google::Apis::Core::JsonRepresentation property :debuggee, as: 'debuggee', class: Google::Apis::ClouddebuggerV2::Debuggee, decorator: Google::Apis::ClouddebuggerV2::Debuggee::Representation @@ -353,8 +308,8 @@ module Google class GitSourceContext # @private class Representation < Google::Apis::Core::JsonRepresentation - property :url, as: 'url' property :revision_id, as: 'revisionId' + property :url, as: 'url' end end @@ -375,22 +330,22 @@ module Google class StackFrame # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :locals, as: 'locals', class: Google::Apis::ClouddebuggerV2::Variable, decorator: Google::Apis::ClouddebuggerV2::Variable::Representation - property :location, as: 'location', class: Google::Apis::ClouddebuggerV2::SourceLocation, decorator: Google::Apis::ClouddebuggerV2::SourceLocation::Representation property :function, as: 'function' collection :arguments, as: 'arguments', class: Google::Apis::ClouddebuggerV2::Variable, decorator: Google::Apis::ClouddebuggerV2::Variable::Representation + collection :locals, as: 'locals', class: Google::Apis::ClouddebuggerV2::Variable, decorator: Google::Apis::ClouddebuggerV2::Variable::Representation + end end class RepoId # @private class Representation < Google::Apis::Core::JsonRepresentation + property :uid, as: 'uid' property :project_repo_id, as: 'projectRepoId', class: Google::Apis::ClouddebuggerV2::ProjectRepoId, decorator: Google::Apis::ClouddebuggerV2::ProjectRepoId::Representation - property :uid, as: 'uid' end end @@ -436,28 +391,73 @@ module Google class SourceLocation # @private class Representation < Google::Apis::Core::JsonRepresentation - property :line, as: 'line' property :path, as: 'path' + property :line, as: 'line' end end class Debuggee # @private class Representation < Google::Apis::Core::JsonRepresentation - property :is_disabled, as: 'isDisabled' - property :agent_version, as: 'agentVersion' + hash :labels, as: 'labels' + property :is_inactive, as: 'isInactive' + property :status, as: 'status', class: Google::Apis::ClouddebuggerV2::StatusMessage, decorator: Google::Apis::ClouddebuggerV2::StatusMessage::Representation + + property :project, as: 'project' property :id, as: 'id' - property :description, as: 'description' + property :agent_version, as: 'agentVersion' + property :is_disabled, as: 'isDisabled' property :uniquifier, as: 'uniquifier' + property :description, as: 'description' collection :source_contexts, as: 'sourceContexts', class: Google::Apis::ClouddebuggerV2::SourceContext, decorator: Google::Apis::ClouddebuggerV2::SourceContext::Representation collection :ext_source_contexts, as: 'extSourceContexts', class: Google::Apis::ClouddebuggerV2::ExtendedSourceContext, decorator: Google::Apis::ClouddebuggerV2::ExtendedSourceContext::Representation - hash :labels, as: 'labels' - property :status, as: 'status', class: Google::Apis::ClouddebuggerV2::StatusMessage, decorator: Google::Apis::ClouddebuggerV2::StatusMessage::Representation + end + end + + class ListActiveBreakpointsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_wait_token, as: 'nextWaitToken' + collection :breakpoints, as: 'breakpoints', class: Google::Apis::ClouddebuggerV2::Breakpoint, decorator: Google::Apis::ClouddebuggerV2::Breakpoint::Representation + + property :wait_expired, as: 'waitExpired' + end + end + + class ProjectRepoId + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :project_id, as: 'projectId' + property :repo_name, as: 'repoName' + end + end + + class CloudWorkspaceSourceContext + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :workspace_id, as: 'workspaceId', class: Google::Apis::ClouddebuggerV2::CloudWorkspaceId, decorator: Google::Apis::ClouddebuggerV2::CloudWorkspaceId::Representation + + property :snapshot_id, as: 'snapshotId' + end + end + + class UpdateActiveBreakpointResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class GerritSourceContext + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :host_uri, as: 'hostUri' + property :revision_id, as: 'revisionId' + property :alias_name, as: 'aliasName' + property :gerrit_project, as: 'gerritProject' + property :alias_context, as: 'aliasContext', class: Google::Apis::ClouddebuggerV2::AliasContext, decorator: Google::Apis::ClouddebuggerV2::AliasContext::Representation - property :is_inactive, as: 'isInactive' - property :project, as: 'project' end end end diff --git a/generated/google/apis/clouddebugger_v2/service.rb b/generated/google/apis/clouddebugger_v2/service.rb index d51131a5e..d5dc6dee4 100644 --- a/generated/google/apis/clouddebugger_v2/service.rb +++ b/generated/google/apis/clouddebugger_v2/service.rb @@ -33,21 +33,226 @@ module Google # # @see http://cloud.google.com/debugger class CloudDebuggerService < Google::Apis::Core::BaseService - # @return [String] - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - attr_accessor :quota_user - # @return [String] # API key. Your API key identifies your project and provides you with API access, # quota, and reports. Required unless you provide an OAuth 2.0 token. attr_accessor :key + # @return [String] + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + attr_accessor :quota_user + def initialize super('https://clouddebugger.googleapis.com/', '') @batch_path = 'batch' end + # Lists all the debuggees that the user can set breakpoints to. + # @param [String] project + # Project number of a Google Cloud project whose debuggees to list. + # @param [String] client_version + # The client version making the call. + # Following: `domain/type/version` (e.g., `google.com/intellij/v1`). + # @param [Boolean] include_inactive + # When set to `true`, the result includes all debuggees. Otherwise, the + # result includes only debuggees that are active. + # @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::ClouddebuggerV2::ListDebuggeesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClouddebuggerV2::ListDebuggeesResponse] + # + # @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_debugger_debuggees(project: nil, client_version: nil, include_inactive: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/debugger/debuggees', options) + command.response_representation = Google::Apis::ClouddebuggerV2::ListDebuggeesResponse::Representation + command.response_class = Google::Apis::ClouddebuggerV2::ListDebuggeesResponse + command.query['project'] = project unless project.nil? + command.query['clientVersion'] = client_version unless client_version.nil? + command.query['includeInactive'] = include_inactive unless include_inactive.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 breakpoint to the debuggee. + # @param [String] debuggee_id + # ID of the debuggee where the breakpoint is to be set. + # @param [Google::Apis::ClouddebuggerV2::Breakpoint] breakpoint_object + # @param [String] client_version + # The client version making the call. + # Following: `domain/type/version` (e.g., `google.com/intellij/v1`). + # @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::ClouddebuggerV2::SetBreakpointResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClouddebuggerV2::SetBreakpointResponse] + # + # @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_debugger_debuggee_breakpoint(debuggee_id, breakpoint_object = nil, client_version: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2/debugger/debuggees/{debuggeeId}/breakpoints/set', options) + command.request_representation = Google::Apis::ClouddebuggerV2::Breakpoint::Representation + command.request_object = breakpoint_object + command.response_representation = Google::Apis::ClouddebuggerV2::SetBreakpointResponse::Representation + command.response_class = Google::Apis::ClouddebuggerV2::SetBreakpointResponse + command.params['debuggeeId'] = debuggee_id unless debuggee_id.nil? + command.query['clientVersion'] = client_version unless client_version.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes the breakpoint from the debuggee. + # @param [String] debuggee_id + # ID of the debuggee whose breakpoint to delete. + # @param [String] breakpoint_id + # ID of the breakpoint to delete. + # @param [String] client_version + # The client version making the call. + # Following: `domain/type/version` (e.g., `google.com/intellij/v1`). + # @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::ClouddebuggerV2::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClouddebuggerV2::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_debugger_debuggee_breakpoint(debuggee_id, breakpoint_id, client_version: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v2/debugger/debuggees/{debuggeeId}/breakpoints/{breakpointId}', options) + command.response_representation = Google::Apis::ClouddebuggerV2::Empty::Representation + command.response_class = Google::Apis::ClouddebuggerV2::Empty + command.params['debuggeeId'] = debuggee_id unless debuggee_id.nil? + command.params['breakpointId'] = breakpoint_id unless breakpoint_id.nil? + command.query['clientVersion'] = client_version unless client_version.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets breakpoint information. + # @param [String] debuggee_id + # ID of the debuggee whose breakpoint to get. + # @param [String] breakpoint_id + # ID of the breakpoint to get. + # @param [String] client_version + # The client version making the call. + # Following: `domain/type/version` (e.g., `google.com/intellij/v1`). + # @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::ClouddebuggerV2::GetBreakpointResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClouddebuggerV2::GetBreakpointResponse] + # + # @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_debugger_debuggee_breakpoint(debuggee_id, breakpoint_id, client_version: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/debugger/debuggees/{debuggeeId}/breakpoints/{breakpointId}', options) + command.response_representation = Google::Apis::ClouddebuggerV2::GetBreakpointResponse::Representation + command.response_class = Google::Apis::ClouddebuggerV2::GetBreakpointResponse + command.params['debuggeeId'] = debuggee_id unless debuggee_id.nil? + command.params['breakpointId'] = breakpoint_id unless breakpoint_id.nil? + command.query['clientVersion'] = client_version unless client_version.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 all breakpoints for the debuggee. + # @param [String] debuggee_id + # ID of the debuggee whose breakpoints to list. + # @param [Boolean] strip_results + # This field is deprecated. The following fields are always stripped out of + # the result: `stack_frames`, `evaluated_expressions` and `variable_table`. + # @param [String] wait_token + # A wait token that, if specified, blocks the call until the breakpoints + # list has changed, or a server selected timeout has expired. The value + # should be set from the last response. The error code + # `google.rpc.Code.ABORTED` (RPC) is returned on wait timeout, which + # should be called again with the same `wait_token`. + # @param [String] action_value + # Only breakpoints with the specified action will pass the filter. + # @param [String] client_version + # The client version making the call. + # Following: `domain/type/version` (e.g., `google.com/intellij/v1`). + # @param [Boolean] include_inactive + # When set to `true`, the response includes active and inactive + # breakpoints. Otherwise, it includes only active breakpoints. + # @param [Boolean] include_all_users + # When set to `true`, the response includes the list of breakpoints set by + # any user. Otherwise, it includes only breakpoints set by the caller. + # @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::ClouddebuggerV2::ListBreakpointsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClouddebuggerV2::ListBreakpointsResponse] + # + # @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_debugger_debuggee_breakpoints(debuggee_id, strip_results: nil, wait_token: nil, action_value: nil, client_version: nil, include_inactive: nil, include_all_users: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/debugger/debuggees/{debuggeeId}/breakpoints', options) + command.response_representation = Google::Apis::ClouddebuggerV2::ListBreakpointsResponse::Representation + command.response_class = Google::Apis::ClouddebuggerV2::ListBreakpointsResponse + command.params['debuggeeId'] = debuggee_id unless debuggee_id.nil? + command.query['stripResults'] = strip_results unless strip_results.nil? + command.query['waitToken'] = wait_token unless wait_token.nil? + command.query['action.value'] = action_value unless action_value.nil? + command.query['clientVersion'] = client_version unless client_version.nil? + command.query['includeInactive'] = include_inactive unless include_inactive.nil? + command.query['includeAllUsers'] = include_all_users unless include_all_users.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Registers the debuggee with the controller service. # All agents attached to the same application should call this method with # the same request content to get back the same stable `debuggee_id`. Agents @@ -57,11 +262,11 @@ module Google # data loss. If the debuggee is disabled by the server, the response will # have `is_disabled` set to `true`. # @param [Google::Apis::ClouddebuggerV2::RegisterDebuggeeRequest] register_debuggee_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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -74,14 +279,14 @@ 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 register_debuggee(register_debuggee_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def register_debuggee(register_debuggee_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2/controller/debuggees/register', options) command.request_representation = Google::Apis::ClouddebuggerV2::RegisterDebuggeeRequest::Representation command.request_object = register_debuggee_request_object command.response_representation = Google::Apis::ClouddebuggerV2::RegisterDebuggeeResponse::Representation command.response_class = Google::Apis::ClouddebuggerV2::RegisterDebuggeeResponse - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -98,21 +303,21 @@ module Google # setting those breakpoints again. # @param [String] debuggee_id # Identifies the debuggee. + # @param [String] wait_token + # A wait token that, if specified, blocks the method call until the list + # of active breakpoints has changed, or a server selected timeout has + # expired. The value should be set from the last returned response. # @param [Boolean] success_on_timeout # If set to `true`, returns `google.rpc.Code.OK` status and sets the # `wait_expired` response field to `true` when the server-selected timeout # has expired (recommended). # If set to `false`, returns `google.rpc.Code.ABORTED` status when the # server-selected timeout has expired (deprecated). - # @param [String] wait_token - # A wait token that, if specified, blocks the method call until the list - # of active breakpoints has changed, or a server selected timeout has - # expired. The value should be set from the last returned response. + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -125,15 +330,15 @@ 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_controller_debuggee_breakpoints(debuggee_id, success_on_timeout: nil, wait_token: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_controller_debuggee_breakpoints(debuggee_id, wait_token: nil, success_on_timeout: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/controller/debuggees/{debuggeeId}/breakpoints', options) command.response_representation = Google::Apis::ClouddebuggerV2::ListActiveBreakpointsResponse::Representation command.response_class = Google::Apis::ClouddebuggerV2::ListActiveBreakpointsResponse command.params['debuggeeId'] = debuggee_id unless debuggee_id.nil? - command.query['successOnTimeout'] = success_on_timeout unless success_on_timeout.nil? command.query['waitToken'] = wait_token unless wait_token.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['successOnTimeout'] = success_on_timeout unless success_on_timeout.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -150,11 +355,11 @@ module Google # @param [String] id # Breakpoint identifier, unique in the scope of the debuggee. # @param [Google::Apis::ClouddebuggerV2::UpdateActiveBreakpointRequest] update_active_breakpoint_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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -167,7 +372,7 @@ 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 update_active_breakpoint(debuggee_id, id, update_active_breakpoint_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def update_active_breakpoint(debuggee_id, id, update_active_breakpoint_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:put, 'v2/controller/debuggees/{debuggeeId}/breakpoints/{id}', options) command.request_representation = Google::Apis::ClouddebuggerV2::UpdateActiveBreakpointRequest::Representation command.request_object = update_active_breakpoint_request_object @@ -175,221 +380,16 @@ module Google command.response_class = Google::Apis::ClouddebuggerV2::UpdateActiveBreakpointResponse command.params['debuggeeId'] = debuggee_id unless debuggee_id.nil? command.params['id'] = id unless id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Lists all the debuggees that the user can set breakpoints to. - # @param [String] client_version - # The client version making the call. - # Following: `domain/type/version` (e.g., `google.com/intellij/v1`). - # @param [Boolean] include_inactive - # When set to `true`, the result includes all debuggees. Otherwise, the - # result includes only debuggees that are active. - # @param [String] project - # Project number of a Google Cloud project whose debuggees to list. - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClouddebuggerV2::ListDebuggeesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClouddebuggerV2::ListDebuggeesResponse] - # - # @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_debugger_debuggees(client_version: nil, include_inactive: nil, project: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v2/debugger/debuggees', options) - command.response_representation = Google::Apis::ClouddebuggerV2::ListDebuggeesResponse::Representation - command.response_class = Google::Apis::ClouddebuggerV2::ListDebuggeesResponse - command.query['clientVersion'] = client_version unless client_version.nil? - command.query['includeInactive'] = include_inactive unless include_inactive.nil? - command.query['project'] = project unless project.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Sets the breakpoint to the debuggee. - # @param [String] debuggee_id - # ID of the debuggee where the breakpoint is to be set. - # @param [Google::Apis::ClouddebuggerV2::Breakpoint] breakpoint_object - # @param [String] client_version - # The client version making the call. - # Following: `domain/type/version` (e.g., `google.com/intellij/v1`). - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClouddebuggerV2::SetBreakpointResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClouddebuggerV2::SetBreakpointResponse] - # - # @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_debugger_debuggee_breakpoint(debuggee_id, breakpoint_object = nil, client_version: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v2/debugger/debuggees/{debuggeeId}/breakpoints/set', options) - command.request_representation = Google::Apis::ClouddebuggerV2::Breakpoint::Representation - command.request_object = breakpoint_object - command.response_representation = Google::Apis::ClouddebuggerV2::SetBreakpointResponse::Representation - command.response_class = Google::Apis::ClouddebuggerV2::SetBreakpointResponse - command.params['debuggeeId'] = debuggee_id unless debuggee_id.nil? - command.query['clientVersion'] = client_version unless client_version.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Deletes the breakpoint from the debuggee. - # @param [String] debuggee_id - # ID of the debuggee whose breakpoint to delete. - # @param [String] breakpoint_id - # ID of the breakpoint to delete. - # @param [String] client_version - # The client version making the call. - # Following: `domain/type/version` (e.g., `google.com/intellij/v1`). - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClouddebuggerV2::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClouddebuggerV2::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_debugger_debuggee_breakpoint(debuggee_id, breakpoint_id, client_version: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:delete, 'v2/debugger/debuggees/{debuggeeId}/breakpoints/{breakpointId}', options) - command.response_representation = Google::Apis::ClouddebuggerV2::Empty::Representation - command.response_class = Google::Apis::ClouddebuggerV2::Empty - command.params['debuggeeId'] = debuggee_id unless debuggee_id.nil? - command.params['breakpointId'] = breakpoint_id unless breakpoint_id.nil? - command.query['clientVersion'] = client_version unless client_version.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Gets breakpoint information. - # @param [String] debuggee_id - # ID of the debuggee whose breakpoint to get. - # @param [String] breakpoint_id - # ID of the breakpoint to get. - # @param [String] client_version - # The client version making the call. - # Following: `domain/type/version` (e.g., `google.com/intellij/v1`). - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClouddebuggerV2::GetBreakpointResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClouddebuggerV2::GetBreakpointResponse] - # - # @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_debugger_debuggee_breakpoint(debuggee_id, breakpoint_id, client_version: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v2/debugger/debuggees/{debuggeeId}/breakpoints/{breakpointId}', options) - command.response_representation = Google::Apis::ClouddebuggerV2::GetBreakpointResponse::Representation - command.response_class = Google::Apis::ClouddebuggerV2::GetBreakpointResponse - command.params['debuggeeId'] = debuggee_id unless debuggee_id.nil? - command.params['breakpointId'] = breakpoint_id unless breakpoint_id.nil? - command.query['clientVersion'] = client_version unless client_version.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Lists all breakpoints for the debuggee. - # @param [String] debuggee_id - # ID of the debuggee whose breakpoints to list. - # @param [Boolean] strip_results - # This field is deprecated. The following fields are always stripped out of - # the result: `stack_frames`, `evaluated_expressions` and `variable_table`. - # @param [String] wait_token - # A wait token that, if specified, blocks the call until the breakpoints - # list has changed, or a server selected timeout has expired. The value - # should be set from the last response. The error code - # `google.rpc.Code.ABORTED` (RPC) is returned on wait timeout, which - # should be called again with the same `wait_token`. - # @param [String] client_version - # The client version making the call. - # Following: `domain/type/version` (e.g., `google.com/intellij/v1`). - # @param [String] action_value - # Only breakpoints with the specified action will pass the filter. - # @param [Boolean] include_inactive - # When set to `true`, the response includes active and inactive - # breakpoints. Otherwise, it includes only active breakpoints. - # @param [Boolean] include_all_users - # When set to `true`, the response includes the list of breakpoints set by - # any user. Otherwise, it includes only breakpoints set by the caller. - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClouddebuggerV2::ListBreakpointsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClouddebuggerV2::ListBreakpointsResponse] - # - # @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_debugger_debuggee_breakpoints(debuggee_id, strip_results: nil, wait_token: nil, client_version: nil, action_value: nil, include_inactive: nil, include_all_users: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v2/debugger/debuggees/{debuggeeId}/breakpoints', options) - command.response_representation = Google::Apis::ClouddebuggerV2::ListBreakpointsResponse::Representation - command.response_class = Google::Apis::ClouddebuggerV2::ListBreakpointsResponse - command.params['debuggeeId'] = debuggee_id unless debuggee_id.nil? - command.query['stripResults'] = strip_results unless strip_results.nil? - command.query['waitToken'] = wait_token unless wait_token.nil? - command.query['clientVersion'] = client_version unless client_version.nil? - command.query['action.value'] = action_value unless action_value.nil? - command.query['includeInactive'] = include_inactive unless include_inactive.nil? - command.query['includeAllUsers'] = include_all_users unless include_all_users.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end protected def apply_command_defaults(command) - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['key'] = key unless key.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? end end end diff --git a/generated/google/apis/clouderrorreporting_v1beta1.rb b/generated/google/apis/clouderrorreporting_v1beta1.rb index e2852a75c..3622bd6b5 100644 --- a/generated/google/apis/clouderrorreporting_v1beta1.rb +++ b/generated/google/apis/clouderrorreporting_v1beta1.rb @@ -20,14 +20,13 @@ module Google module Apis # Stackdriver Error Reporting API # - # Stackdriver Error Reporting groups and counts similar errors from cloud - # services. The Stackdriver Error Reporting API provides a way to report new - # errors and read access to error groups and their associated errors. + # Groups and counts similar errors from cloud services and applications, reports + # new errors, and provides access to error groups and their associated errors. # # @see https://cloud.google.com/error-reporting/ module ClouderrorreportingV1beta1 VERSION = 'V1beta1' - REVISION = '20170414' + REVISION = '20170517' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/clouderrorreporting_v1beta1/classes.rb b/generated/google/apis/clouderrorreporting_v1beta1/classes.rb index 655a0c89e..a29435ee3 100644 --- a/generated/google/apis/clouderrorreporting_v1beta1/classes.rb +++ b/generated/google/apis/clouderrorreporting_v1beta1/classes.rb @@ -22,61 +22,10 @@ module Google module Apis module ClouderrorreportingV1beta1 - # An error event which is returned by the Error Reporting system. - class ErrorEvent - include Google::Apis::Core::Hashable - - # A description of the context in which an error occurred. - # This data should be provided by the application when reporting an error, - # unless the - # error report has been generated automatically from Google App Engine logs. - # Corresponds to the JSON property `context` - # @return [Google::Apis::ClouderrorreportingV1beta1::ErrorContext] - attr_accessor :context - - # The stack trace that was reported or logged by the service. - # Corresponds to the JSON property `message` - # @return [String] - attr_accessor :message - - # Describes a running service that sends errors. - # Its version changes over time and multiple versions can run in parallel. - # Corresponds to the JSON property `serviceContext` - # @return [Google::Apis::ClouderrorreportingV1beta1::ServiceContext] - attr_accessor :service_context - - # Time when the event occurred as provided in the error report. - # If the report did not contain a timestamp, the time the error was received - # by the Error Reporting system is used. - # Corresponds to the JSON property `eventTime` - # @return [String] - attr_accessor :event_time - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @context = args[:context] if args.key?(:context) - @message = args[:message] if args.key?(:message) - @service_context = args[:service_context] if args.key?(:service_context) - @event_time = args[:event_time] if args.key?(:event_time) - end - end - # An error event which is reported to the Error Reporting system. class ReportedErrorEvent include Google::Apis::Core::Hashable - # A description of the context in which an error occurred. - # This data should be provided by the application when reporting an error, - # unless the - # error report has been generated automatically from Google App Engine logs. - # Corresponds to the JSON property `context` - # @return [Google::Apis::ClouderrorreportingV1beta1::ErrorContext] - attr_accessor :context - # [Required] The error message. # If no `context.reportLocation` is provided, the message must contain a # header (typically consisting of the exception type name and an error @@ -118,16 +67,24 @@ module Google # @return [String] attr_accessor :event_time + # A description of the context in which an error occurred. + # This data should be provided by the application when reporting an error, + # unless the + # error report has been generated automatically from Google App Engine logs. + # Corresponds to the JSON property `context` + # @return [Google::Apis::ClouderrorreportingV1beta1::ErrorContext] + attr_accessor :context + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @context = args[:context] if args.key?(:context) @message = args[:message] if args.key?(:message) @service_context = args[:service_context] if args.key?(:service_context) @event_time = args[:event_time] if args.key?(:event_time) + @context = args[:context] if args.key?(:context) end end @@ -138,6 +95,28 @@ module Google class ErrorContext include Google::Apis::Core::Hashable + # Indicates a location in the source code of the service for which errors are + # reported. `functionName` must be provided by the application when reporting + # an error, unless the error report contains a `message` with a supported + # exception stack trace. All fields are optional for the later case. + # Corresponds to the JSON property `reportLocation` + # @return [Google::Apis::ClouderrorreportingV1beta1::SourceLocation] + attr_accessor :report_location + + # Source code that was used to build the executable which has + # caused the given error message. + # Corresponds to the JSON property `sourceReferences` + # @return [Array] + attr_accessor :source_references + + # HTTP request data that is related to a reported error. + # This data should be provided by the application when reporting an error, + # unless the + # error report has been generated automatically from Google App Engine logs. + # Corresponds to the JSON property `httpRequest` + # @return [Google::Apis::ClouderrorreportingV1beta1::HttpRequestContext] + attr_accessor :http_request + # The user who caused or was affected by the crash. # This can be a user ID, an email address, or an arbitrary token that # uniquely identifies the user. @@ -150,31 +129,16 @@ module Google # @return [String] attr_accessor :user - # Indicates a location in the source code of the service for which errors are - # reported. `functionName` must be provided by the application when reporting - # an error, unless the error report contains a `message` with a supported - # exception stack trace. All fields are optional for the later case. - # Corresponds to the JSON property `reportLocation` - # @return [Google::Apis::ClouderrorreportingV1beta1::SourceLocation] - attr_accessor :report_location - - # HTTP request data that is related to a reported error. - # This data should be provided by the application when reporting an error, - # unless the - # error report has been generated automatically from Google App Engine logs. - # Corresponds to the JSON property `httpRequest` - # @return [Google::Apis::ClouderrorreportingV1beta1::HttpRequestContext] - attr_accessor :http_request - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @user = args[:user] if args.key?(:user) @report_location = args[:report_location] if args.key?(:report_location) + @source_references = args[:source_references] if args.key?(:source_references) @http_request = args[:http_request] if args.key?(:http_request) + @user = args[:user] if args.key?(:user) end end @@ -203,6 +167,20 @@ module Google class ErrorGroupStats include Google::Apis::Core::Hashable + # An error event which is returned by the Error Reporting system. + # Corresponds to the JSON property `representative` + # @return [Google::Apis::ClouderrorreportingV1beta1::ErrorEvent] + attr_accessor :representative + + # Approximate number of occurrences over time. + # Timed counts returned by ListGroups are guaranteed to be: + # - Inside the requested time interval + # - Non-overlapping, and + # - Ordered by ascending time. + # Corresponds to the JSON property `timedCounts` + # @return [Array] + attr_accessor :timed_counts + # Description of a group of similar error events. # Corresponds to the JSON property `group` # @return [Google::Apis::ClouderrorreportingV1beta1::ErrorGroup] @@ -221,6 +199,13 @@ module Google # @return [Fixnum] attr_accessor :count + # Approximate last occurrence that was ever seen for this group and + # which matches the given filter criteria, ignoring the time_range + # that was specified in the request. + # Corresponds to the JSON property `lastSeenTime` + # @return [String] + attr_accessor :last_seen_time + # Approximate number of affected users in the given group that # match the filter criteria. # Users are distinguished by data in the `ErrorContext` of the @@ -237,13 +222,6 @@ module Google # @return [Fixnum] attr_accessor :affected_users_count - # Approximate last occurrence that was ever seen for this group and - # which matches the given filter criteria, ignoring the time_range - # that was specified in the request. - # Corresponds to the JSON property `lastSeenTime` - # @return [String] - attr_accessor :last_seen_time - # The total number of services with a non-zero error count for the given # filter criteria. # Corresponds to the JSON property `numAffectedServices` @@ -257,35 +235,21 @@ module Google # @return [Array] attr_accessor :affected_services - # An error event which is returned by the Error Reporting system. - # Corresponds to the JSON property `representative` - # @return [Google::Apis::ClouderrorreportingV1beta1::ErrorEvent] - attr_accessor :representative - - # Approximate number of occurrences over time. - # Timed counts returned by ListGroups are guaranteed to be: - # - Inside the requested time interval - # - Non-overlapping, and - # - Ordered by ascending time. - # Corresponds to the JSON property `timedCounts` - # @return [Array] - attr_accessor :timed_counts - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @representative = args[:representative] if args.key?(:representative) + @timed_counts = args[:timed_counts] if args.key?(:timed_counts) @group = args[:group] if args.key?(:group) @first_seen_time = args[:first_seen_time] if args.key?(:first_seen_time) @count = args[:count] if args.key?(:count) - @affected_users_count = args[:affected_users_count] if args.key?(:affected_users_count) @last_seen_time = args[:last_seen_time] if args.key?(:last_seen_time) + @affected_users_count = args[:affected_users_count] if args.key?(:affected_users_count) @num_affected_services = args[:num_affected_services] if args.key?(:num_affected_services) @affected_services = args[:affected_services] if args.key?(:affected_services) - @representative = args[:representative] if args.key?(:representative) - @timed_counts = args[:timed_counts] if args.key?(:timed_counts) end end @@ -293,6 +257,13 @@ module Google class ListEventsResponse include Google::Apis::Core::Hashable + # If non-empty, more results are available. + # Pass this token, along with the same query parameters as the first + # request, to view the next page of results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + # The timestamp specifies the start time to which the request was restricted. # Corresponds to the JSON property `timeRangeBegin` # @return [String] @@ -303,22 +274,15 @@ module Google # @return [Array] attr_accessor :error_events - # If non-empty, more results are available. - # Pass this token, along with the same query parameters as the first - # request, to view the next page of results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) @time_range_begin = args[:time_range_begin] if args.key?(:time_range_begin) @error_events = args[:error_events] if args.key?(:error_events) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) end end @@ -359,12 +323,6 @@ module Google class ErrorGroup include Google::Apis::Core::Hashable - # The group resource name. - # Example: projects/my-project-123/groups/my-groupid - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - # Group IDs are unique for a given project. If the same kind of error # occurs in different service contexts, it will receive the same group ID. # Corresponds to the JSON property `groupId` @@ -376,58 +334,21 @@ module Google # @return [Array] attr_accessor :tracking_issues + # The group resource name. + # Example: projects/my-project-123/groups/my-groupid + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @name = args[:name] if args.key?(:name) @group_id = args[:group_id] if args.key?(:group_id) @tracking_issues = args[:tracking_issues] if args.key?(:tracking_issues) - end - end - - # Describes a running service that sends errors. - # Its version changes over time and multiple versions can run in parallel. - class ServiceContext - include Google::Apis::Core::Hashable - - # Represents the source code version that the developer provided, - # which could represent a version label or a Git SHA-1 hash, for example. - # For App Engine standard environment, the version is set to the version of - # the app. - # Corresponds to the JSON property `version` - # @return [String] - attr_accessor :version - - # An identifier of the service, such as the name of the - # executable, job, or Google App Engine service name. This field is expected - # to have a low number of values that are relatively stable over time, as - # opposed to `version`, which can be changed whenever new code is deployed. - # Contains the service name for error reports extracted from Google - # App Engine logs or `default` if the App Engine default service is used. - # Corresponds to the JSON property `service` - # @return [String] - attr_accessor :service - - # Type of the MonitoredResource. List of possible values: - # https://cloud.google.com/monitoring/api/resources - # Value is set automatically for incoming errors and must not be set when - # reporting errors. - # Corresponds to the JSON property `resourceType` - # @return [String] - attr_accessor :resource_type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @version = args[:version] if args.key?(:version) - @service = args[:service] if args.key?(:service) - @resource_type = args[:resource_type] if args.key?(:resource_type) + @name = args[:name] if args.key?(:name) end end @@ -468,6 +389,49 @@ module Google end end + # Describes a running service that sends errors. + # Its version changes over time and multiple versions can run in parallel. + class ServiceContext + include Google::Apis::Core::Hashable + + # Type of the MonitoredResource. List of possible values: + # https://cloud.google.com/monitoring/api/resources + # Value is set automatically for incoming errors and must not be set when + # reporting errors. + # Corresponds to the JSON property `resourceType` + # @return [String] + attr_accessor :resource_type + + # Represents the source code version that the developer provided, + # which could represent a version label or a Git SHA-1 hash, for example. + # For App Engine standard environment, the version is set to the version of + # the app. + # Corresponds to the JSON property `version` + # @return [String] + attr_accessor :version + + # An identifier of the service, such as the name of the + # executable, job, or Google App Engine service name. This field is expected + # to have a low number of values that are relatively stable over time, as + # opposed to `version`, which can be changed whenever new code is deployed. + # Contains the service name for error reports extracted from Google + # App Engine logs or `default` if the App Engine default service is used. + # 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) + @resource_type = args[:resource_type] if args.key?(:resource_type) + @version = args[:version] if args.key?(:version) + @service = args[:service] if args.key?(:service) + end + end + # Response for reporting an individual error event. # Data may be added to this message in the future. class ReportErrorEventResponse @@ -489,6 +453,16 @@ module Google class HttpRequestContext include Google::Apis::Core::Hashable + # The URL of the request. + # Corresponds to the JSON property `url` + # @return [String] + attr_accessor :url + + # The HTTP response status code for the request. + # Corresponds to the JSON property `responseStatusCode` + # @return [Fixnum] + attr_accessor :response_status_code + # The type of HTTP request, such as `GET`, `POST`, etc. # Corresponds to the JSON property `method` # @return [String] @@ -512,28 +486,18 @@ module Google # @return [String] attr_accessor :user_agent - # The URL of the request. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - # The HTTP response status code for the request. - # Corresponds to the JSON property `responseStatusCode` - # @return [Fixnum] - attr_accessor :response_status_code - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @url = args[:url] if args.key?(:url) + @response_status_code = args[:response_status_code] if args.key?(:response_status_code) @method_prop = args[:method_prop] if args.key?(:method_prop) @remote_ip = args[:remote_ip] if args.key?(:remote_ip) @referrer = args[:referrer] if args.key?(:referrer) @user_agent = args[:user_agent] if args.key?(:user_agent) - @url = args[:url] if args.key?(:url) - @response_status_code = args[:response_status_code] if args.key?(:response_status_code) end end @@ -541,6 +505,13 @@ module Google class ListGroupStatsResponse include Google::Apis::Core::Hashable + # If non-empty, more results are available. + # Pass this token, along with the same query parameters as the first + # request, to view the next page of results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + # The timestamp specifies the start time to which the request was restricted. # The start time is set based on the requested time range. It may be adjusted # to a later time if a project has exceeded the storage quota and older data @@ -554,22 +525,15 @@ module Google # @return [Array] attr_accessor :error_group_stats - # If non-empty, more results are available. - # Pass this token, along with the same query parameters as the first - # request, to view the next page of results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) @time_range_begin = args[:time_range_begin] if args.key?(:time_range_begin) @error_group_stats = args[:error_group_stats] if args.key?(:error_group_stats) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) end end @@ -585,6 +549,77 @@ module Google def update!(**args) end end + + # A reference to a particular snapshot of the source tree used to build and + # deploy an application. + class SourceReference + include Google::Apis::Core::Hashable + + # Optional. A URI string identifying the repository. + # Example: "https://github.com/GoogleCloudPlatform/kubernetes.git" + # Corresponds to the JSON property `repository` + # @return [String] + attr_accessor :repository + + # The canonical and persistent identifier of the deployed revision. + # Example (git): "0035781c50ec7aa23385dc841529ce8a4b70db1b" + # Corresponds to the JSON property `revisionId` + # @return [String] + attr_accessor :revision_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @repository = args[:repository] if args.key?(:repository) + @revision_id = args[:revision_id] if args.key?(:revision_id) + end + end + + # An error event which is returned by the Error Reporting system. + class ErrorEvent + include Google::Apis::Core::Hashable + + # Describes a running service that sends errors. + # Its version changes over time and multiple versions can run in parallel. + # Corresponds to the JSON property `serviceContext` + # @return [Google::Apis::ClouderrorreportingV1beta1::ServiceContext] + attr_accessor :service_context + + # Time when the event occurred as provided in the error report. + # If the report did not contain a timestamp, the time the error was received + # by the Error Reporting system is used. + # Corresponds to the JSON property `eventTime` + # @return [String] + attr_accessor :event_time + + # A description of the context in which an error occurred. + # This data should be provided by the application when reporting an error, + # unless the + # error report has been generated automatically from Google App Engine logs. + # Corresponds to the JSON property `context` + # @return [Google::Apis::ClouderrorreportingV1beta1::ErrorContext] + attr_accessor :context + + # The stack trace that was reported or logged by the service. + # Corresponds to the JSON property `message` + # @return [String] + attr_accessor :message + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @service_context = args[:service_context] if args.key?(:service_context) + @event_time = args[:event_time] if args.key?(:event_time) + @context = args[:context] if args.key?(:context) + @message = args[:message] if args.key?(:message) + end + end end end end diff --git a/generated/google/apis/clouderrorreporting_v1beta1/representations.rb b/generated/google/apis/clouderrorreporting_v1beta1/representations.rb index cfac590f9..99c720e69 100644 --- a/generated/google/apis/clouderrorreporting_v1beta1/representations.rb +++ b/generated/google/apis/clouderrorreporting_v1beta1/representations.rb @@ -22,12 +22,6 @@ module Google module Apis module ClouderrorreportingV1beta1 - class ErrorEvent - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class ReportedErrorEvent class Representation < Google::Apis::Core::JsonRepresentation; end @@ -70,13 +64,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class ServiceContext + class SourceLocation class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class SourceLocation + class ServiceContext class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -106,38 +100,40 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class SourceReference + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class ErrorEvent - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :context, as: 'context', class: Google::Apis::ClouderrorreportingV1beta1::ErrorContext, decorator: Google::Apis::ClouderrorreportingV1beta1::ErrorContext::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :message, as: 'message' - property :service_context, as: 'serviceContext', class: Google::Apis::ClouderrorreportingV1beta1::ServiceContext, decorator: Google::Apis::ClouderrorreportingV1beta1::ServiceContext::Representation - - property :event_time, as: 'eventTime' - end + include Google::Apis::Core::JsonObjectSupport end class ReportedErrorEvent # @private class Representation < Google::Apis::Core::JsonRepresentation - property :context, as: 'context', class: Google::Apis::ClouderrorreportingV1beta1::ErrorContext, decorator: Google::Apis::ClouderrorreportingV1beta1::ErrorContext::Representation - property :message, as: 'message' property :service_context, as: 'serviceContext', class: Google::Apis::ClouderrorreportingV1beta1::ServiceContext, decorator: Google::Apis::ClouderrorreportingV1beta1::ServiceContext::Representation property :event_time, as: 'eventTime' + property :context, as: 'context', class: Google::Apis::ClouderrorreportingV1beta1::ErrorContext, decorator: Google::Apis::ClouderrorreportingV1beta1::ErrorContext::Representation + end end class ErrorContext # @private class Representation < Google::Apis::Core::JsonRepresentation - property :user, as: 'user' property :report_location, as: 'reportLocation', class: Google::Apis::ClouderrorreportingV1beta1::SourceLocation, decorator: Google::Apis::ClouderrorreportingV1beta1::SourceLocation::Representation + collection :source_references, as: 'sourceReferences', class: Google::Apis::ClouderrorreportingV1beta1::SourceReference, decorator: Google::Apis::ClouderrorreportingV1beta1::SourceReference::Representation + property :http_request, as: 'httpRequest', class: Google::Apis::ClouderrorreportingV1beta1::HttpRequestContext, decorator: Google::Apis::ClouderrorreportingV1beta1::HttpRequestContext::Representation + property :user, as: 'user' end end @@ -151,29 +147,29 @@ module Google class ErrorGroupStats # @private class Representation < Google::Apis::Core::JsonRepresentation + property :representative, as: 'representative', class: Google::Apis::ClouderrorreportingV1beta1::ErrorEvent, decorator: Google::Apis::ClouderrorreportingV1beta1::ErrorEvent::Representation + + collection :timed_counts, as: 'timedCounts', class: Google::Apis::ClouderrorreportingV1beta1::TimedCount, decorator: Google::Apis::ClouderrorreportingV1beta1::TimedCount::Representation + property :group, as: 'group', class: Google::Apis::ClouderrorreportingV1beta1::ErrorGroup, decorator: Google::Apis::ClouderrorreportingV1beta1::ErrorGroup::Representation property :first_seen_time, as: 'firstSeenTime' property :count, :numeric_string => true, as: 'count' - property :affected_users_count, :numeric_string => true, as: 'affectedUsersCount' property :last_seen_time, as: 'lastSeenTime' + property :affected_users_count, :numeric_string => true, as: 'affectedUsersCount' property :num_affected_services, as: 'numAffectedServices' collection :affected_services, as: 'affectedServices', class: Google::Apis::ClouderrorreportingV1beta1::ServiceContext, decorator: Google::Apis::ClouderrorreportingV1beta1::ServiceContext::Representation - property :representative, as: 'representative', class: Google::Apis::ClouderrorreportingV1beta1::ErrorEvent, decorator: Google::Apis::ClouderrorreportingV1beta1::ErrorEvent::Representation - - collection :timed_counts, as: 'timedCounts', class: Google::Apis::ClouderrorreportingV1beta1::TimedCount, decorator: Google::Apis::ClouderrorreportingV1beta1::TimedCount::Representation - end end class ListEventsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' property :time_range_begin, as: 'timeRangeBegin' collection :error_events, as: 'errorEvents', class: Google::Apis::ClouderrorreportingV1beta1::ErrorEvent, decorator: Google::Apis::ClouderrorreportingV1beta1::ErrorEvent::Representation - property :next_page_token, as: 'nextPageToken' end end @@ -189,19 +185,10 @@ module Google class ErrorGroup # @private class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' property :group_id, as: 'groupId' collection :tracking_issues, as: 'trackingIssues', class: Google::Apis::ClouderrorreportingV1beta1::TrackingIssue, decorator: Google::Apis::ClouderrorreportingV1beta1::TrackingIssue::Representation - end - end - - class ServiceContext - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :version, as: 'version' - property :service, as: 'service' - property :resource_type, as: 'resourceType' + property :name, as: 'name' end end @@ -214,6 +201,15 @@ module Google end end + class ServiceContext + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :resource_type, as: 'resourceType' + property :version, as: 'version' + property :service, as: 'service' + end + end + class ReportErrorEventResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -223,22 +219,22 @@ module Google class HttpRequestContext # @private class Representation < Google::Apis::Core::JsonRepresentation + property :url, as: 'url' + property :response_status_code, as: 'responseStatusCode' property :method_prop, as: 'method' property :remote_ip, as: 'remoteIp' property :referrer, as: 'referrer' property :user_agent, as: 'userAgent' - property :url, as: 'url' - property :response_status_code, as: 'responseStatusCode' end end class ListGroupStatsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' property :time_range_begin, as: 'timeRangeBegin' collection :error_group_stats, as: 'errorGroupStats', class: Google::Apis::ClouderrorreportingV1beta1::ErrorGroupStats, decorator: Google::Apis::ClouderrorreportingV1beta1::ErrorGroupStats::Representation - property :next_page_token, as: 'nextPageToken' end end @@ -247,6 +243,26 @@ module Google class Representation < Google::Apis::Core::JsonRepresentation end end + + class SourceReference + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :repository, as: 'repository' + property :revision_id, as: 'revisionId' + end + end + + class ErrorEvent + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :service_context, as: 'serviceContext', class: Google::Apis::ClouderrorreportingV1beta1::ServiceContext, decorator: Google::Apis::ClouderrorreportingV1beta1::ServiceContext::Representation + + property :event_time, as: 'eventTime' + property :context, as: 'context', class: Google::Apis::ClouderrorreportingV1beta1::ErrorContext, decorator: Google::Apis::ClouderrorreportingV1beta1::ErrorContext::Representation + + property :message, as: 'message' + end + end end end end diff --git a/generated/google/apis/clouderrorreporting_v1beta1/service.rb b/generated/google/apis/clouderrorreporting_v1beta1/service.rb index fbcd69ead..99b3fa527 100644 --- a/generated/google/apis/clouderrorreporting_v1beta1/service.rb +++ b/generated/google/apis/clouderrorreporting_v1beta1/service.rb @@ -22,9 +22,8 @@ module Google module ClouderrorreportingV1beta1 # Stackdriver Error Reporting API # - # Stackdriver Error Reporting groups and counts similar errors from cloud - # services. The Stackdriver Error Reporting API provides a way to report new - # errors and read access to error groups and their associated errors. + # Groups and counts similar errors from cloud services and applications, reports + # new errors, and provides access to error groups and their associated errors. # # @example # require 'google/apis/clouderrorreporting_v1beta1' @@ -56,11 +55,11 @@ module Google # [Google Cloud Platform project # ID](https://support.google.com/cloud/answer/6158840). # Example: `projects/my-project-123`. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -73,13 +72,13 @@ 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 delete_project_events(project_name, fields: nil, quota_user: nil, options: nil, &block) + def delete_project_events(project_name, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:delete, 'v1beta1/{+projectName}/events', options) command.response_representation = Google::Apis::ClouderrorreportingV1beta1::DeleteEventsResponse::Representation command.response_class = Google::Apis::ClouderrorreportingV1beta1::DeleteEventsResponse command.params['projectName'] = project_name unless project_name.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -98,11 +97,11 @@ module Google # 6158840). # Example: `projects/my-project-123`. # @param [Google::Apis::ClouderrorreportingV1beta1::ReportedErrorEvent] reported_error_event_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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -115,15 +114,15 @@ 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 report_project_event(project_name, reported_error_event_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def report_project_event(project_name, reported_error_event_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta1/{+projectName}/events:report', options) command.request_representation = Google::Apis::ClouderrorreportingV1beta1::ReportedErrorEvent::Representation command.request_object = reported_error_event_object command.response_representation = Google::Apis::ClouderrorreportingV1beta1::ReportErrorEventResponse::Representation command.response_class = Google::Apis::ClouderrorreportingV1beta1::ReportErrorEventResponse command.params['projectName'] = project_name unless project_name.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -134,6 +133,14 @@ module Google # [Google Cloud Platform project # ID](https://support.google.com/cloud/answer/6158840). # Example: `projects/my-project-123`. + # @param [String] service_filter_resource_type + # [Optional] The exact value to match against + # [`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ + # ServiceContext#FIELDS.resource_type). + # @param [String] time_range_period + # Restricts the query to the specified time range. + # @param [String] group_id + # [Required] The group for which events shall be returned. # @param [String] page_token # [Optional] A `next_page_token` provided by a previous response. # @param [String] service_filter_service @@ -146,19 +153,11 @@ module Google # [Optional] The exact value to match against # [`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ # ServiceContext#FIELDS.version). - # @param [String] service_filter_resource_type - # [Optional] The exact value to match against - # [`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ - # ServiceContext#FIELDS.resource_type). - # @param [String] time_range_period - # Restricts the query to the specified time range. - # @param [String] group_id - # [Required] The group for which events shall be returned. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -171,20 +170,20 @@ 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_project_events(project_name, page_token: nil, service_filter_service: nil, page_size: nil, service_filter_version: nil, service_filter_resource_type: nil, time_range_period: nil, group_id: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_project_events(project_name, service_filter_resource_type: nil, time_range_period: nil, group_id: nil, page_token: nil, service_filter_service: nil, page_size: nil, service_filter_version: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1beta1/{+projectName}/events', options) command.response_representation = Google::Apis::ClouderrorreportingV1beta1::ListEventsResponse::Representation command.response_class = Google::Apis::ClouderrorreportingV1beta1::ListEventsResponse command.params['projectName'] = project_name unless project_name.nil? + command.query['serviceFilter.resourceType'] = service_filter_resource_type unless service_filter_resource_type.nil? + command.query['timeRange.period'] = time_range_period unless time_range_period.nil? + command.query['groupId'] = group_id unless group_id.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['serviceFilter.service'] = service_filter_service unless service_filter_service.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['serviceFilter.version'] = service_filter_version unless service_filter_version.nil? - command.query['serviceFilter.resourceType'] = service_filter_resource_type unless service_filter_resource_type.nil? - command.query['timeRange.period'] = time_range_period unless time_range_period.nil? - command.query['groupId'] = group_id unless group_id.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -197,11 +196,11 @@ module Google # groupStats.list to return a list of groups belonging to # this project. # Example: projects/my-project-123/groups/my-group - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -214,13 +213,13 @@ 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 get_project_group(group_name, fields: nil, quota_user: nil, options: nil, &block) + def get_project_group(group_name, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1beta1/{+groupName}', options) command.response_representation = Google::Apis::ClouderrorreportingV1beta1::ErrorGroup::Representation command.response_class = Google::Apis::ClouderrorreportingV1beta1::ErrorGroup command.params['groupName'] = group_name unless group_name.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -230,11 +229,11 @@ module Google # The group resource name. # Example: projects/my-project-123/groups/my-groupid # @param [Google::Apis::ClouderrorreportingV1beta1::ErrorGroup] error_group_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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -247,15 +246,15 @@ 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 update_project_group(name, error_group_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def update_project_group(name, error_group_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:put, 'v1beta1/{+name}', options) command.request_representation = Google::Apis::ClouderrorreportingV1beta1::ErrorGroup::Representation command.request_object = error_group_object command.response_representation = Google::Apis::ClouderrorreportingV1beta1::ErrorGroup::Representation command.response_class = Google::Apis::ClouderrorreportingV1beta1::ErrorGroup command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -266,6 +265,13 @@ module Google # Google Cloud # Platform project ID. # Example: projects/my-project-123. + # @param [String] timed_count_duration + # [Optional] The preferred duration for a single returned `TimedCount`. + # If not set, no timed counts are returned. + # @param [String] page_token + # [Optional] A `next_page_token` provided by a previous response. To view + # additional results, pass this token along with the identical query + # parameters as the first request. # @param [String] time_range_period # Restricts the query to the specified time range. # @param [String] alignment @@ -280,13 +286,13 @@ module Google # @param [Fixnum] page_size # [Optional] The maximum number of results to return per response. # Default is 20. - # @param [String] order - # [Optional] The sort order in which the results are returned. - # Default is `COUNT_DESC`. # @param [String] service_filter_version # [Optional] The exact value to match against # [`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ # ServiceContext#FIELDS.version). + # @param [String] order + # [Optional] The sort order in which the results are returned. + # Default is `COUNT_DESC`. # @param [String] service_filter_resource_type # [Optional] The exact value to match against # [`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ @@ -294,18 +300,11 @@ module Google # @param [String] alignment_time # [Optional] Time where the timed counts shall be aligned if rounded # alignment is chosen. Default is 00:00 UTC. - # @param [String] timed_count_duration - # [Optional] The preferred duration for a single returned `TimedCount`. - # If not set, no timed counts are returned. - # @param [String] page_token - # [Optional] A `next_page_token` provided by a previous response. To view - # additional results, pass this token along with the identical query - # parameters as the first request. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -318,24 +317,24 @@ 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_project_group_stats(project_name, time_range_period: nil, alignment: nil, group_id: nil, service_filter_service: nil, page_size: nil, order: nil, service_filter_version: nil, service_filter_resource_type: nil, alignment_time: nil, timed_count_duration: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_project_group_stats(project_name, timed_count_duration: nil, page_token: nil, time_range_period: nil, alignment: nil, group_id: nil, service_filter_service: nil, page_size: nil, service_filter_version: nil, order: nil, service_filter_resource_type: nil, alignment_time: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1beta1/{+projectName}/groupStats', options) command.response_representation = Google::Apis::ClouderrorreportingV1beta1::ListGroupStatsResponse::Representation command.response_class = Google::Apis::ClouderrorreportingV1beta1::ListGroupStatsResponse command.params['projectName'] = project_name unless project_name.nil? + command.query['timedCountDuration'] = timed_count_duration unless timed_count_duration.nil? + command.query['pageToken'] = page_token unless page_token.nil? command.query['timeRange.period'] = time_range_period unless time_range_period.nil? command.query['alignment'] = alignment unless alignment.nil? command.query['groupId'] = group_id unless group_id.nil? command.query['serviceFilter.service'] = service_filter_service unless service_filter_service.nil? command.query['pageSize'] = page_size unless page_size.nil? - command.query['order'] = order unless order.nil? command.query['serviceFilter.version'] = service_filter_version unless service_filter_version.nil? + command.query['order'] = order unless order.nil? command.query['serviceFilter.resourceType'] = service_filter_resource_type unless service_filter_resource_type.nil? command.query['alignmentTime'] = alignment_time unless alignment_time.nil? - command.query['timedCountDuration'] = timed_count_duration unless timed_count_duration.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end diff --git a/generated/google/apis/cloudfunctions_v1.rb b/generated/google/apis/cloudfunctions_v1.rb index e1619517d..009acbe8e 100644 --- a/generated/google/apis/cloudfunctions_v1.rb +++ b/generated/google/apis/cloudfunctions_v1.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/functions module CloudfunctionsV1 VERSION = 'V1' - REVISION = '20170425' + REVISION = '20170520' end end end diff --git a/generated/google/apis/cloudkms_v1.rb b/generated/google/apis/cloudkms_v1.rb index 6a9714a20..145ce739e 100644 --- a/generated/google/apis/cloudkms_v1.rb +++ b/generated/google/apis/cloudkms_v1.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/kms/ module CloudkmsV1 VERSION = 'V1' - REVISION = '20170425' + REVISION = '20170515' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/cloudkms_v1/classes.rb b/generated/google/apis/cloudkms_v1/classes.rb index 6b3a9c8da..e99d7c40f 100644 --- a/generated/google/apis/cloudkms_v1/classes.rb +++ b/generated/google/apis/cloudkms_v1/classes.rb @@ -22,383 +22,6 @@ module Google module Apis module CloudkmsV1 - # Request message for KeyManagementService.DestroyCryptoKeyVersion. - class DestroyCryptoKeyVersionRequest - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # A rule to be applied in a Policy. - class Rule - include Google::Apis::Core::Hashable - - # If one or more 'not_in' clauses are specified, the rule matches - # if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries. - # The format for in and not_in entries is the same as for members in a - # Binding (see google/iam/v1/policy.proto). - # Corresponds to the JSON property `notIn` - # @return [Array] - attr_accessor :not_in - - # Human-readable description of the rule. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Additional restrictions that must be met - # Corresponds to the JSON property `conditions` - # @return [Array] - attr_accessor :conditions - - # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries - # that match the LOG action. - # Corresponds to the JSON property `logConfig` - # @return [Array] - attr_accessor :log_config - - # If one or more 'in' clauses are specified, the rule matches if - # the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries. - # Corresponds to the JSON property `in` - # @return [Array] - attr_accessor :in - - # A permission is a string of form '..' - # (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, - # and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs. - # Corresponds to the JSON property `permissions` - # @return [Array] - attr_accessor :permissions - - # Required - # Corresponds to the JSON property `action` - # @return [String] - attr_accessor :action - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @not_in = args[:not_in] if args.key?(:not_in) - @description = args[:description] if args.key?(:description) - @conditions = args[:conditions] if args.key?(:conditions) - @log_config = args[:log_config] if args.key?(:log_config) - @in = args[:in] if args.key?(:in) - @permissions = args[:permissions] if args.key?(:permissions) - @action = args[:action] if args.key?(:action) - end - end - - # A CryptoKey represents a logical key that can be used for cryptographic - # operations. - # A CryptoKey is made up of one or more versions, which - # represent the actual key material used in cryptographic operations. - class CryptoKey - include Google::Apis::Core::Hashable - - # Output only. The time at which this CryptoKey was created. - # Corresponds to the JSON property `createTime` - # @return [String] - attr_accessor :create_time - - # next_rotation_time will be advanced by this period when the service - # automatically rotates a key. Must be at least one day. - # If rotation_period is set, next_rotation_time must also be set. - # Corresponds to the JSON property `rotationPeriod` - # @return [String] - attr_accessor :rotation_period - - # A CryptoKeyVersion represents an individual cryptographic key, and the - # associated key material. - # It can be used for cryptographic operations either directly, or via its - # parent CryptoKey, in which case the server will choose the appropriate - # version for the operation. - # Corresponds to the JSON property `primary` - # @return [Google::Apis::CloudkmsV1::CryptoKeyVersion] - attr_accessor :primary - - # Output only. The resource name for this CryptoKey in the format - # `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The immutable purpose of this CryptoKey. Currently, the only acceptable - # purpose is ENCRYPT_DECRYPT. - # Corresponds to the JSON property `purpose` - # @return [String] - attr_accessor :purpose - - # At next_rotation_time, the Key Management Service will automatically: - # 1. Create a new version of this CryptoKey. - # 2. Mark the new version as primary. - # Key rotations performed manually via - # CreateCryptoKeyVersion and - # UpdateCryptoKeyPrimaryVersion - # do not affect next_rotation_time. - # Corresponds to the JSON property `nextRotationTime` - # @return [String] - attr_accessor :next_rotation_time - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @create_time = args[:create_time] if args.key?(:create_time) - @rotation_period = args[:rotation_period] if args.key?(:rotation_period) - @primary = args[:primary] if args.key?(:primary) - @name = args[:name] if args.key?(:name) - @purpose = args[:purpose] if args.key?(:purpose) - @next_rotation_time = args[:next_rotation_time] if args.key?(:next_rotation_time) - end - end - - # Specifies what kind of log the caller must write - class LogConfig - include Google::Apis::Core::Hashable - - # Options for counters - # Corresponds to the JSON property `counter` - # @return [Google::Apis::CloudkmsV1::CounterOptions] - attr_accessor :counter - - # Write a Data Access (Gin) log - # Corresponds to the JSON property `dataAccess` - # @return [Google::Apis::CloudkmsV1::DataAccessOptions] - attr_accessor :data_access - - # Write a Cloud Audit log - # Corresponds to the JSON property `cloudAudit` - # @return [Google::Apis::CloudkmsV1::CloudAuditOptions] - attr_accessor :cloud_audit - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @counter = args[:counter] if args.key?(:counter) - @data_access = args[:data_access] if args.key?(:data_access) - @cloud_audit = args[:cloud_audit] if args.key?(:cloud_audit) - 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). - # Corresponds to the JSON property `policy` - # @return [Google::Apis::CloudkmsV1::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 - - # Request message for KeyManagementService.Decrypt. - class DecryptRequest - include Google::Apis::Core::Hashable - - # Required. The encrypted data originally returned in - # EncryptResponse.ciphertext. - # Corresponds to the JSON property `ciphertext` - # NOTE: Values are automatically base64 encoded/decoded in the client library. - # @return [String] - attr_accessor :ciphertext - - # Optional data that must match the data originally supplied in - # EncryptRequest.additional_authenticated_data. - # Corresponds to the JSON property `additionalAuthenticatedData` - # NOTE: Values are automatically base64 encoded/decoded in the client library. - # @return [String] - attr_accessor :additional_authenticated_data - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @ciphertext = args[:ciphertext] if args.key?(:ciphertext) - @additional_authenticated_data = args[:additional_authenticated_data] if args.key?(:additional_authenticated_data) - end - end - - # A resource that represents Google Cloud Platform location. - class Location - include Google::Apis::Core::Hashable - - # Cross-service attributes for the location. For example - # `"cloud.googleapis.com/region": "us-east1"` - # Corresponds to the JSON property `labels` - # @return [Hash] - attr_accessor :labels - - # Resource name for the location, which may vary between implementations. - # For example: `"projects/example-project/locations/us-east1"` - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The canonical id for this location. For example: `"us-east1"`. - # Corresponds to the JSON property `locationId` - # @return [String] - attr_accessor :location_id - - # Service-specific metadata. For example the available capacity at the given - # location. - # Corresponds to the JSON property `metadata` - # @return [Hash] - attr_accessor :metadata - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @labels = args[:labels] if args.key?(:labels) - @name = args[:name] if args.key?(:name) - @location_id = args[:location_id] if args.key?(:location_id) - @metadata = args[:metadata] if args.key?(:metadata) - end - end - - # Response message for KeyManagementService.ListCryptoKeys. - class ListCryptoKeysResponse - include Google::Apis::Core::Hashable - - # A token to retrieve next page of results. Pass this value in - # ListCryptoKeysRequest.page_token to retrieve the next page of results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # The list of CryptoKeys. - # Corresponds to the JSON property `cryptoKeys` - # @return [Array] - attr_accessor :crypto_keys - - # The total number of CryptoKeys that matched the query. - # Corresponds to the JSON property `totalSize` - # @return [Fixnum] - attr_accessor :total_size - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @crypto_keys = args[:crypto_keys] if args.key?(:crypto_keys) - @total_size = args[:total_size] if args.key?(:total_size) - end - end - - # A condition to be met. - class Condition - include Google::Apis::Core::Hashable - - # DEPRECATED. Use 'values' instead. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - # Trusted attributes supplied by any service that owns resources and uses - # the IAM system for access control. - # Corresponds to the JSON property `sys` - # @return [String] - attr_accessor :sys - - # Trusted attributes supplied by the IAM system. - # Corresponds to the JSON property `iam` - # @return [String] - attr_accessor :iam - - # The objects of the condition. This is mutually exclusive with 'value'. - # Corresponds to the JSON property `values` - # @return [Array] - attr_accessor :values - - # An operator to apply the subject with. - # Corresponds to the JSON property `op` - # @return [String] - attr_accessor :op - - # Trusted attributes discharged by the service. - # Corresponds to the JSON property `svc` - # @return [String] - attr_accessor :svc - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @value = args[:value] if args.key?(:value) - @sys = args[:sys] if args.key?(:sys) - @iam = args[:iam] if args.key?(:iam) - @values = args[:values] if args.key?(:values) - @op = args[:op] if args.key?(:op) - @svc = args[:svc] if args.key?(:svc) - end - end - # Options for counters class CounterOptions include Google::Apis::Core::Hashable @@ -444,11 +67,6 @@ module Google class AuditLogConfig include Google::Apis::Core::Hashable - # The log type that this config enables. - # Corresponds to the JSON property `logType` - # @return [String] - attr_accessor :log_type - # Specifies the identities that do not cause logging for this type of # permission. # Follows the same format of Binding.members. @@ -456,14 +74,19 @@ module Google # @return [Array] 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) - @log_type = args[:log_type] if args.key?(:log_type) @exempted_members = args[:exempted_members] if args.key?(:exempted_members) + @log_type = args[:log_type] if args.key?(:log_type) end end @@ -509,20 +132,114 @@ module Google end end - # Response message for KeyManagementService.Encrypt. - class EncryptResponse + # 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). + class Policy include Google::Apis::Core::Hashable - # The encrypted data. - # Corresponds to the JSON property `ciphertext` + # Specifies cloud audit logging configuration for this policy. + # Corresponds to the JSON property `auditConfigs` + # @return [Array] + attr_accessor :audit_configs + + # Associates a list of `members` to a `role`. + # Multiple `bindings` must not be specified for the same `role`. + # `bindings` with no members will result in an error. + # Corresponds to the JSON property `bindings` + # @return [Array] + 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 :ciphertext + attr_accessor :etag - # The resource name of the CryptoKeyVersion used in encryption. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name + # + # Corresponds to the JSON property `iamOwned` + # @return [Boolean] + attr_accessor :iam_owned + alias_method :iam_owned?, :iam_owned + + # If more than one rule is specified, the rules are applied in the following + # manner: + # - All matching LOG rules are always applied. + # - If any DENY/DENY_WITH_LOG rule matches, permission is denied. + # Logging will be applied if one or more matching rule requires logging. + # - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is + # granted. + # Logging will be applied if one or more matching rule requires logging. + # - Otherwise, if no rule applies, permission is denied. + # Corresponds to the JSON property `rules` + # @return [Array] + attr_accessor :rules + + # Version of the `Policy`. The default version is 0. + # 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) + @iam_owned = args[:iam_owned] if args.key?(:iam_owned) + @rules = args[:rules] if args.key?(:rules) + @version = args[:version] if args.key?(:version) + end + end + + # Response message for KeyManagementService.Encrypt. + class EncryptResponse + include Google::Apis::Core::Hashable + + # The resource name of the CryptoKeyVersion used in encryption. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The encrypted data. + # Corresponds to the JSON property `ciphertext` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :ciphertext def initialize(**args) update!(**args) @@ -530,8 +247,8 @@ module Google # Update properties of this object def update!(**args) - @ciphertext = args[:ciphertext] if args.key?(:ciphertext) @name = args[:name] if args.key?(:name) + @ciphertext = args[:ciphertext] if args.key?(:ciphertext) end end @@ -586,100 +303,6 @@ 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). - class Policy - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `iamOwned` - # @return [Boolean] - attr_accessor :iam_owned - alias_method :iam_owned?, :iam_owned - - # If more than one rule is specified, the rules are applied in the following - # manner: - # - All matching LOG rules are always applied. - # - If any DENY/DENY_WITH_LOG rule matches, permission is denied. - # Logging will be applied if one or more matching rule requires logging. - # - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is - # granted. - # Logging will be applied if one or more matching rule requires logging. - # - Otherwise, if no rule applies, permission is denied. - # Corresponds to the JSON property `rules` - # @return [Array] - attr_accessor :rules - - # Version of the `Policy`. The default version is 0. - # Corresponds to the JSON property `version` - # @return [Fixnum] - attr_accessor :version - - # Specifies cloud audit logging configuration for this policy. - # Corresponds to the JSON property `auditConfigs` - # @return [Array] - attr_accessor :audit_configs - - # Associates a list of `members` to a `role`. - # Multiple `bindings` must not be specified for the same `role`. - # `bindings` with no members will result in an error. - # Corresponds to the JSON property `bindings` - # @return [Array] - 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 - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @iam_owned = args[:iam_owned] if args.key?(:iam_owned) - @rules = args[:rules] if args.key?(:rules) - @version = args[:version] if args.key?(:version) - @audit_configs = args[:audit_configs] if args.key?(:audit_configs) - @bindings = args[:bindings] if args.key?(:bindings) - @etag = args[:etag] if args.key?(:etag) - end - end - # Request message for KeyManagementService.RestoreCryptoKeyVersion. class RestoreCryptoKeyVersionRequest include Google::Apis::Core::Hashable @@ -712,15 +335,23 @@ module Google end end + # Write a Data Access (Gin) log + class DataAccessOptions + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + # Response message for KeyManagementService.ListKeyRings. class ListKeyRingsResponse include Google::Apis::Core::Hashable - # The list of KeyRings. - # Corresponds to the JSON property `keyRings` - # @return [Array] - attr_accessor :key_rings - # A token to retrieve next page of results. Pass this value in # ListKeyRingsRequest.page_token to retrieve the next page of results. # Corresponds to the JSON property `nextPageToken` @@ -732,28 +363,20 @@ module Google # @return [Fixnum] attr_accessor :total_size + # The list of KeyRings. + # Corresponds to the JSON property `keyRings` + # @return [Array] + attr_accessor :key_rings + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @key_rings = args[:key_rings] if args.key?(:key_rings) @next_page_token = args[:next_page_token] if args.key?(:next_page_token) @total_size = args[:total_size] if args.key?(:total_size) - end - end - - # Write a Data Access (Gin) log - class DataAccessOptions - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) + @key_rings = args[:key_rings] if args.key?(:key_rings) end end @@ -807,11 +430,6 @@ module Google class AuditConfig include Google::Apis::Core::Hashable - # - # Corresponds to the JSON property `exemptedMembers` - # @return [Array] - 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. @@ -825,15 +443,20 @@ module Google # @return [Array] attr_accessor :audit_log_configs + # + # Corresponds to the JSON property `exemptedMembers` + # @return [Array] + attr_accessor :exempted_members + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @exempted_members = args[:exempted_members] if args.key?(:exempted_members) @service = args[:service] if args.key?(:service) @audit_log_configs = args[:audit_log_configs] if args.key?(:audit_log_configs) + @exempted_members = args[:exempted_members] if args.key?(:exempted_members) end end @@ -845,6 +468,17 @@ module Google class CryptoKeyVersion include Google::Apis::Core::Hashable + # The current state of the CryptoKeyVersion. + # Corresponds to the JSON property `state` + # @return [String] + attr_accessor :state + + # Output only. The resource name for this CryptoKeyVersion in the format + # `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + # Output only. The time this CryptoKeyVersion's key material was # destroyed. Only present if state is # DESTROYED. @@ -864,28 +498,17 @@ module Google # @return [String] attr_accessor :create_time - # The current state of the CryptoKeyVersion. - # Corresponds to the JSON property `state` - # @return [String] - attr_accessor :state - - # Output only. The resource name for this CryptoKeyVersion in the format - # `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @state = args[:state] if args.key?(:state) + @name = args[:name] if args.key?(:name) @destroy_event_time = args[:destroy_event_time] if args.key?(:destroy_event_time) @destroy_time = args[:destroy_time] if args.key?(:destroy_time) @create_time = args[:create_time] if args.key?(:create_time) - @state = args[:state] if args.key?(:state) - @name = args[:name] if args.key?(:name) end end @@ -893,12 +516,18 @@ module Google class CloudAuditOptions include Google::Apis::Core::Hashable + # The log_name to populate in the Cloud Audit Record. + # Corresponds to the JSON property `logName` + # @return [String] + attr_accessor :log_name + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @log_name = args[:log_name] if args.key?(:log_name) end end @@ -1024,6 +653,383 @@ module Google @permissions = args[:permissions] if args.key?(:permissions) end end + + # Request message for KeyManagementService.DestroyCryptoKeyVersion. + class DestroyCryptoKeyVersionRequest + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # A rule to be applied in a Policy. + class Rule + include Google::Apis::Core::Hashable + + # Human-readable description of the rule. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # Additional restrictions that must be met + # Corresponds to the JSON property `conditions` + # @return [Array] + attr_accessor :conditions + + # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries + # that match the LOG action. + # Corresponds to the JSON property `logConfig` + # @return [Array] + attr_accessor :log_config + + # If one or more 'in' clauses are specified, the rule matches if + # the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries. + # Corresponds to the JSON property `in` + # @return [Array] + attr_accessor :in + + # A permission is a string of form '..' + # (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, + # and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs. + # Corresponds to the JSON property `permissions` + # @return [Array] + attr_accessor :permissions + + # Required + # Corresponds to the JSON property `action` + # @return [String] + attr_accessor :action + + # If one or more 'not_in' clauses are specified, the rule matches + # if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries. + # The format for in and not_in entries is the same as for members in a + # Binding (see google/iam/v1/policy.proto). + # Corresponds to the JSON property `notIn` + # @return [Array] + attr_accessor :not_in + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @description = args[:description] if args.key?(:description) + @conditions = args[:conditions] if args.key?(:conditions) + @log_config = args[:log_config] if args.key?(:log_config) + @in = args[:in] if args.key?(:in) + @permissions = args[:permissions] if args.key?(:permissions) + @action = args[:action] if args.key?(:action) + @not_in = args[:not_in] if args.key?(:not_in) + end + end + + # A CryptoKey represents a logical key that can be used for cryptographic + # operations. + # A CryptoKey is made up of one or more versions, which + # represent the actual key material used in cryptographic operations. + class CryptoKey + include Google::Apis::Core::Hashable + + # The immutable purpose of this CryptoKey. Currently, the only acceptable + # purpose is ENCRYPT_DECRYPT. + # Corresponds to the JSON property `purpose` + # @return [String] + attr_accessor :purpose + + # At next_rotation_time, the Key Management Service will automatically: + # 1. Create a new version of this CryptoKey. + # 2. Mark the new version as primary. + # Key rotations performed manually via + # CreateCryptoKeyVersion and + # UpdateCryptoKeyPrimaryVersion + # do not affect next_rotation_time. + # Corresponds to the JSON property `nextRotationTime` + # @return [String] + attr_accessor :next_rotation_time + + # Output only. The time at which this CryptoKey was created. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # next_rotation_time will be advanced by this period when the service + # automatically rotates a key. Must be at least one day. + # If rotation_period is set, next_rotation_time must also be set. + # Corresponds to the JSON property `rotationPeriod` + # @return [String] + attr_accessor :rotation_period + + # A CryptoKeyVersion represents an individual cryptographic key, and the + # associated key material. + # It can be used for cryptographic operations either directly, or via its + # parent CryptoKey, in which case the server will choose the appropriate + # version for the operation. + # Corresponds to the JSON property `primary` + # @return [Google::Apis::CloudkmsV1::CryptoKeyVersion] + attr_accessor :primary + + # Output only. The resource name for this CryptoKey in the format + # `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @purpose = args[:purpose] if args.key?(:purpose) + @next_rotation_time = args[:next_rotation_time] if args.key?(:next_rotation_time) + @create_time = args[:create_time] if args.key?(:create_time) + @rotation_period = args[:rotation_period] if args.key?(:rotation_period) + @primary = args[:primary] if args.key?(:primary) + @name = args[:name] if args.key?(:name) + end + end + + # Specifies what kind of log the caller must write + class LogConfig + include Google::Apis::Core::Hashable + + # Options for counters + # Corresponds to the JSON property `counter` + # @return [Google::Apis::CloudkmsV1::CounterOptions] + attr_accessor :counter + + # Write a Data Access (Gin) log + # Corresponds to the JSON property `dataAccess` + # @return [Google::Apis::CloudkmsV1::DataAccessOptions] + attr_accessor :data_access + + # Write a Cloud Audit log + # Corresponds to the JSON property `cloudAudit` + # @return [Google::Apis::CloudkmsV1::CloudAuditOptions] + attr_accessor :cloud_audit + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @counter = args[:counter] if args.key?(:counter) + @data_access = args[:data_access] if args.key?(:data_access) + @cloud_audit = args[:cloud_audit] if args.key?(:cloud_audit) + end + end + + # Request message for `SetIamPolicy` method. + class SetIamPolicyRequest + include Google::Apis::Core::Hashable + + # 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 + + # 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). + # Corresponds to the JSON property `policy` + # @return [Google::Apis::CloudkmsV1::Policy] + attr_accessor :policy + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @update_mask = args[:update_mask] if args.key?(:update_mask) + @policy = args[:policy] if args.key?(:policy) + end + end + + # Request message for KeyManagementService.Decrypt. + class DecryptRequest + include Google::Apis::Core::Hashable + + # Required. The encrypted data originally returned in + # EncryptResponse.ciphertext. + # Corresponds to the JSON property `ciphertext` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :ciphertext + + # Optional data that must match the data originally supplied in + # EncryptRequest.additional_authenticated_data. + # Corresponds to the JSON property `additionalAuthenticatedData` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :additional_authenticated_data + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @ciphertext = args[:ciphertext] if args.key?(:ciphertext) + @additional_authenticated_data = args[:additional_authenticated_data] if args.key?(:additional_authenticated_data) + end + end + + # A resource that represents Google Cloud Platform location. + class Location + include Google::Apis::Core::Hashable + + # The canonical id for this location. For example: `"us-east1"`. + # Corresponds to the JSON property `locationId` + # @return [String] + attr_accessor :location_id + + # Service-specific metadata. For example the available capacity at the given + # location. + # Corresponds to the JSON property `metadata` + # @return [Hash] + attr_accessor :metadata + + # Cross-service attributes for the location. For example + # `"cloud.googleapis.com/region": "us-east1"` + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # Resource name for the location, which may vary between implementations. + # For example: `"projects/example-project/locations/us-east1"` + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @location_id = args[:location_id] if args.key?(:location_id) + @metadata = args[:metadata] if args.key?(:metadata) + @labels = args[:labels] if args.key?(:labels) + @name = args[:name] if args.key?(:name) + end + end + + # Response message for KeyManagementService.ListCryptoKeys. + class ListCryptoKeysResponse + include Google::Apis::Core::Hashable + + # A token to retrieve next page of results. Pass this value in + # ListCryptoKeysRequest.page_token to retrieve the next page of results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The list of CryptoKeys. + # Corresponds to the JSON property `cryptoKeys` + # @return [Array] + attr_accessor :crypto_keys + + # The total number of CryptoKeys that matched the query. + # Corresponds to the JSON property `totalSize` + # @return [Fixnum] + attr_accessor :total_size + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @crypto_keys = args[:crypto_keys] if args.key?(:crypto_keys) + @total_size = args[:total_size] if args.key?(:total_size) + end + end + + # A condition to be met. + class Condition + include Google::Apis::Core::Hashable + + # Trusted attributes supplied by any service that owns resources and uses + # the IAM system for access control. + # Corresponds to the JSON property `sys` + # @return [String] + attr_accessor :sys + + # DEPRECATED. Use 'values' instead. + # Corresponds to the JSON property `value` + # @return [String] + attr_accessor :value + + # The objects of the condition. This is mutually exclusive with 'value'. + # Corresponds to the JSON property `values` + # @return [Array] + attr_accessor :values + + # Trusted attributes supplied by the IAM system. + # Corresponds to the JSON property `iam` + # @return [String] + attr_accessor :iam + + # An operator to apply the subject with. + # Corresponds to the JSON property `op` + # @return [String] + attr_accessor :op + + # Trusted attributes discharged by the service. + # Corresponds to the JSON property `svc` + # @return [String] + attr_accessor :svc + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @sys = args[:sys] if args.key?(:sys) + @value = args[:value] if args.key?(:value) + @values = args[:values] if args.key?(:values) + @iam = args[:iam] if args.key?(:iam) + @op = args[:op] if args.key?(:op) + @svc = args[:svc] if args.key?(:svc) + end + end end end end diff --git a/generated/google/apis/cloudkms_v1/representations.rb b/generated/google/apis/cloudkms_v1/representations.rb index cda6b43eb..ba37a6df0 100644 --- a/generated/google/apis/cloudkms_v1/representations.rb +++ b/generated/google/apis/cloudkms_v1/representations.rb @@ -22,60 +22,6 @@ module Google module Apis module CloudkmsV1 - class DestroyCryptoKeyVersionRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Rule - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CryptoKey - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class LogConfig - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SetIamPolicyRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DecryptRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Location - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListCryptoKeysResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Condition - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class CounterOptions class Representation < Google::Apis::Core::JsonRepresentation; end @@ -100,6 +46,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 EncryptResponse class Representation < Google::Apis::Core::JsonRepresentation; end @@ -118,12 +70,6 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class Policy - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class RestoreCryptoKeyVersionRequest class Representation < Google::Apis::Core::JsonRepresentation; end @@ -136,13 +82,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class ListKeyRingsResponse + class DataAccessOptions class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class DataAccessOptions + class ListKeyRingsResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -191,98 +137,57 @@ module Google end class DestroyCryptoKeyVersionRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class Rule - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :not_in, as: 'notIn' - property :description, as: 'description' - collection :conditions, as: 'conditions', class: Google::Apis::CloudkmsV1::Condition, decorator: Google::Apis::CloudkmsV1::Condition::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - collection :log_config, as: 'logConfig', class: Google::Apis::CloudkmsV1::LogConfig, decorator: Google::Apis::CloudkmsV1::LogConfig::Representation - - collection :in, as: 'in' - collection :permissions, as: 'permissions' - property :action, as: 'action' - end + include Google::Apis::Core::JsonObjectSupport end class CryptoKey - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :create_time, as: 'createTime' - property :rotation_period, as: 'rotationPeriod' - property :primary, as: 'primary', class: Google::Apis::CloudkmsV1::CryptoKeyVersion, decorator: Google::Apis::CloudkmsV1::CryptoKeyVersion::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :name, as: 'name' - property :purpose, as: 'purpose' - property :next_rotation_time, as: 'nextRotationTime' - end + include Google::Apis::Core::JsonObjectSupport end class LogConfig - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :counter, as: 'counter', class: Google::Apis::CloudkmsV1::CounterOptions, decorator: Google::Apis::CloudkmsV1::CounterOptions::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :data_access, as: 'dataAccess', class: Google::Apis::CloudkmsV1::DataAccessOptions, decorator: Google::Apis::CloudkmsV1::DataAccessOptions::Representation - - property :cloud_audit, as: 'cloudAudit', class: Google::Apis::CloudkmsV1::CloudAuditOptions, decorator: Google::Apis::CloudkmsV1::CloudAuditOptions::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class SetIamPolicyRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :policy, as: 'policy', class: Google::Apis::CloudkmsV1::Policy, decorator: Google::Apis::CloudkmsV1::Policy::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :update_mask, as: 'updateMask' - end + include Google::Apis::Core::JsonObjectSupport end class DecryptRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :ciphertext, :base64 => true, as: 'ciphertext' - property :additional_authenticated_data, :base64 => true, as: 'additionalAuthenticatedData' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class Location - # @private - class Representation < Google::Apis::Core::JsonRepresentation - hash :labels, as: 'labels' - property :name, as: 'name' - property :location_id, as: 'locationId' - hash :metadata, as: 'metadata' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ListCryptoKeysResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - collection :crypto_keys, as: 'cryptoKeys', class: Google::Apis::CloudkmsV1::CryptoKey, decorator: Google::Apis::CloudkmsV1::CryptoKey::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :total_size, as: 'totalSize' - end + include Google::Apis::Core::JsonObjectSupport end class Condition - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :value, as: 'value' - property :sys, as: 'sys' - property :iam, as: 'iam' - collection :values, as: 'values' - property :op, as: 'op' - property :svc, as: 'svc' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class CounterOptions @@ -296,8 +201,8 @@ module Google class AuditLogConfig # @private class Representation < Google::Apis::Core::JsonRepresentation - property :log_type, as: 'logType' collection :exempted_members, as: 'exemptedMembers' + property :log_type, as: 'logType' end end @@ -315,11 +220,26 @@ module Google end end + class Policy + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :audit_configs, as: 'auditConfigs', class: Google::Apis::CloudkmsV1::AuditConfig, decorator: Google::Apis::CloudkmsV1::AuditConfig::Representation + + collection :bindings, as: 'bindings', class: Google::Apis::CloudkmsV1::Binding, decorator: Google::Apis::CloudkmsV1::Binding::Representation + + property :etag, :base64 => true, as: 'etag' + property :iam_owned, as: 'iamOwned' + collection :rules, as: 'rules', class: Google::Apis::CloudkmsV1::Rule, decorator: Google::Apis::CloudkmsV1::Rule::Representation + + property :version, as: 'version' + end + end + class EncryptResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - property :ciphertext, :base64 => true, as: 'ciphertext' property :name, as: 'name' + property :ciphertext, :base64 => true, as: 'ciphertext' end end @@ -340,21 +260,6 @@ module Google end end - class Policy - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :iam_owned, as: 'iamOwned' - collection :rules, as: 'rules', class: Google::Apis::CloudkmsV1::Rule, decorator: Google::Apis::CloudkmsV1::Rule::Representation - - property :version, as: 'version' - collection :audit_configs, as: 'auditConfigs', class: Google::Apis::CloudkmsV1::AuditConfig, decorator: Google::Apis::CloudkmsV1::AuditConfig::Representation - - collection :bindings, as: 'bindings', class: Google::Apis::CloudkmsV1::Binding, decorator: Google::Apis::CloudkmsV1::Binding::Representation - - property :etag, :base64 => true, as: 'etag' - end - end - class RestoreCryptoKeyVersionRequest # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -368,46 +273,47 @@ module Google end end - class ListKeyRingsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :key_rings, as: 'keyRings', class: Google::Apis::CloudkmsV1::KeyRing, decorator: Google::Apis::CloudkmsV1::KeyRing::Representation - - property :next_page_token, as: 'nextPageToken' - property :total_size, as: 'totalSize' - end - end - class DataAccessOptions # @private class Representation < Google::Apis::Core::JsonRepresentation end end + class ListKeyRingsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + property :total_size, as: 'totalSize' + collection :key_rings, as: 'keyRings', class: Google::Apis::CloudkmsV1::KeyRing, decorator: Google::Apis::CloudkmsV1::KeyRing::Representation + + end + end + class AuditConfig # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :exempted_members, as: 'exemptedMembers' property :service, as: 'service' collection :audit_log_configs, as: 'auditLogConfigs', class: Google::Apis::CloudkmsV1::AuditLogConfig, decorator: Google::Apis::CloudkmsV1::AuditLogConfig::Representation + collection :exempted_members, as: 'exemptedMembers' end end class CryptoKeyVersion # @private class Representation < Google::Apis::Core::JsonRepresentation + property :state, as: 'state' + property :name, as: 'name' property :destroy_event_time, as: 'destroyEventTime' property :destroy_time, as: 'destroyTime' property :create_time, as: 'createTime' - property :state, as: 'state' - property :name, as: 'name' end end class CloudAuditOptions # @private class Representation < Google::Apis::Core::JsonRepresentation + property :log_name, as: 'logName' end end @@ -443,6 +349,101 @@ module Google collection :permissions, as: 'permissions' end end + + class DestroyCryptoKeyVersionRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class Rule + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :description, as: 'description' + collection :conditions, as: 'conditions', class: Google::Apis::CloudkmsV1::Condition, decorator: Google::Apis::CloudkmsV1::Condition::Representation + + collection :log_config, as: 'logConfig', class: Google::Apis::CloudkmsV1::LogConfig, decorator: Google::Apis::CloudkmsV1::LogConfig::Representation + + collection :in, as: 'in' + collection :permissions, as: 'permissions' + property :action, as: 'action' + collection :not_in, as: 'notIn' + end + end + + class CryptoKey + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :purpose, as: 'purpose' + property :next_rotation_time, as: 'nextRotationTime' + property :create_time, as: 'createTime' + property :rotation_period, as: 'rotationPeriod' + property :primary, as: 'primary', class: Google::Apis::CloudkmsV1::CryptoKeyVersion, decorator: Google::Apis::CloudkmsV1::CryptoKeyVersion::Representation + + property :name, as: 'name' + end + end + + class LogConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :counter, as: 'counter', class: Google::Apis::CloudkmsV1::CounterOptions, decorator: Google::Apis::CloudkmsV1::CounterOptions::Representation + + property :data_access, as: 'dataAccess', class: Google::Apis::CloudkmsV1::DataAccessOptions, decorator: Google::Apis::CloudkmsV1::DataAccessOptions::Representation + + property :cloud_audit, as: 'cloudAudit', class: Google::Apis::CloudkmsV1::CloudAuditOptions, decorator: Google::Apis::CloudkmsV1::CloudAuditOptions::Representation + + end + end + + class SetIamPolicyRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :update_mask, as: 'updateMask' + property :policy, as: 'policy', class: Google::Apis::CloudkmsV1::Policy, decorator: Google::Apis::CloudkmsV1::Policy::Representation + + end + end + + class DecryptRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :ciphertext, :base64 => true, as: 'ciphertext' + property :additional_authenticated_data, :base64 => true, as: 'additionalAuthenticatedData' + end + end + + class Location + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :location_id, as: 'locationId' + hash :metadata, as: 'metadata' + hash :labels, as: 'labels' + property :name, as: 'name' + end + end + + class ListCryptoKeysResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :crypto_keys, as: 'cryptoKeys', class: Google::Apis::CloudkmsV1::CryptoKey, decorator: Google::Apis::CloudkmsV1::CryptoKey::Representation + + property :total_size, as: 'totalSize' + end + end + + class Condition + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :sys, as: 'sys' + property :value, as: 'value' + collection :values, as: 'values' + property :iam, as: 'iam' + property :op, as: 'op' + property :svc, as: 'svc' + end + end end end end diff --git a/generated/google/apis/cloudkms_v1/service.rb b/generated/google/apis/cloudkms_v1/service.rb index 0e1833b08..565d7a699 100644 --- a/generated/google/apis/cloudkms_v1/service.rb +++ b/generated/google/apis/cloudkms_v1/service.rb @@ -57,11 +57,11 @@ module Google # The standard list page size. # @param [String] filter # The standard list filter. + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -74,7 +74,7 @@ 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_project_locations(name, page_token: nil, page_size: nil, filter: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_project_locations(name, page_token: nil, page_size: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}/locations', options) command.response_representation = Google::Apis::CloudkmsV1::ListLocationsResponse::Representation command.response_class = Google::Apis::CloudkmsV1::ListLocationsResponse @@ -82,19 +82,19 @@ module Google command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['filter'] = filter unless filter.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Get information about a location. # @param [String] name # Resource name for the location. + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -107,86 +107,13 @@ 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 get_project_location(name, quota_user: nil, fields: nil, options: nil, &block) + def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', options) command.response_representation = Google::Apis::CloudkmsV1::Location::Representation command.response_class = Google::Apis::CloudkmsV1::Location command.params['name'] = name unless name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Create a new KeyRing in a given Project and Location. - # @param [String] parent - # Required. The resource name of the location associated with the - # KeyRings, in the format `projects/*/locations/*`. - # @param [Google::Apis::CloudkmsV1::KeyRing] key_ring_object - # @param [String] key_ring_id - # Required. It must be unique within a location and match the regular - # expression `[a-zA-Z0-9_-]`1,63`` - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CloudkmsV1::KeyRing] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudkmsV1::KeyRing] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_project_location_key_ring(parent, key_ring_object = nil, key_ring_id: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+parent}/keyRings', options) - command.request_representation = Google::Apis::CloudkmsV1::KeyRing::Representation - command.request_object = key_ring_object - command.response_representation = Google::Apis::CloudkmsV1::KeyRing::Representation - command.response_class = Google::Apis::CloudkmsV1::KeyRing - command.params['parent'] = parent unless parent.nil? - command.query['keyRingId'] = key_ring_id unless key_ring_id.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Sets the access control policy on the specified resource. Replaces any - # existing policy. - # @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::CloudkmsV1::SetIamPolicyRequest] set_iam_policy_request_object - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CloudkmsV1::Policy] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudkmsV1::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_key_ring_iam_policy(resource, set_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options) - command.request_representation = Google::Apis::CloudkmsV1::SetIamPolicyRequest::Representation - command.request_object = set_iam_policy_request_object - command.response_representation = Google::Apis::CloudkmsV1::Policy::Representation - command.response_class = Google::Apis::CloudkmsV1::Policy - command.params['resource'] = resource unless resource.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -196,11 +123,11 @@ module Google # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -213,24 +140,24 @@ 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 get_project_location_key_ring_iam_policy(resource, quota_user: nil, fields: nil, options: nil, &block) + def get_project_location_key_ring_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::CloudkmsV1::Policy::Representation command.response_class = Google::Apis::CloudkmsV1::Policy command.params['resource'] = resource unless resource.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Returns metadata for a given KeyRing. # @param [String] name # The name of the KeyRing to get. + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -243,13 +170,13 @@ 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 get_project_location_key_ring(name, quota_user: nil, fields: nil, options: nil, &block) + def get_project_location_key_ring(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', options) command.response_representation = Google::Apis::CloudkmsV1::KeyRing::Representation command.response_class = Google::Apis::CloudkmsV1::KeyRing command.params['name'] = name unless name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -263,11 +190,11 @@ module Google # 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::CloudkmsV1::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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -280,15 +207,15 @@ 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 test_key_ring_iam_permissions(resource, test_iam_permissions_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def test_key_ring_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::CloudkmsV1::TestIamPermissionsRequest::Representation command.request_object = test_iam_permissions_request_object command.response_representation = Google::Apis::CloudkmsV1::TestIamPermissionsResponse::Representation command.response_class = Google::Apis::CloudkmsV1::TestIamPermissionsResponse command.params['resource'] = resource unless resource.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -304,11 +231,11 @@ module Google # response. Further KeyRings can subsequently be obtained by # including the ListKeyRingsResponse.next_page_token in a subsequent # request. If unspecified, the server will pick an appropriate default. + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -321,88 +248,88 @@ 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_project_location_key_rings(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_project_location_key_rings(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/keyRings', options) command.response_representation = Google::Apis::CloudkmsV1::ListKeyRingsResponse::Representation command.response_class = Google::Apis::CloudkmsV1::ListKeyRingsResponse command.params['parent'] = parent unless parent.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end - # Returns permissions that a caller has on the specified resource. - # If the resource does not exist, this will return an empty set of - # permissions, not a NOT_FOUND error. - # Note: This operation is designed to be used for building permission-aware - # UIs and command-line tools, not for authorization checking. This operation - # may "fail open" without warning. + # Create a new KeyRing in a given Project and Location. + # @param [String] parent + # Required. The resource name of the location associated with the + # KeyRings, in the format `projects/*/locations/*`. + # @param [Google::Apis::CloudkmsV1::KeyRing] key_ring_object + # @param [String] key_ring_id + # Required. It must be unique within a location and match the regular + # expression `[a-zA-Z0-9_-]`1,63`` + # @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::CloudkmsV1::KeyRing] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudkmsV1::KeyRing] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_project_location_key_ring(parent, key_ring_object = nil, key_ring_id: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+parent}/keyRings', options) + command.request_representation = Google::Apis::CloudkmsV1::KeyRing::Representation + command.request_object = key_ring_object + command.response_representation = Google::Apis::CloudkmsV1::KeyRing::Representation + command.response_class = Google::Apis::CloudkmsV1::KeyRing + command.params['parent'] = parent unless parent.nil? + command.query['keyRingId'] = key_ring_id unless key_ring_id.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 on the specified resource. Replaces any + # existing policy. # @param [String] resource - # REQUIRED: The resource for which the policy detail is being requested. + # REQUIRED: The resource for which the policy is being specified. # See the operation documentation for the appropriate value for this field. - # @param [Google::Apis::CloudkmsV1::TestIamPermissionsRequest] test_iam_permissions_request_object + # @param [Google::Apis::CloudkmsV1::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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CloudkmsV1::TestIamPermissionsResponse] parsed result object + # @yieldparam result [Google::Apis::CloudkmsV1::Policy] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::CloudkmsV1::TestIamPermissionsResponse] + # @return [Google::Apis::CloudkmsV1::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 test_crypto_key_iam_permissions(resource, test_iam_permissions_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options) - command.request_representation = Google::Apis::CloudkmsV1::TestIamPermissionsRequest::Representation - command.request_object = test_iam_permissions_request_object - command.response_representation = Google::Apis::CloudkmsV1::TestIamPermissionsResponse::Representation - command.response_class = Google::Apis::CloudkmsV1::TestIamPermissionsResponse + def set_key_ring_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::CloudkmsV1::SetIamPolicyRequest::Representation + command.request_object = set_iam_policy_request_object + command.response_representation = Google::Apis::CloudkmsV1::Policy::Representation + command.response_class = Google::Apis::CloudkmsV1::Policy command.params['resource'] = resource unless resource.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Decrypt data that was protected by Encrypt. - # @param [String] name - # Required. The resource name of the CryptoKey to use for decryption. - # The server will choose the appropriate version. - # @param [Google::Apis::CloudkmsV1::DecryptRequest] decrypt_request_object - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CloudkmsV1::DecryptResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudkmsV1::DecryptResponse] - # - # @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 decrypt_crypto_key(name, decrypt_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+name}:decrypt', options) - command.request_representation = Google::Apis::CloudkmsV1::DecryptRequest::Representation - command.request_object = decrypt_request_object - command.response_representation = Google::Apis::CloudkmsV1::DecryptResponse::Representation - command.response_class = Google::Apis::CloudkmsV1::DecryptResponse - command.params['name'] = name unless name.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -418,11 +345,11 @@ module Google # response. Further CryptoKeys can subsequently be obtained by # including the ListCryptoKeysResponse.next_page_token in a subsequent # request. If unspecified, the server will pick an appropriate default. + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -435,15 +362,15 @@ 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_project_location_key_ring_crypto_keys(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_project_location_key_ring_crypto_keys(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/cryptoKeys', options) command.response_representation = Google::Apis::CloudkmsV1::ListCryptoKeysResponse::Representation command.response_class = Google::Apis::CloudkmsV1::ListCryptoKeysResponse command.params['parent'] = parent unless parent.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -454,11 +381,11 @@ module Google # If a CryptoKey is specified, the server will use its # primary version. # @param [Google::Apis::CloudkmsV1::EncryptRequest] encrypt_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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -471,15 +398,15 @@ 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 encrypt_crypto_key(name, encrypt_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def encrypt_crypto_key(name, encrypt_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:encrypt', options) command.request_representation = Google::Apis::CloudkmsV1::EncryptRequest::Representation command.request_object = encrypt_request_object command.response_representation = Google::Apis::CloudkmsV1::EncryptResponse::Representation command.response_class = Google::Apis::CloudkmsV1::EncryptResponse command.params['name'] = name unless name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -492,11 +419,11 @@ module Google # @param [String] crypto_key_id # Required. It must be unique within a KeyRing and match the regular # expression `[a-zA-Z0-9_-]`1,63`` + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -509,7 +436,7 @@ 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 create_project_location_key_ring_crypto_key(parent, crypto_key_object = nil, crypto_key_id: nil, quota_user: nil, fields: nil, options: nil, &block) + def create_project_location_key_ring_crypto_key(parent, crypto_key_object = nil, crypto_key_id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/cryptoKeys', options) command.request_representation = Google::Apis::CloudkmsV1::CryptoKey::Representation command.request_object = crypto_key_object @@ -517,8 +444,8 @@ module Google command.response_class = Google::Apis::CloudkmsV1::CryptoKey command.params['parent'] = parent unless parent.nil? command.query['cryptoKeyId'] = crypto_key_id unless crypto_key_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -528,11 +455,11 @@ module Google # REQUIRED: The resource for which the policy is being specified. # See the operation documentation for the appropriate value for this field. # @param [Google::Apis::CloudkmsV1::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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -545,15 +472,15 @@ 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 set_crypto_key_iam_policy(resource, set_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def set_crypto_key_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::CloudkmsV1::SetIamPolicyRequest::Representation command.request_object = set_iam_policy_request_object command.response_representation = Google::Apis::CloudkmsV1::Policy::Representation command.response_class = Google::Apis::CloudkmsV1::Policy command.params['resource'] = resource unless resource.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -561,11 +488,11 @@ module Google # @param [String] name # The resource name of the CryptoKey to update. # @param [Google::Apis::CloudkmsV1::UpdateCryptoKeyPrimaryVersionRequest] update_crypto_key_primary_version_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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -578,15 +505,15 @@ 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 update_project_location_key_ring_crypto_key_primary_version(name, update_crypto_key_primary_version_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def update_project_location_key_ring_crypto_key_primary_version(name, update_crypto_key_primary_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:updatePrimaryVersion', options) command.request_representation = Google::Apis::CloudkmsV1::UpdateCryptoKeyPrimaryVersionRequest::Representation command.request_object = update_crypto_key_primary_version_request_object command.response_representation = Google::Apis::CloudkmsV1::CryptoKey::Representation command.response_class = Google::Apis::CloudkmsV1::CryptoKey command.params['name'] = name unless name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -596,11 +523,11 @@ module Google # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -613,13 +540,13 @@ 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 get_project_location_key_ring_crypto_key_iam_policy(resource, quota_user: nil, fields: nil, options: nil, &block) + def get_project_location_key_ring_crypto_key_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::CloudkmsV1::Policy::Representation command.response_class = Google::Apis::CloudkmsV1::Policy command.params['resource'] = resource unless resource.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -627,11 +554,11 @@ module Google # primary CryptoKeyVersion. # @param [String] name # The name of the CryptoKey to get. + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -644,13 +571,13 @@ 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 get_project_location_key_ring_crypto_key(name, quota_user: nil, fields: nil, options: nil, &block) + def get_project_location_key_ring_crypto_key(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', options) command.response_representation = Google::Apis::CloudkmsV1::CryptoKey::Representation command.response_class = Google::Apis::CloudkmsV1::CryptoKey command.params['name'] = name unless name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -661,11 +588,11 @@ module Google # @param [Google::Apis::CloudkmsV1::CryptoKey] crypto_key_object # @param [String] update_mask # Required list of fields to be updated in this request. + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -678,7 +605,7 @@ 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 patch_project_location_key_ring_crypto_key(name, crypto_key_object = nil, update_mask: nil, quota_user: nil, fields: nil, options: nil, &block) + def patch_project_location_key_ring_crypto_key(name, crypto_key_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::CloudkmsV1::CryptoKey::Representation command.request_object = crypto_key_object @@ -686,8 +613,81 @@ module Google command.response_class = Google::Apis::CloudkmsV1::CryptoKey command.params['name'] = name unless name.nil? command.query['updateMask'] = update_mask unless update_mask.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Returns permissions that a caller has on the specified resource. + # If the resource does not exist, this will return an empty set of + # permissions, not a NOT_FOUND error. + # Note: This operation is designed to be used for building permission-aware + # UIs and command-line tools, not for authorization checking. This operation + # may "fail open" without warning. + # @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::CloudkmsV1::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::CloudkmsV1::TestIamPermissionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudkmsV1::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_crypto_key_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::CloudkmsV1::TestIamPermissionsRequest::Representation + command.request_object = test_iam_permissions_request_object + command.response_representation = Google::Apis::CloudkmsV1::TestIamPermissionsResponse::Representation + command.response_class = Google::Apis::CloudkmsV1::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 + + # Decrypt data that was protected by Encrypt. + # @param [String] name + # Required. The resource name of the CryptoKey to use for decryption. + # The server will choose the appropriate version. + # @param [Google::Apis::CloudkmsV1::DecryptRequest] decrypt_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::CloudkmsV1::DecryptResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudkmsV1::DecryptResponse] + # + # @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 decrypt_crypto_key(name, decrypt_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+name}:decrypt', options) + command.request_representation = Google::Apis::CloudkmsV1::DecryptRequest::Representation + command.request_object = decrypt_request_object + command.response_representation = Google::Apis::CloudkmsV1::DecryptResponse::Representation + command.response_class = Google::Apis::CloudkmsV1::DecryptResponse + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -704,11 +704,11 @@ module Google # subsequently be obtained by including the # ListCryptoKeyVersionsResponse.next_page_token in a subsequent request. # If unspecified, the server will pick an appropriate default. + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -721,15 +721,15 @@ 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_project_location_key_ring_crypto_key_crypto_key_versions(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_project_location_key_ring_crypto_key_crypto_key_versions(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/cryptoKeyVersions', options) command.response_representation = Google::Apis::CloudkmsV1::ListCryptoKeyVersionsResponse::Representation command.response_class = Google::Apis::CloudkmsV1::ListCryptoKeyVersionsResponse command.params['parent'] = parent unless parent.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -741,11 +741,11 @@ module Google # Required. The name of the CryptoKey associated with # the CryptoKeyVersions. # @param [Google::Apis::CloudkmsV1::CryptoKeyVersion] crypto_key_version_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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -758,15 +758,15 @@ 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 create_project_location_key_ring_crypto_key_crypto_key_version(parent, crypto_key_version_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def create_project_location_key_ring_crypto_key_crypto_key_version(parent, crypto_key_version_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/cryptoKeyVersions', options) command.request_representation = Google::Apis::CloudkmsV1::CryptoKeyVersion::Representation command.request_object = crypto_key_version_object command.response_representation = Google::Apis::CloudkmsV1::CryptoKeyVersion::Representation command.response_class = Google::Apis::CloudkmsV1::CryptoKeyVersion command.params['parent'] = parent unless parent.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -783,11 +783,11 @@ module Google # @param [String] name # The resource name of the CryptoKeyVersion to destroy. # @param [Google::Apis::CloudkmsV1::DestroyCryptoKeyVersionRequest] destroy_crypto_key_version_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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -800,15 +800,15 @@ 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 destroy_crypto_key_version(name, destroy_crypto_key_version_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def destroy_crypto_key_version(name, destroy_crypto_key_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:destroy', options) command.request_representation = Google::Apis::CloudkmsV1::DestroyCryptoKeyVersionRequest::Representation command.request_object = destroy_crypto_key_version_request_object command.response_representation = Google::Apis::CloudkmsV1::CryptoKeyVersion::Representation command.response_class = Google::Apis::CloudkmsV1::CryptoKeyVersion command.params['name'] = name unless name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -821,11 +821,11 @@ module Google # @param [String] name # The resource name of the CryptoKeyVersion to restore. # @param [Google::Apis::CloudkmsV1::RestoreCryptoKeyVersionRequest] restore_crypto_key_version_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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -838,15 +838,15 @@ 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 restore_crypto_key_version(name, restore_crypto_key_version_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def restore_crypto_key_version(name, restore_crypto_key_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:restore', options) command.request_representation = Google::Apis::CloudkmsV1::RestoreCryptoKeyVersionRequest::Representation command.request_object = restore_crypto_key_version_request_object command.response_representation = Google::Apis::CloudkmsV1::CryptoKeyVersion::Representation command.response_class = Google::Apis::CloudkmsV1::CryptoKeyVersion command.params['name'] = name unless name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -862,11 +862,11 @@ module Google # @param [Google::Apis::CloudkmsV1::CryptoKeyVersion] crypto_key_version_object # @param [String] update_mask # Required list of fields to be updated in this request. + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -879,7 +879,7 @@ 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 patch_project_location_key_ring_crypto_key_crypto_key_version(name, crypto_key_version_object = nil, update_mask: nil, quota_user: nil, fields: nil, options: nil, &block) + def patch_project_location_key_ring_crypto_key_crypto_key_version(name, crypto_key_version_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::CloudkmsV1::CryptoKeyVersion::Representation command.request_object = crypto_key_version_object @@ -887,19 +887,19 @@ module Google command.response_class = Google::Apis::CloudkmsV1::CryptoKeyVersion command.params['name'] = name unless name.nil? command.query['updateMask'] = update_mask unless update_mask.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Returns metadata for a given CryptoKeyVersion. # @param [String] name # The name of the CryptoKeyVersion to get. + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -912,13 +912,13 @@ 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 get_project_location_key_ring_crypto_key_crypto_key_version(name, quota_user: nil, fields: nil, options: nil, &block) + def get_project_location_key_ring_crypto_key_crypto_key_version(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', options) command.response_representation = Google::Apis::CloudkmsV1::CryptoKeyVersion::Representation command.response_class = Google::Apis::CloudkmsV1::CryptoKeyVersion command.params['name'] = name unless name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end diff --git a/generated/google/apis/cloudresourcemanager_v1.rb b/generated/google/apis/cloudresourcemanager_v1.rb index 036d9b6b4..5341671c8 100644 --- a/generated/google/apis/cloudresourcemanager_v1.rb +++ b/generated/google/apis/cloudresourcemanager_v1.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/resource-manager module CloudresourcemanagerV1 VERSION = 'V1' - REVISION = '20170501' + REVISION = '20170524' # View your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM_READ_ONLY = 'https://www.googleapis.com/auth/cloud-platform.read-only' diff --git a/generated/google/apis/cloudresourcemanager_v1/classes.rb b/generated/google/apis/cloudresourcemanager_v1/classes.rb index c1527a475..4971e286b 100644 --- a/generated/google/apis/cloudresourcemanager_v1/classes.rb +++ b/generated/google/apis/cloudresourcemanager_v1/classes.rb @@ -22,6 +22,515 @@ module Google module Apis module CloudresourcemanagerV1 + # 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] + 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 request sent to the [ListAvailableOrgPolicyConstraints] + # google.cloud.OrgPolicy.v1.ListAvailableOrgPolicyConstraints] method. + class ListAvailableOrgPolicyConstraintsRequest + include Google::Apis::Core::Hashable + + # Page token used to retrieve the next page. This is currently unsupported + # and will be ignored. The server may at any point start using this field. + # Corresponds to the JSON property `pageToken` + # @return [String] + attr_accessor :page_token + + # Size of the pages to be returned. This is currently unsupported and will + # be ignored. The server may at any point start using this field to limit + # page size. + # Corresponds to the JSON property `pageSize` + # @return [Fixnum] + attr_accessor :page_size + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @page_token = args[:page_token] if args.key?(:page_token) + @page_size = args[:page_size] if args.key?(:page_size) + end + end + + # Metadata describing a long running folder operation + class FolderOperation + include Google::Apis::Core::Hashable + + # The resource name of the folder or organization we are either creating + # the folder under or moving the folder to. + # Corresponds to the JSON property `destinationParent` + # @return [String] + attr_accessor :destination_parent + + # The type of this operation. + # Corresponds to the JSON property `operationType` + # @return [String] + attr_accessor :operation_type + + # The display name of the folder. + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # The resource name of the folder's parent. + # Only applicable when the operation_type is MOVE. + # Corresponds to the JSON property `sourceParent` + # @return [String] + attr_accessor :source_parent + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @destination_parent = args[:destination_parent] if args.key?(:destination_parent) + @operation_type = args[:operation_type] if args.key?(:operation_type) + @display_name = args[:display_name] if args.key?(:display_name) + @source_parent = args[:source_parent] if args.key?(:source_parent) + 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). + class Policy + include Google::Apis::Core::Hashable + + # `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 + + # Version of the `Policy`. The default version is 0. + # Corresponds to the JSON property `version` + # @return [Fixnum] + attr_accessor :version + + # Specifies cloud audit logging configuration for this policy. + # Corresponds to the JSON property `auditConfigs` + # @return [Array] + attr_accessor :audit_configs + + # Associates a list of `members` to a `role`. + # Multiple `bindings` must not be specified for the same `role`. + # `bindings` with no members will result in an error. + # Corresponds to the JSON property `bindings` + # @return [Array] + attr_accessor :bindings + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @etag = args[:etag] if args.key?(:etag) + @version = args[:version] if args.key?(:version) + @audit_configs = args[:audit_configs] if args.key?(:audit_configs) + @bindings = args[:bindings] if args.key?(:bindings) + end + end + + # A container to reference an id for any resource type. A `resource` in Google + # Cloud Platform is a generic term for something you (a developer) may want to + # interact with through one of our API's. Some examples are an App Engine app, + # a Compute Engine instance, a Cloud SQL database, and so on. + class ResourceId + include Google::Apis::Core::Hashable + + # Required field representing the resource type this id is for. + # At present, the valid types are: "organization" + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # Required field for the type-specific id. This should correspond to the id + # used in the type-specific API's. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @type = args[:type] if args.key?(:type) + @id = args[:id] if args.key?(:id) + end + end + + # The request sent to the GetEffectiveOrgPolicy method. + class GetEffectiveOrgPolicyRequest + include Google::Apis::Core::Hashable + + # The name of the `Constraint` to compute the effective `Policy`. + # Corresponds to the JSON property `constraint` + # @return [String] + attr_accessor :constraint + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @constraint = args[:constraint] if args.key?(:constraint) + end + end + + # The request sent to the ListOrgPolicies method. + class ListOrgPoliciesRequest + include Google::Apis::Core::Hashable + + # Page token used to retrieve the next page. This is currently unsupported + # and will be ignored. The server may at any point start using this field. + # Corresponds to the JSON property `pageToken` + # @return [String] + attr_accessor :page_token + + # Size of the pages to be returned. This is currently unsupported and will + # be ignored. The server may at any point start using this field to limit + # page size. + # Corresponds to the JSON property `pageSize` + # @return [Fixnum] + attr_accessor :page_size + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @page_token = args[:page_token] if args.key?(:page_token) + @page_size = args[:page_size] if args.key?(:page_size) + end + end + + # This resource represents a long-running operation that is the result of a + # network API call. + class Operation + include Google::Apis::Core::Hashable + + # The normal response of the operation in case of success. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # Corresponds to the JSON property `response` + # @return [Hash] + attr_accessor :response + + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should have the format of `operations/some/unique/name`. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The `Status` type defines a logical error model that is suitable for different + # programming environments, including REST APIs and RPC APIs. It is used by + # [gRPC](https://github.com/grpc). The error model is designed to be: + # - Simple to use and understand for most users + # - Flexible enough to meet unexpected needs + # # Overview + # The `Status` message contains three pieces of data: error code, error message, + # and error details. The error code should be an enum value of + # google.rpc.Code, but it may accept additional error codes if needed. The + # error message should be a developer-facing English message that helps + # developers *understand* and *resolve* the error. If a localized user-facing + # error message is needed, put the localized message in the error details or + # localize it in the client. The optional error details may contain arbitrary + # information about the error. There is a predefined set of error detail types + # in the package `google.rpc` that can be used for common error conditions. + # # Language mapping + # The `Status` message is the logical representation of the error model, but it + # is not necessarily the actual wire format. When the `Status` message is + # exposed in different client libraries and different wire protocols, it can be + # mapped differently. For example, it will likely be mapped to some exceptions + # in Java, but more likely mapped to some error codes in C. + # # Other uses + # The error model and the `Status` message can be used in a variety of + # environments, either with or without APIs, to provide a + # consistent developer experience across different environments. + # Example uses of this error model include: + # - Partial errors. If a service needs to return partial errors to the client, + # it may embed the `Status` in the normal response to indicate the partial + # errors. + # - Workflow errors. A typical workflow has multiple steps. Each step may + # have a `Status` message for error reporting. + # - Batch operations. If a client uses batch request and batch response, the + # `Status` message should be used directly inside batch response, one for + # each error sub-response. + # - Asynchronous operations. If an API call embeds asynchronous operation + # results in its response, the status of those operations should be + # represented directly using the `Status` message. + # - Logging. If some API errors are stored in logs, the message `Status` could + # be used directly after any stripping needed for security/privacy reasons. + # Corresponds to the JSON property `error` + # @return [Google::Apis::CloudresourcemanagerV1::Status] + attr_accessor :error + + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # Corresponds to the JSON property `metadata` + # @return [Hash] + attr_accessor :metadata + + # If the value is `false`, it means the operation is still in progress. + # If true, the operation is completed, and either `error` or `response` is + # available. + # Corresponds to the JSON property `done` + # @return [Boolean] + attr_accessor :done + alias_method :done?, :done + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @response = args[:response] if args.key?(:response) + @name = args[:name] if args.key?(:name) + @error = args[:error] if args.key?(:error) + @metadata = args[:metadata] if args.key?(:metadata) + @done = args[:done] if args.key?(:done) + end + end + + # 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 + # AuditConfig 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 + + # 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 + + # The configuration for logging of each type of permission. + # Next ID: 4 + # Corresponds to the JSON property `auditLogConfigs` + # @return [Array] + attr_accessor :audit_log_configs + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @service = args[:service] if args.key?(:service) + @audit_log_configs = args[:audit_log_configs] if args.key?(:audit_log_configs) + end + end + + # The `Status` type defines a logical error model that is suitable for different + # programming environments, including REST APIs and RPC APIs. It is used by + # [gRPC](https://github.com/grpc). The error model is designed to be: + # - Simple to use and understand for most users + # - Flexible enough to meet unexpected needs + # # Overview + # The `Status` message contains three pieces of data: error code, error message, + # and error details. The error code should be an enum value of + # google.rpc.Code, but it may accept additional error codes if needed. The + # error message should be a developer-facing English message that helps + # developers *understand* and *resolve* the error. If a localized user-facing + # error message is needed, put the localized message in the error details or + # localize it in the client. The optional error details may contain arbitrary + # information about the error. There is a predefined set of error detail types + # in the package `google.rpc` that can be used for common error conditions. + # # Language mapping + # The `Status` message is the logical representation of the error model, but it + # is not necessarily the actual wire format. When the `Status` message is + # exposed in different client libraries and different wire protocols, it can be + # mapped differently. For example, it will likely be mapped to some exceptions + # in Java, but more likely mapped to some error codes in C. + # # Other uses + # The error model and the `Status` message can be used in a variety of + # environments, either with or without APIs, to provide a + # consistent developer experience across different environments. + # Example uses of this error model include: + # - Partial errors. If a service needs to return partial errors to the client, + # it may embed the `Status` in the normal response to indicate the partial + # errors. + # - Workflow errors. A typical workflow has multiple steps. Each step may + # have a `Status` message for error reporting. + # - Batch operations. If a client uses batch request and batch response, the + # `Status` message should be used directly inside batch response, one for + # each error sub-response. + # - Asynchronous operations. If an API call embeds asynchronous operation + # results in its response, the status of those operations should be + # represented directly using the `Status` message. + # - Logging. If some API errors are stored in logs, the message `Status` could + # be used directly after any stripping needed for security/privacy reasons. + class Status + include Google::Apis::Core::Hashable + + # The status code, which should be an enum value of google.rpc.Code. + # Corresponds to the JSON property `code` + # @return [Fixnum] + attr_accessor :code + + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # google.rpc.Status.details field, or localized by the client. + # Corresponds to the JSON property `message` + # @return [String] + attr_accessor :message + + # A list of messages that carry the error details. There will be a + # common set of message types for APIs to use. + # Corresponds to the JSON property `details` + # @return [Array>] + attr_accessor :details + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @code = args[:code] if args.key?(:code) + @message = args[:message] if args.key?(:message) + @details = args[:details] if args.key?(:details) + end + end + + # The response message for Liens.ListLiens. + class ListLiensResponse + include Google::Apis::Core::Hashable + + # A list of Liens. + # Corresponds to the JSON property `liens` + # @return [Array] + attr_accessor :liens + + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @liens = args[:liens] if args.key?(:liens) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + # A `Constraint` describes a way in which a resource's configuration can be # restricted. For example, it controls which cloud services can be activated # across an organization, or whether a Compute Engine instance can have @@ -38,12 +547,16 @@ module Google class Constraint include Google::Apis::Core::Hashable - # Detailed description of what this `Constraint` controls as well as how and - # where it is enforced. - # Mutable. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description + # A `Constraint` that allows or disallows a list of string values, which are + # configured by an Organization's policy administrator with a `Policy`. + # Corresponds to the JSON property `listConstraint` + # @return [Google::Apis::CloudresourcemanagerV1::ListConstraint] + attr_accessor :list_constraint + + # Version of the `Constraint`. Default version is 0; + # Corresponds to the JSON property `version` + # @return [Fixnum] + attr_accessor :version # The human readable name. # Mutable. @@ -51,6 +564,13 @@ module Google # @return [String] attr_accessor :display_name + # Detailed description of what this `Constraint` controls as well as how and + # where it is enforced. + # Mutable. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + # A `Constraint` that is either enforced or not. # For example a constraint `constraints/compute.disableSerialPortAccess`. # If it is enforced on a VM instance, serial port connections will not be @@ -70,128 +590,19 @@ module Google # @return [String] attr_accessor :name - # Version of the `Constraint`. Default version is 0; - # Corresponds to the JSON property `version` - # @return [Fixnum] - attr_accessor :version - - # A `Constraint` that allows or disallows a list of string values, which are - # configured by an Organization's policy administrator with a `Policy`. - # Corresponds to the JSON property `listConstraint` - # @return [Google::Apis::CloudresourcemanagerV1::ListConstraint] - attr_accessor :list_constraint - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @description = args[:description] if args.key?(:description) + @list_constraint = args[:list_constraint] if args.key?(:list_constraint) + @version = args[:version] if args.key?(:version) @display_name = args[:display_name] if args.key?(:display_name) + @description = args[:description] if args.key?(:description) @boolean_constraint = args[:boolean_constraint] if args.key?(:boolean_constraint) @constraint_default = args[:constraint_default] if args.key?(:constraint_default) @name = args[:name] if args.key?(:name) - @version = args[:version] if args.key?(:version) - @list_constraint = args[:list_constraint] if args.key?(:list_constraint) - end - end - - # The `Status` type defines a logical error model that is suitable for different - # programming environments, including REST APIs and RPC APIs. It is used by - # [gRPC](https://github.com/grpc). The error model is designed to be: - # - Simple to use and understand for most users - # - Flexible enough to meet unexpected needs - # # Overview - # The `Status` message contains three pieces of data: error code, error message, - # and error details. The error code should be an enum value of - # google.rpc.Code, but it may accept additional error codes if needed. The - # error message should be a developer-facing English message that helps - # developers *understand* and *resolve* the error. If a localized user-facing - # error message is needed, put the localized message in the error details or - # localize it in the client. The optional error details may contain arbitrary - # information about the error. There is a predefined set of error detail types - # in the package `google.rpc` which can be used for common error conditions. - # # Language mapping - # The `Status` message is the logical representation of the error model, but it - # is not necessarily the actual wire format. When the `Status` message is - # exposed in different client libraries and different wire protocols, it can be - # mapped differently. For example, it will likely be mapped to some exceptions - # in Java, but more likely mapped to some error codes in C. - # # Other uses - # The error model and the `Status` message can be used in a variety of - # environments, either with or without APIs, to provide a - # consistent developer experience across different environments. - # Example uses of this error model include: - # - Partial errors. If a service needs to return partial errors to the client, - # it may embed the `Status` in the normal response to indicate the partial - # errors. - # - Workflow errors. A typical workflow has multiple steps. Each step may - # have a `Status` message for error reporting purpose. - # - Batch operations. If a client uses batch request and batch response, the - # `Status` message should be used directly inside batch response, one for - # each error sub-response. - # - Asynchronous operations. If an API call embeds asynchronous operation - # results in its response, the status of those operations should be - # represented directly using the `Status` message. - # - Logging. If some API errors are stored in logs, the message `Status` could - # be used directly after any stripping needed for security/privacy reasons. - class Status - include Google::Apis::Core::Hashable - - # A list of messages that carry the error details. There will be a - # common set of message types for APIs to use. - # Corresponds to the JSON property `details` - # @return [Array>] - attr_accessor :details - - # The status code, which should be an enum value of google.rpc.Code. - # Corresponds to the JSON property `code` - # @return [Fixnum] - attr_accessor :code - - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # google.rpc.Status.details field, or localized by the client. - # Corresponds to the JSON property `message` - # @return [String] - attr_accessor :message - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @details = args[:details] if args.key?(:details) - @code = args[:code] if args.key?(:code) - @message = args[:message] if args.key?(:message) - end - end - - # The response message for Liens.ListLiens. - class ListLiensResponse - include Google::Apis::Core::Hashable - - # Token to retrieve the next page of results, or empty if there are no more - # results in the list. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # A list of Liens. - # Corresponds to the JSON property `liens` - # @return [Array] - attr_accessor :liens - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @liens = args[:liens] if args.key?(:liens) end end @@ -277,20 +688,6 @@ module Google end end - # The request sent to the UndeleteProject - # method. - class UndeleteProjectRequest - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - # The request sent to the ClearOrgPolicy method. class ClearOrgPolicyRequest include Google::Apis::Core::Hashable @@ -318,6 +715,20 @@ module Google end end + # The request sent to the UndeleteProject + # method. + class UndeleteProjectRequest + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + # A status object which is used as the `metadata` field for the Operation # returned by CreateProject. It provides insight for when significant phases of # Project creation have completed. @@ -435,6 +846,12 @@ module Google class ListProjectsResponse include Google::Apis::Core::Hashable + # The list of Projects that matched the list filter. This list can + # be paginated. + # Corresponds to the JSON property `projects` + # @return [Array] + attr_accessor :projects + # Pagination token. # If the result set is too large to fit in a single response, this token # is returned. It encodes the position of the current result cursor. @@ -447,20 +864,14 @@ module Google # @return [String] attr_accessor :next_page_token - # The list of Projects that matched the list filter. This list can - # be paginated. - # Corresponds to the JSON property `projects` - # @return [Array] - attr_accessor :projects - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) @projects = args[:projects] if args.key?(:projects) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) end end @@ -470,12 +881,6 @@ module Google class Project include Google::Apis::Core::Hashable - # The Project lifecycle state. - # Read-only. - # Corresponds to the JSON property `lifecycleState` - # @return [String] - attr_accessor :lifecycle_state - # The number uniquely identifying the project. # Example: 415104041262 # Read-only. @@ -491,6 +896,12 @@ module Google # @return [Google::Apis::CloudresourcemanagerV1::ResourceId] attr_accessor :parent + # Creation time. + # Read-only. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + # The labels associated with this Project. # Label keys must be between 1 and 63 characters long and must conform # to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. @@ -505,12 +916,6 @@ module Google # @return [Hash] attr_accessor :labels - # Creation time. - # Read-only. - # Corresponds to the JSON property `createTime` - # @return [String] - attr_accessor :create_time - # The user-assigned display name of the Project. # It must be 4 to 30 characters. # Allowed characters are: lowercase and uppercase letters, numbers, @@ -531,19 +936,25 @@ module Google # @return [String] attr_accessor :project_id + # The Project lifecycle state. + # Read-only. + # Corresponds to the JSON property `lifecycleState` + # @return [String] + attr_accessor :lifecycle_state + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @lifecycle_state = args[:lifecycle_state] if args.key?(:lifecycle_state) @project_number = args[:project_number] if args.key?(:project_number) @parent = args[:parent] if args.key?(:parent) - @labels = args[:labels] if args.key?(:labels) @create_time = args[:create_time] if args.key?(:create_time) + @labels = args[:labels] if args.key?(:labels) @name = args[:name] if args.key?(:name) @project_id = args[:project_id] if args.key?(:project_id) + @lifecycle_state = args[:lifecycle_state] if args.key?(:lifecycle_state) end end @@ -629,6 +1040,14 @@ module Google class OrgPolicy include Google::Apis::Core::Hashable + # The time stamp the `Policy` was previously updated. This is set by the + # server, not specified by the caller, and represents the last time a call to + # `SetOrgPolicy` was made for that `Policy`. Any value set by the client will + # be ignored. + # Corresponds to the JSON property `updateTime` + # @return [String] + attr_accessor :update_time + # Version of the `Policy`. Default version is 0; # Corresponds to the JSON property `version` # @return [Fixnum] @@ -679,6 +1098,12 @@ module Google # @return [String] attr_accessor :etag + # Used in `policy_type` to specify how `boolean_policy` will behave at this + # resource. + # Corresponds to the JSON property `booleanPolicy` + # @return [Google::Apis::CloudresourcemanagerV1::BooleanPolicy] + attr_accessor :boolean_policy + # The name of the `Constraint` the `Policy` is configuring, for example, # `constraints/serviceuser.services`. # Immutable after creation. @@ -686,33 +1111,19 @@ module Google # @return [String] attr_accessor :constraint - # Used in `policy_type` to specify how `boolean_policy` will behave at this - # resource. - # Corresponds to the JSON property `booleanPolicy` - # @return [Google::Apis::CloudresourcemanagerV1::BooleanPolicy] - attr_accessor :boolean_policy - - # The time stamp the `Policy` was previously updated. This is set by the - # server, not specified by the caller, and represents the last time a call to - # `SetOrgPolicy` was made for that `Policy`. Any value set by the client will - # be ignored. - # Corresponds to the JSON property `updateTime` - # @return [String] - attr_accessor :update_time - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @update_time = args[:update_time] if args.key?(:update_time) @version = args[:version] if args.key?(:version) @restore_default = args[:restore_default] if args.key?(:restore_default) @list_policy = args[:list_policy] if args.key?(:list_policy) @etag = args[:etag] if args.key?(:etag) - @constraint = args[:constraint] if args.key?(:constraint) @boolean_policy = args[:boolean_policy] if args.key?(:boolean_policy) - @update_time = args[:update_time] if args.key?(:update_time) + @constraint = args[:constraint] if args.key?(:constraint) end end @@ -779,18 +1190,6 @@ module Google class Lien include Google::Apis::Core::Hashable - # A reference to the resource this Lien is attached to. The server will - # validate the parent against those for which Liens are supported. - # Example: `projects/1234` - # Corresponds to the JSON property `parent` - # @return [String] - attr_accessor :parent - - # The creation time of this Lien. - # Corresponds to the JSON property `createTime` - # @return [String] - attr_accessor :create_time - # A system-generated unique identifier for this Lien. # Example: `liens/1234abcd` # Corresponds to the JSON property `name` @@ -821,18 +1220,30 @@ module Google # @return [Array] attr_accessor :restrictions + # A reference to the resource this Lien is attached to. The server will + # validate the parent against those for which Liens are supported. + # Example: `projects/1234` + # Corresponds to the JSON property `parent` + # @return [String] + attr_accessor :parent + + # The creation time of this Lien. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @parent = args[:parent] if args.key?(:parent) - @create_time = args[:create_time] if args.key?(:create_time) @name = args[:name] if args.key?(:name) @reason = args[:reason] if args.key?(:reason) @origin = args[:origin] if args.key?(:origin) @restrictions = args[:restrictions] if args.key?(:restrictions) + @parent = args[:parent] if args.key?(:parent) + @create_time = args[:create_time] if args.key?(:create_time) end end @@ -903,15 +1314,6 @@ module Google class SetIamPolicyRequest include Google::Apis::Core::Hashable - # 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 - # 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 @@ -942,14 +1344,23 @@ module Google # @return [Google::Apis::CloudresourcemanagerV1::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) - @update_mask = args[:update_mask] if args.key?(:update_mask) @policy = args[:policy] if args.key?(:policy) + @update_mask = args[:update_mask] if args.key?(:update_mask) end end @@ -977,12 +1388,6 @@ module Google class Organization include Google::Apis::Core::Hashable - # Timestamp when the Organization was created. Assigned by the server. - # @OutputOnly - # Corresponds to the JSON property `creationTime` - # @return [String] - attr_accessor :creation_time - # The entity that owns an Organization. The lifetime of the Organization and # all of its descendants are bound to the `OrganizationOwner`. If the # `OrganizationOwner` is deleted, the Organization and all its descendants will @@ -1012,17 +1417,23 @@ module Google # @return [String] attr_accessor :display_name + # Timestamp when the Organization was created. Assigned by the server. + # @OutputOnly + # Corresponds to the JSON property `creationTime` + # @return [String] + attr_accessor :creation_time + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @creation_time = args[:creation_time] if args.key?(:creation_time) @owner = args[:owner] if args.key?(:owner) @lifecycle_state = args[:lifecycle_state] if args.key?(:lifecycle_state) @name = args[:name] if args.key?(:name) @display_name = args[:display_name] if args.key?(:display_name) + @creation_time = args[:creation_time] if args.key?(:creation_time) end end @@ -1033,24 +1444,24 @@ module Google class ListAvailableOrgPolicyConstraintsResponse include Google::Apis::Core::Hashable - # Page token used to retrieve the next page. This is currently not used. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - # The collection of constraints that are settable on the request resource. # Corresponds to the JSON property `constraints` # @return [Array] attr_accessor :constraints + # Page token used to retrieve the next page. This is currently not used. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) @constraints = args[:constraints] if args.key?(:constraints) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) end end @@ -1224,6 +1635,11 @@ module Google class AuditLogConfig include Google::Apis::Core::Hashable + # The log type that this config enables. + # Corresponds to the JSON property `logType` + # @return [String] + attr_accessor :log_type + # Specifies the identities that do not cause logging for this type of # permission. # Follows the same format of Binding.members. @@ -1231,19 +1647,14 @@ module Google # @return [Array] 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) + @exempted_members = args[:exempted_members] if args.key?(:exempted_members) end end @@ -1304,417 +1715,6 @@ module Google def update!(**args) 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] - 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 request sent to the [ListAvailableOrgPolicyConstraints] - # google.cloud.OrgPolicy.v1.ListAvailableOrgPolicyConstraints] method. - class ListAvailableOrgPolicyConstraintsRequest - include Google::Apis::Core::Hashable - - # Page token used to retrieve the next page. This is currently unsupported - # and will be ignored. The server may at any point start using this field. - # Corresponds to the JSON property `pageToken` - # @return [String] - attr_accessor :page_token - - # Size of the pages to be returned. This is currently unsupported and will - # be ignored. The server may at any point start using this field to limit - # page size. - # Corresponds to the JSON property `pageSize` - # @return [Fixnum] - attr_accessor :page_size - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @page_token = args[:page_token] if args.key?(:page_token) - @page_size = args[:page_size] if args.key?(:page_size) - 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). - class Policy - include Google::Apis::Core::Hashable - - # `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 - - # Version of the `Policy`. The default version is 0. - # Corresponds to the JSON property `version` - # @return [Fixnum] - attr_accessor :version - - # Specifies cloud audit logging configuration for this policy. - # Corresponds to the JSON property `auditConfigs` - # @return [Array] - attr_accessor :audit_configs - - # Associates a list of `members` to a `role`. - # Multiple `bindings` must not be specified for the same `role`. - # `bindings` with no members will result in an error. - # Corresponds to the JSON property `bindings` - # @return [Array] - attr_accessor :bindings - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @etag = args[:etag] if args.key?(:etag) - @version = args[:version] if args.key?(:version) - @audit_configs = args[:audit_configs] if args.key?(:audit_configs) - @bindings = args[:bindings] if args.key?(:bindings) - end - end - - # Metadata describing a long running folder operation - class FolderOperation - include Google::Apis::Core::Hashable - - # The type of this operation. - # Corresponds to the JSON property `operationType` - # @return [String] - attr_accessor :operation_type - - # The display name of the folder. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # The resource name of the folder's parent. - # Only applicable when the operation_type is MOVE. - # Corresponds to the JSON property `sourceParent` - # @return [String] - attr_accessor :source_parent - - # The resource name of the folder or organization we are either creating - # the folder under or moving the folder to. - # Corresponds to the JSON property `destinationParent` - # @return [String] - attr_accessor :destination_parent - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @operation_type = args[:operation_type] if args.key?(:operation_type) - @display_name = args[:display_name] if args.key?(:display_name) - @source_parent = args[:source_parent] if args.key?(:source_parent) - @destination_parent = args[:destination_parent] if args.key?(:destination_parent) - end - end - - # A container to reference an id for any resource type. A `resource` in Google - # Cloud Platform is a generic term for something you (a developer) may want to - # interact with through one of our API's. Some examples are an App Engine app, - # a Compute Engine instance, a Cloud SQL database, and so on. - class ResourceId - include Google::Apis::Core::Hashable - - # Required field representing the resource type this id is for. - # At present, the valid types are: "organization" - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Required field for the type-specific id. This should correspond to the id - # used in the type-specific API's. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @type = args[:type] if args.key?(:type) - @id = args[:id] if args.key?(:id) - end - end - - # The request sent to the GetEffectiveOrgPolicy method. - class GetEffectiveOrgPolicyRequest - include Google::Apis::Core::Hashable - - # The name of the `Constraint` to compute the effective `Policy`. - # Corresponds to the JSON property `constraint` - # @return [String] - attr_accessor :constraint - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @constraint = args[:constraint] if args.key?(:constraint) - end - end - - # The request sent to the ListOrgPolicies method. - class ListOrgPoliciesRequest - include Google::Apis::Core::Hashable - - # Page token used to retrieve the next page. This is currently unsupported - # and will be ignored. The server may at any point start using this field. - # Corresponds to the JSON property `pageToken` - # @return [String] - attr_accessor :page_token - - # Size of the pages to be returned. This is currently unsupported and will - # be ignored. The server may at any point start using this field to limit - # page size. - # Corresponds to the JSON property `pageSize` - # @return [Fixnum] - attr_accessor :page_size - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @page_token = args[:page_token] if args.key?(:page_token) - @page_size = args[:page_size] if args.key?(:page_size) - end - end - - # This resource represents a long-running operation that is the result of a - # network API call. - class Operation - include Google::Apis::Core::Hashable - - # The normal response of the operation in case of success. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # Corresponds to the JSON property `response` - # @return [Hash] - attr_accessor :response - - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should have the format of `operations/some/unique/name`. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The `Status` type defines a logical error model that is suitable for different - # programming environments, including REST APIs and RPC APIs. It is used by - # [gRPC](https://github.com/grpc). The error model is designed to be: - # - Simple to use and understand for most users - # - Flexible enough to meet unexpected needs - # # Overview - # The `Status` message contains three pieces of data: error code, error message, - # and error details. The error code should be an enum value of - # google.rpc.Code, but it may accept additional error codes if needed. The - # error message should be a developer-facing English message that helps - # developers *understand* and *resolve* the error. If a localized user-facing - # error message is needed, put the localized message in the error details or - # localize it in the client. The optional error details may contain arbitrary - # information about the error. There is a predefined set of error detail types - # in the package `google.rpc` which can be used for common error conditions. - # # Language mapping - # The `Status` message is the logical representation of the error model, but it - # is not necessarily the actual wire format. When the `Status` message is - # exposed in different client libraries and different wire protocols, it can be - # mapped differently. For example, it will likely be mapped to some exceptions - # in Java, but more likely mapped to some error codes in C. - # # Other uses - # The error model and the `Status` message can be used in a variety of - # environments, either with or without APIs, to provide a - # consistent developer experience across different environments. - # Example uses of this error model include: - # - Partial errors. If a service needs to return partial errors to the client, - # it may embed the `Status` in the normal response to indicate the partial - # errors. - # - Workflow errors. A typical workflow has multiple steps. Each step may - # have a `Status` message for error reporting purpose. - # - Batch operations. If a client uses batch request and batch response, the - # `Status` message should be used directly inside batch response, one for - # each error sub-response. - # - Asynchronous operations. If an API call embeds asynchronous operation - # results in its response, the status of those operations should be - # represented directly using the `Status` message. - # - Logging. If some API errors are stored in logs, the message `Status` could - # be used directly after any stripping needed for security/privacy reasons. - # Corresponds to the JSON property `error` - # @return [Google::Apis::CloudresourcemanagerV1::Status] - attr_accessor :error - - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # Corresponds to the JSON property `metadata` - # @return [Hash] - attr_accessor :metadata - - # If the value is `false`, it means the operation is still in progress. - # If true, the operation is completed, and either `error` or `response` is - # available. - # Corresponds to the JSON property `done` - # @return [Boolean] - attr_accessor :done - alias_method :done?, :done - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @response = args[:response] if args.key?(:response) - @name = args[:name] if args.key?(:name) - @error = args[:error] if args.key?(:error) - @metadata = args[:metadata] if args.key?(:metadata) - @done = args[:done] if args.key?(:done) - end - end - - # 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 - # AuditConfig 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 - - # 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 - - # The configuration for logging of each type of permission. - # Next ID: 4 - # Corresponds to the JSON property `auditLogConfigs` - # @return [Array] - attr_accessor :audit_log_configs - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @service = args[:service] if args.key?(:service) - @audit_log_configs = args[:audit_log_configs] if args.key?(:audit_log_configs) - end - end end end end diff --git a/generated/google/apis/cloudresourcemanager_v1/representations.rb b/generated/google/apis/cloudresourcemanager_v1/representations.rb index 32e3095d0..cea3b1874 100644 --- a/generated/google/apis/cloudresourcemanager_v1/representations.rb +++ b/generated/google/apis/cloudresourcemanager_v1/representations.rb @@ -22,204 +22,6 @@ module Google module Apis module CloudresourcemanagerV1 - class Constraint - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Status - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListLiensResponse - 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 GetOrgPolicyRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class RestoreDefault - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UndeleteProjectRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ClearOrgPolicyRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ProjectCreationStatus - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BooleanConstraint - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class GetIamPolicyRequest - 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 OrganizationOwner - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListProjectsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Project - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SearchOrganizationsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListOrgPoliciesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class FolderOperationError - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class OrgPolicy - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BooleanPolicy - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Lien - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Ancestor - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListConstraint - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SetOrgPolicyRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SetIamPolicyRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Empty - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Organization - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListAvailableOrgPolicyConstraintsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListPolicy - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class GetAncestryResponse - 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 SearchOrganizationsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class GetAncestryRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class TestIamPermissionsRequest class Representation < Google::Apis::Core::JsonRepresentation; end @@ -232,13 +34,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class Policy + class FolderOperation class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class FolderOperation + class Policy class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -274,291 +76,202 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class Constraint - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :description, as: 'description' - property :display_name, as: 'displayName' - property :boolean_constraint, as: 'booleanConstraint', class: Google::Apis::CloudresourcemanagerV1::BooleanConstraint, decorator: Google::Apis::CloudresourcemanagerV1::BooleanConstraint::Representation - - property :constraint_default, as: 'constraintDefault' - property :name, as: 'name' - property :version, as: 'version' - property :list_constraint, as: 'listConstraint', class: Google::Apis::CloudresourcemanagerV1::ListConstraint, decorator: Google::Apis::CloudresourcemanagerV1::ListConstraint::Representation - - end - end - class Status - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :details, as: 'details' - property :code, as: 'code' - property :message, as: 'message' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ListLiensResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - collection :liens, as: 'liens', class: Google::Apis::CloudresourcemanagerV1::Lien, decorator: Google::Apis::CloudresourcemanagerV1::Lien::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport + end + + class Constraint + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class Binding - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :members, as: 'members' - property :role, as: 'role' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class GetOrgPolicyRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :constraint, as: 'constraint' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class RestoreDefault - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end - end + class Representation < Google::Apis::Core::JsonRepresentation; end - class UndeleteProjectRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end + include Google::Apis::Core::JsonObjectSupport end class ClearOrgPolicyRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :etag, :base64 => true, as: 'etag' - property :constraint, as: 'constraint' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UndeleteProjectRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ProjectCreationStatus - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :ready, as: 'ready' - property :create_time, as: 'createTime' - property :gettable, as: 'gettable' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class BooleanConstraint - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class GetIamPolicyRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class TestIamPermissionsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :permissions, as: 'permissions' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class OrganizationOwner - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :directory_customer_id, as: 'directoryCustomerId' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ListProjectsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - collection :projects, as: 'projects', class: Google::Apis::CloudresourcemanagerV1::Project, decorator: Google::Apis::CloudresourcemanagerV1::Project::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class Project - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :lifecycle_state, as: 'lifecycleState' - property :project_number, :numeric_string => true, as: 'projectNumber' - property :parent, as: 'parent', class: Google::Apis::CloudresourcemanagerV1::ResourceId, decorator: Google::Apis::CloudresourcemanagerV1::ResourceId::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - hash :labels, as: 'labels' - property :create_time, as: 'createTime' - property :name, as: 'name' - property :project_id, as: 'projectId' - end + include Google::Apis::Core::JsonObjectSupport end class SearchOrganizationsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - collection :organizations, as: 'organizations', class: Google::Apis::CloudresourcemanagerV1::Organization, decorator: Google::Apis::CloudresourcemanagerV1::Organization::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class ListOrgPoliciesResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :policies, as: 'policies', class: Google::Apis::CloudresourcemanagerV1::OrgPolicy, decorator: Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :next_page_token, as: 'nextPageToken' - end + include Google::Apis::Core::JsonObjectSupport end class FolderOperationError - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :error_message_id, as: 'errorMessageId' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class OrgPolicy - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :version, as: 'version' - property :restore_default, as: 'restoreDefault', class: Google::Apis::CloudresourcemanagerV1::RestoreDefault, decorator: Google::Apis::CloudresourcemanagerV1::RestoreDefault::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :list_policy, as: 'listPolicy', class: Google::Apis::CloudresourcemanagerV1::ListPolicy, decorator: Google::Apis::CloudresourcemanagerV1::ListPolicy::Representation - - property :etag, :base64 => true, as: 'etag' - property :constraint, as: 'constraint' - property :boolean_policy, as: 'booleanPolicy', class: Google::Apis::CloudresourcemanagerV1::BooleanPolicy, decorator: Google::Apis::CloudresourcemanagerV1::BooleanPolicy::Representation - - property :update_time, as: 'updateTime' - end + include Google::Apis::Core::JsonObjectSupport end class BooleanPolicy - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :enforced, as: 'enforced' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class Lien - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :parent, as: 'parent' - property :create_time, as: 'createTime' - property :name, as: 'name' - property :reason, as: 'reason' - property :origin, as: 'origin' - collection :restrictions, as: 'restrictions' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class Ancestor - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :resource_id, as: 'resourceId', class: Google::Apis::CloudresourcemanagerV1::ResourceId, decorator: Google::Apis::CloudresourcemanagerV1::ResourceId::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class ListConstraint - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :suggested_value, as: 'suggestedValue' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class SetOrgPolicyRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :policy, as: 'policy', class: Google::Apis::CloudresourcemanagerV1::OrgPolicy, decorator: Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class SetIamPolicyRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :update_mask, as: 'updateMask' - property :policy, as: 'policy', class: Google::Apis::CloudresourcemanagerV1::Policy, decorator: Google::Apis::CloudresourcemanagerV1::Policy::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class Empty - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class Organization - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :creation_time, as: 'creationTime' - property :owner, as: 'owner', class: Google::Apis::CloudresourcemanagerV1::OrganizationOwner, decorator: Google::Apis::CloudresourcemanagerV1::OrganizationOwner::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :lifecycle_state, as: 'lifecycleState' - property :name, as: 'name' - property :display_name, as: 'displayName' - end + include Google::Apis::Core::JsonObjectSupport end class ListAvailableOrgPolicyConstraintsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - collection :constraints, as: 'constraints', class: Google::Apis::CloudresourcemanagerV1::Constraint, decorator: Google::Apis::CloudresourcemanagerV1::Constraint::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class ListPolicy - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :all_values, as: 'allValues' - collection :allowed_values, as: 'allowedValues' - property :suggested_value, as: 'suggestedValue' - property :inherit_from_parent, as: 'inheritFromParent' - collection :denied_values, as: 'deniedValues' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class GetAncestryResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :ancestor, as: 'ancestor', class: Google::Apis::CloudresourcemanagerV1::Ancestor, decorator: Google::Apis::CloudresourcemanagerV1::Ancestor::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class AuditLogConfig - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :exempted_members, as: 'exemptedMembers' - property :log_type, as: 'logType' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class SearchOrganizationsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :page_token, as: 'pageToken' - property :page_size, as: 'pageSize' - property :filter, as: 'filter' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class GetAncestryRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class TestIamPermissionsRequest @@ -576,6 +289,16 @@ module Google end end + class FolderOperation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :destination_parent, as: 'destinationParent' + property :operation_type, as: 'operationType' + property :display_name, as: 'displayName' + property :source_parent, as: 'sourceParent' + end + end + class Policy # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -588,16 +311,6 @@ module Google end end - class FolderOperation - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :operation_type, as: 'operationType' - property :display_name, as: 'displayName' - property :source_parent, as: 'sourceParent' - property :destination_parent, as: 'destinationParent' - end - end - class ResourceId # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -641,6 +354,293 @@ module Google end end + + class Status + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :code, as: 'code' + property :message, as: 'message' + collection :details, as: 'details' + end + end + + class ListLiensResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :liens, as: 'liens', class: Google::Apis::CloudresourcemanagerV1::Lien, decorator: Google::Apis::CloudresourcemanagerV1::Lien::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class Constraint + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :list_constraint, as: 'listConstraint', class: Google::Apis::CloudresourcemanagerV1::ListConstraint, decorator: Google::Apis::CloudresourcemanagerV1::ListConstraint::Representation + + property :version, as: 'version' + property :display_name, as: 'displayName' + property :description, as: 'description' + property :boolean_constraint, as: 'booleanConstraint', class: Google::Apis::CloudresourcemanagerV1::BooleanConstraint, decorator: Google::Apis::CloudresourcemanagerV1::BooleanConstraint::Representation + + property :constraint_default, as: 'constraintDefault' + property :name, as: 'name' + end + end + + class Binding + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :members, as: 'members' + property :role, as: 'role' + end + end + + class GetOrgPolicyRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :constraint, as: 'constraint' + end + end + + class RestoreDefault + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class ClearOrgPolicyRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :etag, :base64 => true, as: 'etag' + property :constraint, as: 'constraint' + end + end + + class UndeleteProjectRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class ProjectCreationStatus + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :ready, as: 'ready' + property :create_time, as: 'createTime' + property :gettable, as: 'gettable' + end + end + + class BooleanConstraint + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class GetIamPolicyRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class TestIamPermissionsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :permissions, as: 'permissions' + end + end + + class OrganizationOwner + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :directory_customer_id, as: 'directoryCustomerId' + end + end + + class ListProjectsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :projects, as: 'projects', class: Google::Apis::CloudresourcemanagerV1::Project, decorator: Google::Apis::CloudresourcemanagerV1::Project::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class Project + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :project_number, :numeric_string => true, as: 'projectNumber' + property :parent, as: 'parent', class: Google::Apis::CloudresourcemanagerV1::ResourceId, decorator: Google::Apis::CloudresourcemanagerV1::ResourceId::Representation + + property :create_time, as: 'createTime' + hash :labels, as: 'labels' + property :name, as: 'name' + property :project_id, as: 'projectId' + property :lifecycle_state, as: 'lifecycleState' + end + end + + class SearchOrganizationsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :organizations, as: 'organizations', class: Google::Apis::CloudresourcemanagerV1::Organization, decorator: Google::Apis::CloudresourcemanagerV1::Organization::Representation + + end + end + + class ListOrgPoliciesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :policies, as: 'policies', class: Google::Apis::CloudresourcemanagerV1::OrgPolicy, decorator: Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class FolderOperationError + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :error_message_id, as: 'errorMessageId' + end + end + + class OrgPolicy + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :update_time, as: 'updateTime' + property :version, as: 'version' + property :restore_default, as: 'restoreDefault', class: Google::Apis::CloudresourcemanagerV1::RestoreDefault, decorator: Google::Apis::CloudresourcemanagerV1::RestoreDefault::Representation + + property :list_policy, as: 'listPolicy', class: Google::Apis::CloudresourcemanagerV1::ListPolicy, decorator: Google::Apis::CloudresourcemanagerV1::ListPolicy::Representation + + property :etag, :base64 => true, as: 'etag' + property :boolean_policy, as: 'booleanPolicy', class: Google::Apis::CloudresourcemanagerV1::BooleanPolicy, decorator: Google::Apis::CloudresourcemanagerV1::BooleanPolicy::Representation + + property :constraint, as: 'constraint' + end + end + + class BooleanPolicy + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :enforced, as: 'enforced' + end + end + + class Lien + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :name, as: 'name' + property :reason, as: 'reason' + property :origin, as: 'origin' + collection :restrictions, as: 'restrictions' + property :parent, as: 'parent' + property :create_time, as: 'createTime' + end + end + + class Ancestor + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :resource_id, as: 'resourceId', class: Google::Apis::CloudresourcemanagerV1::ResourceId, decorator: Google::Apis::CloudresourcemanagerV1::ResourceId::Representation + + end + end + + class ListConstraint + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :suggested_value, as: 'suggestedValue' + end + end + + class SetOrgPolicyRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :policy, as: 'policy', class: Google::Apis::CloudresourcemanagerV1::OrgPolicy, decorator: Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation + + end + end + + class SetIamPolicyRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :policy, as: 'policy', class: Google::Apis::CloudresourcemanagerV1::Policy, decorator: Google::Apis::CloudresourcemanagerV1::Policy::Representation + + property :update_mask, as: 'updateMask' + end + end + + class Empty + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class Organization + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :owner, as: 'owner', class: Google::Apis::CloudresourcemanagerV1::OrganizationOwner, decorator: Google::Apis::CloudresourcemanagerV1::OrganizationOwner::Representation + + property :lifecycle_state, as: 'lifecycleState' + property :name, as: 'name' + property :display_name, as: 'displayName' + property :creation_time, as: 'creationTime' + end + end + + class ListAvailableOrgPolicyConstraintsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :constraints, as: 'constraints', class: Google::Apis::CloudresourcemanagerV1::Constraint, decorator: Google::Apis::CloudresourcemanagerV1::Constraint::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class ListPolicy + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :all_values, as: 'allValues' + collection :allowed_values, as: 'allowedValues' + property :suggested_value, as: 'suggestedValue' + property :inherit_from_parent, as: 'inheritFromParent' + collection :denied_values, as: 'deniedValues' + end + end + + class GetAncestryResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :ancestor, as: 'ancestor', class: Google::Apis::CloudresourcemanagerV1::Ancestor, decorator: Google::Apis::CloudresourcemanagerV1::Ancestor::Representation + + end + end + + class AuditLogConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :log_type, as: 'logType' + collection :exempted_members, as: 'exemptedMembers' + end + end + + class SearchOrganizationsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :page_token, as: 'pageToken' + property :page_size, as: 'pageSize' + property :filter, as: 'filter' + end + end + + class GetAncestryRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end end end end diff --git a/generated/google/apis/cloudresourcemanager_v1/service.rb b/generated/google/apis/cloudresourcemanager_v1/service.rb index bc7d5d7c2..f4eca56ac 100644 --- a/generated/google/apis/cloudresourcemanager_v1/service.rb +++ b/generated/google/apis/cloudresourcemanager_v1/service.rb @@ -48,6 +48,558 @@ module Google @batch_path = 'batch' end + # Lists `Constraints` that could be applied on the specified resource. + # @param [String] resource + # Name of the resource to list `Constraints` for. + # @param [Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsRequest] list_available_org_policy_constraints_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::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse] + # + # @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_organization_available_org_policy_constraints(resource, list_available_org_policy_constraints_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:listAvailableOrgPolicyConstraints', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsRequest::Representation + command.request_object = list_available_org_policy_constraints_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse + 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 all the `Policies` set for a particular resource. + # @param [String] resource + # Name of the resource to list Policies for. + # @param [Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesRequest] list_org_policies_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::CloudresourcemanagerV1::ListOrgPoliciesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse] + # + # @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_organization_org_policies(resource, list_org_policies_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:listOrgPolicies', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesRequest::Representation + command.request_object = list_org_policies_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse + 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 + + # Gets the access control policy for an Organization resource. May be empty + # if no such policy or resource exists. The `resource` field should be the + # organization's resource name, e.g. "organizations/123". + # @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 [Google::Apis::CloudresourcemanagerV1::GetIamPolicyRequest] get_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::CloudresourcemanagerV1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::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_organization_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::GetIamPolicyRequest::Representation + command.request_object = get_iam_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::Policy::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::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 + + # Searches Organization resources that are visible to the user and satisfy + # the specified filter. This method returns Organizations in an unspecified + # order. New Organizations do not necessarily appear at the end of the + # results. + # @param [Google::Apis::CloudresourcemanagerV1::SearchOrganizationsRequest] search_organizations_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::CloudresourcemanagerV1::SearchOrganizationsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::SearchOrganizationsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def search_organizations(search_organizations_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/organizations:search', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::SearchOrganizationsRequest::Representation + command.request_object = search_organizations_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::SearchOrganizationsResponse::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::SearchOrganizationsResponse + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a `Policy` on a resource. + # If no `Policy` is set on the resource, a `Policy` is returned with default + # values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The + # `etag` value can be used with `SetOrgPolicy()` to create or update a + # `Policy` during read-modify-write. + # @param [String] resource + # Name of the resource the `Policy` is set on. + # @param [Google::Apis::CloudresourcemanagerV1::GetOrgPolicyRequest] get_org_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::CloudresourcemanagerV1::OrgPolicy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy] + # + # @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_organization_org_policy(resource, get_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:getOrgPolicy', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::GetOrgPolicyRequest::Representation + command.request_object = get_org_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy + 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 + + # Gets the effective `Policy` on a resource. This is the result of merging + # `Policies` in the resource hierarchy. The returned `Policy` will not have + # an `etag`set because it is a computed `Policy` across multiple resources. + # @param [String] resource + # The name of the resource to start computing the effective `Policy`. + # @param [Google::Apis::CloudresourcemanagerV1::GetEffectiveOrgPolicyRequest] get_effective_org_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::CloudresourcemanagerV1::OrgPolicy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy] + # + # @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_organization_effective_org_policy(resource, get_effective_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:getEffectiveOrgPolicy', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::GetEffectiveOrgPolicyRequest::Representation + command.request_object = get_effective_org_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy + 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 + + # Fetches an Organization resource identified by the specified resource name. + # @param [String] name + # The resource name of the Organization to fetch, e.g. "organizations/1234". + # @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::CloudresourcemanagerV1::Organization] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::Organization] + # + # @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_organization(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}', options) + command.response_representation = Google::Apis::CloudresourcemanagerV1::Organization::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::Organization + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Returns permissions that a caller has on the specified Organization. + # The `resource` field should be the organization's resource name, + # e.g. "organizations/123". + # @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::CloudresourcemanagerV1::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::CloudresourcemanagerV1::TestIamPermissionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::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_organization_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::CloudresourcemanagerV1::TestIamPermissionsRequest::Representation + command.request_object = test_iam_permissions_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::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 + + # Clears a `Policy` from a resource. + # @param [String] resource + # Name of the resource for the `Policy` to clear. + # @param [Google::Apis::CloudresourcemanagerV1::ClearOrgPolicyRequest] clear_org_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::CloudresourcemanagerV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def clear_organization_org_policy(resource, clear_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:clearOrgPolicy', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::ClearOrgPolicyRequest::Representation + command.request_object = clear_org_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::Empty + 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 + + # Updates the specified `Policy` on the resource. Creates a new `Policy` for + # that `Constraint` on the resource if one does not exist. + # Not supplying an `etag` on the request `Policy` results in an unconditional + # write of the `Policy`. + # @param [String] resource + # Resource name of the resource to attach the `Policy`. + # @param [Google::Apis::CloudresourcemanagerV1::SetOrgPolicyRequest] set_org_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::CloudresourcemanagerV1::OrgPolicy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy] + # + # @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_organization_org_policy(resource, set_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:setOrgPolicy', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::SetOrgPolicyRequest::Representation + command.request_object = set_org_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy + 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 + + # Sets the access control policy on an Organization resource. Replaces any + # existing policy. The `resource` field should be the organization's resource + # name, e.g. "organizations/123". + # @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::CloudresourcemanagerV1::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::CloudresourcemanagerV1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::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_organization_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::CloudresourcemanagerV1::SetIamPolicyRequest::Representation + command.request_object = set_iam_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::Policy::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::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 + + # Delete a Lien by `name`. + # Callers of this method will require permission on the `parent` resource. + # For example, a Lien with a `parent` of `projects/1234` requires permission + # `resourcemanager.projects.updateLiens`. + # @param [String] name + # The name/identifier of the Lien to delete. + # @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::CloudresourcemanagerV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_lien(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/{+name}', options) + command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::Empty + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # List all Liens applied to the `parent` resource. + # Callers of this method will require permission on the `parent` resource. + # For example, a Lien with a `parent` of `projects/1234` requires permission + # `resourcemanager.projects.get`. + # @param [String] page_token + # The `next_page_token` value returned from a previous List request, if any. + # @param [Fixnum] page_size + # The maximum number of items to return. This is a suggestion for the server. + # @param [String] parent + # The name of the resource to list all attached Liens. + # For example, `projects/1234`. + # @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::CloudresourcemanagerV1::ListLiensResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::ListLiensResponse] + # + # @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_liens(page_token: nil, page_size: nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/liens', options) + command.response_representation = Google::Apis::CloudresourcemanagerV1::ListLiensResponse::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::ListLiensResponse + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Create a Lien which applies to the resource denoted by the `parent` field. + # Callers of this method will require permission on the `parent` resource. + # For example, applying to `projects/1234` requires permission + # `resourcemanager.projects.updateLiens`. + # NOTE: Some resources may limit the number of Liens which may be applied. + # @param [Google::Apis::CloudresourcemanagerV1::Lien] lien_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::CloudresourcemanagerV1::Lien] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::Lien] + # + # @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_lien(lien_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/liens', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::Lien::Representation + command.request_object = lien_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::Lien::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::Lien + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # @param [String] name + # The name of the operation resource. + # @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::CloudresourcemanagerV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::Operation] + # + # @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_operation(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}', options) + command.response_representation = Google::Apis::CloudresourcemanagerV1::Operation::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::Operation + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets the effective `Policy` on a resource. This is the result of merging + # `Policies` in the resource hierarchy. The returned `Policy` will not have + # an `etag`set because it is a computed `Policy` across multiple resources. + # @param [String] resource + # The name of the resource to start computing the effective `Policy`. + # @param [Google::Apis::CloudresourcemanagerV1::GetEffectiveOrgPolicyRequest] get_effective_org_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::CloudresourcemanagerV1::OrgPolicy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy] + # + # @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_folder_effective_org_policy(resource, get_effective_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:getEffectiveOrgPolicy', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::GetEffectiveOrgPolicyRequest::Representation + command.request_object = get_effective_org_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy + 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 + # Clears a `Policy` from a resource. # @param [String] resource # Name of the resource for the `Policy` to clear. @@ -220,12 +772,12 @@ module Google execute_or_queue_command(command, &block) end - # Gets the effective `Policy` on a resource. This is the result of merging - # `Policies` in the resource hierarchy. The returned `Policy` will not have - # an `etag`set because it is a computed `Policy` across multiple resources. - # @param [String] resource - # The name of the resource to start computing the effective `Policy`. - # @param [Google::Apis::CloudresourcemanagerV1::GetEffectiveOrgPolicyRequest] get_effective_org_policy_request_object + # Retrieves the Project identified by the specified + # `project_id` (for example, `my-project-123`). + # The caller must have read permissions for this Project. + # @param [String] project_id + # The Project ID (for example, `my-project-123`). + # Required. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -235,20 +787,231 @@ module Google # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CloudresourcemanagerV1::OrgPolicy] parsed result object + # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Project] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy] + # @return [Google::Apis::CloudresourcemanagerV1::Project] # # @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_folder_effective_org_policy(resource, get_effective_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+resource}:getEffectiveOrgPolicy', options) - command.request_representation = Google::Apis::CloudresourcemanagerV1::GetEffectiveOrgPolicyRequest::Representation - command.request_object = get_effective_org_policy_request_object - command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy + def get_project(project_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/projects/{projectId}', options) + command.response_representation = Google::Apis::CloudresourcemanagerV1::Project::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::Project + command.params['projectId'] = project_id unless project_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a list of ancestors in the resource hierarchy for the Project + # identified by the specified `project_id` (for example, `my-project-123`). + # The caller must have read permissions for this Project. + # @param [String] project_id + # The Project ID (for example, `my-project-123`). + # Required. + # @param [Google::Apis::CloudresourcemanagerV1::GetAncestryRequest] get_ancestry_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::CloudresourcemanagerV1::GetAncestryResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::GetAncestryResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_ancestry(project_id, get_ancestry_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/projects/{projectId}:getAncestry', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::GetAncestryRequest::Representation + command.request_object = get_ancestry_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::GetAncestryResponse::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::GetAncestryResponse + command.params['projectId'] = project_id unless project_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Returns permissions that a caller has on the specified Project. + # @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::CloudresourcemanagerV1::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::CloudresourcemanagerV1::TestIamPermissionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::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_project_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/projects/{resource}:testIamPermissions', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsRequest::Representation + command.request_object = test_iam_permissions_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::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 + + # Marks the Project identified by the specified + # `project_id` (for example, `my-project-123`) for deletion. + # This method will only affect the Project if the following criteria are met: + # + The Project does not have a billing account associated with it. + # + The Project has a lifecycle state of + # ACTIVE. + # This method changes the Project's lifecycle state from + # ACTIVE + # to DELETE_REQUESTED. + # The deletion starts at an unspecified time, + # at which point the Project is no longer accessible. + # Until the deletion completes, you can check the lifecycle state + # checked by retrieving the Project with GetProject, + # and the Project remains visible to ListProjects. + # However, you cannot update the project. + # After the deletion completes, the Project is not retrievable by + # the GetProject and + # ListProjects methods. + # The caller must have modify permissions for this Project. + # @param [String] project_id + # The Project ID (for example, `foo-bar-123`). + # Required. + # @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::CloudresourcemanagerV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_project(project_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/projects/{projectId}', options) + command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::Empty + command.params['projectId'] = project_id unless project_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Clears a `Policy` from a resource. + # @param [String] resource + # Name of the resource for the `Policy` to clear. + # @param [Google::Apis::CloudresourcemanagerV1::ClearOrgPolicyRequest] clear_org_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::CloudresourcemanagerV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def clear_project_org_policy(resource, clear_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:clearOrgPolicy', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::ClearOrgPolicyRequest::Representation + command.request_object = clear_org_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::Empty + 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 + + # Sets the IAM access control policy for the specified Project. Replaces + # any existing policy. + # The following constraints apply when using `setIamPolicy()`: + # + Project does not support `allUsers` and `allAuthenticatedUsers` as + # `members` in a `Binding` of a `Policy`. + # + The owner role can be granted only to `user` and `serviceAccount`. + # + Service accounts can be made owners of a project directly + # without any restrictions. However, to be added as an owner, a user must be + # invited via Cloud Platform console and must accept the invitation. + # + A user cannot be granted the owner role using `setIamPolicy()`. The user + # must be granted the owner role using the Cloud Platform Console and must + # explicitly accept the invitation. + # + Invitations to grant the owner role cannot be sent using + # `setIamPolicy()`; + # they must be sent only using the Cloud Platform Console. + # + Membership changes that leave the project without any owners that have + # accepted the Terms of Service (ToS) will be rejected. + # + There must be at least one owner who has accepted the Terms of + # Service (ToS) agreement in the policy. Calling `setIamPolicy()` to + # remove the last ToS-accepted owner from the policy will fail. This + # restriction also applies to legacy projects that no longer have owners + # who have accepted the ToS. Edits to IAM policies will be rejected until + # the lack of a ToS-accepting owner is rectified. + # + Calling this method requires enabling the App Engine Admin API. + # Note: Removing service accounts from policies or changing their roles + # can render services completely inoperable. It is important to understand + # how the service account is being used before removing or updating its + # roles. + # @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::CloudresourcemanagerV1::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::CloudresourcemanagerV1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::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_project_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/projects/{resource}:setIamPolicy', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::SetIamPolicyRequest::Representation + command.request_object = set_iam_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::Policy::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::Policy command.params['resource'] = resource unless resource.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? @@ -633,769 +1396,6 @@ module Google command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end - - # Retrieves the Project identified by the specified - # `project_id` (for example, `my-project-123`). - # The caller must have read permissions for this Project. - # @param [String] project_id - # The Project ID (for example, `my-project-123`). - # Required. - # @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::CloudresourcemanagerV1::Project] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudresourcemanagerV1::Project] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_project(project_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/projects/{projectId}', options) - command.response_representation = Google::Apis::CloudresourcemanagerV1::Project::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1::Project - command.params['projectId'] = project_id unless project_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets a list of ancestors in the resource hierarchy for the Project - # identified by the specified `project_id` (for example, `my-project-123`). - # The caller must have read permissions for this Project. - # @param [String] project_id - # The Project ID (for example, `my-project-123`). - # Required. - # @param [Google::Apis::CloudresourcemanagerV1::GetAncestryRequest] get_ancestry_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::CloudresourcemanagerV1::GetAncestryResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudresourcemanagerV1::GetAncestryResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_project_ancestry(project_id, get_ancestry_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/projects/{projectId}:getAncestry', options) - command.request_representation = Google::Apis::CloudresourcemanagerV1::GetAncestryRequest::Representation - command.request_object = get_ancestry_request_object - command.response_representation = Google::Apis::CloudresourcemanagerV1::GetAncestryResponse::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1::GetAncestryResponse - command.params['projectId'] = project_id unless project_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Returns permissions that a caller has on the specified Project. - # @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::CloudresourcemanagerV1::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::CloudresourcemanagerV1::TestIamPermissionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudresourcemanagerV1::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_project_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/projects/{resource}:testIamPermissions', options) - command.request_representation = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsRequest::Representation - command.request_object = test_iam_permissions_request_object - command.response_representation = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1::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 - - # Marks the Project identified by the specified - # `project_id` (for example, `my-project-123`) for deletion. - # This method will only affect the Project if the following criteria are met: - # + The Project does not have a billing account associated with it. - # + The Project has a lifecycle state of - # ACTIVE. - # This method changes the Project's lifecycle state from - # ACTIVE - # to DELETE_REQUESTED. - # The deletion starts at an unspecified time, - # at which point the Project is no longer accessible. - # Until the deletion completes, you can check the lifecycle state - # checked by retrieving the Project with GetProject, - # and the Project remains visible to ListProjects. - # However, you cannot update the project. - # After the deletion completes, the Project is not retrievable by - # the GetProject and - # ListProjects methods. - # The caller must have modify permissions for this Project. - # @param [String] project_id - # The Project ID (for example, `foo-bar-123`). - # Required. - # @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::CloudresourcemanagerV1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudresourcemanagerV1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_project(project_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1/projects/{projectId}', options) - command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1::Empty - command.params['projectId'] = project_id unless project_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Clears a `Policy` from a resource. - # @param [String] resource - # Name of the resource for the `Policy` to clear. - # @param [Google::Apis::CloudresourcemanagerV1::ClearOrgPolicyRequest] clear_org_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::CloudresourcemanagerV1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudresourcemanagerV1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def clear_project_org_policy(resource, clear_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+resource}:clearOrgPolicy', options) - command.request_representation = Google::Apis::CloudresourcemanagerV1::ClearOrgPolicyRequest::Representation - command.request_object = clear_org_policy_request_object - command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1::Empty - 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 - - # Sets the IAM access control policy for the specified Project. Replaces - # any existing policy. - # The following constraints apply when using `setIamPolicy()`: - # + Project does not support `allUsers` and `allAuthenticatedUsers` as - # `members` in a `Binding` of a `Policy`. - # + The owner role can be granted only to `user` and `serviceAccount`. - # + Service accounts can be made owners of a project directly - # without any restrictions. However, to be added as an owner, a user must be - # invited via Cloud Platform console and must accept the invitation. - # + A user cannot be granted the owner role using `setIamPolicy()`. The user - # must be granted the owner role using the Cloud Platform Console and must - # explicitly accept the invitation. - # + Invitations to grant the owner role cannot be sent using - # `setIamPolicy()`; - # they must be sent only using the Cloud Platform Console. - # + Membership changes that leave the project without any owners that have - # accepted the Terms of Service (ToS) will be rejected. - # + There must be at least one owner who has accepted the Terms of - # Service (ToS) agreement in the policy. Calling `setIamPolicy()` to - # remove the last ToS-accepted owner from the policy will fail. This - # restriction also applies to legacy projects that no longer have owners - # who have accepted the ToS. Edits to IAM policies will be rejected until - # the lack of a ToS-accepting owner is rectified. - # + Calling this method requires enabling the App Engine Admin API. - # Note: Removing service accounts from policies or changing their roles - # can render services completely inoperable. It is important to understand - # how the service account is being used before removing or updating its - # roles. - # @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::CloudresourcemanagerV1::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::CloudresourcemanagerV1::Policy] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudresourcemanagerV1::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_project_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/projects/{resource}:setIamPolicy', options) - command.request_representation = Google::Apis::CloudresourcemanagerV1::SetIamPolicyRequest::Representation - command.request_object = set_iam_policy_request_object - command.response_representation = Google::Apis::CloudresourcemanagerV1::Policy::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1::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 - - # Returns permissions that a caller has on the specified Organization. - # The `resource` field should be the organization's resource name, - # e.g. "organizations/123". - # @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::CloudresourcemanagerV1::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::CloudresourcemanagerV1::TestIamPermissionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudresourcemanagerV1::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_organization_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::CloudresourcemanagerV1::TestIamPermissionsRequest::Representation - command.request_object = test_iam_permissions_request_object - command.response_representation = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1::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 - - # Clears a `Policy` from a resource. - # @param [String] resource - # Name of the resource for the `Policy` to clear. - # @param [Google::Apis::CloudresourcemanagerV1::ClearOrgPolicyRequest] clear_org_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::CloudresourcemanagerV1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudresourcemanagerV1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def clear_organization_org_policy(resource, clear_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+resource}:clearOrgPolicy', options) - command.request_representation = Google::Apis::CloudresourcemanagerV1::ClearOrgPolicyRequest::Representation - command.request_object = clear_org_policy_request_object - command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1::Empty - 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 - - # Updates the specified `Policy` on the resource. Creates a new `Policy` for - # that `Constraint` on the resource if one does not exist. - # Not supplying an `etag` on the request `Policy` results in an unconditional - # write of the `Policy`. - # @param [String] resource - # Resource name of the resource to attach the `Policy`. - # @param [Google::Apis::CloudresourcemanagerV1::SetOrgPolicyRequest] set_org_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::CloudresourcemanagerV1::OrgPolicy] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy] - # - # @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_organization_org_policy(resource, set_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+resource}:setOrgPolicy', options) - command.request_representation = Google::Apis::CloudresourcemanagerV1::SetOrgPolicyRequest::Representation - command.request_object = set_org_policy_request_object - command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy - 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 - - # Sets the access control policy on an Organization resource. Replaces any - # existing policy. The `resource` field should be the organization's resource - # name, e.g. "organizations/123". - # @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::CloudresourcemanagerV1::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::CloudresourcemanagerV1::Policy] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudresourcemanagerV1::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_organization_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::CloudresourcemanagerV1::SetIamPolicyRequest::Representation - command.request_object = set_iam_policy_request_object - command.response_representation = Google::Apis::CloudresourcemanagerV1::Policy::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1::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 all the `Policies` set for a particular resource. - # @param [String] resource - # Name of the resource to list Policies for. - # @param [Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesRequest] list_org_policies_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::CloudresourcemanagerV1::ListOrgPoliciesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse] - # - # @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_organization_org_policies(resource, list_org_policies_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+resource}:listOrgPolicies', options) - command.request_representation = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesRequest::Representation - command.request_object = list_org_policies_request_object - command.response_representation = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse - 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 `Constraints` that could be applied on the specified resource. - # @param [String] resource - # Name of the resource to list `Constraints` for. - # @param [Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsRequest] list_available_org_policy_constraints_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::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse] - # - # @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_organization_available_org_policy_constraints(resource, list_available_org_policy_constraints_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+resource}:listAvailableOrgPolicyConstraints', options) - command.request_representation = Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsRequest::Representation - command.request_object = list_available_org_policy_constraints_request_object - command.response_representation = Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse - 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 - - # Gets the access control policy for an Organization resource. May be empty - # if no such policy or resource exists. The `resource` field should be the - # organization's resource name, e.g. "organizations/123". - # @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 [Google::Apis::CloudresourcemanagerV1::GetIamPolicyRequest] get_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::CloudresourcemanagerV1::Policy] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudresourcemanagerV1::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_organization_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options) - command.request_representation = Google::Apis::CloudresourcemanagerV1::GetIamPolicyRequest::Representation - command.request_object = get_iam_policy_request_object - command.response_representation = Google::Apis::CloudresourcemanagerV1::Policy::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1::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 - - # Gets a `Policy` on a resource. - # If no `Policy` is set on the resource, a `Policy` is returned with default - # values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The - # `etag` value can be used with `SetOrgPolicy()` to create or update a - # `Policy` during read-modify-write. - # @param [String] resource - # Name of the resource the `Policy` is set on. - # @param [Google::Apis::CloudresourcemanagerV1::GetOrgPolicyRequest] get_org_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::CloudresourcemanagerV1::OrgPolicy] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy] - # - # @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_organization_org_policy(resource, get_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+resource}:getOrgPolicy', options) - command.request_representation = Google::Apis::CloudresourcemanagerV1::GetOrgPolicyRequest::Representation - command.request_object = get_org_policy_request_object - command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy - 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 - - # Searches Organization resources that are visible to the user and satisfy - # the specified filter. This method returns Organizations in an unspecified - # order. New Organizations do not necessarily appear at the end of the - # results. - # @param [Google::Apis::CloudresourcemanagerV1::SearchOrganizationsRequest] search_organizations_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::CloudresourcemanagerV1::SearchOrganizationsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudresourcemanagerV1::SearchOrganizationsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def search_organizations(search_organizations_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/organizations:search', options) - command.request_representation = Google::Apis::CloudresourcemanagerV1::SearchOrganizationsRequest::Representation - command.request_object = search_organizations_request_object - command.response_representation = Google::Apis::CloudresourcemanagerV1::SearchOrganizationsResponse::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1::SearchOrganizationsResponse - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets the effective `Policy` on a resource. This is the result of merging - # `Policies` in the resource hierarchy. The returned `Policy` will not have - # an `etag`set because it is a computed `Policy` across multiple resources. - # @param [String] resource - # The name of the resource to start computing the effective `Policy`. - # @param [Google::Apis::CloudresourcemanagerV1::GetEffectiveOrgPolicyRequest] get_effective_org_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::CloudresourcemanagerV1::OrgPolicy] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy] - # - # @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_organization_effective_org_policy(resource, get_effective_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+resource}:getEffectiveOrgPolicy', options) - command.request_representation = Google::Apis::CloudresourcemanagerV1::GetEffectiveOrgPolicyRequest::Representation - command.request_object = get_effective_org_policy_request_object - command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy - 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 - - # Fetches an Organization resource identified by the specified resource name. - # @param [String] name - # The resource name of the Organization to fetch, e.g. "organizations/1234". - # @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::CloudresourcemanagerV1::Organization] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudresourcemanagerV1::Organization] - # - # @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_organization(name, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/{+name}', options) - command.response_representation = Google::Apis::CloudresourcemanagerV1::Organization::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1::Organization - command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Delete a Lien by `name`. - # Callers of this method will require permission on the `parent` resource. - # For example, a Lien with a `parent` of `projects/1234` requires permission - # `resourcemanager.projects.updateLiens`. - # @param [String] name - # The name/identifier of the Lien to delete. - # @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::CloudresourcemanagerV1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudresourcemanagerV1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_lien(name, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1/{+name}', options) - command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1::Empty - command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # List all Liens applied to the `parent` resource. - # Callers of this method will require permission on the `parent` resource. - # For example, a Lien with a `parent` of `projects/1234` requires permission - # `resourcemanager.projects.get`. - # @param [String] page_token - # The `next_page_token` value returned from a previous List request, if any. - # @param [Fixnum] page_size - # The maximum number of items to return. This is a suggestion for the server. - # @param [String] parent - # The name of the resource to list all attached Liens. - # For example, `projects/1234`. - # @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::CloudresourcemanagerV1::ListLiensResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudresourcemanagerV1::ListLiensResponse] - # - # @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_liens(page_token: nil, page_size: nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/liens', options) - command.response_representation = Google::Apis::CloudresourcemanagerV1::ListLiensResponse::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1::ListLiensResponse - command.query['pageToken'] = page_token unless page_token.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['parent'] = parent unless parent.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Create a Lien which applies to the resource denoted by the `parent` field. - # Callers of this method will require permission on the `parent` resource. - # For example, applying to `projects/1234` requires permission - # `resourcemanager.projects.updateLiens`. - # NOTE: Some resources may limit the number of Liens which may be applied. - # @param [Google::Apis::CloudresourcemanagerV1::Lien] lien_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::CloudresourcemanagerV1::Lien] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudresourcemanagerV1::Lien] - # - # @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_lien(lien_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/liens', options) - command.request_representation = Google::Apis::CloudresourcemanagerV1::Lien::Representation - command.request_object = lien_object - command.response_representation = Google::Apis::CloudresourcemanagerV1::Lien::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1::Lien - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # @param [String] name - # The name of the operation resource. - # @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::CloudresourcemanagerV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudresourcemanagerV1::Operation] - # - # @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_operation(name, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/{+name}', options) - command.response_representation = Google::Apis::CloudresourcemanagerV1::Operation::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1::Operation - command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end protected diff --git a/generated/google/apis/cloudresourcemanager_v1beta1.rb b/generated/google/apis/cloudresourcemanager_v1beta1.rb index 2e7062c1a..5f4df9b78 100644 --- a/generated/google/apis/cloudresourcemanager_v1beta1.rb +++ b/generated/google/apis/cloudresourcemanager_v1beta1.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/resource-manager module CloudresourcemanagerV1beta1 VERSION = 'V1beta1' - REVISION = '20170501' + REVISION = '20170524' # View your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM_READ_ONLY = 'https://www.googleapis.com/auth/cloud-platform.read-only' diff --git a/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb b/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb index 5c4cbd856..0f1a13339 100644 --- a/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +++ b/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb @@ -22,6 +22,272 @@ module Google module Apis module CloudresourcemanagerV1beta1 + # A Project is a high-level Google Cloud Platform entity. It is a + # container for ACLs, APIs, App Engine Apps, VMs, and other + # Google Cloud Platform resources. + class Project + include Google::Apis::Core::Hashable + + # The number uniquely identifying the project. + # Example: 415104041262 + # Read-only. + # Corresponds to the JSON property `projectNumber` + # @return [Fixnum] + attr_accessor :project_number + + # A container to reference an id for any resource type. A `resource` in Google + # Cloud Platform is a generic term for something you (a developer) may want to + # interact with through one of our API's. Some examples are an App Engine app, + # a Compute Engine instance, a Cloud SQL database, and so on. + # Corresponds to the JSON property `parent` + # @return [Google::Apis::CloudresourcemanagerV1beta1::ResourceId] + attr_accessor :parent + + # Creation time. + # Read-only. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # The labels associated with this Project. + # Label keys must be between 1 and 63 characters long and must conform + # to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. + # Label values must be between 0 and 63 characters long and must conform + # to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. + # No more than 256 labels can be associated with a given resource. + # Clients should store labels in a representation such as JSON that does not + # depend on specific characters being disallowed. + # Example: "environment" : "dev" + # Read-write. + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # The user-assigned display name of the Project. + # It must be 4 to 30 characters. + # Allowed characters are: lowercase and uppercase letters, numbers, + # hyphen, single-quote, double-quote, space, and exclamation point. + # Example: My Project + # Read-write. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The unique, user-assigned ID of the Project. + # It must be 6 to 30 lowercase letters, digits, or hyphens. + # It must start with a letter. + # Trailing hyphens are prohibited. + # Example: tokyo-rain-123 + # Read-only after creation. + # Corresponds to the JSON property `projectId` + # @return [String] + attr_accessor :project_id + + # The Project lifecycle state. + # Read-only. + # Corresponds to the JSON property `lifecycleState` + # @return [String] + attr_accessor :lifecycle_state + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @project_number = args[:project_number] if args.key?(:project_number) + @parent = args[:parent] if args.key?(:parent) + @create_time = args[:create_time] if args.key?(:create_time) + @labels = args[:labels] if args.key?(:labels) + @name = args[:name] if args.key?(:name) + @project_id = args[:project_id] if args.key?(:project_id) + @lifecycle_state = args[:lifecycle_state] if args.key?(:lifecycle_state) + 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] + 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 + + # 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). + class Policy + include Google::Apis::Core::Hashable + + # `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 + + # Version of the `Policy`. The default version is 0. + # Corresponds to the JSON property `version` + # @return [Fixnum] + attr_accessor :version + + # Specifies cloud audit logging configuration for this policy. + # Corresponds to the JSON property `auditConfigs` + # @return [Array] + attr_accessor :audit_configs + + # Associates a list of `members` to a `role`. + # Multiple `bindings` must not be specified for the same `role`. + # `bindings` with no members will result in an error. + # Corresponds to the JSON property `bindings` + # @return [Array] + attr_accessor :bindings + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @etag = args[:etag] if args.key?(:etag) + @version = args[:version] if args.key?(:version) + @audit_configs = args[:audit_configs] if args.key?(:audit_configs) + @bindings = args[:bindings] if args.key?(:bindings) + end + end + + # Metadata describing a long running folder operation + class FolderOperation + include Google::Apis::Core::Hashable + + # The resource name of the folder or organization we are either creating + # the folder under or moving the folder to. + # Corresponds to the JSON property `destinationParent` + # @return [String] + attr_accessor :destination_parent + + # The type of this operation. + # Corresponds to the JSON property `operationType` + # @return [String] + attr_accessor :operation_type + + # The display name of the folder. + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # The resource name of the folder's parent. + # Only applicable when the operation_type is MOVE. + # Corresponds to the JSON property `sourceParent` + # @return [String] + attr_accessor :source_parent + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @destination_parent = args[:destination_parent] if args.key?(:destination_parent) + @operation_type = args[:operation_type] if args.key?(:operation_type) + @display_name = args[:display_name] if args.key?(:display_name) + @source_parent = args[:source_parent] if args.key?(:source_parent) + end + end + + # A classification of the Folder Operation error. + class FolderOperationError + include Google::Apis::Core::Hashable + + # The type of operation error experienced. + # Corresponds to the JSON property `errorMessageId` + # @return [String] + attr_accessor :error_message_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @error_message_id = args[:error_message_id] if args.key?(:error_message_id) + end + end + + # A container to reference an id for any resource type. A `resource` in Google + # Cloud Platform is a generic term for something you (a developer) may want to + # interact with through one of our API's. Some examples are an App Engine app, + # a Compute Engine instance, a Cloud SQL database, and so on. + class ResourceId + include Google::Apis::Core::Hashable + + # Required field for the type-specific id. This should correspond to the id + # used in the type-specific API's. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # Required field representing the resource type this id is for. + # At present, the valid types are "project" and "organization". + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @id = args[:id] if args.key?(:id) + @type = args[:type] if args.key?(:type) + end + end + # Specifies the audit configuration for a service. # The configuration determines which permission types are logged, and what # identities, if any, are exempted from logging. @@ -265,6 +531,13 @@ module Google class Organization include Google::Apis::Core::Hashable + # Output Only. The resource name of the organization. This is the + # organization's relative path in the API. Its format is + # "organizations/[organization_id]". For example, "organizations/1234". + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + # An immutable id for the Organization that is assigned on creation. This # should be omitted when creating a new Organization. # This field is read-only. @@ -301,25 +574,18 @@ module Google # @return [Google::Apis::CloudresourcemanagerV1beta1::OrganizationOwner] attr_accessor :owner - # Output Only. The resource name of the organization. This is the - # organization's relative path in the API. Its format is - # "organizations/[organization_id]". For example, "organizations/1234". - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @name = args[:name] if args.key?(:name) @organization_id = args[:organization_id] if args.key?(:organization_id) @lifecycle_state = args[:lifecycle_state] if args.key?(:lifecycle_state) @display_name = args[:display_name] if args.key?(:display_name) @creation_time = args[:creation_time] if args.key?(:creation_time) @owner = args[:owner] if args.key?(:owner) - @name = args[:name] if args.key?(:name) end end @@ -545,272 +811,6 @@ module Google def update!(**args) end end - - # A Project is a high-level Google Cloud Platform entity. It is a - # container for ACLs, APIs, App Engine Apps, VMs, and other - # Google Cloud Platform resources. - class Project - include Google::Apis::Core::Hashable - - # The number uniquely identifying the project. - # Example: 415104041262 - # Read-only. - # Corresponds to the JSON property `projectNumber` - # @return [Fixnum] - attr_accessor :project_number - - # A container to reference an id for any resource type. A `resource` in Google - # Cloud Platform is a generic term for something you (a developer) may want to - # interact with through one of our API's. Some examples are an App Engine app, - # a Compute Engine instance, a Cloud SQL database, and so on. - # Corresponds to the JSON property `parent` - # @return [Google::Apis::CloudresourcemanagerV1beta1::ResourceId] - attr_accessor :parent - - # The labels associated with this Project. - # Label keys must be between 1 and 63 characters long and must conform - # to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. - # Label values must be between 0 and 63 characters long and must conform - # to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. - # No more than 256 labels can be associated with a given resource. - # Clients should store labels in a representation such as JSON that does not - # depend on specific characters being disallowed. - # Example: "environment" : "dev" - # Read-write. - # Corresponds to the JSON property `labels` - # @return [Hash] - attr_accessor :labels - - # Creation time. - # Read-only. - # Corresponds to the JSON property `createTime` - # @return [String] - attr_accessor :create_time - - # The user-assigned display name of the Project. - # It must be 4 to 30 characters. - # Allowed characters are: lowercase and uppercase letters, numbers, - # hyphen, single-quote, double-quote, space, and exclamation point. - # Example: My Project - # Read-write. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The unique, user-assigned ID of the Project. - # It must be 6 to 30 lowercase letters, digits, or hyphens. - # It must start with a letter. - # Trailing hyphens are prohibited. - # Example: tokyo-rain-123 - # Read-only after creation. - # Corresponds to the JSON property `projectId` - # @return [String] - attr_accessor :project_id - - # The Project lifecycle state. - # Read-only. - # Corresponds to the JSON property `lifecycleState` - # @return [String] - attr_accessor :lifecycle_state - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @project_number = args[:project_number] if args.key?(:project_number) - @parent = args[:parent] if args.key?(:parent) - @labels = args[:labels] if args.key?(:labels) - @create_time = args[:create_time] if args.key?(:create_time) - @name = args[:name] if args.key?(:name) - @project_id = args[:project_id] if args.key?(:project_id) - @lifecycle_state = args[:lifecycle_state] if args.key?(:lifecycle_state) - 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] - 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 - - # 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). - class Policy - include Google::Apis::Core::Hashable - - # Version of the `Policy`. The default version is 0. - # Corresponds to the JSON property `version` - # @return [Fixnum] - attr_accessor :version - - # Specifies cloud audit logging configuration for this policy. - # Corresponds to the JSON property `auditConfigs` - # @return [Array] - attr_accessor :audit_configs - - # Associates a list of `members` to a `role`. - # Multiple `bindings` must not be specified for the same `role`. - # `bindings` with no members will result in an error. - # Corresponds to the JSON property `bindings` - # @return [Array] - 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 - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @version = args[:version] if args.key?(:version) - @audit_configs = args[:audit_configs] if args.key?(:audit_configs) - @bindings = args[:bindings] if args.key?(:bindings) - @etag = args[:etag] if args.key?(:etag) - end - end - - # Metadata describing a long running folder operation - class FolderOperation - include Google::Apis::Core::Hashable - - # The display name of the folder. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # The resource name of the folder's parent. - # Only applicable when the operation_type is MOVE. - # Corresponds to the JSON property `sourceParent` - # @return [String] - attr_accessor :source_parent - - # The resource name of the folder or organization we are either creating - # the folder under or moving the folder to. - # Corresponds to the JSON property `destinationParent` - # @return [String] - attr_accessor :destination_parent - - # The type of this operation. - # Corresponds to the JSON property `operationType` - # @return [String] - attr_accessor :operation_type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @display_name = args[:display_name] if args.key?(:display_name) - @source_parent = args[:source_parent] if args.key?(:source_parent) - @destination_parent = args[:destination_parent] if args.key?(:destination_parent) - @operation_type = args[:operation_type] if args.key?(:operation_type) - end - end - - # A classification of the Folder Operation error. - class FolderOperationError - include Google::Apis::Core::Hashable - - # The type of operation error experienced. - # Corresponds to the JSON property `errorMessageId` - # @return [String] - attr_accessor :error_message_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @error_message_id = args[:error_message_id] if args.key?(:error_message_id) - end - end - - # A container to reference an id for any resource type. A `resource` in Google - # Cloud Platform is a generic term for something you (a developer) may want to - # interact with through one of our API's. Some examples are an App Engine app, - # a Compute Engine instance, a Cloud SQL database, and so on. - class ResourceId - include Google::Apis::Core::Hashable - - # Required field representing the resource type this id is for. - # At present, the valid types are "project" and "organization". - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Required field for the type-specific id. This should correspond to the id - # used in the type-specific API's. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @type = args[:type] if args.key?(:type) - @id = args[:id] if args.key?(:id) - end - end end end end diff --git a/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb b/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb index fffad786f..2f3e6d897 100644 --- a/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +++ b/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb @@ -22,6 +22,42 @@ module Google module Apis module CloudresourcemanagerV1beta1 + class Project + 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 Policy + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class FolderOperation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class FolderOperationError + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ResourceId + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class AuditConfig class Representation < Google::Apis::Core::JsonRepresentation; end @@ -119,39 +155,61 @@ module Google end class Project - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :project_number, :numeric_string => true, as: 'projectNumber' + property :parent, as: 'parent', class: Google::Apis::CloudresourcemanagerV1beta1::ResourceId, decorator: Google::Apis::CloudresourcemanagerV1beta1::ResourceId::Representation - include Google::Apis::Core::JsonObjectSupport + property :create_time, as: 'createTime' + hash :labels, as: 'labels' + property :name, as: 'name' + property :project_id, as: 'projectId' + property :lifecycle_state, as: 'lifecycleState' + end end class TestIamPermissionsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :permissions, as: 'permissions' + end end class Policy - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :etag, :base64 => true, as: 'etag' + property :version, as: 'version' + collection :audit_configs, as: 'auditConfigs', class: Google::Apis::CloudresourcemanagerV1beta1::AuditConfig, decorator: Google::Apis::CloudresourcemanagerV1beta1::AuditConfig::Representation - include Google::Apis::Core::JsonObjectSupport + collection :bindings, as: 'bindings', class: Google::Apis::CloudresourcemanagerV1beta1::Binding, decorator: Google::Apis::CloudresourcemanagerV1beta1::Binding::Representation + + end end class FolderOperation - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :destination_parent, as: 'destinationParent' + property :operation_type, as: 'operationType' + property :display_name, as: 'displayName' + property :source_parent, as: 'sourceParent' + end end class FolderOperationError - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :error_message_id, as: 'errorMessageId' + end end class ResourceId - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :id, as: 'id' + property :type, as: 'type' + end end class AuditConfig @@ -206,13 +264,13 @@ module Google class Organization # @private class Representation < Google::Apis::Core::JsonRepresentation + property :name, as: 'name' property :organization_id, as: 'organizationId' property :lifecycle_state, as: 'lifecycleState' property :display_name, as: 'displayName' property :creation_time, as: 'creationTime' property :owner, as: 'owner', class: Google::Apis::CloudresourcemanagerV1beta1::OrganizationOwner, decorator: Google::Apis::CloudresourcemanagerV1beta1::OrganizationOwner::Representation - property :name, as: 'name' end end @@ -281,64 +339,6 @@ module Google class Representation < Google::Apis::Core::JsonRepresentation end end - - class Project - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :project_number, :numeric_string => true, as: 'projectNumber' - property :parent, as: 'parent', class: Google::Apis::CloudresourcemanagerV1beta1::ResourceId, decorator: Google::Apis::CloudresourcemanagerV1beta1::ResourceId::Representation - - hash :labels, as: 'labels' - property :create_time, as: 'createTime' - property :name, as: 'name' - property :project_id, as: 'projectId' - property :lifecycle_state, as: 'lifecycleState' - end - end - - class TestIamPermissionsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :permissions, as: 'permissions' - end - end - - class Policy - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :version, as: 'version' - collection :audit_configs, as: 'auditConfigs', class: Google::Apis::CloudresourcemanagerV1beta1::AuditConfig, decorator: Google::Apis::CloudresourcemanagerV1beta1::AuditConfig::Representation - - collection :bindings, as: 'bindings', class: Google::Apis::CloudresourcemanagerV1beta1::Binding, decorator: Google::Apis::CloudresourcemanagerV1beta1::Binding::Representation - - property :etag, :base64 => true, as: 'etag' - end - end - - class FolderOperation - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :display_name, as: 'displayName' - property :source_parent, as: 'sourceParent' - property :destination_parent, as: 'destinationParent' - property :operation_type, as: 'operationType' - end - end - - class FolderOperationError - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :error_message_id, as: 'errorMessageId' - end - end - - class ResourceId - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :type, as: 'type' - property :id, as: 'id' - end - end end end end diff --git a/generated/google/apis/cloudresourcemanager_v1beta1/service.rb b/generated/google/apis/cloudresourcemanager_v1beta1/service.rb index 9ec27cf39..6c276c02e 100644 --- a/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +++ b/generated/google/apis/cloudresourcemanager_v1beta1/service.rb @@ -69,11 +69,11 @@ module Google # @param [Fixnum] page_size # The maximum number of Organizations to return in the response. # This field is optional. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -86,15 +86,15 @@ 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_organizations(filter: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_organizations(filter: nil, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1beta1/organizations', options) command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::ListOrganizationsResponse::Representation command.response_class = Google::Apis::CloudresourcemanagerV1beta1::ListOrganizationsResponse command.query['filter'] = filter unless filter.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -105,11 +105,11 @@ module Google # REQUIRED: The resource for which the policy is being specified. # See the operation documentation for the appropriate value for this field. # @param [Google::Apis::CloudresourcemanagerV1beta1::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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -122,15 +122,15 @@ 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 set_organization_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def set_organization_iam_policy(resource, set_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta1/{+resource}:setIamPolicy', options) command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::SetIamPolicyRequest::Representation command.request_object = set_iam_policy_request_object command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Policy::Representation command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Policy command.params['resource'] = resource unless resource.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -141,11 +141,11 @@ module Google # REQUIRED: The resource for which the policy is being requested. # See the operation documentation for the appropriate value for this field. # @param [Google::Apis::CloudresourcemanagerV1beta1::GetIamPolicyRequest] get_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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -158,15 +158,15 @@ 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 get_organization_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def get_organization_iam_policy(resource, get_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta1/{+resource}:getIamPolicy', options) command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::GetIamPolicyRequest::Representation command.request_object = get_iam_policy_request_object command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Policy::Representation command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Policy command.params['resource'] = resource unless resource.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -176,11 +176,11 @@ module Google # @param [String] organization_id # The id of the Organization resource to fetch. # This field is deprecated and will be removed in v1. Use name instead. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -193,14 +193,14 @@ 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 get_organization(name, organization_id: nil, fields: nil, quota_user: nil, options: nil, &block) + def get_organization(name, organization_id: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1beta1/{+name}', options) command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Organization::Representation command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Organization command.params['name'] = name unless name.nil? command.query['organizationId'] = organization_id unless organization_id.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -210,11 +210,11 @@ module Google # organization's relative path in the API. Its format is # "organizations/[organization_id]". For example, "organizations/1234". # @param [Google::Apis::CloudresourcemanagerV1beta1::Organization] organization_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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -227,15 +227,15 @@ 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 update_organization(name, organization_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def update_organization(name, organization_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:put, 'v1beta1/{+name}', options) command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::Organization::Representation command.request_object = organization_object command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Organization::Representation command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Organization command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -246,11 +246,11 @@ module Google # 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::CloudresourcemanagerV1beta1::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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -263,15 +263,15 @@ 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 test_organization_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def test_organization_iam_permissions(resource, test_iam_permissions_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta1/{+resource}:testIamPermissions', options) command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsRequest::Representation command.request_object = test_iam_permissions_request_object command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsResponse::Representation command.response_class = Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsResponse command.params['resource'] = resource unless resource.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -306,11 +306,11 @@ module Google # REQUIRED: The resource for which the policy is being specified. # See the operation documentation for the appropriate value for this field. # @param [Google::Apis::CloudresourcemanagerV1beta1::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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -323,15 +323,15 @@ 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 set_project_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def set_project_iam_policy(resource, set_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta1/projects/{resource}:setIamPolicy', options) command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::SetIamPolicyRequest::Representation command.request_object = set_iam_policy_request_object command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Policy::Representation command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Policy command.params['resource'] = resource unless resource.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -344,11 +344,11 @@ module Google # @param [Google::Apis::CloudresourcemanagerV1beta1::Project] project_object # @param [Boolean] use_legacy_stack # A safety hatch to opt out of the new reliable project creation process. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -361,15 +361,15 @@ 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 create_project(project_object = nil, use_legacy_stack: nil, fields: nil, quota_user: nil, options: nil, &block) + def create_project(project_object = nil, use_legacy_stack: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta1/projects', options) command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation command.request_object = project_object command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Project command.query['useLegacyStack'] = use_legacy_stack unless use_legacy_stack.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -379,11 +379,11 @@ module Google # REQUIRED: The resource for which the policy is being requested. # See the operation documentation for the appropriate value for this field. # @param [Google::Apis::CloudresourcemanagerV1beta1::GetIamPolicyRequest] get_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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -396,15 +396,15 @@ 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 get_project_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def get_project_iam_policy(resource, get_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta1/projects/{resource}:getIamPolicy', options) command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::GetIamPolicyRequest::Representation command.request_object = get_iam_policy_request_object command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Policy::Representation command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Policy command.params['resource'] = resource unless resource.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -414,11 +414,11 @@ module Google # @param [String] project_id # The Project ID (for example, `my-project-123`). # Required. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -431,13 +431,13 @@ 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 get_project(project_id, fields: nil, quota_user: nil, options: nil, &block) + def get_project(project_id, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1beta1/projects/{projectId}', options) command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Project command.params['projectId'] = project_id unless project_id.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -451,11 +451,11 @@ module Google # The project ID (for example, `foo-bar-123`). # Required. # @param [Google::Apis::CloudresourcemanagerV1beta1::UndeleteProjectRequest] undelete_project_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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -468,15 +468,15 @@ 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 undelete_project(project_id, undelete_project_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def undelete_project(project_id, undelete_project_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta1/projects/{projectId}:undelete', options) command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::UndeleteProjectRequest::Representation command.request_object = undelete_project_request_object command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Empty::Representation command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Empty command.params['projectId'] = project_id unless project_id.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -487,11 +487,11 @@ module Google # The project ID (for example, `my-project-123`). # Required. # @param [Google::Apis::CloudresourcemanagerV1beta1::Project] project_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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -504,15 +504,15 @@ 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 update_project(project_id, project_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def update_project(project_id, project_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:put, 'v1beta1/projects/{projectId}', options) command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation command.request_object = project_object command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Project command.params['projectId'] = project_id unless project_id.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -523,11 +523,11 @@ module Google # The Project ID (for example, `my-project-123`). # Required. # @param [Google::Apis::CloudresourcemanagerV1beta1::GetAncestryRequest] get_ancestry_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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -540,15 +540,15 @@ 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 get_project_ancestry(project_id, get_ancestry_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def get_project_ancestry(project_id, get_ancestry_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta1/projects/{projectId}:getAncestry', options) command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::GetAncestryRequest::Representation command.request_object = get_ancestry_request_object command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::GetAncestryResponse::Representation command.response_class = Google::Apis::CloudresourcemanagerV1beta1::GetAncestryResponse command.params['projectId'] = project_id unless project_id.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -557,11 +557,11 @@ module Google # 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::CloudresourcemanagerV1beta1::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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -574,15 +574,15 @@ 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 test_project_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def test_project_iam_permissions(resource, test_iam_permissions_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta1/projects/{resource}:testIamPermissions', options) command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsRequest::Representation command.request_object = test_iam_permissions_request_object command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsResponse::Representation command.response_class = Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsResponse command.params['resource'] = resource unless resource.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -608,11 +608,11 @@ module Google # @param [String] project_id # The Project ID (for example, `foo-bar-123`). # Required. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -625,13 +625,13 @@ 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 delete_project(project_id, fields: nil, quota_user: nil, options: nil, &block) + def delete_project(project_id, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:delete, 'v1beta1/projects/{projectId}', options) command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Empty::Representation command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Empty command.params['projectId'] = project_id unless project_id.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -665,11 +665,11 @@ module Google # |labels.color:red labels.size:big|The project's label `color` has the # value `red` and its label `size` has the value `big`. # Optional. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -682,15 +682,15 @@ 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_projects(page_token: nil, page_size: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_projects(page_token: nil, page_size: nil, filter: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1beta1/projects', options) command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::ListProjectsResponse::Representation command.response_class = Google::Apis::CloudresourcemanagerV1beta1::ListProjectsResponse command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['filter'] = filter unless filter.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end diff --git a/generated/google/apis/cloudtrace_v1.rb b/generated/google/apis/cloudtrace_v1.rb index b4d5bf936..03faa67f6 100644 --- a/generated/google/apis/cloudtrace_v1.rb +++ b/generated/google/apis/cloudtrace_v1.rb @@ -28,16 +28,16 @@ module Google # @see https://cloud.google.com/trace module CloudtraceV1 VERSION = 'V1' - REVISION = '20170425' + REVISION = '20170516' + + # Read Trace data for a project or application + AUTH_TRACE_READONLY = 'https://www.googleapis.com/auth/trace.readonly' # Write Trace data for a project or application AUTH_TRACE_APPEND = 'https://www.googleapis.com/auth/trace.append' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' - - # Read Trace data for a project or application - AUTH_TRACE_READONLY = 'https://www.googleapis.com/auth/trace.readonly' end end end diff --git a/generated/google/apis/cloudtrace_v1/classes.rb b/generated/google/apis/cloudtrace_v1/classes.rb index dbd848202..df108ca2b 100644 --- a/generated/google/apis/cloudtrace_v1/classes.rb +++ b/generated/google/apis/cloudtrace_v1/classes.rb @@ -22,6 +22,121 @@ module Google module Apis module CloudtraceV1 + # List of new or updated traces. + class Traces + include Google::Apis::Core::Hashable + + # List of traces. + # Corresponds to the JSON property `traces` + # @return [Array] + attr_accessor :traces + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @traces = args[:traces] if args.key?(:traces) + end + end + + # A span represents a single timed event within a trace. Spans can be nested + # and form a trace tree. Often, a trace contains a root span that describes the + # end-to-end latency of an operation and, optionally, one or more subspans for + # its suboperations. Spans do not need to be contiguous. There may be gaps + # between spans in a trace. + class TraceSpan + include Google::Apis::Core::Hashable + + # Name of the span. Must be less than 128 bytes. The span name is sanitized + # and displayed in the Stackdriver Trace tool in the + # `% dynamic print site_values.console_name %`. + # The name may be a method name or some other per-call site name. + # For the same executable and the same call point, a best practice is + # to use a consistent name, which makes it easier to correlate + # cross-trace spans. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Identifier for the span. Must be a 64-bit integer other than 0 and + # unique within a trace. + # Corresponds to the JSON property `spanId` + # @return [Fixnum] + attr_accessor :span_id + + # ID of the parent span, if any. Optional. + # Corresponds to the JSON property `parentSpanId` + # @return [Fixnum] + attr_accessor :parent_span_id + + # End time of the span in nanoseconds from the UNIX epoch. + # Corresponds to the JSON property `endTime` + # @return [String] + attr_accessor :end_time + + # Start time of the span in nanoseconds from the UNIX epoch. + # Corresponds to the JSON property `startTime` + # @return [String] + attr_accessor :start_time + + # Distinguishes between spans generated in a particular context. For example, + # two spans with the same name may be distinguished using `RPC_CLIENT` + # and `RPC_SERVER` to identify queueing latency associated with the span. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # Collection of labels associated with the span. Label keys must be less than + # 128 bytes. Label values must be less than 16 kilobytes (10MB for + # `/stacktrace` values). + # Some predefined label keys exist, or you may create your own. When creating + # your own, we recommend the following formats: + # * `/category/product/key` for agents of well-known products (e.g. + # `/db/mongodb/read_size`). + # * `short_host/path/key` for domain-specific keys (e.g. + # `foo.com/myproduct/bar`) + # Predefined labels include: + # * `/agent` + # * `/component` + # * `/error/message` + # * `/error/name` + # * `/http/client_city` + # * `/http/client_country` + # * `/http/client_protocol` + # * `/http/client_region` + # * `/http/host` + # * `/http/method` + # * `/http/redirected_url` + # * `/http/request/size` + # * `/http/response/size` + # * `/http/status_code` + # * `/http/url` + # * `/http/user_agent` + # * `/pid` + # * `/stacktrace` + # * `/tid` + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @name = args[:name] if args.key?(:name) + @span_id = args[:span_id] if args.key?(:span_id) + @parent_span_id = args[:parent_span_id] if args.key?(:parent_span_id) + @end_time = args[:end_time] if args.key?(:end_time) + @start_time = args[:start_time] if args.key?(:start_time) + @kind = args[:kind] if args.key?(:kind) + @labels = args[:labels] if args.key?(:labels) + end + end + # The response message for the `ListTraces` method. class ListTracesResponse include Google::Apis::Core::Hashable @@ -101,121 +216,6 @@ module Google @trace_id = args[:trace_id] if args.key?(:trace_id) end end - - # List of new or updated traces. - class Traces - include Google::Apis::Core::Hashable - - # List of traces. - # Corresponds to the JSON property `traces` - # @return [Array] - attr_accessor :traces - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @traces = args[:traces] if args.key?(:traces) - end - end - - # A span represents a single timed event within a trace. Spans can be nested - # and form a trace tree. Often, a trace contains a root span that describes the - # end-to-end latency of an operation and, optionally, one or more subspans for - # its suboperations. Spans do not need to be contiguous. There may be gaps - # between spans in a trace. - class TraceSpan - include Google::Apis::Core::Hashable - - # Collection of labels associated with the span. Label keys must be less than - # 128 bytes. Label values must be less than 16 kilobytes (10MB for - # `/stacktrace` values). - # Some predefined label keys exist, or you may create your own. When creating - # your own, we recommend the following formats: - # * `/category/product/key` for agents of well-known products (e.g. - # `/db/mongodb/read_size`). - # * `short_host/path/key` for domain-specific keys (e.g. - # `foo.com/myproduct/bar`) - # Predefined labels include: - # * `/agent` - # * `/component` - # * `/error/message` - # * `/error/name` - # * `/http/client_city` - # * `/http/client_country` - # * `/http/client_protocol` - # * `/http/client_region` - # * `/http/host` - # * `/http/method` - # * `/http/redirected_url` - # * `/http/request/size` - # * `/http/response/size` - # * `/http/status_code` - # * `/http/url` - # * `/http/user_agent` - # * `/pid` - # * `/stacktrace` - # * `/tid` - # Corresponds to the JSON property `labels` - # @return [Hash] - attr_accessor :labels - - # Name of the span. Must be less than 128 bytes. The span name is sanitized - # and displayed in the Stackdriver Trace tool in the - # `% dynamic print site_values.console_name %`. - # The name may be a method name or some other per-call site name. - # For the same executable and the same call point, a best practice is - # to use a consistent name, which makes it easier to correlate - # cross-trace spans. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Identifier for the span. Must be a 64-bit integer other than 0 and - # unique within a trace. - # Corresponds to the JSON property `spanId` - # @return [Fixnum] - attr_accessor :span_id - - # ID of the parent span, if any. Optional. - # Corresponds to the JSON property `parentSpanId` - # @return [Fixnum] - attr_accessor :parent_span_id - - # End time of the span in nanoseconds from the UNIX epoch. - # Corresponds to the JSON property `endTime` - # @return [String] - attr_accessor :end_time - - # Start time of the span in nanoseconds from the UNIX epoch. - # Corresponds to the JSON property `startTime` - # @return [String] - attr_accessor :start_time - - # Distinguishes between spans generated in a particular context. For example, - # two spans with the same name may be distinguished using `RPC_CLIENT` - # and `RPC_SERVER` to identify queueing latency associated with the span. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @labels = args[:labels] if args.key?(:labels) - @name = args[:name] if args.key?(:name) - @span_id = args[:span_id] if args.key?(:span_id) - @parent_span_id = args[:parent_span_id] if args.key?(:parent_span_id) - @end_time = args[:end_time] if args.key?(:end_time) - @start_time = args[:start_time] if args.key?(:start_time) - @kind = args[:kind] if args.key?(:kind) - end - end end end end diff --git a/generated/google/apis/cloudtrace_v1/representations.rb b/generated/google/apis/cloudtrace_v1/representations.rb index 02ed0c20b..4045959f2 100644 --- a/generated/google/apis/cloudtrace_v1/representations.rb +++ b/generated/google/apis/cloudtrace_v1/representations.rb @@ -22,6 +22,18 @@ module Google module Apis module CloudtraceV1 + class Traces + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TraceSpan + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class ListTracesResponse class Representation < Google::Apis::Core::JsonRepresentation; end @@ -41,15 +53,24 @@ module Google end class Traces - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :traces, as: 'traces', class: Google::Apis::CloudtraceV1::Trace, decorator: Google::Apis::CloudtraceV1::Trace::Representation - include Google::Apis::Core::JsonObjectSupport + end end class TraceSpan - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :name, as: 'name' + property :span_id, :numeric_string => true, as: 'spanId' + property :parent_span_id, :numeric_string => true, as: 'parentSpanId' + property :end_time, as: 'endTime' + property :start_time, as: 'startTime' + property :kind, as: 'kind' + hash :labels, as: 'labels' + end end class ListTracesResponse @@ -76,27 +97,6 @@ module Google property :trace_id, as: 'traceId' end end - - class Traces - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :traces, as: 'traces', class: Google::Apis::CloudtraceV1::Trace, decorator: Google::Apis::CloudtraceV1::Trace::Representation - - end - end - - class TraceSpan - # @private - class Representation < Google::Apis::Core::JsonRepresentation - hash :labels, as: 'labels' - property :name, as: 'name' - property :span_id, :numeric_string => true, as: 'spanId' - property :parent_span_id, :numeric_string => true, as: 'parentSpanId' - property :end_time, as: 'endTime' - property :start_time, as: 'startTime' - property :kind, as: 'kind' - end - end end end end diff --git a/generated/google/apis/cloudtrace_v1/service.rb b/generated/google/apis/cloudtrace_v1/service.rb index acb698be9..4166c7f55 100644 --- a/generated/google/apis/cloudtrace_v1/service.rb +++ b/generated/google/apis/cloudtrace_v1/service.rb @@ -90,13 +90,6 @@ module Google # Returns of a list of traces that match the specified filter conditions. # @param [String] project_id # ID of the Cloud project where the trace data is stored. - # @param [Fixnum] page_size - # Maximum number of traces to return. If not specified or <= 0, the - # implementation selects a reasonable value. The implementation may - # return fewer traces than the requested page size. Optional. - # @param [String] view - # Type of data returned for traces in the list. Optional. Default is - # `MINIMAL`. # @param [String] order_by # Field used to sort the returned traces. Optional. # Can be one of the following: @@ -140,12 +133,19 @@ module Google # @param [String] end_time # End of the time interval (inclusive) during which the trace data was # collected from the application. - # @param [String] page_token - # Token identifying the page of results to return. If provided, use the - # value of the `next_page_token` field from a previous request. Optional. # @param [String] start_time # Start of the time interval (inclusive) during which the trace data was # collected from the application. + # @param [String] page_token + # Token identifying the page of results to return. If provided, use the + # value of the `next_page_token` field from a previous request. Optional. + # @param [Fixnum] page_size + # Maximum number of traces to return. If not specified or <= 0, the + # implementation selects a reasonable value. The implementation may + # return fewer traces than the requested page size. Optional. + # @param [String] view + # Type of data returned for traces in the list. Optional. Default is + # `MINIMAL`. # @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. @@ -163,18 +163,18 @@ 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_project_traces(project_id, page_size: nil, view: nil, order_by: nil, filter: nil, end_time: nil, page_token: nil, start_time: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_project_traces(project_id, order_by: nil, filter: nil, end_time: nil, start_time: nil, page_token: nil, page_size: nil, view: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/projects/{projectId}/traces', options) command.response_representation = Google::Apis::CloudtraceV1::ListTracesResponse::Representation command.response_class = Google::Apis::CloudtraceV1::ListTracesResponse command.params['projectId'] = project_id unless project_id.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['view'] = view unless view.nil? command.query['orderBy'] = order_by unless order_by.nil? command.query['filter'] = filter unless filter.nil? command.query['endTime'] = end_time unless end_time.nil? - command.query['pageToken'] = page_token unless page_token.nil? command.query['startTime'] = start_time unless start_time.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['view'] = view unless view.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) diff --git a/generated/google/apis/compute_beta.rb b/generated/google/apis/compute_beta.rb index 37d844ae1..d33f696c4 100644 --- a/generated/google/apis/compute_beta.rb +++ b/generated/google/apis/compute_beta.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/compute/docs/reference/latest/ module ComputeBeta VERSION = 'Beta' - REVISION = '20170416' + REVISION = '20170515' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/compute_beta/classes.rb b/generated/google/apis/compute_beta/classes.rb index d47e0d2f5..8106ea35f 100644 --- a/generated/google/apis/compute_beta/classes.rb +++ b/generated/google/apis/compute_beta/classes.rb @@ -1336,23 +1336,20 @@ module Google class AutoscalingPolicyCustomMetricUtilization include Google::Apis::Core::Hashable - # The identifier of the Stackdriver Monitoring metric. The metric cannot have - # negative values and should be a utilization metric, which means that the + # The identifier (type) of the Stackdriver Monitoring metric. The metric cannot + # have negative values and should be a utilization metric, which means that the # number of virtual machines handling requests should increase or decrease - # proportionally to the metric. The metric must also have a label of compute. - # googleapis.com/resource_id with the value of the instance's unique ID, - # although this alone does not guarantee that the metric is valid. - # For example, the following is a valid metric: - # compute.googleapis.com/instance/network/received_bytes_count - # The following is not a valid metric because it does not increase or decrease - # based on usage: - # compute.googleapis.com/instance/cpu/reserved_cores + # proportionally to the metric. + # The metric must have a value type of INT64 or DOUBLE. # Corresponds to the JSON property `metric` # @return [String] attr_accessor :metric - # Target value of the metric which autoscaler should maintain. Must be a + # The target value of the metric that autoscaler should maintain. This must be a # positive value. + # For example, a good metric to use as a utilization_target is compute. + # googleapis.com/instance/network/received_bytes_count. The autoscaler will work + # to keep this value constant for each of the instances. # Corresponds to the JSON property `utilizationTarget` # @return [Float] attr_accessor :utilization_target @@ -1893,7 +1890,7 @@ module Google # @return [String] attr_accessor :oauth2_client_secret - # + # [Output Only] SHA256 hash value for the field oauth2_client_secret above. # Corresponds to the JSON property `oauth2ClientSecretSha256` # @return [String] attr_accessor :oauth2_client_secret_sha256 @@ -3418,7 +3415,7 @@ module Google # @return [Fixnum] attr_accessor :id - # [Output Ony] Type of the resource. Always compute#firewall for firewall rules. + # [Output Only] Type of the resource. Always compute#firewall for firewall rules. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind @@ -3635,13 +3632,14 @@ module Google # The IP address that this forwarding rule is serving on behalf of. # For global forwarding rules, the address must be a global IP. For regional # forwarding rules, the address must live in the same region as the forwarding - # rule. By default, this field is empty and an ephemeral IP from the same scope ( - # global or regional) will be assigned. + # rule. By default, this field is empty and an ephemeral IPv4 address from the + # same scope (global or regional) will be assigned. A regional forwarding rule + # supports IPv4 only. A global forwarding rule supports either IPv4 or IPv6. # When the load balancing scheme is INTERNAL, this can only be an RFC 1918 IP # address belonging to the network/subnetwork configured for the forwarding rule. # A reserved address cannot be used. If the field is empty, the IP address will # be automatically allocated from the internal IP range of the subnetwork or - # network configured for this forwarding rule. Only IPv4 is supported. + # network configured for this forwarding rule. # Corresponds to the JSON property `IPAddress` # @return [String] attr_accessor :ip_address @@ -4775,11 +4773,11 @@ module Google attr_accessor :family # A list of features to enable on the guest OS. Applicable for bootable images - # only. Currently, only one feature can be enabled, VIRTIO_SCSCI_MULTIQUEUE, + # only. Currently, only one feature can be enabled, VIRTIO_SCSI_MULTIQUEUE, # which allows each virtual CPU to have its own queue. For Windows images, you - # can only enable VIRTIO_SCSCI_MULTIQUEUE on images with driver version 1.2.0. + # can only enable VIRTIO_SCSI_MULTIQUEUE on images with driver version 1.2.0. # 1621 or higher. Linux images with kernel versions 3.17 and higher will support - # VIRTIO_SCSCI_MULTIQUEUE. + # VIRTIO_SCSI_MULTIQUEUE. # For new Windows images, the server might also populate this field with the # value WINDOWS, to indicate that this is a Windows image. This value is purely # informational and does not enable or disable any features. @@ -5084,6 +5082,12 @@ module Google # @return [Google::Apis::ComputeBeta::Metadata] attr_accessor :metadata + # Minimum cpu/platform to be used by this instance. We may schedule on the + # specified or later cpu/platform. + # Corresponds to the JSON property `minCpuPlatform` + # @return [String] + attr_accessor :min_cpu_platform + # The name of the resource, provided by the client when initially creating the # resource. The resource name must be 1-63 characters long, and comply with # RFC1035. Specifically, the name must be 1-63 characters long and match the @@ -5160,6 +5164,7 @@ module Google @labels = args[:labels] if args.key?(:labels) @machine_type = args[:machine_type] if args.key?(:machine_type) @metadata = args[:metadata] if args.key?(:metadata) + @min_cpu_platform = args[:min_cpu_platform] if args.key?(:min_cpu_platform) @name = args[:name] if args.key?(:name) @network_interfaces = args[:network_interfaces] if args.key?(:network_interfaces) @scheduling = args[:scheduling] if args.key?(:scheduling) @@ -6495,6 +6500,12 @@ module Google # @return [Google::Apis::ComputeBeta::Metadata] attr_accessor :metadata + # Minimum cpu/platform to be used by this instance. The instance may be + # scheduled on the specified or later cpu/platform. + # Corresponds to the JSON property `minCpuPlatform` + # @return [String] + attr_accessor :min_cpu_platform + # An array of network access configurations for this interface. # Corresponds to the JSON property `networkInterfaces` # @return [Array] @@ -6530,6 +6541,7 @@ module Google @labels = args[:labels] if args.key?(:labels) @machine_type = args[:machine_type] if args.key?(:machine_type) @metadata = args[:metadata] if args.key?(:metadata) + @min_cpu_platform = args[:min_cpu_platform] if args.key?(:min_cpu_platform) @network_interfaces = args[:network_interfaces] if args.key?(:network_interfaces) @scheduling = args[:scheduling] if args.key?(:scheduling) @service_accounts = args[:service_accounts] if args.key?(:service_accounts) @@ -6860,6 +6872,25 @@ module Google end end + # + class InstancesSetMinCpuPlatformRequest + include Google::Apis::Core::Hashable + + # Minimum cpu/platform this instance should be started at. + # Corresponds to the JSON property `minCpuPlatform` + # @return [String] + attr_accessor :min_cpu_platform + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @min_cpu_platform = args[:min_cpu_platform] if args.key?(:min_cpu_platform) + end + end + # class InstancesSetServiceAccountRequest include Google::Apis::Core::Hashable @@ -10683,13 +10714,14 @@ module Google attr_accessor :creation_timestamp # An optional description of this resource. Provide this property when you - # create the resource. + # create the resource. This field can be set only at resource creation time. # Corresponds to the JSON property `description` # @return [String] attr_accessor :description # [Output Only] The gateway address for default routes to reach destination - # addresses outside this subnetwork. + # addresses outside this subnetwork. This field can be set only at resource + # creation time. # Corresponds to the JSON property `gatewayAddress` # @return [String] attr_accessor :gateway_address @@ -10703,7 +10735,7 @@ module Google # The range of internal addresses that are owned by this subnetwork. Provide # this property when you create the subnetwork. For example, 10.0.0.0/8 or 192. # 168.0.0/16. Ranges must be unique and non-overlapping within a network. Only - # IPv4 is supported. + # IPv4 is supported. This field can be set only at resource creation time. # Corresponds to the JSON property `ipCidrRange` # @return [String] attr_accessor :ip_cidr_range @@ -10726,19 +10758,22 @@ module Google # The URL of the network to which this subnetwork belongs, provided by the # client when initially creating the subnetwork. Only networks that are in the - # distributed mode can have subnetworks. + # distributed mode can have subnetworks. This field can be set only at resource + # creation time. # Corresponds to the JSON property `network` # @return [String] attr_accessor :network # Whether the VMs in this subnet can access Google services without assigned - # external IP addresses. + # external IP addresses. This field can be both set at resource creation time + # and updated using setPrivateIpGoogleAccess. # Corresponds to the JSON property `privateIpGoogleAccess` # @return [Boolean] attr_accessor :private_ip_google_access alias_method :private_ip_google_access?, :private_ip_google_access - # URL of the region where the Subnetwork resides. + # URL of the region where the Subnetwork resides. This field can be set only at + # resource creation time. # Corresponds to the JSON property `region` # @return [String] attr_accessor :region @@ -13532,6 +13567,11 @@ module Google class Zone include Google::Apis::Core::Hashable + # [Output Only] Available cpu/platform selections for the zone. + # Corresponds to the JSON property `availableCpuPlatforms` + # @return [Array] + attr_accessor :available_cpu_platforms + # [Output Only] Creation timestamp in RFC3339 text format. # Corresponds to the JSON property `creationTimestamp` # @return [String] @@ -13584,6 +13624,7 @@ module Google # Update properties of this object def update!(**args) + @available_cpu_platforms = args[:available_cpu_platforms] if args.key?(:available_cpu_platforms) @creation_timestamp = args[:creation_timestamp] if args.key?(:creation_timestamp) @deprecated = args[:deprecated] if args.key?(:deprecated) @description = args[:description] if args.key?(:description) diff --git a/generated/google/apis/compute_beta/representations.rb b/generated/google/apis/compute_beta/representations.rb index 1e1451f04..f0df72f04 100644 --- a/generated/google/apis/compute_beta/representations.rb +++ b/generated/google/apis/compute_beta/representations.rb @@ -856,6 +856,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class InstancesSetMinCpuPlatformRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class InstancesSetServiceAccountRequest class Representation < Google::Apis::Core::JsonRepresentation; end @@ -2979,6 +2985,7 @@ module Google property :machine_type, as: 'machineType' property :metadata, as: 'metadata', class: Google::Apis::ComputeBeta::Metadata, decorator: Google::Apis::ComputeBeta::Metadata::Representation + property :min_cpu_platform, as: 'minCpuPlatform' property :name, as: 'name' collection :network_interfaces, as: 'networkInterfaces', class: Google::Apis::ComputeBeta::NetworkInterface, decorator: Google::Apis::ComputeBeta::NetworkInterface::Representation @@ -3331,6 +3338,7 @@ module Google property :machine_type, as: 'machineType' property :metadata, as: 'metadata', class: Google::Apis::ComputeBeta::Metadata, decorator: Google::Apis::ComputeBeta::Metadata::Representation + property :min_cpu_platform, as: 'minCpuPlatform' collection :network_interfaces, as: 'networkInterfaces', class: Google::Apis::ComputeBeta::NetworkInterface, decorator: Google::Apis::ComputeBeta::NetworkInterface::Representation property :scheduling, as: 'scheduling', class: Google::Apis::ComputeBeta::Scheduling, decorator: Google::Apis::ComputeBeta::Scheduling::Representation @@ -3436,6 +3444,13 @@ module Google end end + class InstancesSetMinCpuPlatformRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :min_cpu_platform, as: 'minCpuPlatform' + end + end + class InstancesSetServiceAccountRequest # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -5129,6 +5144,7 @@ module Google class Zone # @private class Representation < Google::Apis::Core::JsonRepresentation + collection :available_cpu_platforms, as: 'availableCpuPlatforms' property :creation_timestamp, as: 'creationTimestamp' property :deprecated, as: 'deprecated', class: Google::Apis::ComputeBeta::DeprecationStatus, decorator: Google::Apis::ComputeBeta::DeprecationStatus::Representation diff --git a/generated/google/apis/compute_beta/service.rb b/generated/google/apis/compute_beta/service.rb index 5f68c1734..6856030f1 100644 --- a/generated/google/apis/compute_beta/service.rb +++ b/generated/google/apis/compute_beta/service.rb @@ -5135,6 +5135,9 @@ module Google # DONE when the action is scheduled even if the instances have not yet been # removed from the group. You must separately verify the status of the # abandoning action with the listmanagedinstances method. + # If the group is part of a backend service that has enabled connection draining, + # it can take up to 60 seconds after the connection draining duration has + # elapsed before the VM instance is removed or deleted. # You can specify a maximum of 1000 instances with this method per request. # @param [String] project # Project ID for this request. @@ -5306,6 +5309,9 @@ module Google # DONE when the action is scheduled even if the instances are still being # deleted. You must separately verify the status of the deleting action with the # listmanagedinstances method. + # If the group is part of a backend service that has enabled connection draining, + # it can take up to 60 seconds after the connection draining duration has + # elapsed before the VM instance is removed or deleted. # You can specify a maximum of 1000 instances with this method per request. # @param [String] project # Project ID for this request. @@ -5398,7 +5404,8 @@ module Google # is marked as DONE when the group is created even if the instances in the group # have not yet been created. You must separately verify the status of the # individual instances with the listmanagedinstances method. - # A managed instance group can have up to 1000 VM instances per group. + # A managed instance group can have up to 1000 VM instances per group. Please + # contact Cloud Support if you need an increase in this limit. # @param [String] project # Project ID for this request. # @param [String] zone @@ -5627,6 +5634,9 @@ module Google # DONE when the action is scheduled even if the instances have not yet been # recreated. You must separately verify the status of the recreating action with # the listmanagedinstances method. + # If the group is part of a backend service that has enabled connection draining, + # it can take up to 60 seconds after the connection draining duration has + # elapsed before the VM instance is removed or deleted. # You can specify a maximum of 1000 instances with this method per request. # @param [String] project # Project ID for this request. @@ -5677,6 +5687,9 @@ module Google # the resize actions are scheduled even if the group has not yet added or # deleted any instances. You must separately verify the status of the creating # or deleting actions with the listmanagedinstances method. + # If the group is part of a backend service that has enabled connection draining, + # it can take up to 60 seconds after the connection draining duration has + # elapsed before the VM instance is removed or deleted. # @param [String] project # Project ID for this request. # @param [String] zone @@ -5731,6 +5744,9 @@ module Google # instances. You must separately verify the status of the creating, # creatingWithoutRetries, or deleting actions with the get or # listmanagedinstances method. + # If the group is part of a backend service that has enabled connection draining, + # it can take up to 60 seconds after the connection draining duration has + # elapsed before the VM instance is removed or deleted. # @param [String] project # Project ID for this request. # @param [String] zone @@ -6425,6 +6441,9 @@ module Google # Removes one or more instances from the specified instance group, but does not # delete those instances. + # If the group is part of a backend service that has enabled connection draining, + # it can take up to 60 seconds after the connection draining duration before + # the VM instance is removed or deleted. # @param [String] project # Project ID for this request. # @param [String] zone @@ -6920,7 +6939,10 @@ module Google execute_or_queue_command(command, &block) end - # Attaches a Disk resource to an instance. + # Attaches an existing Disk resource to an instance. You must first create the + # disk before you can attach it. It is not possible to create and attach a disk + # at the same time. For more information, read Adding a persistent disk to your + # instance. # @param [String] project # Project ID for this request. # @param [String] zone @@ -7664,6 +7686,54 @@ module Google execute_or_queue_command(command, &block) end + # Changes the minimum cpu/platform that this instance should be started as. This + # is called on a stopped instance. + # @param [String] project + # Project ID for this request. + # @param [String] zone + # The name of the zone for this request. + # @param [String] instance + # Name of the instance scoping this request. + # @param [Google::Apis::ComputeBeta::InstancesSetMinCpuPlatformRequest] instances_set_min_cpu_platform_request_object + # @param [String] request_id + # begin_interface: MixerMutationRequestBuilder Request ID to support idempotency. + # @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::ComputeBeta::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ComputeBeta::Operation] + # + # @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_instance_min_cpu_platform(project, zone, instance, instances_set_min_cpu_platform_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, '{project}/zones/{zone}/instances/{instance}/setMinCpuPlatform', options) + command.request_representation = Google::Apis::ComputeBeta::InstancesSetMinCpuPlatformRequest::Representation + command.request_object = instances_set_min_cpu_platform_request_object + command.response_representation = Google::Apis::ComputeBeta::Operation::Representation + command.response_class = Google::Apis::ComputeBeta::Operation + command.params['project'] = project unless project.nil? + command.params['zone'] = zone unless zone.nil? + command.params['instance'] = instance unless instance.nil? + command.query['requestId'] = request_id unless request_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + # Sets an instance's scheduling options. # @param [String] project # Project ID for this request. @@ -10004,6 +10074,9 @@ module Google # DONE when the action is scheduled even if the instances have not yet been # removed from the group. You must separately verify the status of the # abandoning action with the listmanagedinstances method. + # If the group is part of a backend service that has enabled connection draining, + # it can take up to 60 seconds after the connection draining duration has + # elapsed before the VM instance is removed or deleted. # You can specify a maximum of 1000 instances with this method per request. # @param [String] project # Project ID for this request. @@ -10097,6 +10170,9 @@ module Google # DONE when the action is scheduled even if the instances are still being # deleted. You must separately verify the status of the deleting action with the # listmanagedinstances method. + # If the group is part of a backend service that has enabled connection draining, + # it can take up to 60 seconds after the connection draining duration has + # elapsed before the VM instance is removed or deleted. # You can specify a maximum of 1000 instances with this method per request. # @param [String] project # Project ID for this request. @@ -10415,6 +10491,9 @@ module Google # DONE when the action is scheduled even if the instances have not yet been # recreated. You must separately verify the status of the recreating action with # the listmanagedinstances method. + # If the group is part of a backend service that has enabled connection draining, + # it can take up to 60 seconds after the connection draining duration has + # elapsed before the VM instance is removed or deleted. # You can specify a maximum of 1000 instances with this method per request. # @param [String] project # Project ID for this request. @@ -10466,6 +10545,9 @@ module Google # resize actions are scheduled even if the group has not yet added or deleted # any instances. You must separately verify the status of the creating or # deleting actions with the listmanagedinstances method. + # If the group is part of a backend service that has enabled connection draining, + # it can take up to 60 seconds after the connection draining duration has + # elapsed before the VM instance is removed or deleted. # @param [String] project # Project ID for this request. # @param [String] region @@ -12936,7 +13018,7 @@ module Google end # Set whether VMs in this subnet can access Google services without assigning - # external IP addresses through Cloudpath. + # external IP addresses through Private Google Access. # @param [String] project # Project ID for this request. # @param [String] region diff --git a/generated/google/apis/compute_v1.rb b/generated/google/apis/compute_v1.rb index 5061ed0bb..a06ea0f3c 100644 --- a/generated/google/apis/compute_v1.rb +++ b/generated/google/apis/compute_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/compute/docs/reference/latest/ module ComputeV1 VERSION = 'V1' - REVISION = '20170416' + REVISION = '20170515' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/compute_v1/classes.rb b/generated/google/apis/compute_v1/classes.rb index 150ee817e..f6ebdca5a 100644 --- a/generated/google/apis/compute_v1/classes.rb +++ b/generated/google/apis/compute_v1/classes.rb @@ -893,23 +893,20 @@ module Google class AutoscalingPolicyCustomMetricUtilization include Google::Apis::Core::Hashable - # The identifier of the Stackdriver Monitoring metric. The metric cannot have - # negative values and should be a utilization metric, which means that the + # The identifier (type) of the Stackdriver Monitoring metric. The metric cannot + # have negative values and should be a utilization metric, which means that the # number of virtual machines handling requests should increase or decrease - # proportionally to the metric. The metric must also have a label of compute. - # googleapis.com/resource_id with the value of the instance's unique ID, - # although this alone does not guarantee that the metric is valid. - # For example, the following is a valid metric: - # compute.googleapis.com/instance/network/received_bytes_count - # The following is not a valid metric because it does not increase or decrease - # based on usage: - # compute.googleapis.com/instance/cpu/reserved_cores + # proportionally to the metric. + # The metric must have a value type of INT64 or DOUBLE. # Corresponds to the JSON property `metric` # @return [String] attr_accessor :metric - # Target value of the metric which autoscaler should maintain. Must be a + # The target value of the metric that autoscaler should maintain. This must be a # positive value. + # For example, a good metric to use as a utilization_target is compute. + # googleapis.com/instance/network/received_bytes_count. The autoscaler will work + # to keep this value constant for each of the instances. # Corresponds to the JSON property `utilizationTarget` # @return [Float] attr_accessor :utilization_target @@ -1229,6 +1226,11 @@ module Google # @return [Array] attr_accessor :health_checks + # Identity-Aware Proxy + # Corresponds to the JSON property `iap` + # @return [Google::Apis::ComputeV1::BackendServiceIap] + attr_accessor :iap + # [Output Only] The unique identifier for the resource. This identifier is # defined by the server. # Corresponds to the JSON property `id` @@ -1321,6 +1323,7 @@ module Google @enable_cdn = args[:enable_cdn] if args.key?(:enable_cdn) @fingerprint = args[:fingerprint] if args.key?(:fingerprint) @health_checks = args[:health_checks] if args.key?(:health_checks) + @iap = args[:iap] if args.key?(:iap) @id = args[:id] if args.key?(:id) @kind = args[:kind] if args.key?(:kind) @load_balancing_scheme = args[:load_balancing_scheme] if args.key?(:load_balancing_scheme) @@ -1424,6 +1427,44 @@ module Google end end + # Identity-Aware Proxy + class BackendServiceIap + include Google::Apis::Core::Hashable + + # + # Corresponds to the JSON property `enabled` + # @return [Boolean] + attr_accessor :enabled + alias_method :enabled?, :enabled + + # + # Corresponds to the JSON property `oauth2ClientId` + # @return [String] + attr_accessor :oauth2_client_id + + # + # Corresponds to the JSON property `oauth2ClientSecret` + # @return [String] + attr_accessor :oauth2_client_secret + + # [Output Only] SHA256 hash value for the field oauth2_client_secret above. + # Corresponds to the JSON property `oauth2ClientSecretSha256` + # @return [String] + attr_accessor :oauth2_client_secret_sha256 + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @enabled = args[:enabled] if args.key?(:enabled) + @oauth2_client_id = args[:oauth2_client_id] if args.key?(:oauth2_client_id) + @oauth2_client_secret = args[:oauth2_client_secret] if args.key?(:oauth2_client_secret) + @oauth2_client_secret_sha256 = args[:oauth2_client_secret_sha256] if args.key?(:oauth2_client_secret_sha256) + end + end + # Contains a list of BackendService resources. class BackendServiceList include Google::Apis::Core::Hashable @@ -1804,6 +1845,12 @@ module Google # @return [String] attr_accessor :kind + # Labels to apply to this disk. These can be later modified by the setLabels + # method. + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + # [Output Only] Last attach timestamp in RFC3339 text format. # Corresponds to the JSON property `lastAttachTimestamp` # @return [String] @@ -1940,6 +1987,7 @@ module Google @disk_encryption_key = args[:disk_encryption_key] if args.key?(:disk_encryption_key) @id = args[:id] if args.key?(:id) @kind = args[:kind] if args.key?(:kind) + @labels = args[:labels] if args.key?(:labels) @last_attach_timestamp = args[:last_attach_timestamp] if args.key?(:last_attach_timestamp) @last_detach_timestamp = args[:last_detach_timestamp] if args.key?(:last_detach_timestamp) @licenses = args[:licenses] if args.key?(:licenses) @@ -2489,7 +2537,7 @@ module Google # @return [Fixnum] attr_accessor :id - # [Output Ony] Type of the resource. Always compute#firewall for firewall rules. + # [Output Only] Type of the resource. Always compute#firewall for firewall rules. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind @@ -2662,13 +2710,14 @@ module Google # The IP address that this forwarding rule is serving on behalf of. # For global forwarding rules, the address must be a global IP. For regional # forwarding rules, the address must live in the same region as the forwarding - # rule. By default, this field is empty and an ephemeral IP from the same scope ( - # global or regional) will be assigned. + # rule. By default, this field is empty and an ephemeral IPv4 address from the + # same scope (global or regional) will be assigned. A regional forwarding rule + # supports IPv4 only. A global forwarding rule supports either IPv4 or IPv6. # When the load balancing scheme is INTERNAL, this can only be an RFC 1918 IP # address belonging to the network/subnetwork configured for the forwarding rule. # A reserved address cannot be used. If the field is empty, the IP address will # be automatically allocated from the internal IP range of the subnetwork or - # network configured for this forwarding rule. Only IPv4 is supported. + # network configured for this forwarding rule. # Corresponds to the JSON property `IPAddress` # @return [String] attr_accessor :ip_address @@ -3006,6 +3055,42 @@ module Google end end + # + class GlobalSetLabelsRequest + include Google::Apis::Core::Hashable + + # The fingerprint of the previous set of labels for this resource, used to + # detect conflicts. The fingerprint is initially generated by Compute Engine and + # changes after every request to modify or update labels. You must always + # provide an up-to-date fingerprint hash when updating or changing labels. Make + # a get() request to the resource to get the latest fingerprint. + # Corresponds to the JSON property `labelFingerprint` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :label_fingerprint + + # A list of labels to apply for this resource. Each label key & value must + # comply with RFC1035. Specifically, the name must be 1-63 characters long and + # match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first + # character must be a lowercase letter, and all following characters must be a + # dash, lowercase letter, or digit, except the last character, which cannot be a + # dash. For example, "webserver-frontend": "images". A label value can also be + # empty (e.g. "my-label": ""). + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @label_fingerprint = args[:label_fingerprint] if args.key?(:label_fingerprint) + @labels = args[:labels] if args.key?(:labels) + end + end + # Guest OS features. class GuestOsFeature include Google::Apis::Core::Hashable @@ -3732,11 +3817,11 @@ module Google attr_accessor :family # A list of features to enable on the guest OS. Applicable for bootable images - # only. Currently, only one feature can be enabled, VIRTIO_SCSCI_MULTIQUEUE, + # only. Currently, only one feature can be enabled, VIRTIO_SCSI_MULTIQUEUE, # which allows each virtual CPU to have its own queue. For Windows images, you - # can only enable VIRTIO_SCSCI_MULTIQUEUE on images with driver version 1.2.0. + # can only enable VIRTIO_SCSI_MULTIQUEUE on images with driver version 1.2.0. # 1621 or higher. Linux images with kernel versions 3.17 and higher will support - # VIRTIO_SCSCI_MULTIQUEUE. + # VIRTIO_SCSI_MULTIQUEUE. # For new Windows images, the server might also populate this field with the # value WINDOWS, to indicate that this is a Windows image. This value is purely # informational and does not enable or disable any features. @@ -3760,6 +3845,12 @@ module Google # @return [String] attr_accessor :kind + # Labels to apply to this image. These can be later modified by the setLabels + # method. + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + # Any applicable license URI. # Corresponds to the JSON property `licenses` # @return [Array] @@ -3838,6 +3929,7 @@ module Google @id = args[:id] if args.key?(:id) @image_encryption_key = args[:image_encryption_key] if args.key?(:image_encryption_key) @kind = args[:kind] if args.key?(:kind) + @labels = args[:labels] if args.key?(:labels) @licenses = args[:licenses] if args.key?(:licenses) @name = args[:name] if args.key?(:name) @raw_disk = args[:raw_disk] if args.key?(:raw_disk) @@ -3978,6 +4070,12 @@ module Google # @return [String] attr_accessor :kind + # Labels to apply to this instance. These can be later modified by the setLabels + # method. + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + # Full or partial URL of the machine type resource to use for this instance, in # the format: zones/zone/machineTypes/machine-type. This is provided by the # client when the instance is created. For example, the following is a valid @@ -4071,6 +4169,7 @@ module Google @disks = args[:disks] if args.key?(:disks) @id = args[:id] if args.key?(:id) @kind = args[:kind] if args.key?(:kind) + @labels = args[:labels] if args.key?(:labels) @machine_type = args[:machine_type] if args.key?(:machine_type) @metadata = args[:metadata] if args.key?(:metadata) @name = args[:name] if args.key?(:name) @@ -5213,6 +5312,11 @@ module Google # @return [Array] attr_accessor :disks + # Labels to apply to instances that are created from this template. + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + # The machine type to use for instances that are created from this template. # Corresponds to the JSON property `machineType` # @return [String] @@ -5254,6 +5358,7 @@ module Google @can_ip_forward = args[:can_ip_forward] if args.key?(:can_ip_forward) @description = args[:description] if args.key?(:description) @disks = args[:disks] if args.key?(:disks) + @labels = args[:labels] if args.key?(:labels) @machine_type = args[:machine_type] if args.key?(:machine_type) @metadata = args[:metadata] if args.key?(:metadata) @network_interfaces = args[:network_interfaces] if args.key?(:network_interfaces) @@ -5518,6 +5623,34 @@ module Google end end + # + class InstancesSetLabelsRequest + include Google::Apis::Core::Hashable + + # Fingerprint of the previous set of labels for this resource, used to prevent + # conflicts. Provide the latest fingerprint value when making a request to add + # or change labels. + # Corresponds to the JSON property `labelFingerprint` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :label_fingerprint + + # + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @label_fingerprint = args[:label_fingerprint] if args.key?(:label_fingerprint) + @labels = args[:labels] if args.key?(:labels) + end + end + # class InstancesSetMachineTypeRequest include Google::Apis::Core::Hashable @@ -7007,6 +7140,12 @@ module Google # @return [Google::Apis::ComputeV1::UsageExportLocation] attr_accessor :usage_export_location + # [Output Only] The role this project has in a Cross Project Network (XPN) + # configuration. Currently only HOST projects are differentiated. + # Corresponds to the JSON property `xpnProjectStatus` + # @return [String] + attr_accessor :xpn_project_status + def initialize(**args) update!(**args) end @@ -7024,6 +7163,102 @@ module Google @quotas = args[:quotas] if args.key?(:quotas) @self_link = args[:self_link] if args.key?(:self_link) @usage_export_location = args[:usage_export_location] if args.key?(:usage_export_location) + @xpn_project_status = args[:xpn_project_status] if args.key?(:xpn_project_status) + end + end + + # + class ProjectsDisableXpnResourceRequest + include Google::Apis::Core::Hashable + + # XpnResourceId + # Corresponds to the JSON property `xpnResource` + # @return [Google::Apis::ComputeV1::XpnResourceId] + attr_accessor :xpn_resource + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @xpn_resource = args[:xpn_resource] if args.key?(:xpn_resource) + end + end + + # + class ProjectsEnableXpnResourceRequest + include Google::Apis::Core::Hashable + + # XpnResourceId + # Corresponds to the JSON property `xpnResource` + # @return [Google::Apis::ComputeV1::XpnResourceId] + attr_accessor :xpn_resource + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @xpn_resource = args[:xpn_resource] if args.key?(:xpn_resource) + end + end + + # + class ProjectsGetXpnResources + include Google::Apis::Core::Hashable + + # [Output Only] Type of resource. Always compute#projectsGetXpnResources for + # lists of XPN resources. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # [Output Only] This token allows you to get the next page of results for list + # requests. If the number of results is larger than maxResults, use the + # nextPageToken as a value for the query parameter pageToken in the next list + # request. Subsequent list requests will have their own nextPageToken to + # continue paging through the results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # XPN resources attached to this project as their XPN host. + # Corresponds to the JSON property `resources` + # @return [Array] + attr_accessor :resources + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @kind = args[:kind] if args.key?(:kind) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @resources = args[:resources] if args.key?(:resources) + end + end + + # + class ProjectsListXpnHostsRequest + include Google::Apis::Core::Hashable + + # Optional organization ID managed by Cloud Resource Manager, for which to list + # XPN host projects. If not specified, the organization will be inferred from + # the project. + # Corresponds to the JSON property `organization` + # @return [String] + attr_accessor :organization + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @organization = args[:organization] if args.key?(:organization) end end @@ -8565,6 +8800,12 @@ module Google # @return [String] attr_accessor :kind + # Labels to apply to this snapshot. These can be later modified by the setLabels + # method. Label values may be empty. + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + # [Output Only] A list of public visible licenses that apply to this snapshot. # This can be because the original image had licenses attached (such as a # Windows image). @@ -8641,6 +8882,7 @@ module Google @disk_size_gb = args[:disk_size_gb] if args.key?(:disk_size_gb) @id = args[:id] if args.key?(:id) @kind = args[:kind] if args.key?(:kind) + @labels = args[:labels] if args.key?(:labels) @licenses = args[:licenses] if args.key?(:licenses) @name = args[:name] if args.key?(:name) @self_link = args[:self_link] if args.key?(:self_link) @@ -8833,13 +9075,14 @@ module Google attr_accessor :creation_timestamp # An optional description of this resource. Provide this property when you - # create the resource. + # create the resource. This field can be set only at resource creation time. # Corresponds to the JSON property `description` # @return [String] attr_accessor :description # [Output Only] The gateway address for default routes to reach destination - # addresses outside this subnetwork. + # addresses outside this subnetwork. This field can be set only at resource + # creation time. # Corresponds to the JSON property `gatewayAddress` # @return [String] attr_accessor :gateway_address @@ -8853,7 +9096,7 @@ module Google # The range of internal addresses that are owned by this subnetwork. Provide # this property when you create the subnetwork. For example, 10.0.0.0/8 or 192. # 168.0.0/16. Ranges must be unique and non-overlapping within a network. Only - # IPv4 is supported. + # IPv4 is supported. This field can be set only at resource creation time. # Corresponds to the JSON property `ipCidrRange` # @return [String] attr_accessor :ip_cidr_range @@ -8876,19 +9119,22 @@ module Google # The URL of the network to which this subnetwork belongs, provided by the # client when initially creating the subnetwork. Only networks that are in the - # distributed mode can have subnetworks. + # distributed mode can have subnetworks. This field can be set only at resource + # creation time. # Corresponds to the JSON property `network` # @return [String] attr_accessor :network # Whether the VMs in this subnet can access Google services without assigned - # external IP addresses. + # external IP addresses. This field can be both set at resource creation time + # and updated using setPrivateIpGoogleAccess. # Corresponds to the JSON property `privateIpGoogleAccess` # @return [Boolean] attr_accessor :private_ip_google_access alias_method :private_ip_google_access?, :private_ip_google_access - # URL of the region where the Subnetwork resides. + # URL of the region where the Subnetwork resides. This field can be set only at + # resource creation time. # Corresponds to the JSON property `region` # @return [String] attr_accessor :region @@ -11327,6 +11573,81 @@ module Google end end + # + class XpnHostList + include Google::Apis::Core::Hashable + + # [Output Only] The unique identifier for the resource. This identifier is + # defined by the server. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # [Output Only] A list of XPN host project URLs. + # Corresponds to the JSON property `items` + # @return [Array] + attr_accessor :items + + # [Output Only] Type of resource. Always compute#xpnHostList for lists of XPN + # hosts. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # [Output Only] This token allows you to get the next page of results for list + # requests. If the number of results is larger than maxResults, use the + # nextPageToken as a value for the query parameter pageToken in the next list + # request. Subsequent list requests will have their own nextPageToken to + # continue paging through the results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # [Output Only] Server-defined URL for this resource. + # Corresponds to the JSON property `selfLink` + # @return [String] + attr_accessor :self_link + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @id = args[:id] if args.key?(:id) + @items = args[:items] if args.key?(:items) + @kind = args[:kind] if args.key?(:kind) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @self_link = args[:self_link] if args.key?(:self_link) + end + end + + # XpnResourceId + class XpnResourceId + include Google::Apis::Core::Hashable + + # The ID of the XPN resource. In the case of projects, this field matches the + # project's name, not the canonical ID. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # The type of the XPN resource. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @id = args[:id] if args.key?(:id) + @type = args[:type] if args.key?(:type) + end + end + # A Zone resource. class Zone include Google::Apis::Core::Hashable @@ -11441,6 +11762,36 @@ module Google @self_link = args[:self_link] if args.key?(:self_link) end end + + # + class ZoneSetLabelsRequest + include Google::Apis::Core::Hashable + + # The fingerprint of the previous set of labels for this resource, used to + # detect conflicts. The fingerprint is initially generated by Compute Engine and + # changes after every request to modify or update labels. You must always + # provide an up-to-date fingerprint hash in order to update or change labels. + # Make a get() request to the resource to get the latest fingerprint. + # Corresponds to the JSON property `labelFingerprint` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :label_fingerprint + + # The labels to set for this resource. + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @label_fingerprint = args[:label_fingerprint] if args.key?(:label_fingerprint) + @labels = args[:labels] if args.key?(:labels) + end + end end end end diff --git a/generated/google/apis/compute_v1/representations.rb b/generated/google/apis/compute_v1/representations.rb index 99f9deab6..6e7d83bf4 100644 --- a/generated/google/apis/compute_v1/representations.rb +++ b/generated/google/apis/compute_v1/representations.rb @@ -178,6 +178,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class BackendServiceIap + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class BackendServiceList class Representation < Google::Apis::Core::JsonRepresentation; end @@ -376,6 +382,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class GlobalSetLabelsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class GuestOsFeature class Representation < Google::Apis::Core::JsonRepresentation; end @@ -682,6 +694,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class InstancesSetLabelsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class InstancesSetMachineTypeRequest class Representation < Google::Apis::Core::JsonRepresentation; end @@ -886,6 +904,30 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class ProjectsDisableXpnResourceRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ProjectsEnableXpnResourceRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ProjectsGetXpnResources + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ProjectsListXpnHostsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class Quota class Representation < Google::Apis::Core::JsonRepresentation; end @@ -1486,6 +1528,18 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class XpnHostList + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class XpnResourceId + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class Zone class Representation < Google::Apis::Core::JsonRepresentation; end @@ -1498,6 +1552,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class ZoneSetLabelsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class AccessConfig # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1771,6 +1831,8 @@ module Google property :enable_cdn, as: 'enableCDN' property :fingerprint, :base64 => true, as: 'fingerprint' collection :health_checks, as: 'healthChecks' + property :iap, as: 'iap', class: Google::Apis::ComputeV1::BackendServiceIap, decorator: Google::Apis::ComputeV1::BackendServiceIap::Representation + property :id, :numeric_string => true, as: 'id' property :kind, as: 'kind' property :load_balancing_scheme, as: 'loadBalancingScheme' @@ -1814,6 +1876,16 @@ module Google end end + class BackendServiceIap + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :enabled, as: 'enabled' + property :oauth2_client_id, as: 'oauth2ClientId' + property :oauth2_client_secret, as: 'oauth2ClientSecret' + property :oauth2_client_secret_sha256, as: 'oauth2ClientSecretSha256' + end + end + class BackendServiceList # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1917,6 +1989,7 @@ module Google property :id, :numeric_string => true, as: 'id' property :kind, as: 'kind' + hash :labels, as: 'labels' property :last_attach_timestamp, as: 'lastAttachTimestamp' property :last_detach_timestamp, as: 'lastDetachTimestamp' collection :licenses, as: 'licenses' @@ -2187,6 +2260,14 @@ module Google end end + class GlobalSetLabelsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :label_fingerprint, :base64 => true, as: 'labelFingerprint' + hash :labels, as: 'labels' + end + end + class GuestOsFeature # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -2357,6 +2438,7 @@ module Google property :image_encryption_key, as: 'imageEncryptionKey', class: Google::Apis::ComputeV1::CustomerEncryptionKey, decorator: Google::Apis::ComputeV1::CustomerEncryptionKey::Representation property :kind, as: 'kind' + hash :labels, as: 'labels' collection :licenses, as: 'licenses' property :name, as: 'name' property :raw_disk, as: 'rawDisk', class: Google::Apis::ComputeV1::Image::RawDisk, decorator: Google::Apis::ComputeV1::Image::RawDisk::Representation @@ -2403,6 +2485,7 @@ module Google property :id, :numeric_string => true, as: 'id' property :kind, as: 'kind' + hash :labels, as: 'labels' property :machine_type, as: 'machineType' property :metadata, as: 'metadata', class: Google::Apis::ComputeV1::Metadata, decorator: Google::Apis::ComputeV1::Metadata::Representation @@ -2711,6 +2794,7 @@ module Google property :description, as: 'description' collection :disks, as: 'disks', class: Google::Apis::ComputeV1::AttachedDisk, decorator: Google::Apis::ComputeV1::AttachedDisk::Representation + hash :labels, as: 'labels' property :machine_type, as: 'machineType' property :metadata, as: 'metadata', class: Google::Apis::ComputeV1::Metadata, decorator: Google::Apis::ComputeV1::Metadata::Representation @@ -2796,6 +2880,14 @@ module Google end end + class InstancesSetLabelsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :label_fingerprint, :base64 => true, as: 'labelFingerprint' + hash :labels, as: 'labels' + end + end + class InstancesSetMachineTypeRequest # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -3169,6 +3261,40 @@ module Google property :self_link, as: 'selfLink' property :usage_export_location, as: 'usageExportLocation', class: Google::Apis::ComputeV1::UsageExportLocation, decorator: Google::Apis::ComputeV1::UsageExportLocation::Representation + property :xpn_project_status, as: 'xpnProjectStatus' + end + end + + class ProjectsDisableXpnResourceRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :xpn_resource, as: 'xpnResource', class: Google::Apis::ComputeV1::XpnResourceId, decorator: Google::Apis::ComputeV1::XpnResourceId::Representation + + end + end + + class ProjectsEnableXpnResourceRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :xpn_resource, as: 'xpnResource', class: Google::Apis::ComputeV1::XpnResourceId, decorator: Google::Apis::ComputeV1::XpnResourceId::Representation + + end + end + + class ProjectsGetXpnResources + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :kind, as: 'kind' + property :next_page_token, as: 'nextPageToken' + collection :resources, as: 'resources', class: Google::Apis::ComputeV1::XpnResourceId, decorator: Google::Apis::ComputeV1::XpnResourceId::Representation + + end + end + + class ProjectsListXpnHostsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :organization, as: 'organization' end end @@ -3574,6 +3700,7 @@ module Google property :disk_size_gb, :numeric_string => true, as: 'diskSizeGb' property :id, :numeric_string => true, as: 'id' property :kind, as: 'kind' + hash :labels, as: 'labels' collection :licenses, as: 'licenses' property :name, as: 'name' property :self_link, as: 'selfLink' @@ -4258,6 +4385,26 @@ module Google end end + class XpnHostList + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :id, as: 'id' + collection :items, as: 'items', class: Google::Apis::ComputeV1::Project, decorator: Google::Apis::ComputeV1::Project::Representation + + property :kind, as: 'kind' + property :next_page_token, as: 'nextPageToken' + property :self_link, as: 'selfLink' + end + end + + class XpnResourceId + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :id, as: 'id' + property :type, as: 'type' + end + end + class Zone # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -4285,6 +4432,14 @@ module Google property :self_link, as: 'selfLink' end end + + class ZoneSetLabelsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :label_fingerprint, :base64 => true, as: 'labelFingerprint' + hash :labels, as: 'labels' + end + end end end end diff --git a/generated/google/apis/compute_v1/service.rb b/generated/google/apis/compute_v1/service.rb index 50227e49a..bdaae7924 100644 --- a/generated/google/apis/compute_v1/service.rb +++ b/generated/google/apis/compute_v1/service.rb @@ -1964,6 +1964,51 @@ module Google execute_or_queue_command(command, &block) end + # Sets the labels on a disk. To learn more about labels, read the Labeling or + # Tagging Resources documentation. + # @param [String] project + # Project ID for this request. + # @param [String] zone + # The name of the zone for this request. + # @param [String] resource + # Name of the resource for this request. + # @param [Google::Apis::ComputeV1::ZoneSetLabelsRequest] zone_set_labels_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # Overrides userIp if both are provided. + # @param [String] user_ip + # IP address of the site where the request originates. Use this if you want to + # enforce per-user limits. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ComputeV1::Operation] + # + # @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_disk_labels(project, zone, resource, zone_set_labels_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, '{project}/zones/{zone}/disks/{resource}/setLabels', options) + command.request_representation = Google::Apis::ComputeV1::ZoneSetLabelsRequest::Representation + command.request_object = zone_set_labels_request_object + command.response_representation = Google::Apis::ComputeV1::Operation::Representation + command.response_class = Google::Apis::ComputeV1::Operation + command.params['project'] = project unless project.nil? + command.params['zone'] = zone unless zone.nil? + command.params['resource'] = resource unless resource.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 + # Deletes the specified firewall. # @param [String] project # Project ID for this request. @@ -4339,6 +4384,48 @@ module Google execute_or_queue_command(command, &block) end + # Sets the labels on an image. To learn more about labels, read the Labeling or + # Tagging Resources documentation. + # @param [String] project + # Project ID for this request. + # @param [String] resource + # Name of the resource for this request. + # @param [Google::Apis::ComputeV1::GlobalSetLabelsRequest] global_set_labels_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # Overrides userIp if both are provided. + # @param [String] user_ip + # IP address of the site where the request originates. Use this if you want to + # enforce per-user limits. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ComputeV1::Operation] + # + # @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_image_labels(project, resource, global_set_labels_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, '{project}/global/images/{resource}/setLabels', options) + command.request_representation = Google::Apis::ComputeV1::GlobalSetLabelsRequest::Representation + command.request_object = global_set_labels_request_object + command.response_representation = Google::Apis::ComputeV1::Operation::Representation + command.response_class = Google::Apis::ComputeV1::Operation + command.params['project'] = project unless project.nil? + command.params['resource'] = resource unless resource.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 + # Schedules a group action to remove the specified instances from the managed # instance group. Abandoning an instance does not delete the instance, but it # does remove the instance from any target pools that are applied by the managed @@ -4347,6 +4434,9 @@ module Google # DONE when the action is scheduled even if the instances have not yet been # removed from the group. You must separately verify the status of the # abandoning action with the listmanagedinstances method. + # If the group is part of a backend service that has enabled connection draining, + # it can take up to 60 seconds after the connection draining duration has + # elapsed before the VM instance is removed or deleted. # You can specify a maximum of 1000 instances with this method per request. # @param [String] project # Project ID for this request. @@ -4518,6 +4608,9 @@ module Google # DONE when the action is scheduled even if the instances are still being # deleted. You must separately verify the status of the deleting action with the # listmanagedinstances method. + # If the group is part of a backend service that has enabled connection draining, + # it can take up to 60 seconds after the connection draining duration has + # elapsed before the VM instance is removed or deleted. # You can specify a maximum of 1000 instances with this method per request. # @param [String] project # Project ID for this request. @@ -4610,7 +4703,8 @@ module Google # is marked as DONE when the group is created even if the instances in the group # have not yet been created. You must separately verify the status of the # individual instances with the listmanagedinstances method. - # A managed instance group can have up to 1000 VM instances per group. + # A managed instance group can have up to 1000 VM instances per group. Please + # contact Cloud Support if you need an increase in this limit. # @param [String] project # Project ID for this request. # @param [String] zone @@ -4791,6 +4885,9 @@ module Google # DONE when the action is scheduled even if the instances have not yet been # recreated. You must separately verify the status of the recreating action with # the listmanagedinstances method. + # If the group is part of a backend service that has enabled connection draining, + # it can take up to 60 seconds after the connection draining duration has + # elapsed before the VM instance is removed or deleted. # You can specify a maximum of 1000 instances with this method per request. # @param [String] project # Project ID for this request. @@ -4841,6 +4938,9 @@ module Google # the resize actions are scheduled even if the group has not yet added or # deleted any instances. You must separately verify the status of the creating # or deleting actions with the listmanagedinstances method. + # If the group is part of a backend service that has enabled connection draining, + # it can take up to 60 seconds after the connection draining duration has + # elapsed before the VM instance is removed or deleted. # @param [String] project # Project ID for this request. # @param [String] zone @@ -5401,6 +5501,9 @@ module Google # Removes one or more instances from the specified instance group, but does not # delete those instances. + # If the group is part of a backend service that has enabled connection draining, + # it can take up to 60 seconds after the connection draining duration before + # the VM instance is removed or deleted. # @param [String] project # Project ID for this request. # @param [String] zone @@ -5811,7 +5914,10 @@ module Google execute_or_queue_command(command, &block) end - # Attaches a Disk resource to an instance. + # Attaches an existing Disk resource to an instance. You must first create the + # disk before you can attach it. It is not possible to create and attach a disk + # at the same time. For more information, read Adding a persistent disk to your + # instance. # @param [String] project # Project ID for this request. # @param [String] zone @@ -6291,6 +6397,51 @@ module Google execute_or_queue_command(command, &block) end + # Sets labels on an instance. To learn more about labels, read the Labeling or + # Tagging Resources documentation. + # @param [String] project + # Project ID for this request. + # @param [String] zone + # The name of the zone for this request. + # @param [String] instance + # Name of the instance scoping this request. + # @param [Google::Apis::ComputeV1::InstancesSetLabelsRequest] instances_set_labels_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # Overrides userIp if both are provided. + # @param [String] user_ip + # IP address of the site where the request originates. Use this if you want to + # enforce per-user limits. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ComputeV1::Operation] + # + # @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_instance_labels(project, zone, instance, instances_set_labels_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, '{project}/zones/{zone}/instances/{instance}/setLabels', options) + command.request_representation = Google::Apis::ComputeV1::InstancesSetLabelsRequest::Representation + command.request_object = instances_set_labels_request_object + command.response_representation = Google::Apis::ComputeV1::Operation::Representation + command.response_class = Google::Apis::ComputeV1::Operation + command.params['project'] = project unless project.nil? + command.params['zone'] = zone unless zone.nil? + command.params['instance'] = instance unless instance.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 + # Changes the machine type for a stopped instance to the machine type specified # in the request. # @param [String] project @@ -7115,6 +7266,154 @@ module Google execute_or_queue_command(command, &block) end + # Disable this project as an XPN host project. + # @param [String] project + # Project ID for this request. + # @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::ComputeV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ComputeV1::Operation] + # + # @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 disable_project_xpn_host(project, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, '{project}/disableXpnHost', options) + command.response_representation = Google::Apis::ComputeV1::Operation::Representation + command.response_class = Google::Apis::ComputeV1::Operation + command.params['project'] = project unless project.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 + + # Disable an XPN resource associated with this host project. + # @param [String] project + # Project ID for this request. + # @param [Google::Apis::ComputeV1::ProjectsDisableXpnResourceRequest] projects_disable_xpn_resource_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # Overrides userIp if both are provided. + # @param [String] user_ip + # IP address of the site where the request originates. Use this if you want to + # enforce per-user limits. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ComputeV1::Operation] + # + # @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 disable_project_xpn_resource(project, projects_disable_xpn_resource_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, '{project}/disableXpnResource', options) + command.request_representation = Google::Apis::ComputeV1::ProjectsDisableXpnResourceRequest::Representation + command.request_object = projects_disable_xpn_resource_request_object + command.response_representation = Google::Apis::ComputeV1::Operation::Representation + command.response_class = Google::Apis::ComputeV1::Operation + command.params['project'] = project unless project.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 + + # Enable this project as an XPN host project. + # @param [String] project + # Project ID for this request. + # @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::ComputeV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ComputeV1::Operation] + # + # @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 enable_project_xpn_host(project, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, '{project}/enableXpnHost', options) + command.response_representation = Google::Apis::ComputeV1::Operation::Representation + command.response_class = Google::Apis::ComputeV1::Operation + command.params['project'] = project unless project.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 + + # Enable XPN resource (a.k.a service project or service folder in the future) + # for a host project, so that subnetworks in the host project can be used by + # instances in the service project or folder. + # @param [String] project + # Project ID for this request. + # @param [Google::Apis::ComputeV1::ProjectsEnableXpnResourceRequest] projects_enable_xpn_resource_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # Overrides userIp if both are provided. + # @param [String] user_ip + # IP address of the site where the request originates. Use this if you want to + # enforce per-user limits. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ComputeV1::Operation] + # + # @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 enable_project_xpn_resource(project, projects_enable_xpn_resource_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, '{project}/enableXpnResource', options) + command.request_representation = Google::Apis::ComputeV1::ProjectsEnableXpnResourceRequest::Representation + command.request_object = projects_enable_xpn_resource_request_object + command.response_representation = Google::Apis::ComputeV1::Operation::Representation + command.response_class = Google::Apis::ComputeV1::Operation + command.params['project'] = project unless project.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 + # Returns the specified Project resource. # @param [String] project # Project ID for this request. @@ -7150,6 +7449,131 @@ module Google execute_or_queue_command(command, &block) end + # Get the XPN host project that this project links to. May be empty if no link + # exists. + # @param [String] project + # Project ID for this request. + # @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::ComputeV1::Project] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ComputeV1::Project] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_xpn_host(project, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:get, '{project}/getXpnHost', options) + command.response_representation = Google::Apis::ComputeV1::Project::Representation + command.response_class = Google::Apis::ComputeV1::Project + command.params['project'] = project unless project.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 + + # Get XPN resources associated with this host project. + # @param [String] project + # Project ID for this request. + # @param [String] filter + # @param [Fixnum] max_results + # @param [String] order_by + # @param [String] page_token + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # Overrides userIp if both are provided. + # @param [String] user_ip + # IP address of the site where the request originates. Use this if you want to + # enforce per-user limits. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ComputeV1::ProjectsGetXpnResources] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ComputeV1::ProjectsGetXpnResources] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_xpn_resources(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:get, '{project}/getXpnResources', options) + command.response_representation = Google::Apis::ComputeV1::ProjectsGetXpnResources::Representation + command.response_class = Google::Apis::ComputeV1::ProjectsGetXpnResources + command.params['project'] = project unless project.nil? + command.query['filter'] = filter unless filter.nil? + command.query['maxResults'] = max_results unless max_results.nil? + command.query['order_by'] = order_by unless order_by.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + + # List all XPN host projects visible to the user in an organization. + # @param [String] project + # Project ID for this request. + # @param [Google::Apis::ComputeV1::ProjectsListXpnHostsRequest] projects_list_xpn_hosts_request_object + # @param [String] filter + # @param [Fixnum] max_results + # @param [String] order_by + # @param [String] page_token + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # Overrides userIp if both are provided. + # @param [String] user_ip + # IP address of the site where the request originates. Use this if you want to + # enforce per-user limits. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ComputeV1::XpnHostList] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ComputeV1::XpnHostList] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_xpn_hosts(project, projects_list_xpn_hosts_request_object = nil, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, '{project}/listXpnHosts', options) + command.request_representation = Google::Apis::ComputeV1::ProjectsListXpnHostsRequest::Representation + command.request_object = projects_list_xpn_hosts_request_object + command.response_representation = Google::Apis::ComputeV1::XpnHostList::Representation + command.response_class = Google::Apis::ComputeV1::XpnHostList + command.params['project'] = project unless project.nil? + command.query['filter'] = filter unless filter.nil? + command.query['maxResults'] = max_results unless max_results.nil? + command.query['order_by'] = order_by unless order_by.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + # Moves a persistent disk from one zone to another. # @param [String] project # Project ID for this request. @@ -7951,6 +8375,9 @@ module Google # DONE when the action is scheduled even if the instances have not yet been # removed from the group. You must separately verify the status of the # abandoning action with the listmanagedinstances method. + # If the group is part of a backend service that has enabled connection draining, + # it can take up to 60 seconds after the connection draining duration has + # elapsed before the VM instance is removed or deleted. # You can specify a maximum of 1000 instances with this method per request. # @param [String] project # Project ID for this request. @@ -8044,6 +8471,9 @@ module Google # DONE when the action is scheduled even if the instances are still being # deleted. You must separately verify the status of the deleting action with the # listmanagedinstances method. + # If the group is part of a backend service that has enabled connection draining, + # it can take up to 60 seconds after the connection draining duration has + # elapsed before the VM instance is removed or deleted. # You can specify a maximum of 1000 instances with this method per request. # @param [String] project # Project ID for this request. @@ -8314,6 +8744,9 @@ module Google # DONE when the action is scheduled even if the instances have not yet been # recreated. You must separately verify the status of the recreating action with # the listmanagedinstances method. + # If the group is part of a backend service that has enabled connection draining, + # it can take up to 60 seconds after the connection draining duration has + # elapsed before the VM instance is removed or deleted. # You can specify a maximum of 1000 instances with this method per request. # @param [String] project # Project ID for this request. @@ -8365,6 +8798,9 @@ module Google # resize actions are scheduled even if the group has not yet added or deleted # any instances. You must separately verify the status of the creating or # deleting actions with the listmanagedinstances method. + # If the group is part of a backend service that has enabled connection draining, + # it can take up to 60 seconds after the connection draining duration has + # elapsed before the VM instance is removed or deleted. # @param [String] project # Project ID for this request. # @param [String] region @@ -9837,6 +10273,48 @@ module Google execute_or_queue_command(command, &block) end + # Sets the labels on a snapshot. To learn more about labels, read the Labeling + # or Tagging Resources documentation. + # @param [String] project + # Project ID for this request. + # @param [String] resource + # Name of the resource for this request. + # @param [Google::Apis::ComputeV1::GlobalSetLabelsRequest] global_set_labels_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # Overrides userIp if both are provided. + # @param [String] user_ip + # IP address of the site where the request originates. Use this if you want to + # enforce per-user limits. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ComputeV1::Operation] + # + # @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_snapshot_labels(project, resource, global_set_labels_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, '{project}/global/snapshots/{resource}/setLabels', options) + command.request_representation = Google::Apis::ComputeV1::GlobalSetLabelsRequest::Representation + command.request_object = global_set_labels_request_object + command.response_representation = Google::Apis::ComputeV1::Operation::Representation + command.response_class = Google::Apis::ComputeV1::Operation + command.params['project'] = project unless project.nil? + command.params['resource'] = resource unless resource.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 + # Deletes the specified SslCertificate resource. # @param [String] project # Project ID for this request. @@ -10358,7 +10836,7 @@ module Google end # Set whether VMs in this subnet can access Google services without assigning - # external IP addresses through Cloudpath. + # external IP addresses through Private Google Access. # @param [String] project # Project ID for this request. # @param [String] region diff --git a/generated/google/apis/container_v1.rb b/generated/google/apis/container_v1.rb index 453eb9679..71f91a9a3 100644 --- a/generated/google/apis/container_v1.rb +++ b/generated/google/apis/container_v1.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/container-engine/ module ContainerV1 VERSION = 'V1' - REVISION = '20170424' + REVISION = '20170430' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/container_v1/classes.rb b/generated/google/apis/container_v1/classes.rb index 291c6dd59..b33e346e8 100644 --- a/generated/google/apis/container_v1/classes.rb +++ b/generated/google/apis/container_v1/classes.rb @@ -22,6 +22,21 @@ module Google module Apis module ContainerV1 + # RollbackNodePoolUpgradeRequest rollbacks the previously Aborted or Failed + # NodePool upgrade. This will be an no-op if the last upgrade successfully + # completed. + class RollbackNodePoolUpgradeRequest + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + # UpdateClusterRequest updates the settings of a cluster. class UpdateClusterRequest include Google::Apis::Core::Hashable @@ -47,6 +62,80 @@ module Google class Cluster include Google::Apis::Core::Hashable + # [Output only] The number of nodes currently in the cluster. + # Corresponds to the JSON property `currentNodeCount` + # @return [Fixnum] + attr_accessor :current_node_count + + # The monitoring service the cluster should use to write metrics. + # Currently available options: + # * `monitoring.googleapis.com` - the Google Cloud Monitoring service. + # * `none` - no metrics will be exported from the cluster. + # * if left as an empty string, `monitoring.googleapis.com` will be used. + # Corresponds to the JSON property `monitoringService` + # @return [String] + attr_accessor :monitoring_service + + # The name of the Google Compute Engine + # [network](/compute/docs/networks-and-firewalls#networks) to which the + # cluster is connected. If left unspecified, the `default` network + # will be used. + # Corresponds to the JSON property `network` + # @return [String] + attr_accessor :network + + # The fingerprint of the set of labels for this cluster. + # Corresponds to the JSON property `labelFingerprint` + # @return [String] + attr_accessor :label_fingerprint + + # [Output only] The name of the Google Compute Engine + # [zone](/compute/docs/zones#available) in which the cluster + # resides. + # Corresponds to the JSON property `zone` + # @return [String] + attr_accessor :zone + + # [Output only] The time the cluster will be automatically + # deleted in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. + # Corresponds to the JSON property `expireTime` + # @return [String] + attr_accessor :expire_time + + # [Output only] The size of the address space on each node for hosting + # containers. This is provisioned from within the `container_ipv4_cidr` + # range. + # Corresponds to the JSON property `nodeIpv4CidrSize` + # @return [Fixnum] + attr_accessor :node_ipv4_cidr_size + + # The logging service the cluster should use to write logs. + # Currently available options: + # * `logging.googleapis.com` - the Google Cloud Logging service. + # * `none` - no logs will be exported from the cluster. + # * if left as an empty string,`logging.googleapis.com` will be used. + # Corresponds to the JSON property `loggingService` + # @return [String] + attr_accessor :logging_service + + # [Output only] Additional information about the current status of this + # cluster, if available. + # Corresponds to the JSON property `statusMessage` + # @return [String] + attr_accessor :status_message + + # The authentication information for accessing the master endpoint. + # Authentication can be done using HTTP basic auth or using client + # certificates. + # Corresponds to the JSON property `masterAuth` + # @return [Google::Apis::ContainerV1::MasterAuth] + attr_accessor :master_auth + + # [Output only] The current software version of the master endpoint. + # Corresponds to the JSON property `currentMasterVersion` + # @return [String] + attr_accessor :current_master_version + # Parameters that describe the nodes in a cluster. # Corresponds to the JSON property `nodeConfig` # @return [Google::Apis::ContainerV1::NodeConfig] @@ -63,13 +152,6 @@ module Google # @return [String] attr_accessor :status - # The name of the Google Compute Engine - # [subnetwork](/compute/docs/subnetworks) to which the - # cluster is connected. - # Corresponds to the JSON property `subnetwork` - # @return [String] - attr_accessor :subnetwork - # [Output only] The current version of the node software components. # If they are currently at multiple versions because they're in the process # of being upgraded, this reflects the minimum version of all nodes. @@ -77,6 +159,13 @@ module Google # @return [String] attr_accessor :current_node_version + # The name of the Google Compute Engine + # [subnetwork](/compute/docs/subnetworks) to which the + # cluster is connected. + # Corresponds to the JSON property `subnetwork` + # @return [String] + attr_accessor :subnetwork + # The resource labels for the cluster to use to annotate any related GCE # resources. # Corresponds to the JSON property `resourceLabels` @@ -100,6 +189,12 @@ module Google # @return [String] attr_accessor :initial_cluster_version + # Configuration for the legacy Attribute Based Access Control authorization + # mode. + # Corresponds to the JSON property `legacyAbac` + # @return [Google::Apis::ContainerV1::LegacyAbac] + attr_accessor :legacy_abac + # [Output only] The IP address of this cluster's master endpoint. # The endpoint can be accessed from the internet at # `https://username:password@endpoint/`. @@ -109,12 +204,6 @@ module Google # @return [String] attr_accessor :endpoint - # Configuration for the legacy Attribute Based Access Control authorization - # mode. - # Corresponds to the JSON property `legacyAbac` - # @return [Google::Apis::ContainerV1::LegacyAbac] - attr_accessor :legacy_abac - # [Output only] The time the cluster was created, in # [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. # Corresponds to the JSON property `createTime` @@ -192,96 +281,33 @@ module Google # @return [String] attr_accessor :description - # [Output only] The number of nodes currently in the cluster. - # Corresponds to the JSON property `currentNodeCount` - # @return [Fixnum] - attr_accessor :current_node_count - - # The monitoring service the cluster should use to write metrics. - # Currently available options: - # * `monitoring.googleapis.com` - the Google Cloud Monitoring service. - # * `none` - no metrics will be exported from the cluster. - # * if left as an empty string, `monitoring.googleapis.com` will be used. - # Corresponds to the JSON property `monitoringService` - # @return [String] - attr_accessor :monitoring_service - - # The name of the Google Compute Engine - # [network](/compute/docs/networks-and-firewalls#networks) to which the - # cluster is connected. If left unspecified, the `default` network - # will be used. - # Corresponds to the JSON property `network` - # @return [String] - attr_accessor :network - - # The fingerprint of the set of labels for this cluster. - # Corresponds to the JSON property `labelFingerprint` - # @return [String] - attr_accessor :label_fingerprint - - # [Output only] The name of the Google Compute Engine - # [zone](/compute/docs/zones#available) in which the cluster - # resides. - # Corresponds to the JSON property `zone` - # @return [String] - attr_accessor :zone - - # The logging service the cluster should use to write logs. - # Currently available options: - # * `logging.googleapis.com` - the Google Cloud Logging service. - # * `none` - no logs will be exported from the cluster. - # * if left as an empty string,`logging.googleapis.com` will be used. - # Corresponds to the JSON property `loggingService` - # @return [String] - attr_accessor :logging_service - - # [Output only] The size of the address space on each node for hosting - # containers. This is provisioned from within the `container_ipv4_cidr` - # range. - # Corresponds to the JSON property `nodeIpv4CidrSize` - # @return [Fixnum] - attr_accessor :node_ipv4_cidr_size - - # [Output only] The time the cluster will be automatically - # deleted in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. - # Corresponds to the JSON property `expireTime` - # @return [String] - attr_accessor :expire_time - - # [Output only] Additional information about the current status of this - # cluster, if available. - # Corresponds to the JSON property `statusMessage` - # @return [String] - attr_accessor :status_message - - # The authentication information for accessing the master endpoint. - # Authentication can be done using HTTP basic auth or using client - # certificates. - # Corresponds to the JSON property `masterAuth` - # @return [Google::Apis::ContainerV1::MasterAuth] - attr_accessor :master_auth - - # [Output only] The current software version of the master endpoint. - # Corresponds to the JSON property `currentMasterVersion` - # @return [String] - attr_accessor :current_master_version - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @current_node_count = args[:current_node_count] if args.key?(:current_node_count) + @monitoring_service = args[:monitoring_service] if args.key?(:monitoring_service) + @network = args[:network] if args.key?(:network) + @label_fingerprint = args[:label_fingerprint] if args.key?(:label_fingerprint) + @zone = args[:zone] if args.key?(:zone) + @expire_time = args[:expire_time] if args.key?(:expire_time) + @node_ipv4_cidr_size = args[:node_ipv4_cidr_size] if args.key?(:node_ipv4_cidr_size) + @logging_service = args[:logging_service] if args.key?(:logging_service) + @status_message = args[:status_message] if args.key?(:status_message) + @master_auth = args[:master_auth] if args.key?(:master_auth) + @current_master_version = args[:current_master_version] if args.key?(:current_master_version) @node_config = args[:node_config] if args.key?(:node_config) @addons_config = args[:addons_config] if args.key?(:addons_config) @status = args[:status] if args.key?(:status) - @subnetwork = args[:subnetwork] if args.key?(:subnetwork) @current_node_version = args[:current_node_version] if args.key?(:current_node_version) + @subnetwork = args[:subnetwork] if args.key?(:subnetwork) @resource_labels = args[:resource_labels] if args.key?(:resource_labels) @name = args[:name] if args.key?(:name) @initial_cluster_version = args[:initial_cluster_version] if args.key?(:initial_cluster_version) - @endpoint = args[:endpoint] if args.key?(:endpoint) @legacy_abac = args[:legacy_abac] if args.key?(:legacy_abac) + @endpoint = args[:endpoint] if args.key?(:endpoint) @create_time = args[:create_time] if args.key?(:create_time) @cluster_ipv4_cidr = args[:cluster_ipv4_cidr] if args.key?(:cluster_ipv4_cidr) @initial_node_count = args[:initial_node_count] if args.key?(:initial_node_count) @@ -292,41 +318,6 @@ module Google @services_ipv4_cidr = args[:services_ipv4_cidr] if args.key?(:services_ipv4_cidr) @enable_kubernetes_alpha = args[:enable_kubernetes_alpha] if args.key?(:enable_kubernetes_alpha) @description = args[:description] if args.key?(:description) - @current_node_count = args[:current_node_count] if args.key?(:current_node_count) - @monitoring_service = args[:monitoring_service] if args.key?(:monitoring_service) - @network = args[:network] if args.key?(:network) - @label_fingerprint = args[:label_fingerprint] if args.key?(:label_fingerprint) - @zone = args[:zone] if args.key?(:zone) - @logging_service = args[:logging_service] if args.key?(:logging_service) - @node_ipv4_cidr_size = args[:node_ipv4_cidr_size] if args.key?(:node_ipv4_cidr_size) - @expire_time = args[:expire_time] if args.key?(:expire_time) - @status_message = args[:status_message] if args.key?(:status_message) - @master_auth = args[:master_auth] if args.key?(:master_auth) - @current_master_version = args[:current_master_version] if args.key?(:current_master_version) - end - end - - # CreateNodePoolRequest creates a node pool for a cluster. - class CreateNodePoolRequest - include Google::Apis::Core::Hashable - - # NodePool contains the name and configuration for a cluster's node pool. - # Node pools are a set of nodes (i.e. VM's), with a common configuration and - # specification, under the control of the cluster master. They may have a set - # of Kubernetes labels applied to them, which may be used to reference them - # during pod scheduling. They may also be resized up or down, to accommodate - # the workload. - # Corresponds to the JSON property `nodePool` - # @return [Google::Apis::ContainerV1::NodePool] - attr_accessor :node_pool - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @node_pool = args[:node_pool] if args.key?(:node_pool) end end @@ -356,6 +347,30 @@ module Google end end + # CreateNodePoolRequest creates a node pool for a cluster. + class CreateNodePoolRequest + include Google::Apis::Core::Hashable + + # NodePool contains the name and configuration for a cluster's node pool. + # Node pools are a set of nodes (i.e. VM's), with a common configuration and + # specification, under the control of the cluster master. They may have a set + # of Kubernetes labels applied to them, which may be used to reference them + # during pod scheduling. They may also be resized up or down, to accommodate + # the workload. + # Corresponds to the JSON property `nodePool` + # @return [Google::Apis::ContainerV1::NodePool] + attr_accessor :node_pool + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @node_pool = args[:node_pool] if args.key?(:node_pool) + end + end + # Container Engine service configuration. class ServerConfig include Google::Apis::Core::Hashable @@ -403,50 +418,6 @@ module Google class NodeConfig include Google::Apis::Core::Hashable - # The set of Google API scopes to be made available on all of the - # node VMs under the "default" service account. - # The following scopes are recommended, but not required, and by default are - # not included: - # * `https://www.googleapis.com/auth/compute` is required for mounting - # persistent storage on your nodes. - # * `https://www.googleapis.com/auth/devstorage.read_only` is required for - # communicating with **gcr.io** - # (the [Google Container Registry](/container-registry/)). - # If unspecified, no scopes are added, unless Cloud Logging or Cloud - # Monitoring are enabled, in which case their required scopes will be added. - # Corresponds to the JSON property `oauthScopes` - # @return [Array] - attr_accessor :oauth_scopes - - # Whether the nodes are created as preemptible VM instances. See: - # https://cloud.google.com/compute/docs/instances/preemptible for more - # inforamtion about preemptible VM instances. - # Corresponds to the JSON property `preemptible` - # @return [Boolean] - attr_accessor :preemptible - alias_method :preemptible?, :preemptible - - # The map of Kubernetes labels (key/value pairs) to be applied to each node. - # These will added in addition to any default label(s) that - # Kubernetes may apply to the node. - # In case of conflict in label keys, the applied set may differ depending on - # the Kubernetes version -- it's best to assume the behavior is undefined - # and conflicts should be avoided. - # For more information, including usage and the valid values, see: - # http://kubernetes.io/v1.1/docs/user-guide/labels.html - # Corresponds to the JSON property `labels` - # @return [Hash] - attr_accessor :labels - - # The number of local SSD disks to be attached to the node. - # The limit for this value is dependant upon the maximum number of - # disks available on a machine per zone. See: - # https://cloud.google.com/compute/docs/disks/local-ssd#local_ssd_limits - # for more information. - # Corresponds to the JSON property `localSsdCount` - # @return [Fixnum] - attr_accessor :local_ssd_count - # The metadata key/value pairs assigned to instances in the cluster. # Keys must conform to the regexp [a-zA-Z0-9-_]+ and be less than 128 bytes # in length. These are reflected as part of a URL in the metadata server. @@ -497,22 +468,66 @@ module Google # @return [String] attr_accessor :image_type + # The set of Google API scopes to be made available on all of the + # node VMs under the "default" service account. + # The following scopes are recommended, but not required, and by default are + # not included: + # * `https://www.googleapis.com/auth/compute` is required for mounting + # persistent storage on your nodes. + # * `https://www.googleapis.com/auth/devstorage.read_only` is required for + # communicating with **gcr.io** + # (the [Google Container Registry](/container-registry/)). + # If unspecified, no scopes are added, unless Cloud Logging or Cloud + # Monitoring are enabled, in which case their required scopes will be added. + # Corresponds to the JSON property `oauthScopes` + # @return [Array] + attr_accessor :oauth_scopes + + # Whether the nodes are created as preemptible VM instances. See: + # https://cloud.google.com/compute/docs/instances/preemptible for more + # inforamtion about preemptible VM instances. + # Corresponds to the JSON property `preemptible` + # @return [Boolean] + attr_accessor :preemptible + alias_method :preemptible?, :preemptible + + # The map of Kubernetes labels (key/value pairs) to be applied to each node. + # These will added in addition to any default label(s) that + # Kubernetes may apply to the node. + # In case of conflict in label keys, the applied set may differ depending on + # the Kubernetes version -- it's best to assume the behavior is undefined + # and conflicts should be avoided. + # For more information, including usage and the valid values, see: + # http://kubernetes.io/v1.1/docs/user-guide/labels.html + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # The number of local SSD disks to be attached to the node. + # The limit for this value is dependant upon the maximum number of + # disks available on a machine per zone. See: + # https://cloud.google.com/compute/docs/disks/local-ssd#local_ssd_limits + # for more information. + # Corresponds to the JSON property `localSsdCount` + # @return [Fixnum] + attr_accessor :local_ssd_count + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @oauth_scopes = args[:oauth_scopes] if args.key?(:oauth_scopes) - @preemptible = args[:preemptible] if args.key?(:preemptible) - @labels = args[:labels] if args.key?(:labels) - @local_ssd_count = args[:local_ssd_count] if args.key?(:local_ssd_count) @metadata = args[:metadata] if args.key?(:metadata) @disk_size_gb = args[:disk_size_gb] if args.key?(:disk_size_gb) @tags = args[:tags] if args.key?(:tags) @service_account = args[:service_account] if args.key?(:service_account) @machine_type = args[:machine_type] if args.key?(:machine_type) @image_type = args[:image_type] if args.key?(:image_type) + @oauth_scopes = args[:oauth_scopes] if args.key?(:oauth_scopes) + @preemptible = args[:preemptible] if args.key?(:preemptible) + @labels = args[:labels] if args.key?(:labels) + @local_ssd_count = args[:local_ssd_count] if args.key?(:local_ssd_count) end end @@ -522,6 +537,19 @@ module Google class MasterAuth include Google::Apis::Core::Hashable + # The username to use for HTTP basic authentication to the master endpoint. + # For clusters v1.6.0 and later, you can disable basic authentication by + # providing an empty username. + # Corresponds to the JSON property `username` + # @return [String] + attr_accessor :username + + # [Output only] Base64-encoded private key used by clients to authenticate + # to the cluster endpoint. + # Corresponds to the JSON property `clientKey` + # @return [String] + attr_accessor :client_key + # [Output only] Base64-encoded public certificate that is the root of # trust for the cluster. # Corresponds to the JSON property `clusterCaCertificate` @@ -542,30 +570,17 @@ module Google # @return [String] attr_accessor :client_certificate - # The username to use for HTTP basic authentication to the master endpoint. - # For clusters v1.6.0 and later, you can disable basic authentication by - # providing an empty username. - # Corresponds to the JSON property `username` - # @return [String] - attr_accessor :username - - # [Output only] Base64-encoded private key used by clients to authenticate - # to the cluster endpoint. - # Corresponds to the JSON property `clientKey` - # @return [String] - attr_accessor :client_key - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @username = args[:username] if args.key?(:username) + @client_key = args[:client_key] if args.key?(:client_key) @cluster_ca_certificate = args[:cluster_ca_certificate] if args.key?(:cluster_ca_certificate) @password = args[:password] if args.key?(:password) @client_certificate = args[:client_certificate] if args.key?(:client_certificate) - @username = args[:username] if args.key?(:username) - @client_key = args[:client_key] if args.key?(:client_key) end end @@ -680,12 +695,6 @@ module Google class NodePoolAutoscaling include Google::Apis::Core::Hashable - # Is autoscaling enabled for this node pool. - # Corresponds to the JSON property `enabled` - # @return [Boolean] - attr_accessor :enabled - alias_method :enabled?, :enabled - # Maximum number of nodes in the NodePool. Must be >= min_node_count. There # has to enough quota to scale up the cluster. # Corresponds to the JSON property `maxNodeCount` @@ -698,15 +707,21 @@ module Google # @return [Fixnum] attr_accessor :min_node_count + # Is autoscaling enabled for this node pool. + # Corresponds to the JSON property `enabled` + # @return [Boolean] + attr_accessor :enabled + alias_method :enabled?, :enabled + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @enabled = args[:enabled] if args.key?(:enabled) @max_node_count = args[:max_node_count] if args.key?(:max_node_count) @min_node_count = args[:min_node_count] if args.key?(:min_node_count) + @enabled = args[:enabled] if args.key?(:enabled) end end @@ -716,6 +731,22 @@ module Google class ClusterUpdate include Google::Apis::Core::Hashable + # NodePoolAutoscaling contains information required by cluster autoscaler to + # adjust the size of the node pool to the current cluster usage. + # Corresponds to the JSON property `desiredNodePoolAutoscaling` + # @return [Google::Apis::ContainerV1::NodePoolAutoscaling] + attr_accessor :desired_node_pool_autoscaling + + # The desired list of Google Compute Engine + # [locations](/compute/docs/zones#available) in which the cluster's nodes + # should be located. Changing the locations a cluster is in will result + # in nodes being either created or removed from the cluster, depending on + # whether locations are being added or removed. + # This list must always include the cluster's primary zone. + # Corresponds to the JSON property `desiredLocations` + # @return [Array] + attr_accessor :desired_locations + # The monitoring service the cluster should use to write metrics. # Currently available options: # * "monitoring.googleapis.com" - the Google Cloud Monitoring service @@ -758,36 +789,20 @@ module Google # @return [String] attr_accessor :desired_master_version - # The desired list of Google Compute Engine - # [locations](/compute/docs/zones#available) in which the cluster's nodes - # should be located. Changing the locations a cluster is in will result - # in nodes being either created or removed from the cluster, depending on - # whether locations are being added or removed. - # This list must always include the cluster's primary zone. - # Corresponds to the JSON property `desiredLocations` - # @return [Array] - attr_accessor :desired_locations - - # NodePoolAutoscaling contains information required by cluster autoscaler to - # adjust the size of the node pool to the current cluster usage. - # Corresponds to the JSON property `desiredNodePoolAutoscaling` - # @return [Google::Apis::ContainerV1::NodePoolAutoscaling] - attr_accessor :desired_node_pool_autoscaling - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @desired_node_pool_autoscaling = args[:desired_node_pool_autoscaling] if args.key?(:desired_node_pool_autoscaling) + @desired_locations = args[:desired_locations] if args.key?(:desired_locations) @desired_monitoring_service = args[:desired_monitoring_service] if args.key?(:desired_monitoring_service) @desired_image_type = args[:desired_image_type] if args.key?(:desired_image_type) @desired_addons_config = args[:desired_addons_config] if args.key?(:desired_addons_config) @desired_node_pool_id = args[:desired_node_pool_id] if args.key?(:desired_node_pool_id) @desired_node_version = args[:desired_node_version] if args.key?(:desired_node_version) @desired_master_version = args[:desired_master_version] if args.key?(:desired_master_version) - @desired_locations = args[:desired_locations] if args.key?(:desired_locations) - @desired_node_pool_autoscaling = args[:desired_node_pool_autoscaling] if args.key?(:desired_node_pool_autoscaling) end end @@ -944,6 +959,38 @@ module Google end end + # SetLabelsRequest sets the Google Cloud Platform labels on a Google Container + # Engine cluster, which will in turn set them for Google Compute Engine + # resources used by that cluster + class SetLabelsRequest + include Google::Apis::Core::Hashable + + # The labels to set for that cluster. + # Corresponds to the JSON property `resourceLabels` + # @return [Hash] + attr_accessor :resource_labels + + # The fingerprint of the previous set of labels for this resource, + # used to detect conflicts. The fingerprint is initially generated by + # Container Engine and changes after every request to modify or update + # labels. You must always provide an up-to-date fingerprint hash when + # updating or changing labels. Make a get() request to the + # resource to get the latest fingerprint. + # Corresponds to the JSON property `labelFingerprint` + # @return [String] + attr_accessor :label_fingerprint + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @resource_labels = args[:resource_labels] if args.key?(:resource_labels) + @label_fingerprint = args[:label_fingerprint] if args.key?(:label_fingerprint) + end + end + # NodePool contains the name and configuration for a cluster's node pool. # Node pools are a set of nodes (i.e. VM's), with a common configuration and # specification, under the control of the cluster master. They may have a set @@ -953,6 +1000,27 @@ module Google class NodePool include Google::Apis::Core::Hashable + # [Output only] The status of the nodes in this pool instance. + # Corresponds to the JSON property `status` + # @return [String] + attr_accessor :status + + # Parameters that describe the nodes in a cluster. + # Corresponds to the JSON property `config` + # @return [Google::Apis::ContainerV1::NodeConfig] + attr_accessor :config + + # [Output only] Additional information about the current status of this + # node pool instance, if available. + # Corresponds to the JSON property `statusMessage` + # @return [String] + attr_accessor :status_message + + # The name of the node pool. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + # NodePoolAutoscaling contains information required by cluster autoscaler to # adjust the size of the node pool to the current cluster usage. # Corresponds to the JSON property `autoscaling` @@ -990,75 +1058,22 @@ module Google # @return [Array] attr_accessor :instance_group_urls - # [Output only] The status of the nodes in this pool instance. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # Parameters that describe the nodes in a cluster. - # Corresponds to the JSON property `config` - # @return [Google::Apis::ContainerV1::NodeConfig] - attr_accessor :config - - # [Output only] Additional information about the current status of this - # node pool instance, if available. - # Corresponds to the JSON property `statusMessage` - # @return [String] - attr_accessor :status_message - - # The name of the node pool. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @status = args[:status] if args.key?(:status) + @config = args[:config] if args.key?(:config) + @status_message = args[:status_message] if args.key?(:status_message) + @name = args[:name] if args.key?(:name) @autoscaling = args[:autoscaling] if args.key?(:autoscaling) @initial_node_count = args[:initial_node_count] if args.key?(:initial_node_count) @management = args[:management] if args.key?(:management) @self_link = args[:self_link] if args.key?(:self_link) @version = args[:version] if args.key?(:version) @instance_group_urls = args[:instance_group_urls] if args.key?(:instance_group_urls) - @status = args[:status] if args.key?(:status) - @config = args[:config] if args.key?(:config) - @status_message = args[:status_message] if args.key?(:status_message) - @name = args[:name] if args.key?(:name) - end - end - - # SetLabelsRequest sets the Google Cloud Platform labels on a Google Container - # Engine cluster, which will in turn set them for Google Compute Engine - # resources used by that cluster - class SetLabelsRequest - include Google::Apis::Core::Hashable - - # The labels to set for that cluster. - # Corresponds to the JSON property `resourceLabels` - # @return [Hash] - attr_accessor :resource_labels - - # The fingerprint of the previous set of labels for this resource, - # used to detect conflicts. The fingerprint is initially generated by - # Container Engine and changes after every request to modify or update - # labels. You must always provide an up-to-date fingerprint hash when - # updating or changing labels. Make a get() request to the - # resource to get the latest fingerprint. - # Corresponds to the JSON property `labelFingerprint` - # @return [String] - attr_accessor :label_fingerprint - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @resource_labels = args[:resource_labels] if args.key?(:resource_labels) - @label_fingerprint = args[:label_fingerprint] if args.key?(:label_fingerprint) end end @@ -1067,6 +1082,12 @@ module Google class NodeManagement include Google::Apis::Core::Hashable + # AutoUpgradeOptions defines the set of options for the user to control how + # the Auto Upgrades will proceed. + # Corresponds to the JSON property `upgradeOptions` + # @return [Google::Apis::ContainerV1::AutoUpgradeOptions] + attr_accessor :upgrade_options + # A flag that specifies whether node auto-upgrade is enabled for the node # pool. If enabled, node auto-upgrade helps keep the nodes in your node pool # up to date with the latest release version of Kubernetes. @@ -1084,21 +1105,15 @@ module Google attr_accessor :auto_repair alias_method :auto_repair?, :auto_repair - # AutoUpgradeOptions defines the set of options for the user to control how - # the Auto Upgrades will proceed. - # Corresponds to the JSON property `upgradeOptions` - # @return [Google::Apis::ContainerV1::AutoUpgradeOptions] - attr_accessor :upgrade_options - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @upgrade_options = args[:upgrade_options] if args.key?(:upgrade_options) @auto_upgrade = args[:auto_upgrade] if args.key?(:auto_upgrade) @auto_repair = args[:auto_repair] if args.key?(:auto_repair) - @upgrade_options = args[:upgrade_options] if args.key?(:upgrade_options) end end @@ -1141,16 +1156,21 @@ module Google class Operation include Google::Apis::Core::Hashable - # If an error has occurred, a textual description of the error. - # Corresponds to the JSON property `statusMessage` + # The current status of the operation. + # Corresponds to the JSON property `status` # @return [String] - attr_accessor :status_message + attr_accessor :status # The server-assigned ID for the operation. # Corresponds to the JSON property `name` # @return [String] attr_accessor :name + # If an error has occurred, a textual description of the error. + # Corresponds to the JSON property `statusMessage` + # @return [String] + attr_accessor :status_message + # Server-defined URL for the resource. # Corresponds to the JSON property `selfLink` # @return [String] @@ -1178,25 +1198,20 @@ module Google # @return [String] attr_accessor :zone - # The current status of the operation. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @status_message = args[:status_message] if args.key?(:status_message) + @status = args[:status] if args.key?(:status) @name = args[:name] if args.key?(:name) + @status_message = args[:status_message] if args.key?(:status_message) @self_link = args[:self_link] if args.key?(:self_link) @target_link = args[:target_link] if args.key?(:target_link) @detail = args[:detail] if args.key?(:detail) @operation_type = args[:operation_type] if args.key?(:operation_type) @zone = args[:zone] if args.key?(:zone) - @status = args[:status] if args.key?(:status) end end @@ -1228,21 +1243,6 @@ module Google @http_load_balancing = args[:http_load_balancing] if args.key?(:http_load_balancing) end end - - # RollbackNodePoolUpgradeRequest rollbacks the previously Aborted or Failed - # NodePool upgrade. This will be an no-op if the last upgrade successfully - # completed. - class RollbackNodePoolUpgradeRequest - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end end end end diff --git a/generated/google/apis/container_v1/representations.rb b/generated/google/apis/container_v1/representations.rb index 29453b0ea..da62bdca2 100644 --- a/generated/google/apis/container_v1/representations.rb +++ b/generated/google/apis/container_v1/representations.rb @@ -22,6 +22,12 @@ module Google module Apis module ContainerV1 + class RollbackNodePoolUpgradeRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class UpdateClusterRequest class Representation < Google::Apis::Core::JsonRepresentation; end @@ -34,13 +40,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class CreateNodePoolRequest + class ListOperationsResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class ListOperationsResponse + class CreateNodePoolRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -148,13 +154,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class NodePool + class SetLabelsRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class SetLabelsRequest + class NodePool class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -191,9 +197,9 @@ module Google end class RollbackNodePoolUpgradeRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end end class UpdateClusterRequest @@ -207,19 +213,31 @@ module Google class Cluster # @private class Representation < Google::Apis::Core::JsonRepresentation + property :current_node_count, as: 'currentNodeCount' + property :monitoring_service, as: 'monitoringService' + property :network, as: 'network' + property :label_fingerprint, as: 'labelFingerprint' + property :zone, as: 'zone' + property :expire_time, as: 'expireTime' + property :node_ipv4_cidr_size, as: 'nodeIpv4CidrSize' + property :logging_service, as: 'loggingService' + property :status_message, as: 'statusMessage' + property :master_auth, as: 'masterAuth', class: Google::Apis::ContainerV1::MasterAuth, decorator: Google::Apis::ContainerV1::MasterAuth::Representation + + property :current_master_version, as: 'currentMasterVersion' property :node_config, as: 'nodeConfig', class: Google::Apis::ContainerV1::NodeConfig, decorator: Google::Apis::ContainerV1::NodeConfig::Representation property :addons_config, as: 'addonsConfig', class: Google::Apis::ContainerV1::AddonsConfig, decorator: Google::Apis::ContainerV1::AddonsConfig::Representation property :status, as: 'status' - property :subnetwork, as: 'subnetwork' property :current_node_version, as: 'currentNodeVersion' + property :subnetwork, as: 'subnetwork' hash :resource_labels, as: 'resourceLabels' property :name, as: 'name' property :initial_cluster_version, as: 'initialClusterVersion' - property :endpoint, as: 'endpoint' property :legacy_abac, as: 'legacyAbac', class: Google::Apis::ContainerV1::LegacyAbac, decorator: Google::Apis::ContainerV1::LegacyAbac::Representation + property :endpoint, as: 'endpoint' property :create_time, as: 'createTime' property :cluster_ipv4_cidr, as: 'clusterIpv4Cidr' property :initial_node_count, as: 'initialNodeCount' @@ -231,26 +249,6 @@ module Google property :services_ipv4_cidr, as: 'servicesIpv4Cidr' property :enable_kubernetes_alpha, as: 'enableKubernetesAlpha' property :description, as: 'description' - property :current_node_count, as: 'currentNodeCount' - property :monitoring_service, as: 'monitoringService' - property :network, as: 'network' - property :label_fingerprint, as: 'labelFingerprint' - property :zone, as: 'zone' - property :logging_service, as: 'loggingService' - property :node_ipv4_cidr_size, as: 'nodeIpv4CidrSize' - property :expire_time, as: 'expireTime' - property :status_message, as: 'statusMessage' - property :master_auth, as: 'masterAuth', class: Google::Apis::ContainerV1::MasterAuth, decorator: Google::Apis::ContainerV1::MasterAuth::Representation - - property :current_master_version, as: 'currentMasterVersion' - end - end - - class CreateNodePoolRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :node_pool, as: 'nodePool', class: Google::Apis::ContainerV1::NodePool, decorator: Google::Apis::ContainerV1::NodePool::Representation - end end @@ -263,6 +261,14 @@ module Google end end + class CreateNodePoolRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :node_pool, as: 'nodePool', class: Google::Apis::ContainerV1::NodePool, decorator: Google::Apis::ContainerV1::NodePool::Representation + + end + end + class ServerConfig # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -277,27 +283,27 @@ module Google class NodeConfig # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :oauth_scopes, as: 'oauthScopes' - property :preemptible, as: 'preemptible' - hash :labels, as: 'labels' - property :local_ssd_count, as: 'localSsdCount' hash :metadata, as: 'metadata' property :disk_size_gb, as: 'diskSizeGb' collection :tags, as: 'tags' property :service_account, as: 'serviceAccount' property :machine_type, as: 'machineType' property :image_type, as: 'imageType' + collection :oauth_scopes, as: 'oauthScopes' + property :preemptible, as: 'preemptible' + hash :labels, as: 'labels' + property :local_ssd_count, as: 'localSsdCount' end end class MasterAuth # @private class Representation < Google::Apis::Core::JsonRepresentation + property :username, as: 'username' + property :client_key, as: 'clientKey' property :cluster_ca_certificate, as: 'clusterCaCertificate' property :password, as: 'password' property :client_certificate, as: 'clientCertificate' - property :username, as: 'username' - property :client_key, as: 'clientKey' end end @@ -337,15 +343,18 @@ module Google class NodePoolAutoscaling # @private class Representation < Google::Apis::Core::JsonRepresentation - property :enabled, as: 'enabled' property :max_node_count, as: 'maxNodeCount' property :min_node_count, as: 'minNodeCount' + property :enabled, as: 'enabled' end end class ClusterUpdate # @private class Representation < Google::Apis::Core::JsonRepresentation + property :desired_node_pool_autoscaling, as: 'desiredNodePoolAutoscaling', class: Google::Apis::ContainerV1::NodePoolAutoscaling, decorator: Google::Apis::ContainerV1::NodePoolAutoscaling::Representation + + collection :desired_locations, as: 'desiredLocations' property :desired_monitoring_service, as: 'desiredMonitoringService' property :desired_image_type, as: 'desiredImageType' property :desired_addons_config, as: 'desiredAddonsConfig', class: Google::Apis::ContainerV1::AddonsConfig, decorator: Google::Apis::ContainerV1::AddonsConfig::Representation @@ -353,9 +362,6 @@ module Google property :desired_node_pool_id, as: 'desiredNodePoolId' property :desired_node_version, as: 'desiredNodeVersion' property :desired_master_version, as: 'desiredMasterVersion' - collection :desired_locations, as: 'desiredLocations' - property :desired_node_pool_autoscaling, as: 'desiredNodePoolAutoscaling', class: Google::Apis::ContainerV1::NodePoolAutoscaling, decorator: Google::Apis::ContainerV1::NodePoolAutoscaling::Representation - end end @@ -415,25 +421,6 @@ module Google end end - class NodePool - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :autoscaling, as: 'autoscaling', class: Google::Apis::ContainerV1::NodePoolAutoscaling, decorator: Google::Apis::ContainerV1::NodePoolAutoscaling::Representation - - property :initial_node_count, as: 'initialNodeCount' - property :management, as: 'management', class: Google::Apis::ContainerV1::NodeManagement, decorator: Google::Apis::ContainerV1::NodeManagement::Representation - - property :self_link, as: 'selfLink' - property :version, as: 'version' - collection :instance_group_urls, as: 'instanceGroupUrls' - property :status, as: 'status' - property :config, as: 'config', class: Google::Apis::ContainerV1::NodeConfig, decorator: Google::Apis::ContainerV1::NodeConfig::Representation - - property :status_message, as: 'statusMessage' - property :name, as: 'name' - end - end - class SetLabelsRequest # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -442,13 +429,32 @@ module Google end end + class NodePool + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :status, as: 'status' + property :config, as: 'config', class: Google::Apis::ContainerV1::NodeConfig, decorator: Google::Apis::ContainerV1::NodeConfig::Representation + + property :status_message, as: 'statusMessage' + property :name, as: 'name' + property :autoscaling, as: 'autoscaling', class: Google::Apis::ContainerV1::NodePoolAutoscaling, decorator: Google::Apis::ContainerV1::NodePoolAutoscaling::Representation + + property :initial_node_count, as: 'initialNodeCount' + property :management, as: 'management', class: Google::Apis::ContainerV1::NodeManagement, decorator: Google::Apis::ContainerV1::NodeManagement::Representation + + property :self_link, as: 'selfLink' + property :version, as: 'version' + collection :instance_group_urls, as: 'instanceGroupUrls' + end + end + class NodeManagement # @private class Representation < Google::Apis::Core::JsonRepresentation - property :auto_upgrade, as: 'autoUpgrade' - property :auto_repair, as: 'autoRepair' property :upgrade_options, as: 'upgradeOptions', class: Google::Apis::ContainerV1::AutoUpgradeOptions, decorator: Google::Apis::ContainerV1::AutoUpgradeOptions::Representation + property :auto_upgrade, as: 'autoUpgrade' + property :auto_repair, as: 'autoRepair' end end @@ -468,14 +474,14 @@ module Google class Operation # @private class Representation < Google::Apis::Core::JsonRepresentation - property :status_message, as: 'statusMessage' + property :status, as: 'status' property :name, as: 'name' + property :status_message, as: 'statusMessage' property :self_link, as: 'selfLink' property :target_link, as: 'targetLink' property :detail, as: 'detail' property :operation_type, as: 'operationType' property :zone, as: 'zone' - property :status, as: 'status' end end @@ -488,12 +494,6 @@ module Google end end - - class RollbackNodePoolUpgradeRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end - end end end end diff --git a/generated/google/apis/container_v1/service.rb b/generated/google/apis/container_v1/service.rb index 0275d7ac6..cc14a9d56 100644 --- a/generated/google/apis/container_v1/service.rb +++ b/generated/google/apis/container_v1/service.rb @@ -83,121 +83,6 @@ module Google execute_or_queue_command(command, &block) end - # Cancels the specified operation. - # @param [String] project_id - # The Google Developers Console [project ID or project - # number](https://support.google.com/cloud/answer/6158840). - # @param [String] zone - # The name of the Google Compute Engine - # [zone](/compute/docs/zones#available) in which the operation resides. - # @param [String] operation_id - # The server-assigned `name` of the operation. - # @param [Google::Apis::ContainerV1::CancelOperationRequest] cancel_operation_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::ContainerV1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ContainerV1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def cancel_operation(project_id, zone, operation_id, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/projects/{projectId}/zones/{zone}/operations/{operationId}:cancel', options) - command.request_representation = Google::Apis::ContainerV1::CancelOperationRequest::Representation - command.request_object = cancel_operation_request_object - command.response_representation = Google::Apis::ContainerV1::Empty::Representation - command.response_class = Google::Apis::ContainerV1::Empty - command.params['projectId'] = project_id unless project_id.nil? - command.params['zone'] = zone unless zone.nil? - command.params['operationId'] = operation_id unless operation_id.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 all operations in a project in a specific zone or all zones. - # @param [String] project_id - # The Google Developers Console [project ID or project - # number](https://support.google.com/cloud/answer/6158840). - # @param [String] zone - # The name of the Google Compute Engine [zone](/compute/docs/zones#available) - # to return operations for, or `-` for all zones. - # @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::ContainerV1::ListOperationsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ContainerV1::ListOperationsResponse] - # - # @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_zone_operations(project_id, zone, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/projects/{projectId}/zones/{zone}/operations', options) - command.response_representation = Google::Apis::ContainerV1::ListOperationsResponse::Representation - command.response_class = Google::Apis::ContainerV1::ListOperationsResponse - command.params['projectId'] = project_id unless project_id.nil? - command.params['zone'] = zone unless zone.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets the specified operation. - # @param [String] project_id - # The Google Developers Console [project ID or project - # number](https://support.google.com/cloud/answer/6158840). - # @param [String] zone - # The name of the Google Compute Engine - # [zone](/compute/docs/zones#available) in which the cluster - # resides. - # @param [String] operation_id - # The server-assigned `name` of the operation. - # @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::ContainerV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ContainerV1::Operation] - # - # @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_zone_operation(project_id, zone, operation_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/projects/{projectId}/zones/{zone}/operations/{operationId}', options) - command.response_representation = Google::Apis::ContainerV1::Operation::Representation - command.response_class = Google::Apis::ContainerV1::Operation - command.params['projectId'] = project_id unless project_id.nil? - command.params['zone'] = zone unless zone.nil? - command.params['operationId'] = operation_id unless operation_id.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 all clusters owned by a project in either the specified zone or all # zones. # @param [String] project_id @@ -235,6 +120,48 @@ module Google execute_or_queue_command(command, &block) end + # Sets labels on a cluster. + # @param [String] project_id + # The Google Developers Console [project ID or project + # number](https://developers.google.com/console/help/new/#projectnumber). + # @param [String] zone + # The name of the Google Compute Engine + # [zone](/compute/docs/zones#available) in which the cluster + # resides. + # @param [String] cluster_id + # The name of the cluster. + # @param [Google::Apis::ContainerV1::SetLabelsRequest] set_labels_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::ContainerV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ContainerV1::Operation] + # + # @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 resource_project_zone_cluster_labels(project_id, zone, cluster_id, set_labels_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/resourceLabels', options) + command.request_representation = Google::Apis::ContainerV1::SetLabelsRequest::Representation + command.request_object = set_labels_request_object + command.response_representation = Google::Apis::ContainerV1::Operation::Representation + command.response_class = Google::Apis::ContainerV1::Operation + command.params['projectId'] = project_id unless project_id.nil? + command.params['zone'] = zone unless zone.nil? + command.params['clusterId'] = cluster_id unless cluster_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Creates a cluster, consisting of the specified number and type of Google # Compute Engine instances. # By default, the cluster is created in the project's @@ -283,48 +210,6 @@ module Google execute_or_queue_command(command, &block) end - # Sets labels on a cluster. - # @param [String] project_id - # The Google Developers Console [project ID or project - # number](https://developers.google.com/console/help/new/#projectnumber). - # @param [String] zone - # The name of the Google Compute Engine - # [zone](/compute/docs/zones#available) in which the cluster - # resides. - # @param [String] cluster_id - # The name of the cluster. - # @param [Google::Apis::ContainerV1::SetLabelsRequest] set_labels_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::ContainerV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ContainerV1::Operation] - # - # @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 resource_project_zone_cluster_labels(project_id, zone, cluster_id, set_labels_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/resourceLabels', options) - command.request_representation = Google::Apis::ContainerV1::SetLabelsRequest::Representation - command.request_object = set_labels_request_object - command.response_representation = Google::Apis::ContainerV1::Operation::Representation - command.response_class = Google::Apis::ContainerV1::Operation - command.params['projectId'] = project_id unless project_id.nil? - command.params['zone'] = zone unless zone.nil? - command.params['clusterId'] = cluster_id unless cluster_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - # Completes master IP rotation. # @param [String] project_id # The Google Developers Console [project ID or project @@ -621,7 +506,7 @@ module Google execute_or_queue_command(command, &block) end - # Retrieves the node pool requested. + # Deletes a node pool from a cluster. # @param [String] project_id # The Google Developers Console [project ID or project # number](https://developers.google.com/console/help/new/#projectnumber). @@ -632,7 +517,7 @@ module Google # @param [String] cluster_id # The name of the cluster. # @param [String] node_pool_id - # The name of the node pool. + # The name of the node pool to delete. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -642,18 +527,18 @@ module Google # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ContainerV1::NodePool] parsed result object + # @yieldparam result [Google::Apis::ContainerV1::Operation] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::ContainerV1::NodePool] + # @return [Google::Apis::ContainerV1::Operation] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_project_zone_cluster_node_pool(project_id, zone, cluster_id, node_pool_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}', options) - command.response_representation = Google::Apis::ContainerV1::NodePool::Representation - command.response_class = Google::Apis::ContainerV1::NodePool + def delete_project_zone_cluster_node_pool(project_id, zone, cluster_id, node_pool_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}', options) + command.response_representation = Google::Apis::ContainerV1::Operation::Representation + command.response_class = Google::Apis::ContainerV1::Operation command.params['projectId'] = project_id unless project_id.nil? command.params['zone'] = zone unless zone.nil? command.params['clusterId'] = cluster_id unless cluster_id.nil? @@ -708,48 +593,6 @@ module Google execute_or_queue_command(command, &block) end - # Deletes a node pool from a cluster. - # @param [String] project_id - # The Google Developers Console [project ID or project - # number](https://developers.google.com/console/help/new/#projectnumber). - # @param [String] zone - # The name of the Google Compute Engine - # [zone](/compute/docs/zones#available) in which the cluster - # resides. - # @param [String] cluster_id - # The name of the cluster. - # @param [String] node_pool_id - # The name of the node pool to delete. - # @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::ContainerV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ContainerV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_project_zone_cluster_node_pool(project_id, zone, cluster_id, node_pool_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}', options) - command.response_representation = Google::Apis::ContainerV1::Operation::Representation - command.response_class = Google::Apis::ContainerV1::Operation - command.params['projectId'] = project_id unless project_id.nil? - command.params['zone'] = zone unless zone.nil? - command.params['clusterId'] = cluster_id unless cluster_id.nil? - command.params['nodePoolId'] = node_pool_id unless node_pool_id.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 node pools for a cluster. # @param [String] project_id # The Google Developers Console [project ID or project @@ -876,6 +719,163 @@ module Google command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end + + # Retrieves the node pool requested. + # @param [String] project_id + # The Google Developers Console [project ID or project + # number](https://developers.google.com/console/help/new/#projectnumber). + # @param [String] zone + # The name of the Google Compute Engine + # [zone](/compute/docs/zones#available) in which the cluster + # resides. + # @param [String] cluster_id + # The name of the cluster. + # @param [String] node_pool_id + # The name of the node pool. + # @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::ContainerV1::NodePool] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ContainerV1::NodePool] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_zone_cluster_node_pool(project_id, zone, cluster_id, node_pool_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}', options) + command.response_representation = Google::Apis::ContainerV1::NodePool::Representation + command.response_class = Google::Apis::ContainerV1::NodePool + command.params['projectId'] = project_id unless project_id.nil? + command.params['zone'] = zone unless zone.nil? + command.params['clusterId'] = cluster_id unless cluster_id.nil? + command.params['nodePoolId'] = node_pool_id unless node_pool_id.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 all operations in a project in a specific zone or all zones. + # @param [String] project_id + # The Google Developers Console [project ID or project + # number](https://support.google.com/cloud/answer/6158840). + # @param [String] zone + # The name of the Google Compute Engine [zone](/compute/docs/zones#available) + # to return operations for, or `-` for all zones. + # @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::ContainerV1::ListOperationsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ContainerV1::ListOperationsResponse] + # + # @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_zone_operations(project_id, zone, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/projects/{projectId}/zones/{zone}/operations', options) + command.response_representation = Google::Apis::ContainerV1::ListOperationsResponse::Representation + command.response_class = Google::Apis::ContainerV1::ListOperationsResponse + command.params['projectId'] = project_id unless project_id.nil? + command.params['zone'] = zone unless zone.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets the specified operation. + # @param [String] project_id + # The Google Developers Console [project ID or project + # number](https://support.google.com/cloud/answer/6158840). + # @param [String] zone + # The name of the Google Compute Engine + # [zone](/compute/docs/zones#available) in which the cluster + # resides. + # @param [String] operation_id + # The server-assigned `name` of the operation. + # @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::ContainerV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ContainerV1::Operation] + # + # @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_zone_operation(project_id, zone, operation_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/projects/{projectId}/zones/{zone}/operations/{operationId}', options) + command.response_representation = Google::Apis::ContainerV1::Operation::Representation + command.response_class = Google::Apis::ContainerV1::Operation + command.params['projectId'] = project_id unless project_id.nil? + command.params['zone'] = zone unless zone.nil? + command.params['operationId'] = operation_id unless operation_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Cancels the specified operation. + # @param [String] project_id + # The Google Developers Console [project ID or project + # number](https://support.google.com/cloud/answer/6158840). + # @param [String] zone + # The name of the Google Compute Engine + # [zone](/compute/docs/zones#available) in which the operation resides. + # @param [String] operation_id + # The server-assigned `name` of the operation. + # @param [Google::Apis::ContainerV1::CancelOperationRequest] cancel_operation_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::ContainerV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ContainerV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def cancel_operation(project_id, zone, operation_id, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/projects/{projectId}/zones/{zone}/operations/{operationId}:cancel', options) + command.request_representation = Google::Apis::ContainerV1::CancelOperationRequest::Representation + command.request_object = cancel_operation_request_object + command.response_representation = Google::Apis::ContainerV1::Empty::Representation + command.response_class = Google::Apis::ContainerV1::Empty + command.params['projectId'] = project_id unless project_id.nil? + command.params['zone'] = zone unless zone.nil? + command.params['operationId'] = operation_id unless operation_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end protected diff --git a/generated/google/apis/content_v2.rb b/generated/google/apis/content_v2.rb index 99f1ce8a6..d62a53296 100644 --- a/generated/google/apis/content_v2.rb +++ b/generated/google/apis/content_v2.rb @@ -26,7 +26,7 @@ module Google # @see https://developers.google.com/shopping-content module ContentV2 VERSION = 'V2' - REVISION = '20170406' + REVISION = '20170519' # Manage your product listings and accounts for Google Shopping AUTH_CONTENT = 'https://www.googleapis.com/auth/content' diff --git a/generated/google/apis/content_v2/classes.rb b/generated/google/apis/content_v2/classes.rb index f67e4b900..df887aa55 100644 --- a/generated/google/apis/content_v2/classes.rb +++ b/generated/google/apis/content_v2/classes.rb @@ -176,6 +176,12 @@ module Google # @return [String] attr_accessor :kind + # Whether the account's website is claimed or not. + # Corresponds to the JSON property `websiteClaimed` + # @return [Boolean] + attr_accessor :website_claimed + alias_method :website_claimed?, :website_claimed + def initialize(**args) update!(**args) end @@ -185,6 +191,7 @@ module Google @account_id = args[:account_id] if args.key?(:account_id) @data_quality_issues = args[:data_quality_issues] if args.key?(:data_quality_issues) @kind = args[:kind] if args.key?(:kind) + @website_claimed = args[:website_claimed] if args.key?(:website_claimed) end end @@ -441,6 +448,26 @@ module Google end end + # + class AccountsClaimWebsiteResponse + include Google::Apis::Core::Hashable + + # Identifies what kind of resource this is. Value: the fixed string "content# + # accountsClaimWebsiteResponse". + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @kind = args[:kind] if args.key?(:kind) + end + end + # class BatchAccountsRequest include Google::Apis::Core::Hashable @@ -469,8 +496,8 @@ module Google # @return [Google::Apis::ContentV2::Account] attr_accessor :account - # The ID of the account to get or delete. Only defined if the method is get or - # delete. + # The ID of the targeted account. Only defined if the method is get, delete or + # claimwebsite. # Corresponds to the JSON property `accountId` # @return [Fixnum] attr_accessor :account_id @@ -490,6 +517,13 @@ module Google # @return [String] attr_accessor :request_method + # Only applicable if the method is claimwebsite. Indicates whether or not to + # take the claim from another account in case there is a conflict. + # Corresponds to the JSON property `overwrite` + # @return [Boolean] + attr_accessor :overwrite + alias_method :overwrite?, :overwrite + def initialize(**args) update!(**args) end @@ -501,6 +535,7 @@ module Google @batch_id = args[:batch_id] if args.key?(:batch_id) @merchant_id = args[:merchant_id] if args.key?(:merchant_id) @request_method = args[:request_method] if args.key?(:request_method) + @overwrite = args[:overwrite] if args.key?(:overwrite) end end diff --git a/generated/google/apis/content_v2/representations.rb b/generated/google/apis/content_v2/representations.rb index 782c11247..ba704a63a 100644 --- a/generated/google/apis/content_v2/representations.rb +++ b/generated/google/apis/content_v2/representations.rb @@ -82,6 +82,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class AccountsClaimWebsiteResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class BatchAccountsRequest class Representation < Google::Apis::Core::JsonRepresentation; end @@ -980,6 +986,7 @@ module Google collection :data_quality_issues, as: 'dataQualityIssues', class: Google::Apis::ContentV2::AccountStatusDataQualityIssue, decorator: Google::Apis::ContentV2::AccountStatusDataQualityIssue::Representation property :kind, as: 'kind' + property :website_claimed, as: 'websiteClaimed' end end @@ -1049,6 +1056,13 @@ module Google end end + class AccountsClaimWebsiteResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :kind, as: 'kind' + end + end + class BatchAccountsRequest # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1066,6 +1080,7 @@ module Google property :batch_id, as: 'batchId' property :merchant_id, :numeric_string => true, as: 'merchantId' property :request_method, as: 'method' + property :overwrite, as: 'overwrite' end end diff --git a/generated/google/apis/content_v2/service.rb b/generated/google/apis/content_v2/service.rb index 6ad617f7f..ee2177834 100644 --- a/generated/google/apis/content_v2/service.rb +++ b/generated/google/apis/content_v2/service.rb @@ -86,6 +86,49 @@ module Google execute_or_queue_command(command, &block) end + # Claims the website of a Merchant Center sub-account. This method can only be + # called for multi-client accounts. + # @param [Fixnum] merchant_id + # The ID of the managing account. + # @param [Fixnum] account_id + # The ID of the account whose website is claimed. + # @param [Boolean] overwrite + # Flag to remove any existing claim on the requested website by another account + # and replace it with a claim from this account. + # @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::ContentV2::AccountsClaimWebsiteResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ContentV2::AccountsClaimWebsiteResponse] + # + # @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 claimwebsite_account(merchant_id, account_id, overwrite: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, '{merchantId}/accounts/{accountId}/claimwebsite', options) + command.response_representation = Google::Apis::ContentV2::AccountsClaimWebsiteResponse::Representation + command.response_class = Google::Apis::ContentV2::AccountsClaimWebsiteResponse + command.params['merchantId'] = merchant_id unless merchant_id.nil? + command.params['accountId'] = account_id unless account_id.nil? + command.query['overwrite'] = overwrite unless overwrite.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + # Retrieves, inserts, updates, and deletes multiple Merchant Center (sub-) # accounts in a single request. # @param [Google::Apis::ContentV2::BatchAccountsRequest] batch_accounts_request_object @@ -2053,6 +2096,9 @@ module Google # Gets the statuses of multiple products in a single request. This method can # only be called for non-multi-client accounts. # @param [Google::Apis::ContentV2::BatchProductStatusesRequest] batch_product_statuses_request_object + # @param [Boolean] include_attributes + # Flag to include full product data in the results of this request. The default + # value is false. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -2074,12 +2120,13 @@ 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 batch_product_status(batch_product_statuses_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def batch_product_status(batch_product_statuses_request_object = nil, include_attributes: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'productstatuses/batch', options) command.request_representation = Google::Apis::ContentV2::BatchProductStatusesRequest::Representation command.request_object = batch_product_statuses_request_object command.response_representation = Google::Apis::ContentV2::BatchProductStatusesResponse::Representation command.response_class = Google::Apis::ContentV2::BatchProductStatusesResponse + command.query['includeAttributes'] = include_attributes unless include_attributes.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? @@ -2092,6 +2139,9 @@ module Google # The ID of the managing account. # @param [String] product_id # The ID of the product. + # @param [Boolean] include_attributes + # Flag to include full product data in the result of this get request. The + # default value is false. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -2113,12 +2163,13 @@ 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 get_product_status(merchant_id, product_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def get_product_status(merchant_id, product_id, include_attributes: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{merchantId}/productstatuses/{productId}', options) command.response_representation = Google::Apis::ContentV2::ProductStatus::Representation command.response_class = Google::Apis::ContentV2::ProductStatus command.params['merchantId'] = merchant_id unless merchant_id.nil? command.params['productId'] = product_id unless product_id.nil? + command.query['includeAttributes'] = include_attributes unless include_attributes.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? @@ -2129,6 +2180,9 @@ module Google # method can only be called for non-multi-client accounts. # @param [Fixnum] merchant_id # The ID of the managing account. + # @param [Boolean] include_attributes + # Flag to include full product data in the results of the list request. The + # default value is false. # @param [Boolean] include_invalid_inserted_items # Flag to include the invalid inserted items in the result of the list request. # By default the invalid items are not shown (the default value is false). @@ -2158,11 +2212,12 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_product_statuses(merchant_id, include_invalid_inserted_items: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def list_product_statuses(merchant_id, include_attributes: nil, include_invalid_inserted_items: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{merchantId}/productstatuses', options) command.response_representation = Google::Apis::ContentV2::ListProductStatusesResponse::Representation command.response_class = Google::Apis::ContentV2::ListProductStatusesResponse command.params['merchantId'] = merchant_id unless merchant_id.nil? + command.query['includeAttributes'] = include_attributes unless include_attributes.nil? command.query['includeInvalidInsertedItems'] = include_invalid_inserted_items unless include_invalid_inserted_items.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? diff --git a/generated/google/apis/dataflow_v1b3.rb b/generated/google/apis/dataflow_v1b3.rb index d3971bdbd..eae385176 100644 --- a/generated/google/apis/dataflow_v1b3.rb +++ b/generated/google/apis/dataflow_v1b3.rb @@ -25,7 +25,10 @@ module Google # @see https://cloud.google.com/dataflow module DataflowV1b3 VERSION = 'V1b3' - REVISION = '20170318' + REVISION = '20170520' + + # View and manage your Google Compute Engine resources + AUTH_COMPUTE = 'https://www.googleapis.com/auth/compute' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/dataflow_v1b3/classes.rb b/generated/google/apis/dataflow_v1b3/classes.rb index 4ba64c30a..4bc570f6f 100644 --- a/generated/google/apis/dataflow_v1b3/classes.rb +++ b/generated/google/apis/dataflow_v1b3/classes.rb @@ -22,21 +22,26 @@ module Google module Apis module DataflowV1b3 - # The metric short id is returned to the user alongside an offset into - # ReportWorkItemStatusRequest - class MetricShortId + # Bucket of values for Distribution's logarithmic histogram. + class LogBucket include Google::Apis::Core::Hashable - # The index of the corresponding metric in - # the ReportWorkItemStatusRequest. Required. - # Corresponds to the JSON property `metricIndex` + # floor(log2(value)); defined to be zero for nonpositive values. + # log(-1) = 0 + # log(0) = 0 + # log(1) = 0 + # log(2) = 1 + # log(3) = 1 + # log(4) = 2 + # log(5) = 2 + # Corresponds to the JSON property `log` # @return [Fixnum] - attr_accessor :metric_index + attr_accessor :log - # The service-generated short identifier for the metric. - # Corresponds to the JSON property `shortId` + # Number of values in this bucket. + # Corresponds to the JSON property `count` # @return [Fixnum] - attr_accessor :short_id + attr_accessor :count def initialize(**args) update!(**args) @@ -44,8 +49,613 @@ module Google # Update properties of this object def update!(**args) - @metric_index = args[:metric_index] if args.key?(:metric_index) - @short_id = args[:short_id] if args.key?(:short_id) + @log = args[:log] if args.key?(:log) + @count = args[:count] if args.key?(:count) + end + end + + # A request for sending worker messages to the service. + class SendWorkerMessagesRequest + include Google::Apis::Core::Hashable + + # The WorkerMessages to send. + # Corresponds to the JSON property `workerMessages` + # @return [Array] + attr_accessor :worker_messages + + # The location which contains the job + # Corresponds to the JSON property `location` + # @return [String] + attr_accessor :location + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @worker_messages = args[:worker_messages] if args.key?(:worker_messages) + @location = args[:location] if args.key?(:location) + end + end + + # DEPRECATED in favor of DerivedSource. + class SourceSplitShard + include Google::Apis::Core::Hashable + + # DEPRECATED + # Corresponds to the JSON property `derivationMode` + # @return [String] + attr_accessor :derivation_mode + + # A source that records can be read and decoded from. + # Corresponds to the JSON property `source` + # @return [Google::Apis::DataflowV1b3::Source] + attr_accessor :source + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @derivation_mode = args[:derivation_mode] if args.key?(:derivation_mode) + @source = args[:source] if args.key?(:source) + end + end + + # Modeled after information exposed by /proc/stat. + class CpuTime + include Google::Apis::Core::Hashable + + # Timestamp of the measurement. + # Corresponds to the JSON property `timestamp` + # @return [String] + attr_accessor :timestamp + + # Total active CPU time across all cores (ie., non-idle) in milliseconds + # since start-up. + # Corresponds to the JSON property `totalMs` + # @return [Fixnum] + attr_accessor :total_ms + + # Average CPU utilization rate (% non-idle cpu / second) since previous + # sample. + # Corresponds to the JSON property `rate` + # @return [Float] + attr_accessor :rate + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @timestamp = args[:timestamp] if args.key?(:timestamp) + @total_ms = args[:total_ms] if args.key?(:total_ms) + @rate = args[:rate] if args.key?(:rate) + end + end + + # Describes the environment in which a Dataflow Job runs. + class Environment + include Google::Apis::Core::Hashable + + # The dataset for the current project where various workflow + # related tables are stored. + # The supported resource type is: + # Google BigQuery: + # bigquery.googleapis.com/`dataset` + # Corresponds to the JSON property `dataset` + # @return [String] + attr_accessor :dataset + + # The list of experiments to enable. + # Corresponds to the JSON property `experiments` + # @return [Array] + attr_accessor :experiments + + # Experimental settings. + # Corresponds to the JSON property `internalExperiments` + # @return [Hash] + attr_accessor :internal_experiments + + # A structure describing which components and their versions of the service + # are required in order to run the job. + # Corresponds to the JSON property `version` + # @return [Hash] + attr_accessor :version + + # Identity to run virtual machines as. Defaults to the default account. + # Corresponds to the JSON property `serviceAccountEmail` + # @return [String] + attr_accessor :service_account_email + + # A description of the process that generated the request. + # Corresponds to the JSON property `userAgent` + # @return [Hash] + attr_accessor :user_agent + + # The Cloud Dataflow SDK pipeline options specified by the user. These + # options are passed through the service and are used to recreate the + # SDK pipeline options on the worker in a language agnostic and platform + # independent way. + # Corresponds to the JSON property `sdkPipelineOptions` + # @return [Hash] + attr_accessor :sdk_pipeline_options + + # The type of cluster manager API to use. If unknown or + # unspecified, the service will attempt to choose a reasonable + # default. This should be in the form of the API service name, + # e.g. "compute.googleapis.com". + # Corresponds to the JSON property `clusterManagerApiService` + # @return [String] + attr_accessor :cluster_manager_api_service + + # The prefix of the resources the system should use for temporary + # storage. The system will append the suffix "/temp-`JOBNAME` to + # this resource prefix, where `JOBNAME` is the value of the + # job_name field. The resulting bucket and object prefix is used + # as the prefix of the resources used to store temporary data + # needed during the job execution. NOTE: This will override the + # value in taskrunner_settings. + # The supported resource type is: + # Google Cloud Storage: + # storage.googleapis.com/`bucket`/`object` + # bucket.storage.googleapis.com/`object` + # Corresponds to the JSON property `tempStoragePrefix` + # @return [String] + attr_accessor :temp_storage_prefix + + # The worker pools. At least one "harness" worker pool must be + # specified in order for the job to have workers. + # Corresponds to the JSON property `workerPools` + # @return [Array] + attr_accessor :worker_pools + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @dataset = args[:dataset] if args.key?(:dataset) + @experiments = args[:experiments] if args.key?(:experiments) + @internal_experiments = args[:internal_experiments] if args.key?(:internal_experiments) + @version = args[:version] if args.key?(:version) + @service_account_email = args[:service_account_email] if args.key?(:service_account_email) + @user_agent = args[:user_agent] if args.key?(:user_agent) + @sdk_pipeline_options = args[:sdk_pipeline_options] if args.key?(:sdk_pipeline_options) + @cluster_manager_api_service = args[:cluster_manager_api_service] if args.key?(:cluster_manager_api_service) + @temp_storage_prefix = args[:temp_storage_prefix] if args.key?(:temp_storage_prefix) + @worker_pools = args[:worker_pools] if args.key?(:worker_pools) + end + end + + # A task which describes what action should be performed for the specified + # streaming computation ranges. + class StreamingComputationTask + include Google::Apis::Core::Hashable + + # Contains ranges of a streaming computation this task should apply to. + # Corresponds to the JSON property `computationRanges` + # @return [Array] + attr_accessor :computation_ranges + + # Describes the set of data disks this task should apply to. + # Corresponds to the JSON property `dataDisks` + # @return [Array] + attr_accessor :data_disks + + # A type of streaming computation task. + # Corresponds to the JSON property `taskType` + # @return [String] + attr_accessor :task_type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @computation_ranges = args[:computation_ranges] if args.key?(:computation_ranges) + @data_disks = args[:data_disks] if args.key?(:data_disks) + @task_type = args[:task_type] if args.key?(:task_type) + end + end + + # Request to send encoded debug information. + class SendDebugCaptureRequest + include Google::Apis::Core::Hashable + + # The internal component id for which debug information is sent. + # Corresponds to the JSON property `componentId` + # @return [String] + attr_accessor :component_id + + # The worker id, i.e., VM hostname. + # Corresponds to the JSON property `workerId` + # @return [String] + attr_accessor :worker_id + + # The location which contains the job specified by job_id. + # Corresponds to the JSON property `location` + # @return [String] + attr_accessor :location + + # The encoded debug information. + # Corresponds to the JSON property `data` + # @return [String] + attr_accessor :data + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @component_id = args[:component_id] if args.key?(:component_id) + @worker_id = args[:worker_id] if args.key?(:worker_id) + @location = args[:location] if args.key?(:location) + @data = args[:data] if args.key?(:data) + end + end + + # Response to a get debug configuration request. + class GetDebugConfigResponse + include Google::Apis::Core::Hashable + + # The encoded debug configuration for the requested component. + # Corresponds to the JSON property `config` + # @return [String] + attr_accessor :config + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @config = args[:config] if args.key?(:config) + end + end + + # Description of a transform executed as part of an execution stage. + class ComponentTransform + include Google::Apis::Core::Hashable + + # User name for the original user transform with which this transform is + # most closely associated. + # Corresponds to the JSON property `originalTransform` + # @return [String] + attr_accessor :original_transform + + # Dataflow service generated name for this source. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Human-readable name for this transform; may be user or system generated. + # Corresponds to the JSON property `userName` + # @return [String] + attr_accessor :user_name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @original_transform = args[:original_transform] if args.key?(:original_transform) + @name = args[:name] if args.key?(:name) + @user_name = args[:user_name] if args.key?(:user_name) + end + end + + # A task which initializes part of a streaming Dataflow job. + class StreamingSetupTask + include Google::Apis::Core::Hashable + + # The TCP port used by the worker to communicate with the Dataflow + # worker harness. + # Corresponds to the JSON property `workerHarnessPort` + # @return [Fixnum] + attr_accessor :worker_harness_port + + # The user has requested drain. + # Corresponds to the JSON property `drain` + # @return [Boolean] + attr_accessor :drain + alias_method :drain?, :drain + + # The TCP port on which the worker should listen for messages from + # other streaming computation workers. + # Corresponds to the JSON property `receiveWorkPort` + # @return [Fixnum] + attr_accessor :receive_work_port + + # Global topology of the streaming Dataflow job, including all + # computations and their sharded locations. + # Corresponds to the JSON property `streamingComputationTopology` + # @return [Google::Apis::DataflowV1b3::TopologyConfig] + attr_accessor :streaming_computation_topology + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @worker_harness_port = args[:worker_harness_port] if args.key?(:worker_harness_port) + @drain = args[:drain] if args.key?(:drain) + @receive_work_port = args[:receive_work_port] if args.key?(:receive_work_port) + @streaming_computation_topology = args[:streaming_computation_topology] if args.key?(:streaming_computation_topology) + end + end + + # Identifies a pubsub location to use for transferring data into or + # out of a streaming Dataflow job. + class PubsubLocation + include Google::Apis::Core::Hashable + + # A pubsub subscription, in the form of + # "pubsub.googleapis.com/subscriptions//" + # Corresponds to the JSON property `subscription` + # @return [String] + attr_accessor :subscription + + # Indicates whether the pipeline allows late-arriving data. + # Corresponds to the JSON property `dropLateData` + # @return [Boolean] + attr_accessor :drop_late_data + alias_method :drop_late_data?, :drop_late_data + + # If set, specifies the pubsub subscription that will be used for tracking + # custom time timestamps for watermark estimation. + # Corresponds to the JSON property `trackingSubscription` + # @return [String] + attr_accessor :tracking_subscription + + # If true, then the client has requested to get pubsub attributes. + # Corresponds to the JSON property `withAttributes` + # @return [Boolean] + attr_accessor :with_attributes + alias_method :with_attributes?, :with_attributes + + # If set, contains a pubsub label from which to extract record ids. + # If left empty, record deduplication will be strictly best effort. + # Corresponds to the JSON property `idLabel` + # @return [String] + attr_accessor :id_label + + # If set, contains a pubsub label from which to extract record timestamps. + # If left empty, record timestamps will be generated upon arrival. + # Corresponds to the JSON property `timestampLabel` + # @return [String] + attr_accessor :timestamp_label + + # A pubsub topic, in the form of + # "pubsub.googleapis.com/topics//" + # Corresponds to the JSON property `topic` + # @return [String] + attr_accessor :topic + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @subscription = args[:subscription] if args.key?(:subscription) + @drop_late_data = args[:drop_late_data] if args.key?(:drop_late_data) + @tracking_subscription = args[:tracking_subscription] if args.key?(:tracking_subscription) + @with_attributes = args[:with_attributes] if args.key?(:with_attributes) + @id_label = args[:id_label] if args.key?(:id_label) + @timestamp_label = args[:timestamp_label] if args.key?(:timestamp_label) + @topic = args[:topic] if args.key?(:topic) + end + end + + # WorkerHealthReport contains information about the health of a worker. + # The VM should be identified by the labels attached to the WorkerMessage that + # this health ping belongs to. + class WorkerHealthReport + include Google::Apis::Core::Hashable + + # The pods running on the worker. See: + # http://kubernetes.io/v1.1/docs/api-reference/v1/definitions.html#_v1_pod + # This field is used by the worker to send the status of the indvidual + # containers running on each worker. + # Corresponds to the JSON property `pods` + # @return [Array>] + attr_accessor :pods + + # The time the VM was booted. + # Corresponds to the JSON property `vmStartupTime` + # @return [String] + attr_accessor :vm_startup_time + + # Whether the VM is healthy. + # Corresponds to the JSON property `vmIsHealthy` + # @return [Boolean] + attr_accessor :vm_is_healthy + alias_method :vm_is_healthy?, :vm_is_healthy + + # The interval at which the worker is sending health reports. + # The default value of 0 should be interpreted as the field is not being + # explicitly set by the worker. + # Corresponds to the JSON property `reportInterval` + # @return [String] + attr_accessor :report_interval + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @pods = args[:pods] if args.key?(:pods) + @vm_startup_time = args[:vm_startup_time] if args.key?(:vm_startup_time) + @vm_is_healthy = args[:vm_is_healthy] if args.key?(:vm_is_healthy) + @report_interval = args[:report_interval] if args.key?(:report_interval) + end + end + + # A particular message pertaining to a Dataflow job. + class JobMessage + include Google::Apis::Core::Hashable + + # Deprecated. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # The text of the message. + # Corresponds to the JSON property `messageText` + # @return [String] + attr_accessor :message_text + + # Importance level of the message. + # Corresponds to the JSON property `messageImportance` + # @return [String] + attr_accessor :message_importance + + # The timestamp of the message. + # Corresponds to the JSON property `time` + # @return [String] + attr_accessor :time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @id = args[:id] if args.key?(:id) + @message_text = args[:message_text] if args.key?(:message_text) + @message_importance = args[:message_importance] if args.key?(:message_importance) + @time = args[:time] if args.key?(:time) + end + end + + # Metadata for a specific parameter. + class ParameterMetadata + include Google::Apis::Core::Hashable + + # Optional. Regexes that the parameter must match. + # Corresponds to the JSON property `regexes` + # @return [Array] + attr_accessor :regexes + + # Required. The label to display for the parameter. + # Corresponds to the JSON property `label` + # @return [String] + attr_accessor :label + + # Required. The help text to display for the parameter. + # Corresponds to the JSON property `helpText` + # @return [String] + attr_accessor :help_text + + # Optional. Whether the parameter is optional. Defaults to false. + # Corresponds to the JSON property `isOptional` + # @return [Boolean] + attr_accessor :is_optional + alias_method :is_optional?, :is_optional + + # Required. The name of the parameter. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @regexes = args[:regexes] if args.key?(:regexes) + @label = args[:label] if args.key?(:label) + @help_text = args[:help_text] if args.key?(:help_text) + @is_optional = args[:is_optional] if args.key?(:is_optional) + @name = args[:name] if args.key?(:name) + end + end + + # Information about an output of a multi-output DoFn. + class MultiOutputInfo + include Google::Apis::Core::Hashable + + # The id of the tag the user code will emit to this output by; this + # should correspond to the tag of some SideInputInfo. + # Corresponds to the JSON property `tag` + # @return [String] + attr_accessor :tag + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @tag = args[:tag] if args.key?(:tag) + end + end + + # Represents the operation to split a high-level Source specification + # into bundles (parts for parallel processing). + # At a high level, splitting of a source into bundles happens as follows: + # SourceSplitRequest is applied to the source. If it returns + # SOURCE_SPLIT_OUTCOME_USE_CURRENT, no further splitting happens and the source + # is used "as is". Otherwise, splitting is applied recursively to each + # produced DerivedSource. + # As an optimization, for any Source, if its does_not_need_splitting is + # true, the framework assumes that splitting this source would return + # SOURCE_SPLIT_OUTCOME_USE_CURRENT, and doesn't initiate a SourceSplitRequest. + # This applies both to the initial source being split and to bundles + # produced from it. + class SourceSplitRequest + include Google::Apis::Core::Hashable + + # A source that records can be read and decoded from. + # Corresponds to the JSON property `source` + # @return [Google::Apis::DataflowV1b3::Source] + attr_accessor :source + + # Hints for splitting a Source into bundles (parts for parallel + # processing) using SourceSplitRequest. + # Corresponds to the JSON property `options` + # @return [Google::Apis::DataflowV1b3::SourceSplitOptions] + attr_accessor :options + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @source = args[:source] if args.key?(:source) + @options = args[:options] if args.key?(:options) + end + end + + # The result of a SourceGetMetadataOperation. + class SourceGetMetadataResponse + include Google::Apis::Core::Hashable + + # Metadata about a Source useful for automatically optimizing + # and tuning the pipeline, etc. + # Corresponds to the JSON property `metadata` + # @return [Google::Apis::DataflowV1b3::SourceMetadata] + attr_accessor :metadata + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @metadata = args[:metadata] if args.key?(:metadata) end end @@ -74,10 +684,124 @@ module Google end end + # The metric short id is returned to the user alongside an offset into + # ReportWorkItemStatusRequest + class MetricShortId + include Google::Apis::Core::Hashable + + # The index of the corresponding metric in + # the ReportWorkItemStatusRequest. Required. + # Corresponds to the JSON property `metricIndex` + # @return [Fixnum] + attr_accessor :metric_index + + # The service-generated short identifier for the metric. + # Corresponds to the JSON property `shortId` + # @return [Fixnum] + attr_accessor :short_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @metric_index = args[:metric_index] if args.key?(:metric_index) + @short_id = args[:short_id] if args.key?(:short_id) + end + end + + # A structured message reporting an autoscaling decision made by the Dataflow + # service. + class AutoscalingEvent + include Google::Apis::Core::Hashable + + # The target number of workers the worker pool wants to resize to use. + # Corresponds to the JSON property `targetNumWorkers` + # @return [Fixnum] + attr_accessor :target_num_workers + + # The type of autoscaling event to report. + # Corresponds to the JSON property `eventType` + # @return [String] + attr_accessor :event_type + + # The current number of workers the job has. + # Corresponds to the JSON property `currentNumWorkers` + # @return [Fixnum] + attr_accessor :current_num_workers + + # A rich message format, including a human readable string, a key for + # identifying the message, and structured data associated with the message for + # programmatic consumption. + # Corresponds to the JSON property `description` + # @return [Google::Apis::DataflowV1b3::StructuredMessage] + attr_accessor :description + + # The time this event was emitted to indicate a new target or current + # num_workers value. + # Corresponds to the JSON property `time` + # @return [String] + attr_accessor :time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @target_num_workers = args[:target_num_workers] if args.key?(:target_num_workers) + @event_type = args[:event_type] if args.key?(:event_type) + @current_num_workers = args[:current_num_workers] if args.key?(:current_num_workers) + @description = args[:description] if args.key?(:description) + @time = args[:time] if args.key?(:time) + end + end + # Taskrunner configuration settings. class TaskRunnerSettings include Google::Apis::Core::Hashable + # The base URL for the taskrunner to use when accessing Google Cloud APIs. + # When workers access Google Cloud APIs, they logically do so via + # relative URLs. If this field is specified, it supplies the base + # URL to use for resolving these relative URLs. The normative + # algorithm used is defined by RFC 1808, "Relative Uniform Resource + # Locators". + # If not specified, the default value is "http://www.googleapis.com/" + # Corresponds to the JSON property `baseUrl` + # @return [String] + attr_accessor :base_url + + # Whether to send taskrunner log info to Google Compute Engine VM serial + # console. + # Corresponds to the JSON property `logToSerialconsole` + # @return [Boolean] + attr_accessor :log_to_serialconsole + alias_method :log_to_serialconsole?, :log_to_serialconsole + + # Whether to continue taskrunner if an exception is hit. + # Corresponds to the JSON property `continueOnException` + # @return [Boolean] + attr_accessor :continue_on_exception + alias_method :continue_on_exception?, :continue_on_exception + + # Provides data to pass through to the worker harness. + # Corresponds to the JSON property `parallelWorkerSettings` + # @return [Google::Apis::DataflowV1b3::WorkerSettings] + attr_accessor :parallel_worker_settings + + # The UNIX user ID on the worker VM to use for tasks launched by + # taskrunner; e.g. "root". + # Corresponds to the JSON property `taskUser` + # @return [String] + attr_accessor :task_user + + # The ID string of the VM. + # Corresponds to the JSON property `vmId` + # @return [String] + attr_accessor :vm_id + # Whether to also send taskrunner log info to stderr. # Corresponds to the JSON property `alsologtostderr` # @return [Boolean] @@ -156,52 +880,18 @@ module Google # @return [String] attr_accessor :language_hint - # The base URL for the taskrunner to use when accessing Google Cloud APIs. - # When workers access Google Cloud APIs, they logically do so via - # relative URLs. If this field is specified, it supplies the base - # URL to use for resolving these relative URLs. The normative - # algorithm used is defined by RFC 1808, "Relative Uniform Resource - # Locators". - # If not specified, the default value is "http://www.googleapis.com/" - # Corresponds to the JSON property `baseUrl` - # @return [String] - attr_accessor :base_url - - # Whether to send taskrunner log info to Google Compute Engine VM serial - # console. - # Corresponds to the JSON property `logToSerialconsole` - # @return [Boolean] - attr_accessor :log_to_serialconsole - alias_method :log_to_serialconsole?, :log_to_serialconsole - - # Whether to continue taskrunner if an exception is hit. - # Corresponds to the JSON property `continueOnException` - # @return [Boolean] - attr_accessor :continue_on_exception - alias_method :continue_on_exception?, :continue_on_exception - - # Provides data to pass through to the worker harness. - # Corresponds to the JSON property `parallelWorkerSettings` - # @return [Google::Apis::DataflowV1b3::WorkerSettings] - attr_accessor :parallel_worker_settings - - # The UNIX user ID on the worker VM to use for tasks launched by - # taskrunner; e.g. "root". - # Corresponds to the JSON property `taskUser` - # @return [String] - attr_accessor :task_user - - # The ID string of the VM. - # Corresponds to the JSON property `vmId` - # @return [String] - attr_accessor :vm_id - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @base_url = args[:base_url] if args.key?(:base_url) + @log_to_serialconsole = args[:log_to_serialconsole] if args.key?(:log_to_serialconsole) + @continue_on_exception = args[:continue_on_exception] if args.key?(:continue_on_exception) + @parallel_worker_settings = args[:parallel_worker_settings] if args.key?(:parallel_worker_settings) + @task_user = args[:task_user] if args.key?(:task_user) + @vm_id = args[:vm_id] if args.key?(:vm_id) @alsologtostderr = args[:alsologtostderr] if args.key?(:alsologtostderr) @task_group = args[:task_group] if args.key?(:task_group) @harness_command = args[:harness_command] if args.key?(:harness_command) @@ -215,12 +905,6 @@ module Google @temp_storage_prefix = args[:temp_storage_prefix] if args.key?(:temp_storage_prefix) @commandlines_file_name = args[:commandlines_file_name] if args.key?(:commandlines_file_name) @language_hint = args[:language_hint] if args.key?(:language_hint) - @base_url = args[:base_url] if args.key?(:base_url) - @log_to_serialconsole = args[:log_to_serialconsole] if args.key?(:log_to_serialconsole) - @continue_on_exception = args[:continue_on_exception] if args.key?(:continue_on_exception) - @parallel_worker_settings = args[:parallel_worker_settings] if args.key?(:parallel_worker_settings) - @task_user = args[:task_user] if args.key?(:task_user) - @vm_id = args[:vm_id] if args.key?(:vm_id) end end @@ -230,11 +914,6 @@ module Google class Position include Google::Apis::Core::Hashable - # Position is a record index. - # Corresponds to the JSON property `recordIndex` - # @return [Fixnum] - attr_accessor :record_index - # CloudPosition is a base64 encoded BatchShufflePosition (with FIXED # sharding). # Corresponds to the JSON property `shufflePosition` @@ -265,18 +944,23 @@ module Google # @return [String] attr_accessor :key + # Position is a record index. + # Corresponds to the JSON property `recordIndex` + # @return [Fixnum] + attr_accessor :record_index + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @record_index = args[:record_index] if args.key?(:record_index) @shuffle_position = args[:shuffle_position] if args.key?(:shuffle_position) @concat_position = args[:concat_position] if args.key?(:concat_position) @byte_offset = args[:byte_offset] if args.key?(:byte_offset) @end = args[:end] if args.key?(:end) @key = args[:key] if args.key?(:key) + @record_index = args[:record_index] if args.key?(:record_index) end end @@ -284,23 +968,6 @@ module Google class Source include Google::Apis::Core::Hashable - # Metadata about a Source useful for automatically optimizing - # and tuning the pipeline, etc. - # Corresponds to the JSON property `metadata` - # @return [Google::Apis::DataflowV1b3::SourceMetadata] - attr_accessor :metadata - - # While splitting, sources may specify the produced bundles - # as differences against another source, in order to save backend-side - # memory and allow bigger jobs. For details, see SourceSplitRequest. - # To support this use case, the full set of parameters of the source - # is logically obtained by taking the latest explicitly specified value - # of each parameter in the order: - # base_specs (later items win), spec (overrides anything in base_specs). - # Corresponds to the JSON property `baseSpecs` - # @return [Array>] - attr_accessor :base_specs - # The codec to use to decode data read from the source. # Corresponds to the JSON property `codec` # @return [Hash] @@ -330,17 +997,34 @@ module Google # @return [Hash] attr_accessor :spec + # Metadata about a Source useful for automatically optimizing + # and tuning the pipeline, etc. + # Corresponds to the JSON property `metadata` + # @return [Google::Apis::DataflowV1b3::SourceMetadata] + attr_accessor :metadata + + # While splitting, sources may specify the produced bundles + # as differences against another source, in order to save backend-side + # memory and allow bigger jobs. For details, see SourceSplitRequest. + # To support this use case, the full set of parameters of the source + # is logically obtained by taking the latest explicitly specified value + # of each parameter in the order: + # base_specs (later items win), spec (overrides anything in base_specs). + # Corresponds to the JSON property `baseSpecs` + # @return [Array>] + attr_accessor :base_specs + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @metadata = args[:metadata] if args.key?(:metadata) - @base_specs = args[:base_specs] if args.key?(:base_specs) @codec = args[:codec] if args.key?(:codec) @does_not_need_splitting = args[:does_not_need_splitting] if args.key?(:does_not_need_splitting) @spec = args[:spec] if args.key?(:spec) + @metadata = args[:metadata] if args.key?(:metadata) + @base_specs = args[:base_specs] if args.key?(:base_specs) end end @@ -378,99 +1062,6 @@ module Google class WorkerPool include Google::Apis::Core::Hashable - # Required. Docker container image that executes the Cloud Dataflow worker - # harness, residing in Google Container Registry. - # Corresponds to the JSON property `workerHarnessContainerImage` - # @return [String] - attr_accessor :worker_harness_container_image - - # Type of root disk for VMs. If empty or unspecified, the service will - # attempt to choose a reasonable default. - # Corresponds to the JSON property `diskType` - # @return [String] - attr_accessor :disk_type - - # Machine type (e.g. "n1-standard-1"). If empty or unspecified, the - # service will attempt to choose a reasonable default. - # Corresponds to the JSON property `machineType` - # @return [String] - attr_accessor :machine_type - - # The kind of the worker pool; currently only `harness` and `shuffle` - # are supported. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Data disks that are used by a VM in this workflow. - # Corresponds to the JSON property `dataDisks` - # @return [Array] - attr_accessor :data_disks - - # Subnetwork to which VMs will be assigned, if desired. Expected to be of - # the form "regions/REGION/subnetworks/SUBNETWORK". - # Corresponds to the JSON property `subnetwork` - # @return [String] - attr_accessor :subnetwork - - # Configuration for VM IPs. - # Corresponds to the JSON property `ipConfiguration` - # @return [String] - attr_accessor :ip_configuration - - # Settings for WorkerPool autoscaling. - # Corresponds to the JSON property `autoscalingSettings` - # @return [Google::Apis::DataflowV1b3::AutoscalingSettings] - attr_accessor :autoscaling_settings - - # Taskrunner configuration settings. - # Corresponds to the JSON property `taskrunnerSettings` - # @return [Google::Apis::DataflowV1b3::TaskRunnerSettings] - attr_accessor :taskrunner_settings - - # Metadata to set on the Google Compute Engine VMs. - # Corresponds to the JSON property `metadata` - # @return [Hash] - attr_accessor :metadata - - # Network to which VMs will be assigned. If empty or unspecified, - # the service will use the network "default". - # Corresponds to the JSON property `network` - # @return [String] - attr_accessor :network - - # The default package set to install. This allows the service to - # select a default set of packages which are useful to worker - # harnesses written in a particular language. - # Corresponds to the JSON property `defaultPackageSet` - # @return [String] - attr_accessor :default_package_set - - # Zone to run the worker pools in. If empty or unspecified, the service - # will attempt to choose a reasonable default. - # Corresponds to the JSON property `zone` - # @return [String] - attr_accessor :zone - - # The number of threads per worker harness. If empty or unspecified, the - # service will choose a number of threads (according to the number of cores - # on the selected machine type for batch, or 1 by convention for streaming). - # Corresponds to the JSON property `numThreadsPerWorker` - # @return [Fixnum] - attr_accessor :num_threads_per_worker - - # Number of Google Compute Engine workers in this pool needed to - # execute the job. If zero or unspecified, the service will - # attempt to choose a reasonable default. - # Corresponds to the JSON property `numWorkers` - # @return [Fixnum] - attr_accessor :num_workers - - # Fully qualified source image for disks. - # Corresponds to the JSON property `diskSourceImage` - # @return [String] - attr_accessor :disk_source_image - # Packages to be installed on workers. # Corresponds to the JSON property `packages` # @return [Array] @@ -511,33 +1102,126 @@ module Google # @return [Fixnum] attr_accessor :disk_size_gb + # Required. Docker container image that executes the Cloud Dataflow worker + # harness, residing in Google Container Registry. + # Corresponds to the JSON property `workerHarnessContainerImage` + # @return [String] + attr_accessor :worker_harness_container_image + + # Machine type (e.g. "n1-standard-1"). If empty or unspecified, the + # service will attempt to choose a reasonable default. + # Corresponds to the JSON property `machineType` + # @return [String] + attr_accessor :machine_type + + # Type of root disk for VMs. If empty or unspecified, the service will + # attempt to choose a reasonable default. + # Corresponds to the JSON property `diskType` + # @return [String] + attr_accessor :disk_type + + # The kind of the worker pool; currently only `harness` and `shuffle` + # are supported. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # Data disks that are used by a VM in this workflow. + # Corresponds to the JSON property `dataDisks` + # @return [Array] + attr_accessor :data_disks + + # Subnetwork to which VMs will be assigned, if desired. Expected to be of + # the form "regions/REGION/subnetworks/SUBNETWORK". + # Corresponds to the JSON property `subnetwork` + # @return [String] + attr_accessor :subnetwork + + # Configuration for VM IPs. + # Corresponds to the JSON property `ipConfiguration` + # @return [String] + attr_accessor :ip_configuration + + # Taskrunner configuration settings. + # Corresponds to the JSON property `taskrunnerSettings` + # @return [Google::Apis::DataflowV1b3::TaskRunnerSettings] + attr_accessor :taskrunner_settings + + # Settings for WorkerPool autoscaling. + # Corresponds to the JSON property `autoscalingSettings` + # @return [Google::Apis::DataflowV1b3::AutoscalingSettings] + attr_accessor :autoscaling_settings + + # Metadata to set on the Google Compute Engine VMs. + # Corresponds to the JSON property `metadata` + # @return [Hash] + attr_accessor :metadata + + # The default package set to install. This allows the service to + # select a default set of packages which are useful to worker + # harnesses written in a particular language. + # Corresponds to the JSON property `defaultPackageSet` + # @return [String] + attr_accessor :default_package_set + + # Network to which VMs will be assigned. If empty or unspecified, + # the service will use the network "default". + # Corresponds to the JSON property `network` + # @return [String] + attr_accessor :network + + # Zone to run the worker pools in. If empty or unspecified, the service + # will attempt to choose a reasonable default. + # Corresponds to the JSON property `zone` + # @return [String] + attr_accessor :zone + + # Number of Google Compute Engine workers in this pool needed to + # execute the job. If zero or unspecified, the service will + # attempt to choose a reasonable default. + # Corresponds to the JSON property `numWorkers` + # @return [Fixnum] + attr_accessor :num_workers + + # The number of threads per worker harness. If empty or unspecified, the + # service will choose a number of threads (according to the number of cores + # on the selected machine type for batch, or 1 by convention for streaming). + # Corresponds to the JSON property `numThreadsPerWorker` + # @return [Fixnum] + attr_accessor :num_threads_per_worker + + # Fully qualified source image for disks. + # Corresponds to the JSON property `diskSourceImage` + # @return [String] + attr_accessor :disk_source_image + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @worker_harness_container_image = args[:worker_harness_container_image] if args.key?(:worker_harness_container_image) - @disk_type = args[:disk_type] if args.key?(:disk_type) - @machine_type = args[:machine_type] if args.key?(:machine_type) - @kind = args[:kind] if args.key?(:kind) - @data_disks = args[:data_disks] if args.key?(:data_disks) - @subnetwork = args[:subnetwork] if args.key?(:subnetwork) - @ip_configuration = args[:ip_configuration] if args.key?(:ip_configuration) - @autoscaling_settings = args[:autoscaling_settings] if args.key?(:autoscaling_settings) - @taskrunner_settings = args[:taskrunner_settings] if args.key?(:taskrunner_settings) - @metadata = args[:metadata] if args.key?(:metadata) - @network = args[:network] if args.key?(:network) - @default_package_set = args[:default_package_set] if args.key?(:default_package_set) - @zone = args[:zone] if args.key?(:zone) - @num_threads_per_worker = args[:num_threads_per_worker] if args.key?(:num_threads_per_worker) - @num_workers = args[:num_workers] if args.key?(:num_workers) - @disk_source_image = args[:disk_source_image] if args.key?(:disk_source_image) @packages = args[:packages] if args.key?(:packages) @teardown_policy = args[:teardown_policy] if args.key?(:teardown_policy) @on_host_maintenance = args[:on_host_maintenance] if args.key?(:on_host_maintenance) @pool_args = args[:pool_args] if args.key?(:pool_args) @disk_size_gb = args[:disk_size_gb] if args.key?(:disk_size_gb) + @worker_harness_container_image = args[:worker_harness_container_image] if args.key?(:worker_harness_container_image) + @machine_type = args[:machine_type] if args.key?(:machine_type) + @disk_type = args[:disk_type] if args.key?(:disk_type) + @kind = args[:kind] if args.key?(:kind) + @data_disks = args[:data_disks] if args.key?(:data_disks) + @subnetwork = args[:subnetwork] if args.key?(:subnetwork) + @ip_configuration = args[:ip_configuration] if args.key?(:ip_configuration) + @taskrunner_settings = args[:taskrunner_settings] if args.key?(:taskrunner_settings) + @autoscaling_settings = args[:autoscaling_settings] if args.key?(:autoscaling_settings) + @metadata = args[:metadata] if args.key?(:metadata) + @default_package_set = args[:default_package_set] if args.key?(:default_package_set) + @network = args[:network] if args.key?(:network) + @zone = args[:zone] if args.key?(:zone) + @num_workers = args[:num_workers] if args.key?(:num_workers) + @num_threads_per_worker = args[:num_threads_per_worker] if args.key?(:num_threads_per_worker) + @disk_source_image = args[:disk_source_image] if args.key?(:disk_source_image) end end @@ -546,11 +1230,6 @@ module Google class SourceOperationRequest include Google::Apis::Core::Hashable - # A request to compute the SourceMetadata of a Source. - # Corresponds to the JSON property `getMetadata` - # @return [Google::Apis::DataflowV1b3::SourceGetMetadataRequest] - attr_accessor :get_metadata - # Represents the operation to split a high-level Source specification # into bundles (parts for parallel processing). # At a high level, splitting of a source into bundles happens as follows: @@ -567,14 +1246,53 @@ module Google # @return [Google::Apis::DataflowV1b3::SourceSplitRequest] attr_accessor :split + # A request to compute the SourceMetadata of a Source. + # Corresponds to the JSON property `getMetadata` + # @return [Google::Apis::DataflowV1b3::SourceGetMetadataRequest] + attr_accessor :get_metadata + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @get_metadata = args[:get_metadata] if args.key?(:get_metadata) @split = args[:split] if args.key?(:split) + @get_metadata = args[:get_metadata] if args.key?(:get_metadata) + end + end + + # A rich message format, including a human readable string, a key for + # identifying the message, and structured data associated with the message for + # programmatic consumption. + class StructuredMessage + include Google::Apis::Core::Hashable + + # Idenfier for this message type. Used by external systems to + # internationalize or personalize message. + # Corresponds to the JSON property `messageKey` + # @return [String] + attr_accessor :message_key + + # Human-readable version of message. + # Corresponds to the JSON property `messageText` + # @return [String] + attr_accessor :message_text + + # The structured data associated with this message. + # Corresponds to the JSON property `parameters` + # @return [Array] + attr_accessor :parameters + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @message_key = args[:message_key] if args.key?(:message_key) + @message_text = args[:message_text] if args.key?(:message_text) + @parameters = args[:parameters] if args.key?(:parameters) end end @@ -583,42 +1301,6 @@ module Google class WorkItem include Google::Apis::Core::Hashable - # Time when the lease on this Work will expire. - # Corresponds to the JSON property `leaseExpireTime` - # @return [String] - attr_accessor :lease_expire_time - - # A task that carries configuration information for streaming computations. - # Corresponds to the JSON property `streamingConfigTask` - # @return [Google::Apis::DataflowV1b3::StreamingConfigTask] - attr_accessor :streaming_config_task - - # The initial index to use when reporting the status of the WorkItem. - # Corresponds to the JSON property `initialReportIndex` - # @return [Fixnum] - attr_accessor :initial_report_index - - # A task which describes what action should be performed for the specified - # streaming computation ranges. - # Corresponds to the JSON property `streamingComputationTask` - # @return [Google::Apis::DataflowV1b3::StreamingComputationTask] - attr_accessor :streaming_computation_task - - # A task which consists of a shell command for the worker to execute. - # Corresponds to the JSON property `shellTask` - # @return [Google::Apis::DataflowV1b3::ShellTask] - attr_accessor :shell_task - - # Identifies the workflow job this WorkItem belongs to. - # Corresponds to the JSON property `jobId` - # @return [String] - attr_accessor :job_id - - # Identifies this WorkItem. - # Corresponds to the JSON property `id` - # @return [Fixnum] - attr_accessor :id - # Work item-specific configuration as an opaque blob. # Corresponds to the JSON property `configuration` # @return [String] @@ -665,19 +1347,48 @@ module Google # @return [String] attr_accessor :report_status_interval + # A task that carries configuration information for streaming computations. + # Corresponds to the JSON property `streamingConfigTask` + # @return [Google::Apis::DataflowV1b3::StreamingConfigTask] + attr_accessor :streaming_config_task + + # Time when the lease on this Work will expire. + # Corresponds to the JSON property `leaseExpireTime` + # @return [String] + attr_accessor :lease_expire_time + + # The initial index to use when reporting the status of the WorkItem. + # Corresponds to the JSON property `initialReportIndex` + # @return [Fixnum] + attr_accessor :initial_report_index + + # A task which describes what action should be performed for the specified + # streaming computation ranges. + # Corresponds to the JSON property `streamingComputationTask` + # @return [Google::Apis::DataflowV1b3::StreamingComputationTask] + attr_accessor :streaming_computation_task + + # A task which consists of a shell command for the worker to execute. + # Corresponds to the JSON property `shellTask` + # @return [Google::Apis::DataflowV1b3::ShellTask] + attr_accessor :shell_task + + # Identifies the workflow job this WorkItem belongs to. + # Corresponds to the JSON property `jobId` + # @return [String] + attr_accessor :job_id + + # Identifies this WorkItem. + # Corresponds to the JSON property `id` + # @return [Fixnum] + attr_accessor :id + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @lease_expire_time = args[:lease_expire_time] if args.key?(:lease_expire_time) - @streaming_config_task = args[:streaming_config_task] if args.key?(:streaming_config_task) - @initial_report_index = args[:initial_report_index] if args.key?(:initial_report_index) - @streaming_computation_task = args[:streaming_computation_task] if args.key?(:streaming_computation_task) - @shell_task = args[:shell_task] if args.key?(:shell_task) - @job_id = args[:job_id] if args.key?(:job_id) - @id = args[:id] if args.key?(:id) @configuration = args[:configuration] if args.key?(:configuration) @map_task = args[:map_task] if args.key?(:map_task) @seq_map_task = args[:seq_map_task] if args.key?(:seq_map_task) @@ -686,38 +1397,13 @@ module Google @source_operation_task = args[:source_operation_task] if args.key?(:source_operation_task) @streaming_setup_task = args[:streaming_setup_task] if args.key?(:streaming_setup_task) @report_status_interval = args[:report_status_interval] if args.key?(:report_status_interval) - end - end - - # Represents the level of parallelism in a WorkItem's input, - # reported by the worker. - class ReportedParallelism - include Google::Apis::Core::Hashable - - # Specifies the level of parallelism in case it is finite. - # Corresponds to the JSON property `value` - # @return [Float] - attr_accessor :value - - # Specifies whether the parallelism is infinite. If true, "value" is - # ignored. - # Infinite parallelism means the service will assume that the work item - # can always be split into more non-empty work items by dynamic splitting. - # This is a work-around for lack of support for infinity by the current - # JSON-based Java RPC stack. - # Corresponds to the JSON property `isInfinite` - # @return [Boolean] - attr_accessor :is_infinite - alias_method :is_infinite?, :is_infinite - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @value = args[:value] if args.key?(:value) - @is_infinite = args[:is_infinite] if args.key?(:is_infinite) + @streaming_config_task = args[:streaming_config_task] if args.key?(:streaming_config_task) + @lease_expire_time = args[:lease_expire_time] if args.key?(:lease_expire_time) + @initial_report_index = args[:initial_report_index] if args.key?(:initial_report_index) + @streaming_computation_task = args[:streaming_computation_task] if args.key?(:streaming_computation_task) + @shell_task = args[:shell_task] if args.key?(:shell_task) + @job_id = args[:job_id] if args.key?(:job_id) + @id = args[:id] if args.key?(:id) end end @@ -742,16 +1428,43 @@ module Google end end + # Represents the level of parallelism in a WorkItem's input, + # reported by the worker. + class ReportedParallelism + include Google::Apis::Core::Hashable + + # Specifies whether the parallelism is infinite. If true, "value" is + # ignored. + # Infinite parallelism means the service will assume that the work item + # can always be split into more non-empty work items by dynamic splitting. + # This is a work-around for lack of support for infinity by the current + # JSON-based Java RPC stack. + # Corresponds to the JSON property `isInfinite` + # @return [Boolean] + attr_accessor :is_infinite + alias_method :is_infinite?, :is_infinite + + # Specifies the level of parallelism in case it is finite. + # Corresponds to the JSON property `value` + # @return [Float] + attr_accessor :value + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @is_infinite = args[:is_infinite] if args.key?(:is_infinite) + @value = args[:value] if args.key?(:value) + end + end + # Global topology of the streaming Dataflow job, including all # computations and their sharded locations. class TopologyConfig include Google::Apis::Core::Hashable - # The size (in bits) of keys that will be assigned to source messages. - # Corresponds to the JSON property `forwardingKeyBits` - # @return [Fixnum] - attr_accessor :forwarding_key_bits - # Maps user stage names to stable computation names. # Corresponds to the JSON property `userStageToComputationNameMap` # @return [Hash] @@ -772,17 +1485,22 @@ module Google # @return [Fixnum] attr_accessor :persistent_state_version + # The size (in bits) of keys that will be assigned to source messages. + # Corresponds to the JSON property `forwardingKeyBits` + # @return [Fixnum] + attr_accessor :forwarding_key_bits + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @forwarding_key_bits = args[:forwarding_key_bits] if args.key?(:forwarding_key_bits) @user_stage_to_computation_name_map = args[:user_stage_to_computation_name_map] if args.key?(:user_stage_to_computation_name_map) @computations = args[:computations] if args.key?(:computations) @data_disk_assignments = args[:data_disk_assignments] if args.key?(:data_disk_assignments) @persistent_state_version = args[:persistent_state_version] if args.key?(:persistent_state_version) + @forwarding_key_bits = args[:forwarding_key_bits] if args.key?(:forwarding_key_bits) end end @@ -852,12 +1570,6 @@ module Google # @return [String] attr_accessor :temp_storage_prefix - # Whether to send work progress updates to the service. - # Corresponds to the JSON property `reportingEnabled` - # @return [Boolean] - attr_accessor :reporting_enabled - alias_method :reporting_enabled?, :reporting_enabled - # The base URL for accessing Google Cloud APIs. # When workers access Google Cloud APIs, they logically do so via # relative URLs. If this field is specified, it supplies the base @@ -869,6 +1581,12 @@ module Google # @return [String] attr_accessor :base_url + # Whether to send work progress updates to the service. + # Corresponds to the JSON property `reportingEnabled` + # @return [Boolean] + attr_accessor :reporting_enabled + alias_method :reporting_enabled?, :reporting_enabled + # The Cloud Dataflow service path relative to the root URL, for example, # "dataflow/v1b3/projects". # Corresponds to the JSON property `servicePath` @@ -889,8 +1607,8 @@ module Google def update!(**args) @worker_id = args[:worker_id] if args.key?(:worker_id) @temp_storage_prefix = args[:temp_storage_prefix] if args.key?(:temp_storage_prefix) - @reporting_enabled = args[:reporting_enabled] if args.key?(:reporting_enabled) @base_url = args[:base_url] if args.key?(:base_url) + @reporting_enabled = args[:reporting_enabled] if args.key?(:reporting_enabled) @service_path = args[:service_path] if args.key?(:service_path) @shuffle_service_path = args[:shuffle_service_path] if args.key?(:shuffle_service_path) end @@ -921,6 +1639,12 @@ module Google class DataDiskAssignment include Google::Apis::Core::Hashable + # VM instance name the data disks mounted to, for example + # "myproject-1014-104817-4c2-harness-0". + # Corresponds to the JSON property `vmInstance` + # @return [String] + attr_accessor :vm_instance + # Mounted data disks. The order is important a data disk's 0-based index in # this list defines which persistent directory the disk is mounted to, for # example the list of ` "myproject-1014-104817-4c2-harness-0-disk-0" `, @@ -929,20 +1653,14 @@ module Google # @return [Array] attr_accessor :data_disks - # VM instance name the data disks mounted to, for example - # "myproject-1014-104817-4c2-harness-0". - # Corresponds to the JSON property `vmInstance` - # @return [String] - attr_accessor :vm_instance - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @data_disks = args[:data_disks] if args.key?(:data_disks) @vm_instance = args[:vm_instance] if args.key?(:vm_instance) + @data_disks = args[:data_disks] if args.key?(:data_disks) end end @@ -988,7 +1706,7 @@ module Google # error message is needed, put the localized message in the error details or # localize it in the client. The optional error details may contain arbitrary # information about the error. There is a predefined set of error detail types - # in the package `google.rpc` which can be used for common error conditions. + # in the package `google.rpc` that can be used for common error conditions. # # Language mapping # The `Status` message is the logical representation of the error model, but it # is not necessarily the actual wire format. When the `Status` message is @@ -1004,7 +1722,7 @@ module Google # it may embed the `Status` in the normal response to indicate the partial # errors. # - Workflow errors. A typical workflow has multiple steps. Each step may - # have a `Status` message for error reporting purpose. + # have a `Status` message for error reporting. # - Batch operations. If a client uses batch request and batch response, the # `Status` message should be used directly inside batch response, one for # each error sub-response. @@ -1016,12 +1734,6 @@ module Google class Status include Google::Apis::Core::Hashable - # A list of messages that carry the error details. There will be a - # common set of message types for APIs to use. - # Corresponds to the JSON property `details` - # @return [Array>] - attr_accessor :details - # The status code, which should be an enum value of google.rpc.Code. # Corresponds to the JSON property `code` # @return [Fixnum] @@ -1034,15 +1746,52 @@ module Google # @return [String] attr_accessor :message + # A list of messages that carry the error details. There will be a + # common set of message types for APIs to use. + # Corresponds to the JSON property `details` + # @return [Array>] + attr_accessor :details + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @details = args[:details] if args.key?(:details) @code = args[:code] if args.key?(:code) @message = args[:message] if args.key?(:message) + @details = args[:details] if args.key?(:details) + end + end + + # A message describing the state of a particular execution stage. + class ExecutionStageState + include Google::Apis::Core::Hashable + + # The name of the execution stage. + # Corresponds to the JSON property `executionStageName` + # @return [String] + attr_accessor :execution_stage_name + + # The time at which the stage transitioned to this state. + # Corresponds to the JSON property `currentStateTime` + # @return [String] + attr_accessor :current_state_time + + # Executions stage states allow the same set of values as JobState. + # Corresponds to the JSON property `executionStageState` + # @return [String] + attr_accessor :execution_stage_state + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @execution_stage_name = args[:execution_stage_name] if args.key?(:execution_stage_name) + @current_state_time = args[:current_state_time] if args.key?(:current_state_time) + @execution_stage_state = args[:execution_stage_state] if args.key?(:execution_stage_state) end end @@ -1051,11 +1800,6 @@ module Google class StreamLocation include Google::Apis::Core::Hashable - # Identifies the location of a custom souce. - # Corresponds to the JSON property `customSourceLocation` - # @return [Google::Apis::DataflowV1b3::CustomSourceLocation] - attr_accessor :custom_source_location - # Identifies the location of a streaming computation stage, for # stage-to-stage communication. # Corresponds to the JSON property `streamingStageLocation` @@ -1073,16 +1817,21 @@ module Google # @return [Google::Apis::DataflowV1b3::StreamingSideInputLocation] attr_accessor :side_input_location + # Identifies the location of a custom souce. + # Corresponds to the JSON property `customSourceLocation` + # @return [Google::Apis::DataflowV1b3::CustomSourceLocation] + attr_accessor :custom_source_location + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @custom_source_location = args[:custom_source_location] if args.key?(:custom_source_location) @streaming_stage_location = args[:streaming_stage_location] if args.key?(:streaming_stage_location) @pubsub_location = args[:pubsub_location] if args.key?(:pubsub_location) @side_input_location = args[:side_input_location] if args.key?(:side_input_location) + @custom_source_location = args[:custom_source_location] if args.key?(:custom_source_location) end end @@ -1105,14 +1854,29 @@ module Google end end - # Response to a request to lease WorkItems. - class LeaseWorkItemResponse + # Configuration information for a single streaming computation. + class StreamingComputationConfig include Google::Apis::Core::Hashable - # A list of the leased WorkItems. - # Corresponds to the JSON property `workItems` - # @return [Array] - attr_accessor :work_items + # Instructions that comprise the computation. + # Corresponds to the JSON property `instructions` + # @return [Array] + attr_accessor :instructions + + # Unique identifier for this computation. + # Corresponds to the JSON property `computationId` + # @return [String] + attr_accessor :computation_id + + # System defined name for this computation. + # Corresponds to the JSON property `systemName` + # @return [String] + attr_accessor :system_name + + # Stage name of this computation. + # Corresponds to the JSON property `stageName` + # @return [String] + attr_accessor :stage_name def initialize(**args) update!(**args) @@ -1120,7 +1884,10 @@ module Google # Update properties of this object def update!(**args) - @work_items = args[:work_items] if args.key?(:work_items) + @instructions = args[:instructions] if args.key?(:instructions) + @computation_id = args[:computation_id] if args.key?(:computation_id) + @system_name = args[:system_name] if args.key?(:system_name) + @stage_name = args[:stage_name] if args.key?(:stage_name) end end @@ -1128,11 +1895,6 @@ module Google class TransformSummary include Google::Apis::Core::Hashable - # SDK generated id of this transform instance. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - # User names for all collection outputs to this transform. # Corresponds to the JSON property `outputCollectionName` # @return [Array] @@ -1158,44 +1920,34 @@ module Google # @return [String] attr_accessor :name + # SDK generated id of this transform instance. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @id = args[:id] if args.key?(:id) @output_collection_name = args[:output_collection_name] if args.key?(:output_collection_name) @display_data = args[:display_data] if args.key?(:display_data) @kind = args[:kind] if args.key?(:kind) @input_collection_name = args[:input_collection_name] if args.key?(:input_collection_name) @name = args[:name] if args.key?(:name) + @id = args[:id] if args.key?(:id) end end - # Configuration information for a single streaming computation. - class StreamingComputationConfig + # Response to a request to lease WorkItems. + class LeaseWorkItemResponse include Google::Apis::Core::Hashable - # Unique identifier for this computation. - # Corresponds to the JSON property `computationId` - # @return [String] - attr_accessor :computation_id - - # System defined name for this computation. - # Corresponds to the JSON property `systemName` - # @return [String] - attr_accessor :system_name - - # Stage name of this computation. - # Corresponds to the JSON property `stageName` - # @return [String] - attr_accessor :stage_name - - # Instructions that comprise the computation. - # Corresponds to the JSON property `instructions` - # @return [Array] - attr_accessor :instructions + # A list of the leased WorkItems. + # Corresponds to the JSON property `workItems` + # @return [Array] + attr_accessor :work_items def initialize(**args) update!(**args) @@ -1203,35 +1955,7 @@ module Google # Update properties of this object def update!(**args) - @computation_id = args[:computation_id] if args.key?(:computation_id) - @system_name = args[:system_name] if args.key?(:system_name) - @stage_name = args[:stage_name] if args.key?(:stage_name) - @instructions = args[:instructions] if args.key?(:instructions) - end - end - - # A sink that records can be encoded and written to. - class Sink - include Google::Apis::Core::Hashable - - # The sink to write to, plus its parameters. - # Corresponds to the JSON property `spec` - # @return [Hash] - attr_accessor :spec - - # The codec to use to encode data written to the sink. - # Corresponds to the JSON property `codec` - # @return [Hash] - attr_accessor :codec - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @spec = args[:spec] if args.key?(:spec) - @codec = args[:codec] if args.key?(:codec) + @work_items = args[:work_items] if args.key?(:work_items) end end @@ -1239,11 +1963,6 @@ module Google class LaunchTemplateParameters include Google::Apis::Core::Hashable - # The runtime parameters to pass to the job. - # Corresponds to the JSON property `parameters` - # @return [Hash] - attr_accessor :parameters - # Required. The job name to use for the created job. # Corresponds to the JSON property `jobName` # @return [String] @@ -1254,15 +1973,45 @@ module Google # @return [Google::Apis::DataflowV1b3::RuntimeEnvironment] attr_accessor :environment + # The runtime parameters to pass to the job. + # Corresponds to the JSON property `parameters` + # @return [Hash] + attr_accessor :parameters + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @parameters = args[:parameters] if args.key?(:parameters) @job_name = args[:job_name] if args.key?(:job_name) @environment = args[:environment] if args.key?(:environment) + @parameters = args[:parameters] if args.key?(:parameters) + end + end + + # A sink that records can be encoded and written to. + class Sink + include Google::Apis::Core::Hashable + + # The codec to use to encode data written to the sink. + # Corresponds to the JSON property `codec` + # @return [Hash] + attr_accessor :codec + + # The sink to write to, plus its parameters. + # Corresponds to the JSON property `spec` + # @return [Hash] + attr_accessor :spec + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @codec = args[:codec] if args.key?(:codec) + @spec = args[:spec] if args.key?(:spec) end end @@ -1428,37 +2177,32 @@ module Google class DisplayData include Google::Apis::Core::Hashable - # Contains value if the data is of timestamp type. - # Corresponds to the JSON property `timestampValue` - # @return [String] - attr_accessor :timestamp_value - - # Contains value if the data is of java class type. - # Corresponds to the JSON property `javaClassValue` - # @return [String] - attr_accessor :java_class_value - # Contains value if the data is of a boolean type. # Corresponds to the JSON property `boolValue` # @return [Boolean] attr_accessor :bool_value alias_method :bool_value?, :bool_value + # Contains value if the data is of java class type. + # Corresponds to the JSON property `javaClassValue` + # @return [String] + attr_accessor :java_class_value + # Contains value if the data is of string type. # Corresponds to the JSON property `strValue` # @return [String] attr_accessor :str_value - # Contains value if the data is of duration type. - # Corresponds to the JSON property `durationValue` - # @return [String] - attr_accessor :duration_value - # Contains value if the data is of int64 type. # Corresponds to the JSON property `int64Value` # @return [Fixnum] attr_accessor :int64_value + # Contains value if the data is of duration type. + # Corresponds to the JSON property `durationValue` + # @return [String] + attr_accessor :duration_value + # The namespace for the key. This is usually a class name or programming # language namespace (i.e. python module) which defines the display data. # This allows a dax monitoring system to specially handle the data @@ -1489,15 +2233,20 @@ module Google # @return [String] attr_accessor :short_str_value + # An optional full URL. + # Corresponds to the JSON property `url` + # @return [String] + attr_accessor :url + # An optional label to display in a dax UI for the element. # Corresponds to the JSON property `label` # @return [String] attr_accessor :label - # An optional full URL. - # Corresponds to the JSON property `url` + # Contains value if the data is of timestamp type. + # Corresponds to the JSON property `timestampValue` # @return [String] - attr_accessor :url + attr_accessor :timestamp_value def initialize(**args) update!(**args) @@ -1505,18 +2254,18 @@ module Google # Update properties of this object def update!(**args) - @timestamp_value = args[:timestamp_value] if args.key?(:timestamp_value) - @java_class_value = args[:java_class_value] if args.key?(:java_class_value) @bool_value = args[:bool_value] if args.key?(:bool_value) + @java_class_value = args[:java_class_value] if args.key?(:java_class_value) @str_value = args[:str_value] if args.key?(:str_value) - @duration_value = args[:duration_value] if args.key?(:duration_value) @int64_value = args[:int64_value] if args.key?(:int64_value) + @duration_value = args[:duration_value] if args.key?(:duration_value) @namespace = args[:namespace] if args.key?(:namespace) @float_value = args[:float_value] if args.key?(:float_value) @key = args[:key] if args.key?(:key) @short_str_value = args[:short_str_value] if args.key?(:short_str_value) - @label = args[:label] if args.key?(:label) @url = args[:url] if args.key?(:url) + @label = args[:label] if args.key?(:label) + @timestamp_value = args[:timestamp_value] if args.key?(:timestamp_value) end end @@ -1524,6 +2273,26 @@ module Google class LeaseWorkItemRequest include Google::Apis::Core::Hashable + # The initial lease period. + # Corresponds to the JSON property `requestedLeaseDuration` + # @return [String] + attr_accessor :requested_lease_duration + + # The current timestamp at the worker. + # Corresponds to the JSON property `currentWorkerTime` + # @return [String] + attr_accessor :current_worker_time + + # The location which contains the WorkItem's job. + # Corresponds to the JSON property `location` + # @return [String] + attr_accessor :location + + # Filter for WorkItem type. + # Corresponds to the JSON property `workItemTypes` + # @return [Array] + attr_accessor :work_item_types + # Worker capabilities. WorkItems might be limited to workers with specific # capabilities. # Corresponds to the JSON property `workerCapabilities` @@ -1536,38 +2305,18 @@ module Google # @return [String] attr_accessor :worker_id - # The initial lease period. - # Corresponds to the JSON property `requestedLeaseDuration` - # @return [String] - attr_accessor :requested_lease_duration - - # The current timestamp at the worker. - # Corresponds to the JSON property `currentWorkerTime` - # @return [String] - attr_accessor :current_worker_time - - # Filter for WorkItem type. - # Corresponds to the JSON property `workItemTypes` - # @return [Array] - attr_accessor :work_item_types - - # The location which contains the WorkItem's job. - # Corresponds to the JSON property `location` - # @return [String] - attr_accessor :location - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @worker_capabilities = args[:worker_capabilities] if args.key?(:worker_capabilities) - @worker_id = args[:worker_id] if args.key?(:worker_id) @requested_lease_duration = args[:requested_lease_duration] if args.key?(:requested_lease_duration) @current_worker_time = args[:current_worker_time] if args.key?(:current_worker_time) - @work_item_types = args[:work_item_types] if args.key?(:work_item_types) @location = args[:location] if args.key?(:location) + @work_item_types = args[:work_item_types] if args.key?(:work_item_types) + @worker_capabilities = args[:worker_capabilities] if args.key?(:worker_capabilities) + @worker_id = args[:worker_id] if args.key?(:worker_id) end end @@ -1586,6 +2335,11 @@ module Google # @return [String] attr_accessor :worker_id + # The location which contains the job specified by job_id. + # Corresponds to the JSON property `location` + # @return [String] + attr_accessor :location + def initialize(**args) update!(**args) end @@ -1594,6 +2348,7 @@ module Google def update!(**args) @component_id = args[:component_id] if args.key?(:component_id) @worker_id = args[:worker_id] if args.key?(:worker_id) + @location = args[:location] if args.key?(:location) end end @@ -1620,7 +2375,7 @@ module Google # error message is needed, put the localized message in the error details or # localize it in the client. The optional error details may contain arbitrary # information about the error. There is a predefined set of error detail types - # in the package `google.rpc` which can be used for common error conditions. + # in the package `google.rpc` that can be used for common error conditions. # # Language mapping # The `Status` message is the logical representation of the error model, but it # is not necessarily the actual wire format. When the `Status` message is @@ -1636,7 +2391,7 @@ module Google # it may embed the `Status` in the normal response to indicate the partial # errors. # - Workflow errors. A typical workflow has multiple steps. Each step may - # have a `Status` message for error reporting purpose. + # have a `Status` message for error reporting. # - Batch operations. If a client uses batch request and batch response, the # `Status` message should be used directly inside batch response, one for # each error sub-response. @@ -1660,10 +2415,42 @@ module Google end end + # Structured data associated with this message. + class Parameter + include Google::Apis::Core::Hashable + + # Value for this parameter. + # Corresponds to the JSON property `value` + # @return [Object] + attr_accessor :value + + # Key or name for this parameter. + # Corresponds to the JSON property `key` + # @return [String] + attr_accessor :key + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @value = args[:value] if args.key?(:value) + @key = args[:key] if args.key?(:key) + end + end + # Request to report the status of WorkItems. class ReportWorkItemStatusRequest include Google::Apis::Core::Hashable + # The order is unimportant, except that the order of the + # WorkItemServiceState messages in the ReportWorkItemStatusResponse + # corresponds to the order of WorkItemStatus messages here. + # Corresponds to the JSON property `workItemStatuses` + # @return [Array] + attr_accessor :work_item_statuses + # The ID of the worker reporting the WorkItem status. If this # does not match the ID of the worker which the Dataflow service # believes currently has the lease on the WorkItem, the report @@ -1682,23 +2469,16 @@ module Google # @return [String] attr_accessor :location - # The order is unimportant, except that the order of the - # WorkItemServiceState messages in the ReportWorkItemStatusResponse - # corresponds to the order of WorkItemStatus messages here. - # Corresponds to the JSON property `workItemStatuses` - # @return [Array] - attr_accessor :work_item_statuses - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @work_item_statuses = args[:work_item_statuses] if args.key?(:work_item_statuses) @worker_id = args[:worker_id] if args.key?(:worker_id) @current_worker_time = args[:current_worker_time] if args.key?(:current_worker_time) @location = args[:location] if args.key?(:location) - @work_item_statuses = args[:work_item_statuses] if args.key?(:work_item_statuses) end end @@ -1708,11 +2488,6 @@ module Google class PipelineDescription include Google::Apis::Core::Hashable - # Description of each transform in the pipeline and collections between them. - # Corresponds to the JSON property `originalPipelineTransform` - # @return [Array] - attr_accessor :original_pipeline_transform - # Pipeline level display data. # Corresponds to the JSON property `displayData` # @return [Array] @@ -1723,15 +2498,20 @@ module Google # @return [Array] attr_accessor :execution_pipeline_stage + # Description of each transform in the pipeline and collections between them. + # Corresponds to the JSON property `originalPipelineTransform` + # @return [Array] + attr_accessor :original_pipeline_transform + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @original_pipeline_transform = args[:original_pipeline_transform] if args.key?(:original_pipeline_transform) @display_data = args[:display_data] if args.key?(:display_data) @execution_pipeline_stage = args[:execution_pipeline_stage] if args.key?(:execution_pipeline_stage) + @original_pipeline_transform = args[:original_pipeline_transform] if args.key?(:original_pipeline_transform) end end @@ -1739,24 +2519,60 @@ module Google class StreamingConfigTask include Google::Apis::Core::Hashable - # Set of computation configuration information. - # Corresponds to the JSON property `streamingComputationConfigs` - # @return [Array] - attr_accessor :streaming_computation_configs + # If present, the worker must use this endpoint to communicate with Windmill + # Service dispatchers, otherwise the worker must continue to use whatever + # endpoint it had been using. + # Corresponds to the JSON property `windmillServiceEndpoint` + # @return [String] + attr_accessor :windmill_service_endpoint # Map from user step names to state families. # Corresponds to the JSON property `userStepToStateFamilyNameMap` # @return [Hash] attr_accessor :user_step_to_state_family_name_map + # If present, the worker must use this port to communicate with Windmill + # Service dispatchers. Only applicable when windmill_service_endpoint is + # specified. + # Corresponds to the JSON property `windmillServicePort` + # @return [Fixnum] + attr_accessor :windmill_service_port + + # Set of computation configuration information. + # Corresponds to the JSON property `streamingComputationConfigs` + # @return [Array] + attr_accessor :streaming_computation_configs + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @streaming_computation_configs = args[:streaming_computation_configs] if args.key?(:streaming_computation_configs) + @windmill_service_endpoint = args[:windmill_service_endpoint] if args.key?(:windmill_service_endpoint) @user_step_to_state_family_name_map = args[:user_step_to_state_family_name_map] if args.key?(:user_step_to_state_family_name_map) + @windmill_service_port = args[:windmill_service_port] if args.key?(:windmill_service_port) + @streaming_computation_configs = args[:streaming_computation_configs] if args.key?(:streaming_computation_configs) + end + end + + # Additional information about how a Cloud Dataflow job will be executed that + # isn't contained in the submitted job. + class JobExecutionInfo + include Google::Apis::Core::Hashable + + # A mapping from each stage to the information about that stage. + # Corresponds to the JSON property `stages` + # @return [Hash] + attr_accessor :stages + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @stages = args[:stages] if args.key?(:stages) end end @@ -1780,13 +2596,6 @@ module Google class Step include Google::Apis::Core::Hashable - # Named properties associated with the step. Each kind of - # predefined step has its own required set of properties. - # Must be provided on Create. Only retrieved with JOB_VIEW_ALL. - # Corresponds to the JSON property `properties` - # @return [Hash] - attr_accessor :properties - # The name that identifies the step. This must be unique for each # step with respect to all other steps in the Cloud Dataflow job. # Corresponds to the JSON property `name` @@ -1798,35 +2607,22 @@ module Google # @return [String] attr_accessor :kind + # Named properties associated with the step. Each kind of + # predefined step has its own required set of properties. + # Must be provided on Create. Only retrieved with JOB_VIEW_ALL. + # Corresponds to the JSON property `properties` + # @return [Hash] + attr_accessor :properties + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @properties = args[:properties] if args.key?(:properties) @name = args[:name] if args.key?(:name) @kind = args[:kind] if args.key?(:kind) - end - end - - # Additional information about how a Cloud Dataflow job will be executed that - # isn't contained in the submitted job. - class JobExecutionInfo - include Google::Apis::Core::Hashable - - # A mapping from each stage to the information about that stage. - # Corresponds to the JSON property `stages` - # @return [Hash] - attr_accessor :stages - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @stages = args[:stages] if args.key?(:stages) + @properties = args[:properties] if args.key?(:properties) end end @@ -1899,16 +2695,6 @@ module Google class CounterMetadata include Google::Apis::Core::Hashable - # Counter aggregation kind. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Human-readable description of the counter semantics. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - # System defined Units, see above enum. # Corresponds to the JSON property `standardUnits` # @return [String] @@ -1919,16 +2705,26 @@ module Google # @return [String] attr_accessor :other_units + # Counter aggregation kind. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # Human-readable description of the counter semantics. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @kind = args[:kind] if args.key?(:kind) - @description = args[:description] if args.key?(:description) @standard_units = args[:standard_units] if args.key?(:standard_units) @other_units = args[:other_units] if args.key?(:other_units) + @kind = args[:kind] if args.key?(:kind) + @description = args[:description] if args.key?(:description) end end @@ -1936,24 +2732,30 @@ module Google class ListJobMessagesResponse include Google::Apis::Core::Hashable - # Messages in ascending timestamp order. - # Corresponds to the JSON property `jobMessages` - # @return [Array] - attr_accessor :job_messages - # The token to obtain the next page of results if there are more. # Corresponds to the JSON property `nextPageToken` # @return [String] attr_accessor :next_page_token + # Autoscaling events in ascending timestamp order. + # Corresponds to the JSON property `autoscalingEvents` + # @return [Array] + attr_accessor :autoscaling_events + + # Messages in ascending timestamp order. + # Corresponds to the JSON property `jobMessages` + # @return [Array] + attr_accessor :job_messages + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @job_messages = args[:job_messages] if args.key?(:job_messages) @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @autoscaling_events = args[:autoscaling_events] if args.key?(:autoscaling_events) + @job_messages = args[:job_messages] if args.key?(:job_messages) end end @@ -1999,6 +2801,32 @@ module Google end end + # State family configuration. + class StateFamilyConfig + include Google::Apis::Core::Hashable + + # The state family value. + # Corresponds to the JSON property `stateFamily` + # @return [String] + attr_accessor :state_family + + # If true, this family corresponds to a read operation. + # Corresponds to the JSON property `isRead` + # @return [Boolean] + attr_accessor :is_read + alias_method :is_read?, :is_read + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @state_family = args[:state_family] if args.key?(:state_family) + @is_read = args[:is_read] if args.key?(:is_read) + end + end + # A metric value representing a list of integers. class IntegerList include Google::Apis::Core::Hashable @@ -2018,32 +2846,6 @@ module Google end end - # State family configuration. - class StateFamilyConfig - include Google::Apis::Core::Hashable - - # If true, this family corresponds to a read operation. - # Corresponds to the JSON property `isRead` - # @return [Boolean] - attr_accessor :is_read - alias_method :is_read?, :is_read - - # The state family value. - # Corresponds to the JSON property `stateFamily` - # @return [String] - attr_accessor :state_family - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @is_read = args[:is_read] if args.key?(:is_read) - @state_family = args[:state_family] if args.key?(:state_family) - end - end - # Service-side response to WorkerMessage reporting resource utilization. class ResourceUtilizationReportResponse include Google::Apis::Core::Hashable @@ -2061,11 +2863,6 @@ module Google class SourceSplitResponse include Google::Apis::Core::Hashable - # DEPRECATED in favor of bundles. - # Corresponds to the JSON property `shards` - # @return [Array] - attr_accessor :shards - # Indicates whether splitting happened and produced a list of bundles. # If this is USE_CURRENT_SOURCE_AS_IS, the current source should # be processed "as is" without splitting. "bundles" is ignored in this case. @@ -2082,15 +2879,20 @@ module Google # @return [Array] attr_accessor :bundles + # DEPRECATED in favor of bundles. + # Corresponds to the JSON property `shards` + # @return [Array] + attr_accessor :shards + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @shards = args[:shards] if args.key?(:shards) @outcome = args[:outcome] if args.key?(:outcome) @bundles = args[:bundles] if args.key?(:bundles) + @shards = args[:shards] if args.key?(:shards) end end @@ -2098,6 +2900,30 @@ module Google class ParallelInstruction include Google::Apis::Core::Hashable + # An instruction that does a ParDo operation. + # Takes one main input and zero or more side inputs, and produces + # zero or more outputs. + # Runs user code. + # Corresponds to the JSON property `parDo` + # @return [Google::Apis::DataflowV1b3::ParDoInstruction] + attr_accessor :par_do + + # An instruction that reads records. + # Takes no inputs, produces one output. + # Corresponds to the JSON property `read` + # @return [Google::Apis::DataflowV1b3::ReadInstruction] + attr_accessor :read + + # System-defined name for the operation in the original workflow graph. + # Corresponds to the JSON property `originalName` + # @return [String] + attr_accessor :original_name + + # An instruction that copies its inputs (zero or more) to its (single) output. + # Corresponds to the JSON property `flatten` + # @return [Google::Apis::DataflowV1b3::FlattenInstruction] + attr_accessor :flatten + # An instruction that writes records. # Takes one input, produces no outputs. # Corresponds to the JSON property `write` @@ -2126,45 +2952,21 @@ module Google # @return [String] attr_accessor :name - # An instruction that does a ParDo operation. - # Takes one main input and zero or more side inputs, and produces - # zero or more outputs. - # Runs user code. - # Corresponds to the JSON property `parDo` - # @return [Google::Apis::DataflowV1b3::ParDoInstruction] - attr_accessor :par_do - - # An instruction that reads records. - # Takes no inputs, produces one output. - # Corresponds to the JSON property `read` - # @return [Google::Apis::DataflowV1b3::ReadInstruction] - attr_accessor :read - - # An instruction that copies its inputs (zero or more) to its (single) output. - # Corresponds to the JSON property `flatten` - # @return [Google::Apis::DataflowV1b3::FlattenInstruction] - attr_accessor :flatten - - # System-defined name for the operation in the original workflow graph. - # Corresponds to the JSON property `originalName` - # @return [String] - attr_accessor :original_name - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @par_do = args[:par_do] if args.key?(:par_do) + @read = args[:read] if args.key?(:read) + @original_name = args[:original_name] if args.key?(:original_name) + @flatten = args[:flatten] if args.key?(:flatten) @write = args[:write] if args.key?(:write) @system_name = args[:system_name] if args.key?(:system_name) @partial_group_by_key = args[:partial_group_by_key] if args.key?(:partial_group_by_key) @outputs = args[:outputs] if args.key?(:outputs) @name = args[:name] if args.key?(:name) - @par_do = args[:par_do] if args.key?(:par_do) - @read = args[:read] if args.key?(:read) - @flatten = args[:flatten] if args.key?(:flatten) - @original_name = args[:original_name] if args.key?(:original_name) end end @@ -2287,95 +3089,6 @@ module Google end end - # Describes the state of a metric. - class MetricUpdate - include Google::Apis::Core::Hashable - - # Metric aggregation kind. The possible metric aggregation kinds are - # "Sum", "Max", "Min", "Mean", "Set", "And", and "Or". - # The specified aggregation kind is case-insensitive. - # If omitted, this is not an aggregated value but instead - # a single metric sample value. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Worker-computed aggregate value for aggregation kinds "Sum", "Max", "Min", - # "And", and "Or". The possible value types are Long, Double, and Boolean. - # Corresponds to the JSON property `scalar` - # @return [Object] - attr_accessor :scalar - - # Worker-computed aggregate value for the "Mean" aggregation kind. - # This holds the count of the aggregated values and is used in combination - # with mean_sum above to obtain the actual mean aggregate value. - # The only possible value type is Long. - # Corresponds to the JSON property `meanCount` - # @return [Object] - attr_accessor :mean_count - - # Worker-computed aggregate value for the "Mean" aggregation kind. - # This holds the sum of the aggregated values and is used in combination - # with mean_count below to obtain the actual mean aggregate value. - # The only possible value types are Long and Double. - # Corresponds to the JSON property `meanSum` - # @return [Object] - attr_accessor :mean_sum - - # Timestamp associated with the metric value. Optional when workers are - # reporting work progress; it will be filled in responses from the - # metrics API. - # Corresponds to the JSON property `updateTime` - # @return [String] - attr_accessor :update_time - - # Identifies a metric, by describing the source which generated the - # metric. - # Corresponds to the JSON property `name` - # @return [Google::Apis::DataflowV1b3::MetricStructuredName] - attr_accessor :name - - # Worker-computed aggregate value for the "Set" aggregation kind. The only - # possible value type is a list of Values whose type can be Long, Double, - # or String, according to the metric's type. All Values in the list must - # be of the same type. - # Corresponds to the JSON property `set` - # @return [Object] - attr_accessor :set - - # True if this metric is reported as the total cumulative aggregate - # value accumulated since the worker started working on this WorkItem. - # By default this is false, indicating that this metric is reported - # as a delta that is not associated with any WorkItem. - # Corresponds to the JSON property `cumulative` - # @return [Boolean] - attr_accessor :cumulative - alias_method :cumulative?, :cumulative - - # Worker-computed aggregate value for internal use by the Dataflow - # service. - # Corresponds to the JSON property `internal` - # @return [Object] - attr_accessor :internal - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] if args.key?(:kind) - @scalar = args[:scalar] if args.key?(:scalar) - @mean_count = args[:mean_count] if args.key?(:mean_count) - @mean_sum = args[:mean_sum] if args.key?(:mean_sum) - @update_time = args[:update_time] if args.key?(:update_time) - @name = args[:name] if args.key?(:name) - @set = args[:set] if args.key?(:set) - @cumulative = args[:cumulative] if args.key?(:cumulative) - @internal = args[:internal] if args.key?(:internal) - end - end - # Identifies a counter within a per-job namespace. Counters whose structured # names are the same get merged into a single value for the job. class CounterStructuredName @@ -2441,15 +3154,105 @@ module Google end end + # Describes the state of a metric. + class MetricUpdate + include Google::Apis::Core::Hashable + + # Worker-computed aggregate value for aggregation kinds "Sum", "Max", "Min", + # "And", and "Or". The possible value types are Long, Double, and Boolean. + # Corresponds to the JSON property `scalar` + # @return [Object] + attr_accessor :scalar + + # Worker-computed aggregate value for the "Mean" aggregation kind. + # This holds the count of the aggregated values and is used in combination + # with mean_sum above to obtain the actual mean aggregate value. + # The only possible value type is Long. + # Corresponds to the JSON property `meanCount` + # @return [Object] + attr_accessor :mean_count + + # Worker-computed aggregate value for the "Mean" aggregation kind. + # This holds the sum of the aggregated values and is used in combination + # with mean_count below to obtain the actual mean aggregate value. + # The only possible value types are Long and Double. + # Corresponds to the JSON property `meanSum` + # @return [Object] + attr_accessor :mean_sum + + # Timestamp associated with the metric value. Optional when workers are + # reporting work progress; it will be filled in responses from the + # metrics API. + # Corresponds to the JSON property `updateTime` + # @return [String] + attr_accessor :update_time + + # Identifies a metric, by describing the source which generated the + # metric. + # Corresponds to the JSON property `name` + # @return [Google::Apis::DataflowV1b3::MetricStructuredName] + attr_accessor :name + + # A struct value describing properties of a distribution of numeric values. + # Corresponds to the JSON property `distribution` + # @return [Object] + attr_accessor :distribution + + # Worker-computed aggregate value for the "Set" aggregation kind. The only + # possible value type is a list of Values whose type can be Long, Double, + # or String, according to the metric's type. All Values in the list must + # be of the same type. + # Corresponds to the JSON property `set` + # @return [Object] + attr_accessor :set + + # Worker-computed aggregate value for internal use by the Dataflow + # service. + # Corresponds to the JSON property `internal` + # @return [Object] + attr_accessor :internal + + # True if this metric is reported as the total cumulative aggregate + # value accumulated since the worker started working on this WorkItem. + # By default this is false, indicating that this metric is reported + # as a delta that is not associated with any WorkItem. + # Corresponds to the JSON property `cumulative` + # @return [Boolean] + attr_accessor :cumulative + alias_method :cumulative?, :cumulative + + # Metric aggregation kind. The possible metric aggregation kinds are + # "Sum", "Max", "Min", "Mean", "Set", "And", "Or", and "Distribution". + # The specified aggregation kind is case-insensitive. + # If omitted, this is not an aggregated value but instead + # a single metric sample value. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @scalar = args[:scalar] if args.key?(:scalar) + @mean_count = args[:mean_count] if args.key?(:mean_count) + @mean_sum = args[:mean_sum] if args.key?(:mean_sum) + @update_time = args[:update_time] if args.key?(:update_time) + @name = args[:name] if args.key?(:name) + @distribution = args[:distribution] if args.key?(:distribution) + @set = args[:set] if args.key?(:set) + @internal = args[:internal] if args.key?(:internal) + @cumulative = args[:cumulative] if args.key?(:cumulative) + @kind = args[:kind] if args.key?(:kind) + end + end + # Obsolete in favor of ApproximateReportedProgress and ApproximateSplitRequest. class ApproximateProgress include Google::Apis::Core::Hashable - # Obsolete. - # Corresponds to the JSON property `percentComplete` - # @return [Float] - attr_accessor :percent_complete - # Obsolete. # Corresponds to the JSON property `remainingTime` # @return [String] @@ -2462,15 +3265,20 @@ module Google # @return [Google::Apis::DataflowV1b3::Position] attr_accessor :position + # Obsolete. + # Corresponds to the JSON property `percentComplete` + # @return [Float] + attr_accessor :percent_complete + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @percent_complete = args[:percent_complete] if args.key?(:percent_complete) @remaining_time = args[:remaining_time] if args.key?(:remaining_time) @position = args[:position] if args.key?(:position) + @percent_complete = args[:percent_complete] if args.key?(:percent_complete) end end @@ -2505,6 +3313,11 @@ module Google class TemplateMetadata include Google::Apis::Core::Hashable + # Optional. A description of the template. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + # If true, will bypass the validation that the temp directory is # writable. This should only be used with templates for pipelines # that are guaranteed not to need to write to the temp directory, @@ -2524,21 +3337,16 @@ module Google # @return [Array] attr_accessor :parameters - # Optional. A description of the template. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @description = args[:description] if args.key?(:description) @bypass_temp_dir_validation = args[:bypass_temp_dir_validation] if args.key?(:bypass_temp_dir_validation) @name = args[:name] if args.key?(:name) @parameters = args[:parameters] if args.key?(:parameters) - @description = args[:description] if args.key?(:description) end end @@ -2546,20 +3354,6 @@ module Google class WorkerMessage include Google::Apis::Core::Hashable - # Labels are used to group WorkerMessages. - # For example, a worker_message about a particular container - # might have the labels: - # ` "JOB_ID": "2015-04-22", - # "WORKER_ID": "wordcount-vm-2015…" - # "CONTAINER_TYPE": "worker", - # "CONTAINER_ID": "ac1234def"` - # Label tags typically correspond to Label enum values. However, for ease - # of development other strings can be used as tags. LABEL_UNSPECIFIED should - # not be used here. - # Corresponds to the JSON property `labels` - # @return [Hash] - attr_accessor :labels - # The timestamp of the worker_message. # Corresponds to the JSON property `time` # @return [String] @@ -2591,17 +3385,31 @@ module Google # @return [Google::Apis::DataflowV1b3::ResourceUtilizationReport] attr_accessor :worker_metrics + # Labels are used to group WorkerMessages. + # For example, a worker_message about a particular container + # might have the labels: + # ` "JOB_ID": "2015-04-22", + # "WORKER_ID": "wordcount-vm-2015…" + # "CONTAINER_TYPE": "worker", + # "CONTAINER_ID": "ac1234def"` + # Label tags typically correspond to Label enum values. However, for ease + # of development other strings can be used as tags. LABEL_UNSPECIFIED should + # not be used here. + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @labels = args[:labels] if args.key?(:labels) @time = args[:time] if args.key?(:time) @worker_health_report = args[:worker_health_report] if args.key?(:worker_health_report) @worker_message_code = args[:worker_message_code] if args.key?(:worker_message_code) @worker_metrics = args[:worker_metrics] if args.key?(:worker_metrics) + @labels = args[:labels] if args.key?(:labels) end end @@ -2658,24 +3466,6 @@ module Google class CounterUpdate include Google::Apis::Core::Hashable - # The service-generated short identifier for this counter. - # The short_id -> (name, metadata) mapping is constant for the lifetime of - # a job. - # Corresponds to the JSON property `shortId` - # @return [Fixnum] - attr_accessor :short_id - - # A metric value representing a list of floating point numbers. - # Corresponds to the JSON property `floatingPointList` - # @return [Google::Apis::DataflowV1b3::FloatingPointList] - attr_accessor :floating_point_list - - # A representation of an int64, n, that is immune to precision loss when - # encoded in JSON. - # Corresponds to the JSON property `integer` - # @return [Google::Apis::DataflowV1b3::SplitInt64] - attr_accessor :integer - # A single message which encapsulates structured name and metadata for a given # counter. # Corresponds to the JSON property `structuredNameAndMetadata` @@ -2697,11 +3487,6 @@ module Google # @return [Google::Apis::DataflowV1b3::IntegerMean] attr_accessor :integer_mean - # Value for internally-defined counters used by the Dataflow service. - # Corresponds to the JSON property `internal` - # @return [Object] - attr_accessor :internal - # True if this counter is reported as the total cumulative aggregate # value accumulated since the worker started working on this WorkItem. # By default this is false, indicating that this counter is reported @@ -2711,6 +3496,11 @@ module Google attr_accessor :cumulative alias_method :cumulative?, :cumulative + # Value for internally-defined counters used by the Dataflow service. + # Corresponds to the JSON property `internal` + # @return [Object] + attr_accessor :internal + # A representation of a floating point mean metric contribution. # Corresponds to the JSON property `floatingPointMean` # @return [Google::Apis::DataflowV1b3::FloatingPointMean] @@ -2737,26 +3527,44 @@ module Google # @return [Google::Apis::DataflowV1b3::DistributionUpdate] attr_accessor :distribution + # The service-generated short identifier for this counter. + # The short_id -> (name, metadata) mapping is constant for the lifetime of + # a job. + # Corresponds to the JSON property `shortId` + # @return [Fixnum] + attr_accessor :short_id + + # A metric value representing a list of floating point numbers. + # Corresponds to the JSON property `floatingPointList` + # @return [Google::Apis::DataflowV1b3::FloatingPointList] + attr_accessor :floating_point_list + + # A representation of an int64, n, that is immune to precision loss when + # encoded in JSON. + # Corresponds to the JSON property `integer` + # @return [Google::Apis::DataflowV1b3::SplitInt64] + attr_accessor :integer + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @short_id = args[:short_id] if args.key?(:short_id) - @floating_point_list = args[:floating_point_list] if args.key?(:floating_point_list) - @integer = args[:integer] if args.key?(:integer) @structured_name_and_metadata = args[:structured_name_and_metadata] if args.key?(:structured_name_and_metadata) @integer_list = args[:integer_list] if args.key?(:integer_list) @floating_point = args[:floating_point] if args.key?(:floating_point) @integer_mean = args[:integer_mean] if args.key?(:integer_mean) - @internal = args[:internal] if args.key?(:internal) @cumulative = args[:cumulative] if args.key?(:cumulative) + @internal = args[:internal] if args.key?(:internal) @floating_point_mean = args[:floating_point_mean] if args.key?(:floating_point_mean) @boolean = args[:boolean] if args.key?(:boolean) @name_and_kind = args[:name_and_kind] if args.key?(:name_and_kind) @string_list = args[:string_list] if args.key?(:string_list) @distribution = args[:distribution] if args.key?(:distribution) + @short_id = args[:short_id] if args.key?(:short_id) + @floating_point_list = args[:floating_point_list] if args.key?(:floating_point_list) + @integer = args[:integer] if args.key?(:integer) end end @@ -2802,12 +3610,6 @@ module Google class DistributionUpdate include Google::Apis::Core::Hashable - # A representation of an int64, n, that is immune to precision loss when - # encoded in JSON. - # Corresponds to the JSON property `count` - # @return [Google::Apis::DataflowV1b3::SplitInt64] - attr_accessor :count - # A representation of an int64, n, that is immune to precision loss when # encoded in JSON. # Corresponds to the JSON property `min` @@ -2819,17 +3621,29 @@ module Google # @return [Float] attr_accessor :sum_of_squares + # A representation of an int64, n, that is immune to precision loss when + # encoded in JSON. + # Corresponds to the JSON property `sum` + # @return [Google::Apis::DataflowV1b3::SplitInt64] + attr_accessor :sum + # A representation of an int64, n, that is immune to precision loss when # encoded in JSON. # Corresponds to the JSON property `max` # @return [Google::Apis::DataflowV1b3::SplitInt64] attr_accessor :max + # (Optional) Logarithmic histogram of values. + # Each log may be in no more than one bucket. Order does not matter. + # Corresponds to the JSON property `logBuckets` + # @return [Array] + attr_accessor :log_buckets + # A representation of an int64, n, that is immune to precision loss when # encoded in JSON. - # Corresponds to the JSON property `sum` + # Corresponds to the JSON property `count` # @return [Google::Apis::DataflowV1b3::SplitInt64] - attr_accessor :sum + attr_accessor :count def initialize(**args) update!(**args) @@ -2837,11 +3651,12 @@ module Google # Update properties of this object def update!(**args) - @count = args[:count] if args.key?(:count) @min = args[:min] if args.key?(:min) @sum_of_squares = args[:sum_of_squares] if args.key?(:sum_of_squares) - @max = args[:max] if args.key?(:max) @sum = args[:sum] if args.key?(:sum) + @max = args[:max] if args.key?(:max) + @log_buckets = args[:log_buckets] if args.key?(:log_buckets) + @count = args[:count] if args.key?(:count) end end @@ -2872,6 +3687,11 @@ module Google class SourceFork include Google::Apis::Core::Hashable + # DEPRECATED in favor of DerivedSource. + # Corresponds to the JSON property `primary` + # @return [Google::Apis::DataflowV1b3::SourceSplitShard] + attr_accessor :primary + # Specification of one of the bundles produced as a result of splitting # a Source (e.g. when executing a SourceSplitRequest, or when # splitting an active task using WorkItemStatus.dynamic_source_split), @@ -2893,21 +3713,16 @@ module Google # @return [Google::Apis::DataflowV1b3::DerivedSource] attr_accessor :residual_source - # DEPRECATED in favor of DerivedSource. - # Corresponds to the JSON property `primary` - # @return [Google::Apis::DataflowV1b3::SourceSplitShard] - attr_accessor :primary - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @primary = args[:primary] if args.key?(:primary) @primary_source = args[:primary_source] if args.key?(:primary_source) @residual = args[:residual] if args.key?(:residual) @residual_source = args[:residual_source] if args.key?(:residual_source) - @primary = args[:primary] if args.key?(:primary) end end @@ -2915,6 +3730,42 @@ module Google class WorkItemStatus include Google::Apis::Core::Hashable + # Worker output counters for this WorkItem. + # Corresponds to the JSON property `counterUpdates` + # @return [Array] + attr_accessor :counter_updates + + # Identifies the WorkItem. + # Corresponds to the JSON property `workItemId` + # @return [String] + attr_accessor :work_item_id + + # DEPRECATED in favor of counter_updates. + # Corresponds to the JSON property `metricUpdates` + # @return [Array] + attr_accessor :metric_updates + + # Specifies errors which occurred during processing. If errors are + # provided, and completed = true, then the WorkItem is considered + # to have failed. + # Corresponds to the JSON property `errors` + # @return [Array] + attr_accessor :errors + + # When a task splits using WorkItemStatus.dynamic_source_split, this + # message describes the two parts of the split relative to the + # description of the current task's input. + # Corresponds to the JSON property `dynamicSourceSplit` + # @return [Google::Apis::DataflowV1b3::DynamicSourceSplit] + attr_accessor :dynamic_source_split + + # The result of a SourceOperationRequest, specified in + # ReportWorkItemStatusRequest.source_operation when the work item + # is completed. + # Corresponds to the JSON property `sourceOperationResponse` + # @return [Google::Apis::DataflowV1b3::SourceOperationResponse] + attr_accessor :source_operation_response + # Obsolete in favor of ApproximateReportedProgress and ApproximateSplitRequest. # Corresponds to the JSON property `progress` # @return [Google::Apis::DataflowV1b3::ApproximateProgress] @@ -2963,48 +3814,18 @@ module Google # @return [Google::Apis::DataflowV1b3::SourceFork] attr_accessor :source_fork - # Worker output counters for this WorkItem. - # Corresponds to the JSON property `counterUpdates` - # @return [Array] - attr_accessor :counter_updates - - # Identifies the WorkItem. - # Corresponds to the JSON property `workItemId` - # @return [String] - attr_accessor :work_item_id - - # DEPRECATED in favor of counter_updates. - # Corresponds to the JSON property `metricUpdates` - # @return [Array] - attr_accessor :metric_updates - - # Specifies errors which occurred during processing. If errors are - # provided, and completed = true, then the WorkItem is considered - # to have failed. - # Corresponds to the JSON property `errors` - # @return [Array] - attr_accessor :errors - - # When a task splits using WorkItemStatus.dynamic_source_split, this - # message describes the two parts of the split relative to the - # description of the current task's input. - # Corresponds to the JSON property `dynamicSourceSplit` - # @return [Google::Apis::DataflowV1b3::DynamicSourceSplit] - attr_accessor :dynamic_source_split - - # The result of a SourceOperationRequest, specified in - # ReportWorkItemStatusRequest.source_operation when the work item - # is completed. - # Corresponds to the JSON property `sourceOperationResponse` - # @return [Google::Apis::DataflowV1b3::SourceOperationResponse] - attr_accessor :source_operation_response - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @counter_updates = args[:counter_updates] if args.key?(:counter_updates) + @work_item_id = args[:work_item_id] if args.key?(:work_item_id) + @metric_updates = args[:metric_updates] if args.key?(:metric_updates) + @errors = args[:errors] if args.key?(:errors) + @dynamic_source_split = args[:dynamic_source_split] if args.key?(:dynamic_source_split) + @source_operation_response = args[:source_operation_response] if args.key?(:source_operation_response) @progress = args[:progress] if args.key?(:progress) @requested_lease_duration = args[:requested_lease_duration] if args.key?(:requested_lease_duration) @report_index = args[:report_index] if args.key?(:report_index) @@ -3012,12 +3833,6 @@ module Google @completed = args[:completed] if args.key?(:completed) @reported_progress = args[:reported_progress] if args.key?(:reported_progress) @source_fork = args[:source_fork] if args.key?(:source_fork) - @counter_updates = args[:counter_updates] if args.key?(:counter_updates) - @work_item_id = args[:work_item_id] if args.key?(:work_item_id) - @metric_updates = args[:metric_updates] if args.key?(:metric_updates) - @errors = args[:errors] if args.key?(:errors) - @dynamic_source_split = args[:dynamic_source_split] if args.key?(:dynamic_source_split) - @source_operation_response = args[:source_operation_response] if args.key?(:source_operation_response) end end @@ -3059,10 +3874,15 @@ module Google class WorkItemServiceState include Google::Apis::Core::Hashable - # New recommended reporting interval. - # Corresponds to the JSON property `reportStatusInterval` - # @return [String] - attr_accessor :report_status_interval + # Obsolete in favor of ApproximateReportedProgress and ApproximateSplitRequest. + # Corresponds to the JSON property `suggestedStopPoint` + # @return [Google::Apis::DataflowV1b3::ApproximateProgress] + attr_accessor :suggested_stop_point + + # A suggestion by the service to the worker to dynamically split the WorkItem. + # Corresponds to the JSON property `splitRequest` + # @return [Google::Apis::DataflowV1b3::ApproximateSplitRequest] + attr_accessor :split_request # Position defines a position within a collection of data. The value # can be either the end position, a key (used with ordered @@ -3071,6 +3891,11 @@ module Google # @return [Google::Apis::DataflowV1b3::Position] attr_accessor :suggested_stop_position + # New recommended reporting interval. + # Corresponds to the JSON property `reportStatusInterval` + # @return [String] + attr_accessor :report_status_interval + # Other data returned by the service, specific to the particular # worker harness. # Corresponds to the JSON property `harnessData` @@ -3099,30 +3924,20 @@ module Google # @return [Fixnum] attr_accessor :next_report_index - # Obsolete in favor of ApproximateReportedProgress and ApproximateSplitRequest. - # Corresponds to the JSON property `suggestedStopPoint` - # @return [Google::Apis::DataflowV1b3::ApproximateProgress] - attr_accessor :suggested_stop_point - - # A suggestion by the service to the worker to dynamically split the WorkItem. - # Corresponds to the JSON property `splitRequest` - # @return [Google::Apis::DataflowV1b3::ApproximateSplitRequest] - attr_accessor :split_request - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @report_status_interval = args[:report_status_interval] if args.key?(:report_status_interval) + @suggested_stop_point = args[:suggested_stop_point] if args.key?(:suggested_stop_point) + @split_request = args[:split_request] if args.key?(:split_request) @suggested_stop_position = args[:suggested_stop_position] if args.key?(:suggested_stop_position) + @report_status_interval = args[:report_status_interval] if args.key?(:report_status_interval) @harness_data = args[:harness_data] if args.key?(:harness_data) @lease_expire_time = args[:lease_expire_time] if args.key?(:lease_expire_time) @metric_short_id = args[:metric_short_id] if args.key?(:metric_short_id) @next_report_index = args[:next_report_index] if args.key?(:next_report_index) - @suggested_stop_point = args[:suggested_stop_point] if args.key?(:suggested_stop_point) - @split_request = args[:split_request] if args.key?(:split_request) end end @@ -3167,24 +3982,24 @@ module Google class SeqMapTaskOutputInfo include Google::Apis::Core::Hashable - # A sink that records can be encoded and written to. - # Corresponds to the JSON property `sink` - # @return [Google::Apis::DataflowV1b3::Sink] - attr_accessor :sink - # The id of the TupleTag the user code will tag the output value by. # Corresponds to the JSON property `tag` # @return [String] attr_accessor :tag + # A sink that records can be encoded and written to. + # Corresponds to the JSON property `sink` + # @return [Google::Apis::DataflowV1b3::Sink] + attr_accessor :sink + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @sink = args[:sink] if args.key?(:sink) @tag = args[:tag] if args.key?(:tag) + @sink = args[:sink] if args.key?(:sink) end end @@ -3216,6 +4031,18 @@ module Google class KeyRangeLocation include Google::Apis::Core::Hashable + # DEPRECATED. The location of the persistent state for this range, as a + # persistent directory in the worker local filesystem. + # Corresponds to the JSON property `deprecatedPersistentDirectory` + # @return [String] + attr_accessor :deprecated_persistent_directory + + # The physical location of this range assignment to be used for + # streaming computation cross-worker message delivery. + # Corresponds to the JSON property `deliveryEndpoint` + # @return [String] + attr_accessor :delivery_endpoint + # The start (inclusive) of the key range. # Corresponds to the JSON property `start` # @return [String] @@ -3234,29 +4061,17 @@ module Google # @return [String] attr_accessor :end - # DEPRECATED. The location of the persistent state for this range, as a - # persistent directory in the worker local filesystem. - # Corresponds to the JSON property `deprecatedPersistentDirectory` - # @return [String] - attr_accessor :deprecated_persistent_directory - - # The physical location of this range assignment to be used for - # streaming computation cross-worker message delivery. - # Corresponds to the JSON property `deliveryEndpoint` - # @return [String] - attr_accessor :delivery_endpoint - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @deprecated_persistent_directory = args[:deprecated_persistent_directory] if args.key?(:deprecated_persistent_directory) + @delivery_endpoint = args[:delivery_endpoint] if args.key?(:delivery_endpoint) @start = args[:start] if args.key?(:start) @data_disk = args[:data_disk] if args.key?(:data_disk) @end = args[:end] if args.key?(:end) - @deprecated_persistent_directory = args[:deprecated_persistent_directory] if args.key?(:deprecated_persistent_directory) - @delivery_endpoint = args[:delivery_endpoint] if args.key?(:delivery_endpoint) end end @@ -3283,24 +4098,24 @@ module Google class NameAndKind include Google::Apis::Core::Hashable - # Counter aggregation kind. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - # Name of the counter. # Corresponds to the JSON property `name` # @return [String] attr_accessor :name + # Counter aggregation kind. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @kind = args[:kind] if args.key?(:kind) @name = args[:name] if args.key?(:name) + @kind = args[:kind] if args.key?(:kind) end end @@ -3308,6 +4123,21 @@ module Google class SeqMapTask include Google::Apis::Core::Hashable + # The user-provided name of the SeqDo operation. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Information about each of the outputs. + # Corresponds to the JSON property `outputInfos` + # @return [Array] + attr_accessor :output_infos + + # Information about each of the inputs. + # Corresponds to the JSON property `inputs` + # @return [Array] + attr_accessor :inputs + # System-defined name of the SeqDo operation. # Unique across the workflow. # Corresponds to the JSON property `systemName` @@ -3325,33 +4155,18 @@ module Google # @return [Hash] attr_accessor :user_fn - # The user-provided name of the SeqDo operation. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Information about each of the outputs. - # Corresponds to the JSON property `outputInfos` - # @return [Array] - attr_accessor :output_infos - - # Information about each of the inputs. - # Corresponds to the JSON property `inputs` - # @return [Array] - attr_accessor :inputs - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @system_name = args[:system_name] if args.key?(:system_name) - @stage_name = args[:stage_name] if args.key?(:stage_name) - @user_fn = args[:user_fn] if args.key?(:user_fn) @name = args[:name] if args.key?(:name) @output_infos = args[:output_infos] if args.key?(:output_infos) @inputs = args[:inputs] if args.key?(:inputs) + @system_name = args[:system_name] if args.key?(:system_name) + @stage_name = args[:stage_name] if args.key?(:stage_name) + @user_fn = args[:user_fn] if args.key?(:user_fn) end end @@ -3366,19 +4181,6 @@ module Google class WorkerMessageCode include Google::Apis::Core::Hashable - # The code is a string intended for consumption by a machine that identifies - # the type of message being sent. - # Examples: - # 1. "HARNESS_STARTED" might be used to indicate the worker harness has - # started. - # 2. "GCS_DOWNLOAD_ERROR" might be used to indicate an error downloading - # a GCS file as part of the boot process of one of the worker containers. - # This is a string and not an enum to make it easy to add new codes without - # waiting for an API change. - # Corresponds to the JSON property `code` - # @return [String] - attr_accessor :code - # Parameters contains specific information about the code. # This is a struct to allow parameters of different types. # Examples: @@ -3399,14 +4201,27 @@ module Google # @return [Hash] attr_accessor :parameters + # The code is a string intended for consumption by a machine that identifies + # the type of message being sent. + # Examples: + # 1. "HARNESS_STARTED" might be used to indicate the worker harness has + # started. + # 2. "GCS_DOWNLOAD_ERROR" might be used to indicate an error downloading + # a GCS file as part of the boot process of one of the worker containers. + # This is a string and not an enum to make it easy to add new codes without + # waiting for an API change. + # Corresponds to the JSON property `code` + # @return [String] + attr_accessor :code + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @code = args[:code] if args.key?(:code) @parameters = args[:parameters] if args.key?(:parameters) + @code = args[:code] if args.key?(:code) end end @@ -3519,6 +4334,32 @@ module Google class InstructionOutput include Google::Apis::Core::Hashable + # System-defined name for this output in the original workflow graph. + # Outputs that do not contribute to an original instruction do not set this. + # Corresponds to the JSON property `originalName` + # @return [String] + attr_accessor :original_name + + # For system-generated byte and mean byte metrics, certain instructions + # should only report the key size. + # Corresponds to the JSON property `onlyCountKeyBytes` + # @return [Boolean] + attr_accessor :only_count_key_bytes + alias_method :only_count_key_bytes?, :only_count_key_bytes + + # System-defined name of this output. + # Unique across the workflow. + # Corresponds to the JSON property `systemName` + # @return [String] + attr_accessor :system_name + + # For system-generated byte and mean byte metrics, certain instructions + # should only report the value size. + # Corresponds to the JSON property `onlyCountValueBytes` + # @return [Boolean] + attr_accessor :only_count_value_bytes + alias_method :only_count_value_bytes?, :only_count_value_bytes + # The codec to use to encode data being written via this output. # Corresponds to the JSON property `codec` # @return [Hash] @@ -3529,44 +4370,18 @@ module Google # @return [String] attr_accessor :name - # System-defined name for this output in the original workflow graph. - # Outputs that do not contribute to an original instruction do not set this. - # Corresponds to the JSON property `originalName` - # @return [String] - attr_accessor :original_name - - # System-defined name of this output. - # Unique across the workflow. - # Corresponds to the JSON property `systemName` - # @return [String] - attr_accessor :system_name - - # For system-generated byte and mean byte metrics, certain instructions - # should only report the key size. - # Corresponds to the JSON property `onlyCountKeyBytes` - # @return [Boolean] - attr_accessor :only_count_key_bytes - alias_method :only_count_key_bytes?, :only_count_key_bytes - - # For system-generated byte and mean byte metrics, certain instructions - # should only report the value size. - # Corresponds to the JSON property `onlyCountValueBytes` - # @return [Boolean] - attr_accessor :only_count_value_bytes - alias_method :only_count_value_bytes?, :only_count_value_bytes - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @original_name = args[:original_name] if args.key?(:original_name) + @only_count_key_bytes = args[:only_count_key_bytes] if args.key?(:only_count_key_bytes) + @system_name = args[:system_name] if args.key?(:system_name) + @only_count_value_bytes = args[:only_count_value_bytes] if args.key?(:only_count_value_bytes) @codec = args[:codec] if args.key?(:codec) @name = args[:name] if args.key?(:name) - @original_name = args[:original_name] if args.key?(:original_name) - @system_name = args[:system_name] if args.key?(:system_name) - @only_count_key_bytes = args[:only_count_key_bytes] if args.key?(:only_count_key_bytes) - @only_count_value_bytes = args[:only_count_value_bytes] if args.key?(:only_count_value_bytes) end end @@ -3574,6 +4389,16 @@ module Google class CreateJobFromTemplateRequest include Google::Apis::Core::Hashable + # The environment values to set at runtime. + # Corresponds to the JSON property `environment` + # @return [Google::Apis::DataflowV1b3::RuntimeEnvironment] + attr_accessor :environment + + # The location to which to direct the request. + # Corresponds to the JSON property `location` + # @return [String] + attr_accessor :location + # The runtime parameters to pass to the job. # Corresponds to the JSON property `parameters` # @return [Hash] @@ -3591,21 +4416,17 @@ module Google # @return [String] attr_accessor :gcs_path - # The environment values to set at runtime. - # Corresponds to the JSON property `environment` - # @return [Google::Apis::DataflowV1b3::RuntimeEnvironment] - attr_accessor :environment - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @environment = args[:environment] if args.key?(:environment) + @location = args[:location] if args.key?(:location) @parameters = args[:parameters] if args.key?(:parameters) @job_name = args[:job_name] if args.key?(:job_name) @gcs_path = args[:gcs_path] if args.key?(:gcs_path) - @environment = args[:environment] if args.key?(:environment) end end @@ -3641,6 +4462,11 @@ module Google class ListJobsResponse include Google::Apis::Core::Hashable + # A subset of the requested job information. + # Corresponds to the JSON property `jobs` + # @return [Array] + attr_accessor :jobs + # Set if there may be more results than fit in this response. # Corresponds to the JSON property `nextPageToken` # @return [String] @@ -3651,20 +4477,15 @@ module Google # @return [Array] attr_accessor :failed_location - # A subset of the requested job information. - # Corresponds to the JSON property `jobs` - # @return [Array] - attr_accessor :jobs - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @jobs = args[:jobs] if args.key?(:jobs) @next_page_token = args[:next_page_token] if args.key?(:next_page_token) @failed_location = args[:failed_location] if args.key?(:failed_location) - @jobs = args[:jobs] if args.key?(:jobs) end end @@ -3672,21 +4493,16 @@ module Google class ComputationTopology include Google::Apis::Core::Hashable - # The user stage name. - # Corresponds to the JSON property `userStageName` - # @return [String] - attr_accessor :user_stage_name + # The state family values. + # Corresponds to the JSON property `stateFamilies` + # @return [Array] + attr_accessor :state_families # The outputs from the computation. # Corresponds to the JSON property `outputs` # @return [Array] attr_accessor :outputs - # The state family values. - # Corresponds to the JSON property `stateFamilies` - # @return [Array] - attr_accessor :state_families - # The system stage name. # Corresponds to the JSON property `systemStageName` # @return [String] @@ -3713,9 +4529,8 @@ module Google # Update properties of this object def update!(**args) - @user_stage_name = args[:user_stage_name] if args.key?(:user_stage_name) - @outputs = args[:outputs] if args.key?(:outputs) @state_families = args[:state_families] if args.key?(:state_families) + @outputs = args[:outputs] if args.key?(:outputs) @system_stage_name = args[:system_stage_name] if args.key?(:system_stage_name) @inputs = args[:inputs] if args.key?(:inputs) @computation_id = args[:computation_id] if args.key?(:computation_id) @@ -3727,6 +4542,26 @@ module Google class RuntimeEnvironment include Google::Apis::Core::Hashable + # The Compute Engine [availability + # zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones) + # for launching worker instances to run your pipeline. + # Corresponds to the JSON property `zone` + # @return [String] + attr_accessor :zone + + # The maximum number of Google Compute Engine instances to be made + # available to your pipeline during execution, from 1 to 1000. + # Corresponds to the JSON property `maxWorkers` + # @return [Fixnum] + attr_accessor :max_workers + + # Whether to bypass the safety checks for the job's temporary directory. + # Use with caution. + # Corresponds to the JSON property `bypassTempDirValidation` + # @return [Boolean] + attr_accessor :bypass_temp_dir_validation + alias_method :bypass_temp_dir_validation?, :bypass_temp_dir_validation + # The email address of the service account to run the job as. # Corresponds to the JSON property `serviceAccountEmail` # @return [String] @@ -3738,25 +4573,11 @@ module Google # @return [String] attr_accessor :temp_location - # Whether to bypass the safety checks for the job's temporary directory. - # Use with caution. - # Corresponds to the JSON property `bypassTempDirValidation` - # @return [Boolean] - attr_accessor :bypass_temp_dir_validation - alias_method :bypass_temp_dir_validation?, :bypass_temp_dir_validation - - # The maximum number of Google Compute Engine instances to be made - # available to your pipeline during execution, from 1 to 1000. - # Corresponds to the JSON property `maxWorkers` - # @return [Fixnum] - attr_accessor :max_workers - - # The Compute Engine [availability zone](https://cloud.google.com/compute/docs/ - # regions-zones/regions-zones) - # for launching worker instances to run your pipeline. - # Corresponds to the JSON property `zone` + # The machine type to use for the job. Defaults to the value from the + # template if not specified. + # Corresponds to the JSON property `machineType` # @return [String] - attr_accessor :zone + attr_accessor :machine_type def initialize(**args) update!(**args) @@ -3764,11 +4585,34 @@ module Google # Update properties of this object def update!(**args) + @zone = args[:zone] if args.key?(:zone) + @max_workers = args[:max_workers] if args.key?(:max_workers) + @bypass_temp_dir_validation = args[:bypass_temp_dir_validation] if args.key?(:bypass_temp_dir_validation) @service_account_email = args[:service_account_email] if args.key?(:service_account_email) @temp_location = args[:temp_location] if args.key?(:temp_location) - @bypass_temp_dir_validation = args[:bypass_temp_dir_validation] if args.key?(:bypass_temp_dir_validation) - @max_workers = args[:max_workers] if args.key?(:max_workers) - @zone = args[:zone] if args.key?(:zone) + @machine_type = args[:machine_type] if args.key?(:machine_type) + end + end + + # Describes mounted data disk. + class MountedDataDisk + include Google::Apis::Core::Hashable + + # The name of the data disk. + # This name is local to the Google Cloud Platform project and uniquely + # identifies the disk within that project, for example + # "myproject-1014-104817-4c2-harness-0-disk-1". + # Corresponds to the JSON property `dataDisk` + # @return [String] + attr_accessor :data_disk + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @data_disk = args[:data_disk] if args.key?(:data_disk) end end @@ -3797,28 +4641,6 @@ module Google end end - # Describes mounted data disk. - class MountedDataDisk - include Google::Apis::Core::Hashable - - # The name of the data disk. - # This name is local to the Google Cloud Platform project and uniquely - # identifies the disk within that project, for example - # "myproject-1014-104817-4c2-harness-0-disk-1". - # Corresponds to the JSON property `dataDisk` - # @return [String] - attr_accessor :data_disk - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @data_disk = args[:data_disk] if args.key?(:data_disk) - end - end - # Response to the request to launch a template. class LaunchTemplateResponse include Google::Apis::Core::Hashable @@ -3838,71 +4660,27 @@ module Google end end - # Specification of one of the bundles produced as a result of splitting - # a Source (e.g. when executing a SourceSplitRequest, or when - # splitting an active task using WorkItemStatus.dynamic_source_split), - # relative to the source being split. - class DerivedSource - include Google::Apis::Core::Hashable - - # What source to base the produced source on (if any). - # Corresponds to the JSON property `derivationMode` - # @return [String] - attr_accessor :derivation_mode - - # A source that records can be read and decoded from. - # Corresponds to the JSON property `source` - # @return [Google::Apis::DataflowV1b3::Source] - attr_accessor :source - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @derivation_mode = args[:derivation_mode] if args.key?(:derivation_mode) - @source = args[:source] if args.key?(:source) - end - end - - # When a task splits using WorkItemStatus.dynamic_source_split, this - # message describes the two parts of the split relative to the - # description of the current task's input. - class DynamicSourceSplit - include Google::Apis::Core::Hashable - - # Specification of one of the bundles produced as a result of splitting - # a Source (e.g. when executing a SourceSplitRequest, or when - # splitting an active task using WorkItemStatus.dynamic_source_split), - # relative to the source being split. - # Corresponds to the JSON property `residual` - # @return [Google::Apis::DataflowV1b3::DerivedSource] - attr_accessor :residual - - # Specification of one of the bundles produced as a result of splitting - # a Source (e.g. when executing a SourceSplitRequest, or when - # splitting an active task using WorkItemStatus.dynamic_source_split), - # relative to the source being split. - # Corresponds to the JSON property `primary` - # @return [Google::Apis::DataflowV1b3::DerivedSource] - attr_accessor :primary - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @residual = args[:residual] if args.key?(:residual) - @primary = args[:primary] if args.key?(:primary) - end - end - # Defines a job to be run by the Cloud Dataflow service. class Job include Google::Apis::Core::Hashable + # The ID of the Cloud Platform project that the job belongs to. + # Corresponds to the JSON property `projectId` + # @return [String] + attr_accessor :project_id + + # The type of Cloud Dataflow job. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # A descriptive representation of submitted pipeline as well as the executed + # form. This data is provided by the Dataflow service for ease of visualizing + # the pipeline and interpretting Dataflow provided metrics. + # Corresponds to the JSON property `pipelineDescription` + # @return [Google::Apis::DataflowV1b3::PipelineDescription] + attr_accessor :pipeline_description + # If this job is an update of an existing job, this field is the job ID # of the job it replaced. # When sending a `CreateJobRequest`, you can update a job by specifying it @@ -4009,17 +4787,6 @@ module Google # @return [Hash] attr_accessor :transform_name_mapping - # The timestamp when the job was initially created. Immutable and set by the - # Cloud Dataflow service. - # Corresponds to the JSON property `createTime` - # @return [String] - attr_accessor :create_time - - # Describes the environment in which a Dataflow Job runs. - # Corresponds to the JSON property `environment` - # @return [Google::Apis::DataflowV1b3::Environment] - attr_accessor :environment - # User-defined labels for this job. # The labels map can contain no more than 64 entries. Entries of the labels # map are UTF8 strings that comply with the following restrictions: @@ -4031,22 +4798,22 @@ module Google # @return [Hash] attr_accessor :labels - # The type of Cloud Dataflow job. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type + # Describes the environment in which a Dataflow Job runs. + # Corresponds to the JSON property `environment` + # @return [Google::Apis::DataflowV1b3::Environment] + attr_accessor :environment - # The ID of the Cloud Platform project that the job belongs to. - # Corresponds to the JSON property `projectId` + # The timestamp when the job was initially created. Immutable and set by the + # Cloud Dataflow service. + # Corresponds to the JSON property `createTime` # @return [String] - attr_accessor :project_id + attr_accessor :create_time - # A descriptive representation of submitted pipeline as well as the executed - # form. This data is provided by the Dataflow service for ease of visualizing - # the pipeline and interpretting Dataflow provided metrics. - # Corresponds to the JSON property `pipelineDescription` - # @return [Google::Apis::DataflowV1b3::PipelineDescription] - attr_accessor :pipeline_description + # This field may be mutated by the Cloud Dataflow service; + # callers cannot mutate it. + # Corresponds to the JSON property `stageStates` + # @return [Array] + attr_accessor :stage_states def initialize(**args) update!(**args) @@ -4054,6 +4821,9 @@ module Google # Update properties of this object def update!(**args) + @project_id = args[:project_id] if args.key?(:project_id) + @type = args[:type] if args.key?(:type) + @pipeline_description = args[:pipeline_description] if args.key?(:pipeline_description) @replace_job_id = args[:replace_job_id] if args.key?(:replace_job_id) @requested_state = args[:requested_state] if args.key?(:requested_state) @temp_files = args[:temp_files] if args.key?(:temp_files) @@ -4067,12 +4837,71 @@ module Google @location = args[:location] if args.key?(:location) @current_state_time = args[:current_state_time] if args.key?(:current_state_time) @transform_name_mapping = args[:transform_name_mapping] if args.key?(:transform_name_mapping) - @create_time = args[:create_time] if args.key?(:create_time) - @environment = args[:environment] if args.key?(:environment) @labels = args[:labels] if args.key?(:labels) - @type = args[:type] if args.key?(:type) - @project_id = args[:project_id] if args.key?(:project_id) - @pipeline_description = args[:pipeline_description] if args.key?(:pipeline_description) + @environment = args[:environment] if args.key?(:environment) + @create_time = args[:create_time] if args.key?(:create_time) + @stage_states = args[:stage_states] if args.key?(:stage_states) + end + end + + # When a task splits using WorkItemStatus.dynamic_source_split, this + # message describes the two parts of the split relative to the + # description of the current task's input. + class DynamicSourceSplit + include Google::Apis::Core::Hashable + + # Specification of one of the bundles produced as a result of splitting + # a Source (e.g. when executing a SourceSplitRequest, or when + # splitting an active task using WorkItemStatus.dynamic_source_split), + # relative to the source being split. + # Corresponds to the JSON property `residual` + # @return [Google::Apis::DataflowV1b3::DerivedSource] + attr_accessor :residual + + # Specification of one of the bundles produced as a result of splitting + # a Source (e.g. when executing a SourceSplitRequest, or when + # splitting an active task using WorkItemStatus.dynamic_source_split), + # relative to the source being split. + # Corresponds to the JSON property `primary` + # @return [Google::Apis::DataflowV1b3::DerivedSource] + attr_accessor :primary + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @residual = args[:residual] if args.key?(:residual) + @primary = args[:primary] if args.key?(:primary) + end + end + + # Specification of one of the bundles produced as a result of splitting + # a Source (e.g. when executing a SourceSplitRequest, or when + # splitting an active task using WorkItemStatus.dynamic_source_split), + # relative to the source being split. + class DerivedSource + include Google::Apis::Core::Hashable + + # What source to base the produced source on (if any). + # Corresponds to the JSON property `derivationMode` + # @return [String] + attr_accessor :derivation_mode + + # A source that records can be read and decoded from. + # Corresponds to the JSON property `source` + # @return [Google::Apis::DataflowV1b3::Source] + attr_accessor :source + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @derivation_mode = args[:derivation_mode] if args.key?(:derivation_mode) + @source = args[:source] if args.key?(:source) end end @@ -4082,24 +4911,38 @@ module Google class SourceOperationResponse include Google::Apis::Core::Hashable - # The result of a SourceGetMetadataOperation. - # Corresponds to the JSON property `getMetadata` - # @return [Google::Apis::DataflowV1b3::SourceGetMetadataResponse] - attr_accessor :get_metadata - # The response to a SourceSplitRequest. # Corresponds to the JSON property `split` # @return [Google::Apis::DataflowV1b3::SourceSplitResponse] attr_accessor :split + # The result of a SourceGetMetadataOperation. + # Corresponds to the JSON property `getMetadata` + # @return [Google::Apis::DataflowV1b3::SourceGetMetadataResponse] + attr_accessor :get_metadata + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @get_metadata = args[:get_metadata] if args.key?(:get_metadata) @split = args[:split] if args.key?(:split) + @get_metadata = args[:get_metadata] if args.key?(:get_metadata) + end + end + + # Response to a send capture request. + # nothing + class SendDebugCaptureResponse + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) end end @@ -4138,20 +4981,6 @@ module Google end end - # Response to a send capture request. - # nothing - class SendDebugCaptureResponse - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - # A single message which encapsulates structured name and metadata for a given # counter. class CounterStructuredNameAndMetadata @@ -4213,25 +5042,50 @@ module Google class WriteInstruction include Google::Apis::Core::Hashable - # A sink that records can be encoded and written to. - # Corresponds to the JSON property `sink` - # @return [Google::Apis::DataflowV1b3::Sink] - attr_accessor :sink - # An input of an instruction, as a reference to an output of a # producer instruction. # Corresponds to the JSON property `input` # @return [Google::Apis::DataflowV1b3::InstructionInput] attr_accessor :input + # A sink that records can be encoded and written to. + # Corresponds to the JSON property `sink` + # @return [Google::Apis::DataflowV1b3::Sink] + attr_accessor :sink + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @sink = args[:sink] if args.key?(:sink) @input = args[:input] if args.key?(:input) + @sink = args[:sink] if args.key?(:sink) + end + end + + # Settings for WorkerPool autoscaling. + class AutoscalingSettings + include Google::Apis::Core::Hashable + + # The algorithm to use for autoscaling. + # Corresponds to the JSON property `algorithm` + # @return [String] + attr_accessor :algorithm + + # The maximum number of workers to cap scaling at. + # Corresponds to the JSON property `maxNumWorkers` + # @return [Fixnum] + attr_accessor :max_num_workers + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @algorithm = args[:algorithm] if args.key?(:algorithm) + @max_num_workers = args[:max_num_workers] if args.key?(:max_num_workers) end end @@ -4261,42 +5115,12 @@ module Google end end - # Settings for WorkerPool autoscaling. - class AutoscalingSettings - include Google::Apis::Core::Hashable - - # The algorithm to use for autoscaling. - # Corresponds to the JSON property `algorithm` - # @return [String] - attr_accessor :algorithm - - # The maximum number of workers to cap scaling at. - # Corresponds to the JSON property `maxNumWorkers` - # @return [Fixnum] - attr_accessor :max_num_workers - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @algorithm = args[:algorithm] if args.key?(:algorithm) - @max_num_workers = args[:max_num_workers] if args.key?(:max_num_workers) - end - end - # Description of the composing transforms, names/ids, and input/outputs of a # stage of execution. Some composing transforms and sources may have been # generated by the Dataflow service during execution planning. class ExecutionStageSummary include Google::Apis::Core::Hashable - # Input sources for this stage. - # Corresponds to the JSON property `inputSource` - # @return [Array] - attr_accessor :input_source - # Dataflow service generated id for this stage. # Corresponds to the JSON property `id` # @return [String] @@ -4327,613 +5151,24 @@ module Google # @return [String] attr_accessor :name + # Input sources for this stage. + # Corresponds to the JSON property `inputSource` + # @return [Array] + attr_accessor :input_source + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @input_source = args[:input_source] if args.key?(:input_source) @id = args[:id] if args.key?(:id) @component_transform = args[:component_transform] if args.key?(:component_transform) @component_source = args[:component_source] if args.key?(:component_source) @kind = args[:kind] if args.key?(:kind) @output_source = args[:output_source] if args.key?(:output_source) @name = args[:name] if args.key?(:name) - end - end - - # A request for sending worker messages to the service. - class SendWorkerMessagesRequest - include Google::Apis::Core::Hashable - - # The WorkerMessages to send. - # Corresponds to the JSON property `workerMessages` - # @return [Array] - attr_accessor :worker_messages - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @worker_messages = args[:worker_messages] if args.key?(:worker_messages) - end - end - - # DEPRECATED in favor of DerivedSource. - class SourceSplitShard - include Google::Apis::Core::Hashable - - # DEPRECATED - # Corresponds to the JSON property `derivationMode` - # @return [String] - attr_accessor :derivation_mode - - # A source that records can be read and decoded from. - # Corresponds to the JSON property `source` - # @return [Google::Apis::DataflowV1b3::Source] - attr_accessor :source - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @derivation_mode = args[:derivation_mode] if args.key?(:derivation_mode) - @source = args[:source] if args.key?(:source) - end - end - - # Modeled after information exposed by /proc/stat. - class CpuTime - include Google::Apis::Core::Hashable - - # Average CPU utilization rate (% non-idle cpu / second) since previous - # sample. - # Corresponds to the JSON property `rate` - # @return [Float] - attr_accessor :rate - - # Timestamp of the measurement. - # Corresponds to the JSON property `timestamp` - # @return [String] - attr_accessor :timestamp - - # Total active CPU time across all cores (ie., non-idle) in milliseconds - # since start-up. - # Corresponds to the JSON property `totalMs` - # @return [Fixnum] - attr_accessor :total_ms - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @rate = args[:rate] if args.key?(:rate) - @timestamp = args[:timestamp] if args.key?(:timestamp) - @total_ms = args[:total_ms] if args.key?(:total_ms) - end - end - - # Describes the environment in which a Dataflow Job runs. - class Environment - include Google::Apis::Core::Hashable - - # The type of cluster manager API to use. If unknown or - # unspecified, the service will attempt to choose a reasonable - # default. This should be in the form of the API service name, - # e.g. "compute.googleapis.com". - # Corresponds to the JSON property `clusterManagerApiService` - # @return [String] - attr_accessor :cluster_manager_api_service - - # The prefix of the resources the system should use for temporary - # storage. The system will append the suffix "/temp-`JOBNAME` to - # this resource prefix, where `JOBNAME` is the value of the - # job_name field. The resulting bucket and object prefix is used - # as the prefix of the resources used to store temporary data - # needed during the job execution. NOTE: This will override the - # value in taskrunner_settings. - # The supported resource type is: - # Google Cloud Storage: - # storage.googleapis.com/`bucket`/`object` - # bucket.storage.googleapis.com/`object` - # Corresponds to the JSON property `tempStoragePrefix` - # @return [String] - attr_accessor :temp_storage_prefix - - # The worker pools. At least one "harness" worker pool must be - # specified in order for the job to have workers. - # Corresponds to the JSON property `workerPools` - # @return [Array] - attr_accessor :worker_pools - - # The dataset for the current project where various workflow - # related tables are stored. - # The supported resource type is: - # Google BigQuery: - # bigquery.googleapis.com/`dataset` - # Corresponds to the JSON property `dataset` - # @return [String] - attr_accessor :dataset - - # The list of experiments to enable. - # Corresponds to the JSON property `experiments` - # @return [Array] - attr_accessor :experiments - - # A structure describing which components and their versions of the service - # are required in order to run the job. - # Corresponds to the JSON property `version` - # @return [Hash] - attr_accessor :version - - # Experimental settings. - # Corresponds to the JSON property `internalExperiments` - # @return [Hash] - attr_accessor :internal_experiments - - # Identity to run virtual machines as. Defaults to the default account. - # Corresponds to the JSON property `serviceAccountEmail` - # @return [String] - attr_accessor :service_account_email - - # The Cloud Dataflow SDK pipeline options specified by the user. These - # options are passed through the service and are used to recreate the - # SDK pipeline options on the worker in a language agnostic and platform - # independent way. - # Corresponds to the JSON property `sdkPipelineOptions` - # @return [Hash] - attr_accessor :sdk_pipeline_options - - # A description of the process that generated the request. - # Corresponds to the JSON property `userAgent` - # @return [Hash] - attr_accessor :user_agent - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @cluster_manager_api_service = args[:cluster_manager_api_service] if args.key?(:cluster_manager_api_service) - @temp_storage_prefix = args[:temp_storage_prefix] if args.key?(:temp_storage_prefix) - @worker_pools = args[:worker_pools] if args.key?(:worker_pools) - @dataset = args[:dataset] if args.key?(:dataset) - @experiments = args[:experiments] if args.key?(:experiments) - @version = args[:version] if args.key?(:version) - @internal_experiments = args[:internal_experiments] if args.key?(:internal_experiments) - @service_account_email = args[:service_account_email] if args.key?(:service_account_email) - @sdk_pipeline_options = args[:sdk_pipeline_options] if args.key?(:sdk_pipeline_options) - @user_agent = args[:user_agent] if args.key?(:user_agent) - end - end - - # A task which describes what action should be performed for the specified - # streaming computation ranges. - class StreamingComputationTask - include Google::Apis::Core::Hashable - - # Describes the set of data disks this task should apply to. - # Corresponds to the JSON property `dataDisks` - # @return [Array] - attr_accessor :data_disks - - # A type of streaming computation task. - # Corresponds to the JSON property `taskType` - # @return [String] - attr_accessor :task_type - - # Contains ranges of a streaming computation this task should apply to. - # Corresponds to the JSON property `computationRanges` - # @return [Array] - attr_accessor :computation_ranges - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @data_disks = args[:data_disks] if args.key?(:data_disks) - @task_type = args[:task_type] if args.key?(:task_type) - @computation_ranges = args[:computation_ranges] if args.key?(:computation_ranges) - end - end - - # Request to send encoded debug information. - class SendDebugCaptureRequest - include Google::Apis::Core::Hashable - - # The encoded debug information. - # Corresponds to the JSON property `data` - # @return [String] - attr_accessor :data - - # The internal component id for which debug information is sent. - # Corresponds to the JSON property `componentId` - # @return [String] - attr_accessor :component_id - - # The worker id, i.e., VM hostname. - # Corresponds to the JSON property `workerId` - # @return [String] - attr_accessor :worker_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @data = args[:data] if args.key?(:data) - @component_id = args[:component_id] if args.key?(:component_id) - @worker_id = args[:worker_id] if args.key?(:worker_id) - end - end - - # Response to a get debug configuration request. - class GetDebugConfigResponse - include Google::Apis::Core::Hashable - - # The encoded debug configuration for the requested component. - # Corresponds to the JSON property `config` - # @return [String] - attr_accessor :config - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @config = args[:config] if args.key?(:config) - end - end - - # Description of a transform executed as part of an execution stage. - class ComponentTransform - include Google::Apis::Core::Hashable - - # Dataflow service generated name for this source. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Human-readable name for this transform; may be user or system generated. - # Corresponds to the JSON property `userName` - # @return [String] - attr_accessor :user_name - - # User name for the original user transform with which this transform is - # most closely associated. - # Corresponds to the JSON property `originalTransform` - # @return [String] - attr_accessor :original_transform - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @name = args[:name] if args.key?(:name) - @user_name = args[:user_name] if args.key?(:user_name) - @original_transform = args[:original_transform] if args.key?(:original_transform) - end - end - - # A task which initializes part of a streaming Dataflow job. - class StreamingSetupTask - include Google::Apis::Core::Hashable - - # The TCP port used by the worker to communicate with the Dataflow - # worker harness. - # Corresponds to the JSON property `workerHarnessPort` - # @return [Fixnum] - attr_accessor :worker_harness_port - - # The user has requested drain. - # Corresponds to the JSON property `drain` - # @return [Boolean] - attr_accessor :drain - alias_method :drain?, :drain - - # The TCP port on which the worker should listen for messages from - # other streaming computation workers. - # Corresponds to the JSON property `receiveWorkPort` - # @return [Fixnum] - attr_accessor :receive_work_port - - # Global topology of the streaming Dataflow job, including all - # computations and their sharded locations. - # Corresponds to the JSON property `streamingComputationTopology` - # @return [Google::Apis::DataflowV1b3::TopologyConfig] - attr_accessor :streaming_computation_topology - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @worker_harness_port = args[:worker_harness_port] if args.key?(:worker_harness_port) - @drain = args[:drain] if args.key?(:drain) - @receive_work_port = args[:receive_work_port] if args.key?(:receive_work_port) - @streaming_computation_topology = args[:streaming_computation_topology] if args.key?(:streaming_computation_topology) - end - end - - # Identifies a pubsub location to use for transferring data into or - # out of a streaming Dataflow job. - class PubsubLocation - include Google::Apis::Core::Hashable - - # If true, then the client has requested to get pubsub attributes. - # Corresponds to the JSON property `withAttributes` - # @return [Boolean] - attr_accessor :with_attributes - alias_method :with_attributes?, :with_attributes - - # If set, contains a pubsub label from which to extract record ids. - # If left empty, record deduplication will be strictly best effort. - # Corresponds to the JSON property `idLabel` - # @return [String] - attr_accessor :id_label - - # A pubsub topic, in the form of - # "pubsub.googleapis.com/topics//" - # Corresponds to the JSON property `topic` - # @return [String] - attr_accessor :topic - - # If set, contains a pubsub label from which to extract record timestamps. - # If left empty, record timestamps will be generated upon arrival. - # Corresponds to the JSON property `timestampLabel` - # @return [String] - attr_accessor :timestamp_label - - # A pubsub subscription, in the form of - # "pubsub.googleapis.com/subscriptions//" - # Corresponds to the JSON property `subscription` - # @return [String] - attr_accessor :subscription - - # Indicates whether the pipeline allows late-arriving data. - # Corresponds to the JSON property `dropLateData` - # @return [Boolean] - attr_accessor :drop_late_data - alias_method :drop_late_data?, :drop_late_data - - # If set, specifies the pubsub subscription that will be used for tracking - # custom time timestamps for watermark estimation. - # Corresponds to the JSON property `trackingSubscription` - # @return [String] - attr_accessor :tracking_subscription - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @with_attributes = args[:with_attributes] if args.key?(:with_attributes) - @id_label = args[:id_label] if args.key?(:id_label) - @topic = args[:topic] if args.key?(:topic) - @timestamp_label = args[:timestamp_label] if args.key?(:timestamp_label) - @subscription = args[:subscription] if args.key?(:subscription) - @drop_late_data = args[:drop_late_data] if args.key?(:drop_late_data) - @tracking_subscription = args[:tracking_subscription] if args.key?(:tracking_subscription) - end - end - - # WorkerHealthReport contains information about the health of a worker. - # The VM should be identified by the labels attached to the WorkerMessage that - # this health ping belongs to. - class WorkerHealthReport - include Google::Apis::Core::Hashable - - # The pods running on the worker. See: - # http://kubernetes.io/v1.1/docs/api-reference/v1/definitions.html#_v1_pod - # This field is used by the worker to send the status of the indvidual - # containers running on each worker. - # Corresponds to the JSON property `pods` - # @return [Array>] - attr_accessor :pods - - # The time the VM was booted. - # Corresponds to the JSON property `vmStartupTime` - # @return [String] - attr_accessor :vm_startup_time - - # Whether the VM is healthy. - # Corresponds to the JSON property `vmIsHealthy` - # @return [Boolean] - attr_accessor :vm_is_healthy - alias_method :vm_is_healthy?, :vm_is_healthy - - # The interval at which the worker is sending health reports. - # The default value of 0 should be interpreted as the field is not being - # explicitly set by the worker. - # Corresponds to the JSON property `reportInterval` - # @return [String] - attr_accessor :report_interval - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @pods = args[:pods] if args.key?(:pods) - @vm_startup_time = args[:vm_startup_time] if args.key?(:vm_startup_time) - @vm_is_healthy = args[:vm_is_healthy] if args.key?(:vm_is_healthy) - @report_interval = args[:report_interval] if args.key?(:report_interval) - end - end - - # A particular message pertaining to a Dataflow job. - class JobMessage - include Google::Apis::Core::Hashable - - # The text of the message. - # Corresponds to the JSON property `messageText` - # @return [String] - attr_accessor :message_text - - # Importance level of the message. - # Corresponds to the JSON property `messageImportance` - # @return [String] - attr_accessor :message_importance - - # The timestamp of the message. - # Corresponds to the JSON property `time` - # @return [String] - attr_accessor :time - - # Identifies the message. This is automatically generated by the - # service; the caller should treat it as an opaque string. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @message_text = args[:message_text] if args.key?(:message_text) - @message_importance = args[:message_importance] if args.key?(:message_importance) - @time = args[:time] if args.key?(:time) - @id = args[:id] if args.key?(:id) - end - end - - # Metadata for a specific parameter. - class ParameterMetadata - include Google::Apis::Core::Hashable - - # Optional. Whether the parameter is optional. Defaults to false. - # Corresponds to the JSON property `isOptional` - # @return [Boolean] - attr_accessor :is_optional - alias_method :is_optional?, :is_optional - - # Required. The name of the parameter. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Optional. Regexes that the parameter must match. - # Corresponds to the JSON property `regexes` - # @return [Array] - attr_accessor :regexes - - # Required. The label to display for the parameter. - # Corresponds to the JSON property `label` - # @return [String] - attr_accessor :label - - # Required. The help text to display for the parameter. - # Corresponds to the JSON property `helpText` - # @return [String] - attr_accessor :help_text - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @is_optional = args[:is_optional] if args.key?(:is_optional) - @name = args[:name] if args.key?(:name) - @regexes = args[:regexes] if args.key?(:regexes) - @label = args[:label] if args.key?(:label) - @help_text = args[:help_text] if args.key?(:help_text) - end - end - - # Information about an output of a multi-output DoFn. - class MultiOutputInfo - include Google::Apis::Core::Hashable - - # The id of the tag the user code will emit to this output by; this - # should correspond to the tag of some SideInputInfo. - # Corresponds to the JSON property `tag` - # @return [String] - attr_accessor :tag - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @tag = args[:tag] if args.key?(:tag) - end - end - - # Represents the operation to split a high-level Source specification - # into bundles (parts for parallel processing). - # At a high level, splitting of a source into bundles happens as follows: - # SourceSplitRequest is applied to the source. If it returns - # SOURCE_SPLIT_OUTCOME_USE_CURRENT, no further splitting happens and the source - # is used "as is". Otherwise, splitting is applied recursively to each - # produced DerivedSource. - # As an optimization, for any Source, if its does_not_need_splitting is - # true, the framework assumes that splitting this source would return - # SOURCE_SPLIT_OUTCOME_USE_CURRENT, and doesn't initiate a SourceSplitRequest. - # This applies both to the initial source being split and to bundles - # produced from it. - class SourceSplitRequest - include Google::Apis::Core::Hashable - - # A source that records can be read and decoded from. - # Corresponds to the JSON property `source` - # @return [Google::Apis::DataflowV1b3::Source] - attr_accessor :source - - # Hints for splitting a Source into bundles (parts for parallel - # processing) using SourceSplitRequest. - # Corresponds to the JSON property `options` - # @return [Google::Apis::DataflowV1b3::SourceSplitOptions] - attr_accessor :options - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @source = args[:source] if args.key?(:source) - @options = args[:options] if args.key?(:options) - end - end - - # The result of a SourceGetMetadataOperation. - class SourceGetMetadataResponse - include Google::Apis::Core::Hashable - - # Metadata about a Source useful for automatically optimizing - # and tuning the pipeline, etc. - # Corresponds to the JSON property `metadata` - # @return [Google::Apis::DataflowV1b3::SourceMetadata] - attr_accessor :metadata - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @metadata = args[:metadata] if args.key?(:metadata) + @input_source = args[:input_source] if args.key?(:input_source) end end end diff --git a/generated/google/apis/dataflow_v1b3/representations.rb b/generated/google/apis/dataflow_v1b3/representations.rb index 2e646c15e..e1bc85464 100644 --- a/generated/google/apis/dataflow_v1b3/representations.rb +++ b/generated/google/apis/dataflow_v1b3/representations.rb @@ -22,7 +22,103 @@ module Google module Apis module DataflowV1b3 - class MetricShortId + class LogBucket + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SendWorkerMessagesRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SourceSplitShard + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CpuTime + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Environment + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class StreamingComputationTask + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SendDebugCaptureRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GetDebugConfigResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ComponentTransform + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class StreamingSetupTask + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class PubsubLocation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class WorkerHealthReport + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class JobMessage + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ParameterMetadata + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class MultiOutputInfo + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SourceSplitRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SourceGetMetadataResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -34,6 +130,18 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class MetricShortId + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AutoscalingEvent + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class TaskRunnerSettings class Representation < Google::Apis::Core::JsonRepresentation; end @@ -70,19 +178,25 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class StructuredMessage + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class WorkItem class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class ReportedParallelism + class ResourceUtilizationReport class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class ResourceUtilizationReport + class ReportedParallelism class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -136,6 +250,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class ExecutionStageState + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class StreamLocation class Representation < Google::Apis::Core::JsonRepresentation; end @@ -148,7 +268,7 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class LeaseWorkItemResponse + class StreamingComputationConfig class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -160,13 +280,7 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class StreamingComputationConfig - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Sink + class LeaseWorkItemResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -178,6 +292,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class Sink + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class FlattenInstruction class Representation < Google::Apis::Core::JsonRepresentation; end @@ -232,6 +352,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class Parameter + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class ReportWorkItemStatusRequest class Representation < Google::Apis::Core::JsonRepresentation; end @@ -250,13 +376,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class Step + class JobExecutionInfo class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class JobExecutionInfo + class Step class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -292,13 +418,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class IntegerList + class StateFamilyConfig class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class StateFamilyConfig + class IntegerList class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -340,13 +466,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class MetricUpdate + class CounterStructuredName class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class CounterStructuredName + class MetricUpdate class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -544,13 +670,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class StreamingSideInputLocation + class MountedDataDisk class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class MountedDataDisk + class StreamingSideInputLocation class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -562,7 +688,7 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class DerivedSource + class Job class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -574,7 +700,7 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class Job + class DerivedSource class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -586,13 +712,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class SideInputInfo + class SendDebugCaptureResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class SendDebugCaptureResponse + class SideInputInfo class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -616,13 +742,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class StreamingComputationRanges + class AutoscalingSettings class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class AutoscalingSettings + class StreamingComputationRanges class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -634,107 +760,172 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class SendWorkerMessagesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end + class LogBucket + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :log, as: 'log' + property :count, :numeric_string => true, as: 'count' + end + end - include Google::Apis::Core::JsonObjectSupport + class SendWorkerMessagesRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :worker_messages, as: 'workerMessages', class: Google::Apis::DataflowV1b3::WorkerMessage, decorator: Google::Apis::DataflowV1b3::WorkerMessage::Representation + + property :location, as: 'location' + end end class SourceSplitShard - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :derivation_mode, as: 'derivationMode' + property :source, as: 'source', class: Google::Apis::DataflowV1b3::Source, decorator: Google::Apis::DataflowV1b3::Source::Representation - include Google::Apis::Core::JsonObjectSupport + end end class CpuTime - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :timestamp, as: 'timestamp' + property :total_ms, :numeric_string => true, as: 'totalMs' + property :rate, as: 'rate' + end end class Environment - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :dataset, as: 'dataset' + collection :experiments, as: 'experiments' + hash :internal_experiments, as: 'internalExperiments' + hash :version, as: 'version' + property :service_account_email, as: 'serviceAccountEmail' + hash :user_agent, as: 'userAgent' + hash :sdk_pipeline_options, as: 'sdkPipelineOptions' + property :cluster_manager_api_service, as: 'clusterManagerApiService' + property :temp_storage_prefix, as: 'tempStoragePrefix' + collection :worker_pools, as: 'workerPools', class: Google::Apis::DataflowV1b3::WorkerPool, decorator: Google::Apis::DataflowV1b3::WorkerPool::Representation - include Google::Apis::Core::JsonObjectSupport + end end class StreamingComputationTask - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :computation_ranges, as: 'computationRanges', class: Google::Apis::DataflowV1b3::StreamingComputationRanges, decorator: Google::Apis::DataflowV1b3::StreamingComputationRanges::Representation - include Google::Apis::Core::JsonObjectSupport + collection :data_disks, as: 'dataDisks', class: Google::Apis::DataflowV1b3::MountedDataDisk, decorator: Google::Apis::DataflowV1b3::MountedDataDisk::Representation + + property :task_type, as: 'taskType' + end end class SendDebugCaptureRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :component_id, as: 'componentId' + property :worker_id, as: 'workerId' + property :location, as: 'location' + property :data, as: 'data' + end end class GetDebugConfigResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :config, as: 'config' + end end class ComponentTransform - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :original_transform, as: 'originalTransform' + property :name, as: 'name' + property :user_name, as: 'userName' + end end class StreamingSetupTask - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :worker_harness_port, as: 'workerHarnessPort' + property :drain, as: 'drain' + property :receive_work_port, as: 'receiveWorkPort' + property :streaming_computation_topology, as: 'streamingComputationTopology', class: Google::Apis::DataflowV1b3::TopologyConfig, decorator: Google::Apis::DataflowV1b3::TopologyConfig::Representation - include Google::Apis::Core::JsonObjectSupport + end end class PubsubLocation - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :subscription, as: 'subscription' + property :drop_late_data, as: 'dropLateData' + property :tracking_subscription, as: 'trackingSubscription' + property :with_attributes, as: 'withAttributes' + property :id_label, as: 'idLabel' + property :timestamp_label, as: 'timestampLabel' + property :topic, as: 'topic' + end end class WorkerHealthReport - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :pods, as: 'pods' + property :vm_startup_time, as: 'vmStartupTime' + property :vm_is_healthy, as: 'vmIsHealthy' + property :report_interval, as: 'reportInterval' + end end class JobMessage - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :id, as: 'id' + property :message_text, as: 'messageText' + property :message_importance, as: 'messageImportance' + property :time, as: 'time' + end end class ParameterMetadata - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :regexes, as: 'regexes' + property :label, as: 'label' + property :help_text, as: 'helpText' + property :is_optional, as: 'isOptional' + property :name, as: 'name' + end end class MultiOutputInfo - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :tag, as: 'tag' + end end class SourceSplitRequest - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :source, as: 'source', class: Google::Apis::DataflowV1b3::Source, decorator: Google::Apis::DataflowV1b3::Source::Representation - include Google::Apis::Core::JsonObjectSupport + property :options, as: 'options', class: Google::Apis::DataflowV1b3::SourceSplitOptions, decorator: Google::Apis::DataflowV1b3::SourceSplitOptions::Representation + + end end class SourceGetMetadataResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class MetricShortId # @private class Representation < Google::Apis::Core::JsonRepresentation - property :metric_index, as: 'metricIndex' - property :short_id, :numeric_string => true, as: 'shortId' + property :metadata, as: 'metadata', class: Google::Apis::DataflowV1b3::SourceMetadata, decorator: Google::Apis::DataflowV1b3::SourceMetadata::Representation + end end @@ -746,9 +937,36 @@ module Google end end + class MetricShortId + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :metric_index, as: 'metricIndex' + property :short_id, :numeric_string => true, as: 'shortId' + end + end + + class AutoscalingEvent + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :target_num_workers, :numeric_string => true, as: 'targetNumWorkers' + property :event_type, as: 'eventType' + property :current_num_workers, :numeric_string => true, as: 'currentNumWorkers' + property :description, as: 'description', class: Google::Apis::DataflowV1b3::StructuredMessage, decorator: Google::Apis::DataflowV1b3::StructuredMessage::Representation + + property :time, as: 'time' + end + end + class TaskRunnerSettings # @private class Representation < Google::Apis::Core::JsonRepresentation + property :base_url, as: 'baseUrl' + property :log_to_serialconsole, as: 'logToSerialconsole' + property :continue_on_exception, as: 'continueOnException' + property :parallel_worker_settings, as: 'parallelWorkerSettings', class: Google::Apis::DataflowV1b3::WorkerSettings, decorator: Google::Apis::DataflowV1b3::WorkerSettings::Representation + + property :task_user, as: 'taskUser' + property :vm_id, as: 'vmId' property :alsologtostderr, as: 'alsologtostderr' property :task_group, as: 'taskGroup' property :harness_command, as: 'harnessCommand' @@ -762,38 +980,31 @@ module Google property :temp_storage_prefix, as: 'tempStoragePrefix' property :commandlines_file_name, as: 'commandlinesFileName' property :language_hint, as: 'languageHint' - property :base_url, as: 'baseUrl' - property :log_to_serialconsole, as: 'logToSerialconsole' - property :continue_on_exception, as: 'continueOnException' - property :parallel_worker_settings, as: 'parallelWorkerSettings', class: Google::Apis::DataflowV1b3::WorkerSettings, decorator: Google::Apis::DataflowV1b3::WorkerSettings::Representation - - property :task_user, as: 'taskUser' - property :vm_id, as: 'vmId' end end class Position # @private class Representation < Google::Apis::Core::JsonRepresentation - property :record_index, :numeric_string => true, as: 'recordIndex' property :shuffle_position, as: 'shufflePosition' property :concat_position, as: 'concatPosition', class: Google::Apis::DataflowV1b3::ConcatPosition, decorator: Google::Apis::DataflowV1b3::ConcatPosition::Representation property :byte_offset, :numeric_string => true, as: 'byteOffset' property :end, as: 'end' property :key, as: 'key' + property :record_index, :numeric_string => true, as: 'recordIndex' end end class Source # @private class Representation < Google::Apis::Core::JsonRepresentation - property :metadata, as: 'metadata', class: Google::Apis::DataflowV1b3::SourceMetadata, decorator: Google::Apis::DataflowV1b3::SourceMetadata::Representation - - collection :base_specs, as: 'baseSpecs' hash :codec, as: 'codec' property :does_not_need_splitting, as: 'doesNotNeedSplitting' hash :spec, as: 'spec' + property :metadata, as: 'metadata', class: Google::Apis::DataflowV1b3::SourceMetadata, decorator: Google::Apis::DataflowV1b3::SourceMetadata::Representation + + collection :base_specs, as: 'baseSpecs' end end @@ -808,40 +1019,50 @@ module Google class WorkerPool # @private class Representation < Google::Apis::Core::JsonRepresentation - property :worker_harness_container_image, as: 'workerHarnessContainerImage' - property :disk_type, as: 'diskType' - property :machine_type, as: 'machineType' - property :kind, as: 'kind' - collection :data_disks, as: 'dataDisks', class: Google::Apis::DataflowV1b3::Disk, decorator: Google::Apis::DataflowV1b3::Disk::Representation - - property :subnetwork, as: 'subnetwork' - property :ip_configuration, as: 'ipConfiguration' - property :autoscaling_settings, as: 'autoscalingSettings', class: Google::Apis::DataflowV1b3::AutoscalingSettings, decorator: Google::Apis::DataflowV1b3::AutoscalingSettings::Representation - - property :taskrunner_settings, as: 'taskrunnerSettings', class: Google::Apis::DataflowV1b3::TaskRunnerSettings, decorator: Google::Apis::DataflowV1b3::TaskRunnerSettings::Representation - - hash :metadata, as: 'metadata' - property :network, as: 'network' - property :default_package_set, as: 'defaultPackageSet' - property :zone, as: 'zone' - property :num_threads_per_worker, as: 'numThreadsPerWorker' - property :num_workers, as: 'numWorkers' - property :disk_source_image, as: 'diskSourceImage' collection :packages, as: 'packages', class: Google::Apis::DataflowV1b3::Package, decorator: Google::Apis::DataflowV1b3::Package::Representation property :teardown_policy, as: 'teardownPolicy' property :on_host_maintenance, as: 'onHostMaintenance' hash :pool_args, as: 'poolArgs' property :disk_size_gb, as: 'diskSizeGb' + property :worker_harness_container_image, as: 'workerHarnessContainerImage' + property :machine_type, as: 'machineType' + property :disk_type, as: 'diskType' + property :kind, as: 'kind' + collection :data_disks, as: 'dataDisks', class: Google::Apis::DataflowV1b3::Disk, decorator: Google::Apis::DataflowV1b3::Disk::Representation + + property :subnetwork, as: 'subnetwork' + property :ip_configuration, as: 'ipConfiguration' + property :taskrunner_settings, as: 'taskrunnerSettings', class: Google::Apis::DataflowV1b3::TaskRunnerSettings, decorator: Google::Apis::DataflowV1b3::TaskRunnerSettings::Representation + + property :autoscaling_settings, as: 'autoscalingSettings', class: Google::Apis::DataflowV1b3::AutoscalingSettings, decorator: Google::Apis::DataflowV1b3::AutoscalingSettings::Representation + + hash :metadata, as: 'metadata' + property :default_package_set, as: 'defaultPackageSet' + property :network, as: 'network' + property :zone, as: 'zone' + property :num_workers, as: 'numWorkers' + property :num_threads_per_worker, as: 'numThreadsPerWorker' + property :disk_source_image, as: 'diskSourceImage' end end class SourceOperationRequest # @private class Representation < Google::Apis::Core::JsonRepresentation + property :split, as: 'split', class: Google::Apis::DataflowV1b3::SourceSplitRequest, decorator: Google::Apis::DataflowV1b3::SourceSplitRequest::Representation + property :get_metadata, as: 'getMetadata', class: Google::Apis::DataflowV1b3::SourceGetMetadataRequest, decorator: Google::Apis::DataflowV1b3::SourceGetMetadataRequest::Representation - property :split, as: 'split', class: Google::Apis::DataflowV1b3::SourceSplitRequest, decorator: Google::Apis::DataflowV1b3::SourceSplitRequest::Representation + end + end + + class StructuredMessage + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :message_key, as: 'messageKey' + property :message_text, as: 'messageText' + collection :parameters, as: 'parameters', class: Google::Apis::DataflowV1b3::Parameter, decorator: Google::Apis::DataflowV1b3::Parameter::Representation end end @@ -849,16 +1070,6 @@ module Google class WorkItem # @private class Representation < Google::Apis::Core::JsonRepresentation - property :lease_expire_time, as: 'leaseExpireTime' - property :streaming_config_task, as: 'streamingConfigTask', class: Google::Apis::DataflowV1b3::StreamingConfigTask, decorator: Google::Apis::DataflowV1b3::StreamingConfigTask::Representation - - property :initial_report_index, :numeric_string => true, as: 'initialReportIndex' - property :streaming_computation_task, as: 'streamingComputationTask', class: Google::Apis::DataflowV1b3::StreamingComputationTask, decorator: Google::Apis::DataflowV1b3::StreamingComputationTask::Representation - - property :shell_task, as: 'shellTask', class: Google::Apis::DataflowV1b3::ShellTask, decorator: Google::Apis::DataflowV1b3::ShellTask::Representation - - property :job_id, as: 'jobId' - property :id, :numeric_string => true, as: 'id' property :configuration, as: 'configuration' property :map_task, as: 'mapTask', class: Google::Apis::DataflowV1b3::MapTask, decorator: Google::Apis::DataflowV1b3::MapTask::Representation @@ -872,14 +1083,16 @@ module Google property :streaming_setup_task, as: 'streamingSetupTask', class: Google::Apis::DataflowV1b3::StreamingSetupTask, decorator: Google::Apis::DataflowV1b3::StreamingSetupTask::Representation property :report_status_interval, as: 'reportStatusInterval' - end - end + property :streaming_config_task, as: 'streamingConfigTask', class: Google::Apis::DataflowV1b3::StreamingConfigTask, decorator: Google::Apis::DataflowV1b3::StreamingConfigTask::Representation - class ReportedParallelism - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :value, as: 'value' - property :is_infinite, as: 'isInfinite' + property :lease_expire_time, as: 'leaseExpireTime' + property :initial_report_index, :numeric_string => true, as: 'initialReportIndex' + property :streaming_computation_task, as: 'streamingComputationTask', class: Google::Apis::DataflowV1b3::StreamingComputationTask, decorator: Google::Apis::DataflowV1b3::StreamingComputationTask::Representation + + property :shell_task, as: 'shellTask', class: Google::Apis::DataflowV1b3::ShellTask, decorator: Google::Apis::DataflowV1b3::ShellTask::Representation + + property :job_id, as: 'jobId' + property :id, :numeric_string => true, as: 'id' end end @@ -891,16 +1104,24 @@ module Google end end + class ReportedParallelism + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :is_infinite, as: 'isInfinite' + property :value, as: 'value' + end + end + class TopologyConfig # @private class Representation < Google::Apis::Core::JsonRepresentation - property :forwarding_key_bits, as: 'forwardingKeyBits' hash :user_stage_to_computation_name_map, as: 'userStageToComputationNameMap' collection :computations, as: 'computations', class: Google::Apis::DataflowV1b3::ComputationTopology, decorator: Google::Apis::DataflowV1b3::ComputationTopology::Representation collection :data_disk_assignments, as: 'dataDiskAssignments', class: Google::Apis::DataflowV1b3::DataDiskAssignment, decorator: Google::Apis::DataflowV1b3::DataDiskAssignment::Representation property :persistent_state_version, as: 'persistentStateVersion' + property :forwarding_key_bits, as: 'forwardingKeyBits' end end @@ -925,8 +1146,8 @@ module Google class Representation < Google::Apis::Core::JsonRepresentation property :worker_id, as: 'workerId' property :temp_storage_prefix, as: 'tempStoragePrefix' - property :reporting_enabled, as: 'reportingEnabled' property :base_url, as: 'baseUrl' + property :reporting_enabled, as: 'reportingEnabled' property :service_path, as: 'servicePath' property :shuffle_service_path, as: 'shuffleServicePath' end @@ -942,8 +1163,8 @@ module Google class DataDiskAssignment # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :data_disks, as: 'dataDisks' property :vm_instance, as: 'vmInstance' + collection :data_disks, as: 'dataDisks' end end @@ -959,23 +1180,32 @@ module Google class Status # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :details, as: 'details' property :code, as: 'code' property :message, as: 'message' + collection :details, as: 'details' + end + end + + class ExecutionStageState + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :execution_stage_name, as: 'executionStageName' + property :current_state_time, as: 'currentStateTime' + property :execution_stage_state, as: 'executionStageState' end end class StreamLocation # @private class Representation < Google::Apis::Core::JsonRepresentation - property :custom_source_location, as: 'customSourceLocation', class: Google::Apis::DataflowV1b3::CustomSourceLocation, decorator: Google::Apis::DataflowV1b3::CustomSourceLocation::Representation - property :streaming_stage_location, as: 'streamingStageLocation', class: Google::Apis::DataflowV1b3::StreamingStageLocation, decorator: Google::Apis::DataflowV1b3::StreamingStageLocation::Representation property :pubsub_location, as: 'pubsubLocation', class: Google::Apis::DataflowV1b3::PubsubLocation, decorator: Google::Apis::DataflowV1b3::PubsubLocation::Representation property :side_input_location, as: 'sideInputLocation', class: Google::Apis::DataflowV1b3::StreamingSideInputLocation, decorator: Google::Apis::DataflowV1b3::StreamingSideInputLocation::Representation + property :custom_source_location, as: 'customSourceLocation', class: Google::Apis::DataflowV1b3::CustomSourceLocation, decorator: Google::Apis::DataflowV1b3::CustomSourceLocation::Representation + end end @@ -987,6 +1217,30 @@ module Google end end + class StreamingComputationConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :instructions, as: 'instructions', class: Google::Apis::DataflowV1b3::ParallelInstruction, decorator: Google::Apis::DataflowV1b3::ParallelInstruction::Representation + + property :computation_id, as: 'computationId' + property :system_name, as: 'systemName' + property :stage_name, as: 'stageName' + end + end + + class TransformSummary + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :output_collection_name, as: 'outputCollectionName' + collection :display_data, as: 'displayData', class: Google::Apis::DataflowV1b3::DisplayData, decorator: Google::Apis::DataflowV1b3::DisplayData::Representation + + property :kind, as: 'kind' + collection :input_collection_name, as: 'inputCollectionName' + property :name, as: 'name' + property :id, as: 'id' + end + end + class LeaseWorkItemResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -995,45 +1249,21 @@ module Google end end - class TransformSummary + class LaunchTemplateParameters # @private class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - collection :output_collection_name, as: 'outputCollectionName' - collection :display_data, as: 'displayData', class: Google::Apis::DataflowV1b3::DisplayData, decorator: Google::Apis::DataflowV1b3::DisplayData::Representation - - property :kind, as: 'kind' - collection :input_collection_name, as: 'inputCollectionName' - property :name, as: 'name' - end - end - - class StreamingComputationConfig - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :computation_id, as: 'computationId' - property :system_name, as: 'systemName' - property :stage_name, as: 'stageName' - collection :instructions, as: 'instructions', class: Google::Apis::DataflowV1b3::ParallelInstruction, decorator: Google::Apis::DataflowV1b3::ParallelInstruction::Representation + property :job_name, as: 'jobName' + property :environment, as: 'environment', class: Google::Apis::DataflowV1b3::RuntimeEnvironment, decorator: Google::Apis::DataflowV1b3::RuntimeEnvironment::Representation + hash :parameters, as: 'parameters' end end class Sink # @private class Representation < Google::Apis::Core::JsonRepresentation - hash :spec, as: 'spec' hash :codec, as: 'codec' - end - end - - class LaunchTemplateParameters - # @private - class Representation < Google::Apis::Core::JsonRepresentation - hash :parameters, as: 'parameters' - property :job_name, as: 'jobName' - property :environment, as: 'environment', class: Google::Apis::DataflowV1b3::RuntimeEnvironment, decorator: Google::Apis::DataflowV1b3::RuntimeEnvironment::Representation - + hash :spec, as: 'spec' end end @@ -1087,30 +1317,30 @@ module Google class DisplayData # @private class Representation < Google::Apis::Core::JsonRepresentation - property :timestamp_value, as: 'timestampValue' - property :java_class_value, as: 'javaClassValue' property :bool_value, as: 'boolValue' + property :java_class_value, as: 'javaClassValue' property :str_value, as: 'strValue' - property :duration_value, as: 'durationValue' property :int64_value, :numeric_string => true, as: 'int64Value' + property :duration_value, as: 'durationValue' property :namespace, as: 'namespace' property :float_value, as: 'floatValue' property :key, as: 'key' property :short_str_value, as: 'shortStrValue' - property :label, as: 'label' property :url, as: 'url' + property :label, as: 'label' + property :timestamp_value, as: 'timestampValue' end end class LeaseWorkItemRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :worker_capabilities, as: 'workerCapabilities' - property :worker_id, as: 'workerId' property :requested_lease_duration, as: 'requestedLeaseDuration' property :current_worker_time, as: 'currentWorkerTime' - collection :work_item_types, as: 'workItemTypes' property :location, as: 'location' + collection :work_item_types, as: 'workItemTypes' + collection :worker_capabilities, as: 'workerCapabilities' + property :worker_id, as: 'workerId' end end @@ -1119,6 +1349,7 @@ module Google class Representation < Google::Apis::Core::JsonRepresentation property :component_id, as: 'componentId' property :worker_id, as: 'workerId' + property :location, as: 'location' end end @@ -1132,44 +1363,45 @@ module Google end end + class Parameter + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :value, as: 'value' + property :key, as: 'key' + end + end + class ReportWorkItemStatusRequest # @private class Representation < Google::Apis::Core::JsonRepresentation + collection :work_item_statuses, as: 'workItemStatuses', class: Google::Apis::DataflowV1b3::WorkItemStatus, decorator: Google::Apis::DataflowV1b3::WorkItemStatus::Representation + property :worker_id, as: 'workerId' property :current_worker_time, as: 'currentWorkerTime' property :location, as: 'location' - collection :work_item_statuses, as: 'workItemStatuses', class: Google::Apis::DataflowV1b3::WorkItemStatus, decorator: Google::Apis::DataflowV1b3::WorkItemStatus::Representation - end end class PipelineDescription # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :original_pipeline_transform, as: 'originalPipelineTransform', class: Google::Apis::DataflowV1b3::TransformSummary, decorator: Google::Apis::DataflowV1b3::TransformSummary::Representation - collection :display_data, as: 'displayData', class: Google::Apis::DataflowV1b3::DisplayData, decorator: Google::Apis::DataflowV1b3::DisplayData::Representation collection :execution_pipeline_stage, as: 'executionPipelineStage', class: Google::Apis::DataflowV1b3::ExecutionStageSummary, decorator: Google::Apis::DataflowV1b3::ExecutionStageSummary::Representation + collection :original_pipeline_transform, as: 'originalPipelineTransform', class: Google::Apis::DataflowV1b3::TransformSummary, decorator: Google::Apis::DataflowV1b3::TransformSummary::Representation + end end class StreamingConfigTask # @private class Representation < Google::Apis::Core::JsonRepresentation + property :windmill_service_endpoint, as: 'windmillServiceEndpoint' + hash :user_step_to_state_family_name_map, as: 'userStepToStateFamilyNameMap' + property :windmill_service_port, :numeric_string => true, as: 'windmillServicePort' collection :streaming_computation_configs, as: 'streamingComputationConfigs', class: Google::Apis::DataflowV1b3::StreamingComputationConfig, decorator: Google::Apis::DataflowV1b3::StreamingComputationConfig::Representation - hash :user_step_to_state_family_name_map, as: 'userStepToStateFamilyNameMap' - end - end - - class Step - # @private - class Representation < Google::Apis::Core::JsonRepresentation - hash :properties, as: 'properties' - property :name, as: 'name' - property :kind, as: 'kind' end end @@ -1181,6 +1413,15 @@ module Google end end + class Step + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :name, as: 'name' + property :kind, as: 'kind' + hash :properties, as: 'properties' + end + end + class FailedLocation # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1200,19 +1441,21 @@ module Google class CounterMetadata # @private class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :description, as: 'description' property :standard_units, as: 'standardUnits' property :other_units, as: 'otherUnits' + property :kind, as: 'kind' + property :description, as: 'description' end end class ListJobMessagesResponse # @private class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :autoscaling_events, as: 'autoscalingEvents', class: Google::Apis::DataflowV1b3::AutoscalingEvent, decorator: Google::Apis::DataflowV1b3::AutoscalingEvent::Representation + collection :job_messages, as: 'jobMessages', class: Google::Apis::DataflowV1b3::JobMessage, decorator: Google::Apis::DataflowV1b3::JobMessage::Representation - property :next_page_token, as: 'nextPageToken' end end @@ -1229,6 +1472,14 @@ module Google end end + class StateFamilyConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :state_family, as: 'stateFamily' + property :is_read, as: 'isRead' + end + end + class IntegerList # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1237,14 +1488,6 @@ module Google end end - class StateFamilyConfig - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :is_read, as: 'isRead' - property :state_family, as: 'stateFamily' - end - end - class ResourceUtilizationReportResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1254,17 +1497,24 @@ module Google class SourceSplitResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :shards, as: 'shards', class: Google::Apis::DataflowV1b3::SourceSplitShard, decorator: Google::Apis::DataflowV1b3::SourceSplitShard::Representation - property :outcome, as: 'outcome' collection :bundles, as: 'bundles', class: Google::Apis::DataflowV1b3::DerivedSource, decorator: Google::Apis::DataflowV1b3::DerivedSource::Representation + collection :shards, as: 'shards', class: Google::Apis::DataflowV1b3::SourceSplitShard, decorator: Google::Apis::DataflowV1b3::SourceSplitShard::Representation + end end class ParallelInstruction # @private class Representation < Google::Apis::Core::JsonRepresentation + property :par_do, as: 'parDo', class: Google::Apis::DataflowV1b3::ParDoInstruction, decorator: Google::Apis::DataflowV1b3::ParDoInstruction::Representation + + property :read, as: 'read', class: Google::Apis::DataflowV1b3::ReadInstruction, decorator: Google::Apis::DataflowV1b3::ReadInstruction::Representation + + property :original_name, as: 'originalName' + property :flatten, as: 'flatten', class: Google::Apis::DataflowV1b3::FlattenInstruction, decorator: Google::Apis::DataflowV1b3::FlattenInstruction::Representation + property :write, as: 'write', class: Google::Apis::DataflowV1b3::WriteInstruction, decorator: Google::Apis::DataflowV1b3::WriteInstruction::Representation property :system_name, as: 'systemName' @@ -1273,13 +1523,6 @@ module Google collection :outputs, as: 'outputs', class: Google::Apis::DataflowV1b3::InstructionOutput, decorator: Google::Apis::DataflowV1b3::InstructionOutput::Representation property :name, as: 'name' - property :par_do, as: 'parDo', class: Google::Apis::DataflowV1b3::ParDoInstruction, decorator: Google::Apis::DataflowV1b3::ParDoInstruction::Representation - - property :read, as: 'read', class: Google::Apis::DataflowV1b3::ReadInstruction, decorator: Google::Apis::DataflowV1b3::ReadInstruction::Representation - - property :flatten, as: 'flatten', class: Google::Apis::DataflowV1b3::FlattenInstruction, decorator: Google::Apis::DataflowV1b3::FlattenInstruction::Representation - - property :original_name, as: 'originalName' end end @@ -1314,22 +1557,6 @@ module Google end end - class MetricUpdate - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :scalar, as: 'scalar' - property :mean_count, as: 'meanCount' - property :mean_sum, as: 'meanSum' - property :update_time, as: 'updateTime' - property :name, as: 'name', class: Google::Apis::DataflowV1b3::MetricStructuredName, decorator: Google::Apis::DataflowV1b3::MetricStructuredName::Representation - - property :set, as: 'set' - property :cumulative, as: 'cumulative' - property :internal, as: 'internal' - end - end - class CounterStructuredName # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1344,13 +1571,30 @@ module Google end end + class MetricUpdate + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :scalar, as: 'scalar' + property :mean_count, as: 'meanCount' + property :mean_sum, as: 'meanSum' + property :update_time, as: 'updateTime' + property :name, as: 'name', class: Google::Apis::DataflowV1b3::MetricStructuredName, decorator: Google::Apis::DataflowV1b3::MetricStructuredName::Representation + + property :distribution, as: 'distribution' + property :set, as: 'set' + property :internal, as: 'internal' + property :cumulative, as: 'cumulative' + property :kind, as: 'kind' + end + end + class ApproximateProgress # @private class Representation < Google::Apis::Core::JsonRepresentation - property :percent_complete, as: 'percentComplete' property :remaining_time, as: 'remainingTime' property :position, as: 'position', class: Google::Apis::DataflowV1b3::Position, decorator: Google::Apis::DataflowV1b3::Position::Representation + property :percent_complete, as: 'percentComplete' end end @@ -1367,18 +1611,17 @@ module Google class TemplateMetadata # @private class Representation < Google::Apis::Core::JsonRepresentation + property :description, as: 'description' property :bypass_temp_dir_validation, as: 'bypassTempDirValidation' property :name, as: 'name' collection :parameters, as: 'parameters', class: Google::Apis::DataflowV1b3::ParameterMetadata, decorator: Google::Apis::DataflowV1b3::ParameterMetadata::Representation - property :description, as: 'description' end end class WorkerMessage # @private class Representation < Google::Apis::Core::JsonRepresentation - hash :labels, as: 'labels' property :time, as: 'time' property :worker_health_report, as: 'workerHealthReport', class: Google::Apis::DataflowV1b3::WorkerHealthReport, decorator: Google::Apis::DataflowV1b3::WorkerHealthReport::Representation @@ -1386,6 +1629,7 @@ module Google property :worker_metrics, as: 'workerMetrics', class: Google::Apis::DataflowV1b3::ResourceUtilizationReport, decorator: Google::Apis::DataflowV1b3::ResourceUtilizationReport::Representation + hash :labels, as: 'labels' end end @@ -1408,11 +1652,6 @@ module Google class CounterUpdate # @private class Representation < Google::Apis::Core::JsonRepresentation - property :short_id, :numeric_string => true, as: 'shortId' - property :floating_point_list, as: 'floatingPointList', class: Google::Apis::DataflowV1b3::FloatingPointList, decorator: Google::Apis::DataflowV1b3::FloatingPointList::Representation - - property :integer, as: 'integer', class: Google::Apis::DataflowV1b3::SplitInt64, decorator: Google::Apis::DataflowV1b3::SplitInt64::Representation - property :structured_name_and_metadata, as: 'structuredNameAndMetadata', class: Google::Apis::DataflowV1b3::CounterStructuredNameAndMetadata, decorator: Google::Apis::DataflowV1b3::CounterStructuredNameAndMetadata::Representation property :integer_list, as: 'integerList', class: Google::Apis::DataflowV1b3::IntegerList, decorator: Google::Apis::DataflowV1b3::IntegerList::Representation @@ -1420,8 +1659,8 @@ module Google property :floating_point, as: 'floatingPoint' property :integer_mean, as: 'integerMean', class: Google::Apis::DataflowV1b3::IntegerMean, decorator: Google::Apis::DataflowV1b3::IntegerMean::Representation - property :internal, as: 'internal' property :cumulative, as: 'cumulative' + property :internal, as: 'internal' property :floating_point_mean, as: 'floatingPointMean', class: Google::Apis::DataflowV1b3::FloatingPointMean, decorator: Google::Apis::DataflowV1b3::FloatingPointMean::Representation property :boolean, as: 'boolean' @@ -1431,6 +1670,11 @@ module Google property :distribution, as: 'distribution', class: Google::Apis::DataflowV1b3::DistributionUpdate, decorator: Google::Apis::DataflowV1b3::DistributionUpdate::Representation + property :short_id, :numeric_string => true, as: 'shortId' + property :floating_point_list, as: 'floatingPointList', class: Google::Apis::DataflowV1b3::FloatingPointList, decorator: Google::Apis::DataflowV1b3::FloatingPointList::Representation + + property :integer, as: 'integer', class: Google::Apis::DataflowV1b3::SplitInt64, decorator: Google::Apis::DataflowV1b3::SplitInt64::Representation + end end @@ -1446,14 +1690,16 @@ module Google class DistributionUpdate # @private class Representation < Google::Apis::Core::JsonRepresentation - property :count, as: 'count', class: Google::Apis::DataflowV1b3::SplitInt64, decorator: Google::Apis::DataflowV1b3::SplitInt64::Representation - property :min, as: 'min', class: Google::Apis::DataflowV1b3::SplitInt64, decorator: Google::Apis::DataflowV1b3::SplitInt64::Representation property :sum_of_squares, as: 'sumOfSquares' + property :sum, as: 'sum', class: Google::Apis::DataflowV1b3::SplitInt64, decorator: Google::Apis::DataflowV1b3::SplitInt64::Representation + property :max, as: 'max', class: Google::Apis::DataflowV1b3::SplitInt64, decorator: Google::Apis::DataflowV1b3::SplitInt64::Representation - property :sum, as: 'sum', class: Google::Apis::DataflowV1b3::SplitInt64, decorator: Google::Apis::DataflowV1b3::SplitInt64::Representation + collection :log_buckets, as: 'logBuckets', class: Google::Apis::DataflowV1b3::LogBucket, decorator: Google::Apis::DataflowV1b3::LogBucket::Representation + + property :count, as: 'count', class: Google::Apis::DataflowV1b3::SplitInt64, decorator: Google::Apis::DataflowV1b3::SplitInt64::Representation end end @@ -1468,31 +1714,20 @@ module Google class SourceFork # @private class Representation < Google::Apis::Core::JsonRepresentation + property :primary, as: 'primary', class: Google::Apis::DataflowV1b3::SourceSplitShard, decorator: Google::Apis::DataflowV1b3::SourceSplitShard::Representation + property :primary_source, as: 'primarySource', class: Google::Apis::DataflowV1b3::DerivedSource, decorator: Google::Apis::DataflowV1b3::DerivedSource::Representation property :residual, as: 'residual', class: Google::Apis::DataflowV1b3::SourceSplitShard, decorator: Google::Apis::DataflowV1b3::SourceSplitShard::Representation property :residual_source, as: 'residualSource', class: Google::Apis::DataflowV1b3::DerivedSource, decorator: Google::Apis::DataflowV1b3::DerivedSource::Representation - property :primary, as: 'primary', class: Google::Apis::DataflowV1b3::SourceSplitShard, decorator: Google::Apis::DataflowV1b3::SourceSplitShard::Representation - end end class WorkItemStatus # @private class Representation < Google::Apis::Core::JsonRepresentation - property :progress, as: 'progress', class: Google::Apis::DataflowV1b3::ApproximateProgress, decorator: Google::Apis::DataflowV1b3::ApproximateProgress::Representation - - property :requested_lease_duration, as: 'requestedLeaseDuration' - property :report_index, :numeric_string => true, as: 'reportIndex' - property :stop_position, as: 'stopPosition', class: Google::Apis::DataflowV1b3::Position, decorator: Google::Apis::DataflowV1b3::Position::Representation - - property :completed, as: 'completed' - property :reported_progress, as: 'reportedProgress', class: Google::Apis::DataflowV1b3::ApproximateReportedProgress, decorator: Google::Apis::DataflowV1b3::ApproximateReportedProgress::Representation - - property :source_fork, as: 'sourceFork', class: Google::Apis::DataflowV1b3::SourceFork, decorator: Google::Apis::DataflowV1b3::SourceFork::Representation - collection :counter_updates, as: 'counterUpdates', class: Google::Apis::DataflowV1b3::CounterUpdate, decorator: Google::Apis::DataflowV1b3::CounterUpdate::Representation property :work_item_id, as: 'workItemId' @@ -1504,6 +1739,17 @@ module Google property :source_operation_response, as: 'sourceOperationResponse', class: Google::Apis::DataflowV1b3::SourceOperationResponse, decorator: Google::Apis::DataflowV1b3::SourceOperationResponse::Representation + property :progress, as: 'progress', class: Google::Apis::DataflowV1b3::ApproximateProgress, decorator: Google::Apis::DataflowV1b3::ApproximateProgress::Representation + + property :requested_lease_duration, as: 'requestedLeaseDuration' + property :report_index, :numeric_string => true, as: 'reportIndex' + property :stop_position, as: 'stopPosition', class: Google::Apis::DataflowV1b3::Position, decorator: Google::Apis::DataflowV1b3::Position::Representation + + property :completed, as: 'completed' + property :reported_progress, as: 'reportedProgress', class: Google::Apis::DataflowV1b3::ApproximateReportedProgress, decorator: Google::Apis::DataflowV1b3::ApproximateReportedProgress::Representation + + property :source_fork, as: 'sourceFork', class: Google::Apis::DataflowV1b3::SourceFork, decorator: Google::Apis::DataflowV1b3::SourceFork::Representation + end end @@ -1519,18 +1765,18 @@ module Google class WorkItemServiceState # @private class Representation < Google::Apis::Core::JsonRepresentation - property :report_status_interval, as: 'reportStatusInterval' + property :suggested_stop_point, as: 'suggestedStopPoint', class: Google::Apis::DataflowV1b3::ApproximateProgress, decorator: Google::Apis::DataflowV1b3::ApproximateProgress::Representation + + property :split_request, as: 'splitRequest', class: Google::Apis::DataflowV1b3::ApproximateSplitRequest, decorator: Google::Apis::DataflowV1b3::ApproximateSplitRequest::Representation + property :suggested_stop_position, as: 'suggestedStopPosition', class: Google::Apis::DataflowV1b3::Position, decorator: Google::Apis::DataflowV1b3::Position::Representation + property :report_status_interval, as: 'reportStatusInterval' hash :harness_data, as: 'harnessData' property :lease_expire_time, as: 'leaseExpireTime' collection :metric_short_id, as: 'metricShortId', class: Google::Apis::DataflowV1b3::MetricShortId, decorator: Google::Apis::DataflowV1b3::MetricShortId::Representation property :next_report_index, :numeric_string => true, as: 'nextReportIndex' - property :suggested_stop_point, as: 'suggestedStopPoint', class: Google::Apis::DataflowV1b3::ApproximateProgress, decorator: Google::Apis::DataflowV1b3::ApproximateProgress::Representation - - property :split_request, as: 'splitRequest', class: Google::Apis::DataflowV1b3::ApproximateSplitRequest, decorator: Google::Apis::DataflowV1b3::ApproximateSplitRequest::Representation - end end @@ -1546,9 +1792,9 @@ module Google class SeqMapTaskOutputInfo # @private class Representation < Google::Apis::Core::JsonRepresentation + property :tag, as: 'tag' property :sink, as: 'sink', class: Google::Apis::DataflowV1b3::Sink, decorator: Google::Apis::DataflowV1b3::Sink::Representation - property :tag, as: 'tag' end end @@ -1562,11 +1808,11 @@ module Google class KeyRangeLocation # @private class Representation < Google::Apis::Core::JsonRepresentation + property :deprecated_persistent_directory, as: 'deprecatedPersistentDirectory' + property :delivery_endpoint, as: 'deliveryEndpoint' property :start, as: 'start' property :data_disk, as: 'dataDisk' property :end, as: 'end' - property :deprecated_persistent_directory, as: 'deprecatedPersistentDirectory' - property :delivery_endpoint, as: 'deliveryEndpoint' end end @@ -1581,30 +1827,30 @@ module Google class NameAndKind # @private class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' property :name, as: 'name' + property :kind, as: 'kind' end end class SeqMapTask # @private class Representation < Google::Apis::Core::JsonRepresentation - property :system_name, as: 'systemName' - property :stage_name, as: 'stageName' - hash :user_fn, as: 'userFn' property :name, as: 'name' collection :output_infos, as: 'outputInfos', class: Google::Apis::DataflowV1b3::SeqMapTaskOutputInfo, decorator: Google::Apis::DataflowV1b3::SeqMapTaskOutputInfo::Representation collection :inputs, as: 'inputs', class: Google::Apis::DataflowV1b3::SideInputInfo, decorator: Google::Apis::DataflowV1b3::SideInputInfo::Representation + property :system_name, as: 'systemName' + property :stage_name, as: 'stageName' + hash :user_fn, as: 'userFn' end end class WorkerMessageCode # @private class Representation < Google::Apis::Core::JsonRepresentation - property :code, as: 'code' hash :parameters, as: 'parameters' + property :code, as: 'code' end end @@ -1645,23 +1891,24 @@ module Google class InstructionOutput # @private class Representation < Google::Apis::Core::JsonRepresentation + property :original_name, as: 'originalName' + property :only_count_key_bytes, as: 'onlyCountKeyBytes' + property :system_name, as: 'systemName' + property :only_count_value_bytes, as: 'onlyCountValueBytes' hash :codec, as: 'codec' property :name, as: 'name' - property :original_name, as: 'originalName' - property :system_name, as: 'systemName' - property :only_count_key_bytes, as: 'onlyCountKeyBytes' - property :only_count_value_bytes, as: 'onlyCountValueBytes' end end class CreateJobFromTemplateRequest # @private class Representation < Google::Apis::Core::JsonRepresentation + property :environment, as: 'environment', class: Google::Apis::DataflowV1b3::RuntimeEnvironment, decorator: Google::Apis::DataflowV1b3::RuntimeEnvironment::Representation + + property :location, as: 'location' hash :parameters, as: 'parameters' property :job_name, as: 'jobName' property :gcs_path, as: 'gcsPath' - property :environment, as: 'environment', class: Google::Apis::DataflowV1b3::RuntimeEnvironment, decorator: Google::Apis::DataflowV1b3::RuntimeEnvironment::Representation - end end @@ -1678,22 +1925,21 @@ module Google class ListJobsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation + collection :jobs, as: 'jobs', class: Google::Apis::DataflowV1b3::Job, decorator: Google::Apis::DataflowV1b3::Job::Representation + property :next_page_token, as: 'nextPageToken' collection :failed_location, as: 'failedLocation', class: Google::Apis::DataflowV1b3::FailedLocation, decorator: Google::Apis::DataflowV1b3::FailedLocation::Representation - collection :jobs, as: 'jobs', class: Google::Apis::DataflowV1b3::Job, decorator: Google::Apis::DataflowV1b3::Job::Representation - end end class ComputationTopology # @private class Representation < Google::Apis::Core::JsonRepresentation - property :user_stage_name, as: 'userStageName' - collection :outputs, as: 'outputs', class: Google::Apis::DataflowV1b3::StreamLocation, decorator: Google::Apis::DataflowV1b3::StreamLocation::Representation - collection :state_families, as: 'stateFamilies', class: Google::Apis::DataflowV1b3::StateFamilyConfig, decorator: Google::Apis::DataflowV1b3::StateFamilyConfig::Representation + collection :outputs, as: 'outputs', class: Google::Apis::DataflowV1b3::StreamLocation, decorator: Google::Apis::DataflowV1b3::StreamLocation::Representation + property :system_stage_name, as: 'systemStageName' collection :inputs, as: 'inputs', class: Google::Apis::DataflowV1b3::StreamLocation, decorator: Google::Apis::DataflowV1b3::StreamLocation::Representation @@ -1706,11 +1952,19 @@ module Google class RuntimeEnvironment # @private class Representation < Google::Apis::Core::JsonRepresentation + property :zone, as: 'zone' + property :max_workers, as: 'maxWorkers' + property :bypass_temp_dir_validation, as: 'bypassTempDirValidation' property :service_account_email, as: 'serviceAccountEmail' property :temp_location, as: 'tempLocation' - property :bypass_temp_dir_validation, as: 'bypassTempDirValidation' - property :max_workers, as: 'maxWorkers' - property :zone, as: 'zone' + property :machine_type, as: 'machineType' + end + end + + class MountedDataDisk + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :data_disk, as: 'dataDisk' end end @@ -1722,13 +1976,6 @@ module Google end end - class MountedDataDisk - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :data_disk, as: 'dataDisk' - end - end - class LaunchTemplateResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1737,28 +1984,13 @@ module Google end end - class DerivedSource - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :derivation_mode, as: 'derivationMode' - property :source, as: 'source', class: Google::Apis::DataflowV1b3::Source, decorator: Google::Apis::DataflowV1b3::Source::Representation - - end - end - - class DynamicSourceSplit - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :residual, as: 'residual', class: Google::Apis::DataflowV1b3::DerivedSource, decorator: Google::Apis::DataflowV1b3::DerivedSource::Representation - - property :primary, as: 'primary', class: Google::Apis::DataflowV1b3::DerivedSource, decorator: Google::Apis::DataflowV1b3::DerivedSource::Representation - - end - end - class Job # @private class Representation < Google::Apis::Core::JsonRepresentation + property :project_id, as: 'projectId' + property :type, as: 'type' + property :pipeline_description, as: 'pipelineDescription', class: Google::Apis::DataflowV1b3::PipelineDescription, decorator: Google::Apis::DataflowV1b3::PipelineDescription::Representation + property :replace_job_id, as: 'replaceJobId' property :requested_state, as: 'requestedState' collection :temp_files, as: 'tempFiles' @@ -1774,13 +2006,30 @@ module Google property :location, as: 'location' property :current_state_time, as: 'currentStateTime' hash :transform_name_mapping, as: 'transformNameMapping' - property :create_time, as: 'createTime' + hash :labels, as: 'labels' property :environment, as: 'environment', class: Google::Apis::DataflowV1b3::Environment, decorator: Google::Apis::DataflowV1b3::Environment::Representation - hash :labels, as: 'labels' - property :type, as: 'type' - property :project_id, as: 'projectId' - property :pipeline_description, as: 'pipelineDescription', class: Google::Apis::DataflowV1b3::PipelineDescription, decorator: Google::Apis::DataflowV1b3::PipelineDescription::Representation + property :create_time, as: 'createTime' + collection :stage_states, as: 'stageStates', class: Google::Apis::DataflowV1b3::ExecutionStageState, decorator: Google::Apis::DataflowV1b3::ExecutionStageState::Representation + + end + end + + class DynamicSourceSplit + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :residual, as: 'residual', class: Google::Apis::DataflowV1b3::DerivedSource, decorator: Google::Apis::DataflowV1b3::DerivedSource::Representation + + property :primary, as: 'primary', class: Google::Apis::DataflowV1b3::DerivedSource, decorator: Google::Apis::DataflowV1b3::DerivedSource::Representation + + end + end + + class DerivedSource + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :derivation_mode, as: 'derivationMode' + property :source, as: 'source', class: Google::Apis::DataflowV1b3::Source, decorator: Google::Apis::DataflowV1b3::Source::Representation end end @@ -1788,10 +2037,16 @@ module Google class SourceOperationResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - property :get_metadata, as: 'getMetadata', class: Google::Apis::DataflowV1b3::SourceGetMetadataResponse, decorator: Google::Apis::DataflowV1b3::SourceGetMetadataResponse::Representation - property :split, as: 'split', class: Google::Apis::DataflowV1b3::SourceSplitResponse, decorator: Google::Apis::DataflowV1b3::SourceSplitResponse::Representation + property :get_metadata, as: 'getMetadata', class: Google::Apis::DataflowV1b3::SourceGetMetadataResponse, decorator: Google::Apis::DataflowV1b3::SourceGetMetadataResponse::Representation + + end + end + + class SendDebugCaptureResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation end end @@ -1805,12 +2060,6 @@ module Google end end - class SendDebugCaptureResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end - end - class CounterStructuredNameAndMetadata # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1833,18 +2082,9 @@ module Google class WriteInstruction # @private class Representation < Google::Apis::Core::JsonRepresentation - property :sink, as: 'sink', class: Google::Apis::DataflowV1b3::Sink, decorator: Google::Apis::DataflowV1b3::Sink::Representation - property :input, as: 'input', class: Google::Apis::DataflowV1b3::InstructionInput, decorator: Google::Apis::DataflowV1b3::InstructionInput::Representation - end - end - - class StreamingComputationRanges - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :computation_id, as: 'computationId' - collection :range_assignments, as: 'rangeAssignments', class: Google::Apis::DataflowV1b3::KeyRangeDataDiskAssignment, decorator: Google::Apis::DataflowV1b3::KeyRangeDataDiskAssignment::Representation + property :sink, as: 'sink', class: Google::Apis::DataflowV1b3::Sink, decorator: Google::Apis::DataflowV1b3::Sink::Representation end end @@ -1857,11 +2097,18 @@ module Google end end + class StreamingComputationRanges + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :computation_id, as: 'computationId' + collection :range_assignments, as: 'rangeAssignments', class: Google::Apis::DataflowV1b3::KeyRangeDataDiskAssignment, decorator: Google::Apis::DataflowV1b3::KeyRangeDataDiskAssignment::Representation + + end + end + class ExecutionStageSummary # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :input_source, as: 'inputSource', class: Google::Apis::DataflowV1b3::StageSource, decorator: Google::Apis::DataflowV1b3::StageSource::Representation - property :id, as: 'id' collection :component_transform, as: 'componentTransform', class: Google::Apis::DataflowV1b3::ComponentTransform, decorator: Google::Apis::DataflowV1b3::ComponentTransform::Representation @@ -1871,164 +2118,7 @@ module Google collection :output_source, as: 'outputSource', class: Google::Apis::DataflowV1b3::StageSource, decorator: Google::Apis::DataflowV1b3::StageSource::Representation property :name, as: 'name' - end - end - - class SendWorkerMessagesRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :worker_messages, as: 'workerMessages', class: Google::Apis::DataflowV1b3::WorkerMessage, decorator: Google::Apis::DataflowV1b3::WorkerMessage::Representation - - end - end - - class SourceSplitShard - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :derivation_mode, as: 'derivationMode' - property :source, as: 'source', class: Google::Apis::DataflowV1b3::Source, decorator: Google::Apis::DataflowV1b3::Source::Representation - - end - end - - class CpuTime - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :rate, as: 'rate' - property :timestamp, as: 'timestamp' - property :total_ms, :numeric_string => true, as: 'totalMs' - end - end - - class Environment - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :cluster_manager_api_service, as: 'clusterManagerApiService' - property :temp_storage_prefix, as: 'tempStoragePrefix' - collection :worker_pools, as: 'workerPools', class: Google::Apis::DataflowV1b3::WorkerPool, decorator: Google::Apis::DataflowV1b3::WorkerPool::Representation - - property :dataset, as: 'dataset' - collection :experiments, as: 'experiments' - hash :version, as: 'version' - hash :internal_experiments, as: 'internalExperiments' - property :service_account_email, as: 'serviceAccountEmail' - hash :sdk_pipeline_options, as: 'sdkPipelineOptions' - hash :user_agent, as: 'userAgent' - end - end - - class StreamingComputationTask - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :data_disks, as: 'dataDisks', class: Google::Apis::DataflowV1b3::MountedDataDisk, decorator: Google::Apis::DataflowV1b3::MountedDataDisk::Representation - - property :task_type, as: 'taskType' - collection :computation_ranges, as: 'computationRanges', class: Google::Apis::DataflowV1b3::StreamingComputationRanges, decorator: Google::Apis::DataflowV1b3::StreamingComputationRanges::Representation - - end - end - - class SendDebugCaptureRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :data, as: 'data' - property :component_id, as: 'componentId' - property :worker_id, as: 'workerId' - end - end - - class GetDebugConfigResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :config, as: 'config' - end - end - - class ComponentTransform - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - property :user_name, as: 'userName' - property :original_transform, as: 'originalTransform' - end - end - - class StreamingSetupTask - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :worker_harness_port, as: 'workerHarnessPort' - property :drain, as: 'drain' - property :receive_work_port, as: 'receiveWorkPort' - property :streaming_computation_topology, as: 'streamingComputationTopology', class: Google::Apis::DataflowV1b3::TopologyConfig, decorator: Google::Apis::DataflowV1b3::TopologyConfig::Representation - - end - end - - class PubsubLocation - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :with_attributes, as: 'withAttributes' - property :id_label, as: 'idLabel' - property :topic, as: 'topic' - property :timestamp_label, as: 'timestampLabel' - property :subscription, as: 'subscription' - property :drop_late_data, as: 'dropLateData' - property :tracking_subscription, as: 'trackingSubscription' - end - end - - class WorkerHealthReport - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :pods, as: 'pods' - property :vm_startup_time, as: 'vmStartupTime' - property :vm_is_healthy, as: 'vmIsHealthy' - property :report_interval, as: 'reportInterval' - end - end - - class JobMessage - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :message_text, as: 'messageText' - property :message_importance, as: 'messageImportance' - property :time, as: 'time' - property :id, as: 'id' - end - end - - class ParameterMetadata - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :is_optional, as: 'isOptional' - property :name, as: 'name' - collection :regexes, as: 'regexes' - property :label, as: 'label' - property :help_text, as: 'helpText' - end - end - - class MultiOutputInfo - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :tag, as: 'tag' - end - end - - class SourceSplitRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :source, as: 'source', class: Google::Apis::DataflowV1b3::Source, decorator: Google::Apis::DataflowV1b3::Source::Representation - - property :options, as: 'options', class: Google::Apis::DataflowV1b3::SourceSplitOptions, decorator: Google::Apis::DataflowV1b3::SourceSplitOptions::Representation - - end - end - - class SourceGetMetadataResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :metadata, as: 'metadata', class: Google::Apis::DataflowV1b3::SourceMetadata, decorator: Google::Apis::DataflowV1b3::SourceMetadata::Representation + collection :input_source, as: 'inputSource', class: Google::Apis::DataflowV1b3::StageSource, decorator: Google::Apis::DataflowV1b3::StageSource::Representation end end diff --git a/generated/google/apis/dataflow_v1b3/service.rb b/generated/google/apis/dataflow_v1b3/service.rb index 2abf81465..05ddd1d4e 100644 --- a/generated/google/apis/dataflow_v1b3/service.rb +++ b/generated/google/apis/dataflow_v1b3/service.rb @@ -80,16 +80,19 @@ module Google execute_or_queue_command(command, &block) end - # Request the job status. + # Launch a template. # @param [String] project_id - # A project id. + # Required. The ID of the Cloud Platform project that the job belongs to. + # @param [Google::Apis::DataflowV1b3::LaunchTemplateParameters] launch_template_parameters_object + # @param [String] gcs_path + # Required. A Cloud Storage path to the template from which to create + # the job. + # Must be valid Cloud Storage URL, beginning with 'gs://'. # @param [String] location - # The location which contains the job specified by job_id. - # @param [String] job_id - # The job to get messages for. - # @param [String] start_time - # Return only metric data that has changed since this time. - # Default is to return all information about all metrics for the job. + # The location to which to direct the request. + # @param [Boolean] validate_only + # If true, the request is validated but not actually executed. + # Defaults to false. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -99,22 +102,256 @@ module Google # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::DataflowV1b3::JobMetrics] parsed result object + # @yieldparam result [Google::Apis::DataflowV1b3::LaunchTemplateResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::DataflowV1b3::JobMetrics] + # @return [Google::Apis::DataflowV1b3::LaunchTemplateResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_project_location_job_metrics(project_id, location, job_id, start_time: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/metrics', options) - command.response_representation = Google::Apis::DataflowV1b3::JobMetrics::Representation - command.response_class = Google::Apis::DataflowV1b3::JobMetrics + def launch_project_template(project_id, launch_template_parameters_object = nil, gcs_path: nil, location: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1b3/projects/{projectId}/templates:launch', options) + command.request_representation = Google::Apis::DataflowV1b3::LaunchTemplateParameters::Representation + command.request_object = launch_template_parameters_object + command.response_representation = Google::Apis::DataflowV1b3::LaunchTemplateResponse::Representation + command.response_class = Google::Apis::DataflowV1b3::LaunchTemplateResponse + command.params['projectId'] = project_id unless project_id.nil? + command.query['gcsPath'] = gcs_path unless gcs_path.nil? + command.query['location'] = location unless location.nil? + command.query['validateOnly'] = validate_only unless validate_only.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Get the template associated with a template. + # @param [String] project_id + # Required. The ID of the Cloud Platform project that the job belongs to. + # @param [String] gcs_path + # Required. A Cloud Storage path to the template from which to + # create the job. + # Must be a valid Cloud Storage URL, beginning with `gs://`. + # @param [String] location + # The location to which to direct the request. + # @param [String] view + # The view to retrieve. Defaults to METADATA_ONLY. + # @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::DataflowV1b3::GetTemplateResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DataflowV1b3::GetTemplateResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_template(project_id, gcs_path: nil, location: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1b3/projects/{projectId}/templates:get', options) + command.response_representation = Google::Apis::DataflowV1b3::GetTemplateResponse::Representation + command.response_class = Google::Apis::DataflowV1b3::GetTemplateResponse + command.params['projectId'] = project_id unless project_id.nil? + command.query['gcsPath'] = gcs_path unless gcs_path.nil? + command.query['location'] = location unless location.nil? + command.query['view'] = view unless view.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a Cloud Dataflow job from a template. + # @param [String] project_id + # Required. The ID of the Cloud Platform project that the job belongs to. + # @param [Google::Apis::DataflowV1b3::CreateJobFromTemplateRequest] create_job_from_template_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::DataflowV1b3::Job] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DataflowV1b3::Job] + # + # @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_job_from_template(project_id, create_job_from_template_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1b3/projects/{projectId}/templates', options) + command.request_representation = Google::Apis::DataflowV1b3::CreateJobFromTemplateRequest::Representation + command.request_object = create_job_from_template_request_object + command.response_representation = Google::Apis::DataflowV1b3::Job::Representation + command.response_class = Google::Apis::DataflowV1b3::Job + command.params['projectId'] = project_id unless project_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Send a worker_message to the service. + # @param [String] project_id + # The project to send the WorkerMessages to. + # @param [String] location + # The location which contains the job + # @param [Google::Apis::DataflowV1b3::SendWorkerMessagesRequest] send_worker_messages_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::DataflowV1b3::SendWorkerMessagesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DataflowV1b3::SendWorkerMessagesResponse] + # + # @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 worker_project_location_messages(project_id, location, send_worker_messages_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1b3/projects/{projectId}/locations/{location}/WorkerMessages', options) + command.request_representation = Google::Apis::DataflowV1b3::SendWorkerMessagesRequest::Representation + command.request_object = send_worker_messages_request_object + command.response_representation = Google::Apis::DataflowV1b3::SendWorkerMessagesResponse::Representation + command.response_class = Google::Apis::DataflowV1b3::SendWorkerMessagesResponse command.params['projectId'] = project_id unless project_id.nil? command.params['location'] = location unless location.nil? - command.params['jobId'] = job_id unless job_id.nil? - command.query['startTime'] = start_time unless start_time.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a Cloud Dataflow job from a template. + # @param [String] project_id + # Required. The ID of the Cloud Platform project that the job belongs to. + # @param [String] location + # The location to which to direct the request. + # @param [Google::Apis::DataflowV1b3::CreateJobFromTemplateRequest] create_job_from_template_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::DataflowV1b3::Job] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DataflowV1b3::Job] + # + # @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_job_from_template_with_location(project_id, location, create_job_from_template_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1b3/projects/{projectId}/locations/{location}/templates', options) + command.request_representation = Google::Apis::DataflowV1b3::CreateJobFromTemplateRequest::Representation + command.request_object = create_job_from_template_request_object + command.response_representation = Google::Apis::DataflowV1b3::Job::Representation + command.response_class = Google::Apis::DataflowV1b3::Job + command.params['projectId'] = project_id unless project_id.nil? + command.params['location'] = location unless location.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Launch a template. + # @param [String] project_id + # Required. The ID of the Cloud Platform project that the job belongs to. + # @param [String] location + # The location to which to direct the request. + # @param [Google::Apis::DataflowV1b3::LaunchTemplateParameters] launch_template_parameters_object + # @param [String] gcs_path + # Required. A Cloud Storage path to the template from which to create + # the job. + # Must be valid Cloud Storage URL, beginning with 'gs://'. + # @param [Boolean] validate_only + # If true, the request is validated but not actually executed. + # Defaults to false. + # @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::DataflowV1b3::LaunchTemplateResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DataflowV1b3::LaunchTemplateResponse] + # + # @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 launch_project_location_template(project_id, location, launch_template_parameters_object = nil, gcs_path: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1b3/projects/{projectId}/locations/{location}/templates:launch', options) + command.request_representation = Google::Apis::DataflowV1b3::LaunchTemplateParameters::Representation + command.request_object = launch_template_parameters_object + command.response_representation = Google::Apis::DataflowV1b3::LaunchTemplateResponse::Representation + command.response_class = Google::Apis::DataflowV1b3::LaunchTemplateResponse + command.params['projectId'] = project_id unless project_id.nil? + command.params['location'] = location unless location.nil? + command.query['gcsPath'] = gcs_path unless gcs_path.nil? + command.query['validateOnly'] = validate_only unless validate_only.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Get the template associated with a template. + # @param [String] project_id + # Required. The ID of the Cloud Platform project that the job belongs to. + # @param [String] location + # The location to which to direct the request. + # @param [String] view + # The view to retrieve. Defaults to METADATA_ONLY. + # @param [String] gcs_path + # Required. A Cloud Storage path to the template from which to + # create the job. + # Must be a valid Cloud Storage URL, beginning with `gs://`. + # @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::DataflowV1b3::GetTemplateResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DataflowV1b3::GetTemplateResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location_template(project_id, location, view: nil, gcs_path: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1b3/projects/{projectId}/locations/{location}/templates:get', options) + command.response_representation = Google::Apis::DataflowV1b3::GetTemplateResponse::Representation + command.response_class = Google::Apis::DataflowV1b3::GetTemplateResponse + command.params['projectId'] = project_id unless project_id.nil? + command.params['location'] = location unless location.nil? + command.query['view'] = view unless view.nil? + command.query['gcsPath'] = gcs_path unless gcs_path.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) @@ -164,6 +401,8 @@ module Google # The project which owns the jobs. # @param [String] location # The location that contains this job. + # @param [String] filter + # The kind of filter to use. # @param [String] page_token # Set this to the 'next_page_token' field of a previous response # to request additional results in a long list. @@ -173,8 +412,6 @@ module Google # and an unspecified server-defined limit. # @param [String] view # Level of information requested in response. Default is `JOB_VIEW_SUMMARY`. - # @param [String] filter - # The kind of filter to use. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -192,16 +429,16 @@ 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_project_location_jobs(project_id, location, page_token: nil, page_size: nil, view: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_project_location_jobs(project_id, location, filter: nil, page_token: nil, page_size: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1b3/projects/{projectId}/locations/{location}/jobs', options) command.response_representation = Google::Apis::DataflowV1b3::ListJobsResponse::Representation command.response_class = Google::Apis::DataflowV1b3::ListJobsResponse command.params['projectId'] = project_id unless project_id.nil? command.params['location'] = location unless location.nil? + command.query['filter'] = filter unless filter.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['view'] = view unless view.nil? - command.query['filter'] = filter unless filter.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) @@ -288,14 +525,16 @@ module Google execute_or_queue_command(command, &block) end - # Reports the status of dataflow WorkItems leased by a worker. + # Request the job status. # @param [String] project_id - # The project which owns the WorkItem's job. + # A project id. # @param [String] location - # The location which contains the WorkItem's job. + # The location which contains the job specified by job_id. # @param [String] job_id - # The job which the WorkItem is part of. - # @param [Google::Apis::DataflowV1b3::ReportWorkItemStatusRequest] report_work_item_status_request_object + # The job to get messages for. + # @param [String] start_time + # Return only metric data that has changed since this time. + # Default is to return all information about all metrics for the job. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -305,20 +544,97 @@ module Google # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::DataflowV1b3::ReportWorkItemStatusResponse] parsed result object + # @yieldparam result [Google::Apis::DataflowV1b3::JobMetrics] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::DataflowV1b3::ReportWorkItemStatusResponse] + # @return [Google::Apis::DataflowV1b3::JobMetrics] # # @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 report_project_location_job_work_item_status(project_id, location, job_id, report_work_item_status_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:reportStatus', options) - command.request_representation = Google::Apis::DataflowV1b3::ReportWorkItemStatusRequest::Representation - command.request_object = report_work_item_status_request_object - command.response_representation = Google::Apis::DataflowV1b3::ReportWorkItemStatusResponse::Representation - command.response_class = Google::Apis::DataflowV1b3::ReportWorkItemStatusResponse + def get_project_location_job_metrics(project_id, location, job_id, start_time: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/metrics', options) + command.response_representation = Google::Apis::DataflowV1b3::JobMetrics::Representation + command.response_class = Google::Apis::DataflowV1b3::JobMetrics + command.params['projectId'] = project_id unless project_id.nil? + command.params['location'] = location unless location.nil? + command.params['jobId'] = job_id unless job_id.nil? + command.query['startTime'] = start_time unless start_time.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Get encoded debug configuration for component. Not cacheable. + # @param [String] project_id + # The project id. + # @param [String] location + # The location which contains the job specified by job_id. + # @param [String] job_id + # The job id. + # @param [Google::Apis::DataflowV1b3::GetDebugConfigRequest] get_debug_config_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::DataflowV1b3::GetDebugConfigResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DataflowV1b3::GetDebugConfigResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location_job_debug_config(project_id, location, job_id, get_debug_config_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/getConfig', options) + command.request_representation = Google::Apis::DataflowV1b3::GetDebugConfigRequest::Representation + command.request_object = get_debug_config_request_object + command.response_representation = Google::Apis::DataflowV1b3::GetDebugConfigResponse::Representation + command.response_class = Google::Apis::DataflowV1b3::GetDebugConfigResponse + command.params['projectId'] = project_id unless project_id.nil? + command.params['location'] = location unless location.nil? + command.params['jobId'] = job_id unless job_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Send encoded debug capture data for component. + # @param [String] project_id + # The project id. + # @param [String] location + # The location which contains the job specified by job_id. + # @param [String] job_id + # The job id. + # @param [Google::Apis::DataflowV1b3::SendDebugCaptureRequest] send_debug_capture_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::DataflowV1b3::SendDebugCaptureResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DataflowV1b3::SendDebugCaptureResponse] + # + # @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 send_project_location_job_debug_capture(project_id, location, job_id, send_debug_capture_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/sendCapture', options) + command.request_representation = Google::Apis::DataflowV1b3::SendDebugCaptureRequest::Representation + command.request_object = send_debug_capture_request_object + command.response_representation = Google::Apis::DataflowV1b3::SendDebugCaptureResponse::Representation + command.response_class = Google::Apis::DataflowV1b3::SendDebugCaptureResponse command.params['projectId'] = project_id unless project_id.nil? command.params['location'] = location unless location.nil? command.params['jobId'] = job_id unless job_id.nil? @@ -366,6 +682,45 @@ module Google execute_or_queue_command(command, &block) end + # Reports the status of dataflow WorkItems leased by a worker. + # @param [String] project_id + # The project which owns the WorkItem's job. + # @param [String] location + # The location which contains the WorkItem's job. + # @param [String] job_id + # The job which the WorkItem is part of. + # @param [Google::Apis::DataflowV1b3::ReportWorkItemStatusRequest] report_work_item_status_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::DataflowV1b3::ReportWorkItemStatusResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DataflowV1b3::ReportWorkItemStatusResponse] + # + # @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 report_project_location_job_work_item_status(project_id, location, job_id, report_work_item_status_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:reportStatus', options) + command.request_representation = Google::Apis::DataflowV1b3::ReportWorkItemStatusRequest::Representation + command.request_object = report_work_item_status_request_object + command.response_representation = Google::Apis::DataflowV1b3::ReportWorkItemStatusResponse::Representation + command.response_class = Google::Apis::DataflowV1b3::ReportWorkItemStatusResponse + command.params['projectId'] = project_id unless project_id.nil? + command.params['location'] = location unless location.nil? + command.params['jobId'] = job_id unless job_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Request the job status. # @param [String] project_id # A project id. @@ -423,129 +778,15 @@ module Google execute_or_queue_command(command, &block) end - # Launch a template. - # @param [String] project_id - # Required. The ID of the Cloud Platform project that the job belongs to. - # @param [Google::Apis::DataflowV1b3::LaunchTemplateParameters] launch_template_parameters_object - # @param [Boolean] dry_run - # Whether or not the job should actually be executed after - # validating parameters. Defaults to false. Validation errors do - # not cause the HTTP request to fail if true. - # @param [String] gcs_path - # Required. A Cloud Storage path to the template from which to create - # the job. - # Must be valid Cloud Storage URL, beginning with 'gs://'. - # @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::DataflowV1b3::LaunchTemplateResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DataflowV1b3::LaunchTemplateResponse] - # - # @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 launch_project_template(project_id, launch_template_parameters_object = nil, dry_run: nil, gcs_path: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1b3/projects/{projectId}/templates:launch', options) - command.request_representation = Google::Apis::DataflowV1b3::LaunchTemplateParameters::Representation - command.request_object = launch_template_parameters_object - command.response_representation = Google::Apis::DataflowV1b3::LaunchTemplateResponse::Representation - command.response_class = Google::Apis::DataflowV1b3::LaunchTemplateResponse - command.params['projectId'] = project_id unless project_id.nil? - command.query['dryRun'] = dry_run unless dry_run.nil? - command.query['gcsPath'] = gcs_path unless gcs_path.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Get the template associated with a template. - # @param [String] project_id - # Required. The ID of the Cloud Platform project that the job belongs to. - # @param [String] view - # The view to retrieve. Defaults to METADATA_ONLY. - # @param [String] gcs_path - # Required. A Cloud Storage path to the template from which to - # create the job. - # Must be a valid Cloud Storage URL, beginning with `gs://`. - # @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::DataflowV1b3::GetTemplateResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DataflowV1b3::GetTemplateResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_project_template(project_id, view: nil, gcs_path: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1b3/projects/{projectId}/templates:get', options) - command.response_representation = Google::Apis::DataflowV1b3::GetTemplateResponse::Representation - command.response_class = Google::Apis::DataflowV1b3::GetTemplateResponse - command.params['projectId'] = project_id unless project_id.nil? - command.query['view'] = view unless view.nil? - command.query['gcsPath'] = gcs_path unless gcs_path.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Creates a Cloud Dataflow job from a template. - # @param [String] project_id - # Required. The ID of the Cloud Platform project that the job belongs to. - # @param [Google::Apis::DataflowV1b3::CreateJobFromTemplateRequest] create_job_from_template_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::DataflowV1b3::Job] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DataflowV1b3::Job] - # - # @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_job_from_template(project_id, create_job_from_template_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1b3/projects/{projectId}/templates', options) - command.request_representation = Google::Apis::DataflowV1b3::CreateJobFromTemplateRequest::Representation - command.request_object = create_job_from_template_request_object - command.response_representation = Google::Apis::DataflowV1b3::Job::Representation - command.response_class = Google::Apis::DataflowV1b3::Job - command.params['projectId'] = project_id unless project_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - # Gets the state of the specified Cloud Dataflow job. # @param [String] project_id # The ID of the Cloud Platform project that the job belongs to. # @param [String] job_id # The job ID. - # @param [String] location - # The location that contains this job. # @param [String] view # The level of information requested in response. + # @param [String] location + # The location that contains this job. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -563,14 +804,14 @@ 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 get_project_job(project_id, job_id, location: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block) + def get_project_job(project_id, job_id, view: nil, location: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1b3/projects/{projectId}/jobs/{jobId}', options) command.response_representation = Google::Apis::DataflowV1b3::Job::Representation command.response_class = Google::Apis::DataflowV1b3::Job command.params['projectId'] = project_id unless project_id.nil? command.params['jobId'] = job_id unless job_id.nil? - command.query['location'] = location unless location.nil? command.query['view'] = view unless view.nil? + command.query['location'] = location unless location.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) @@ -710,11 +951,11 @@ module Google # A project id. # @param [String] job_id # The job to get messages for. - # @param [String] location - # The location which contains the job specified by job_id. # @param [String] start_time # Return only metric data that has changed since this time. # Default is to return all information about all metrics for the job. + # @param [String] location + # The location which contains the job specified by job_id. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -732,14 +973,14 @@ 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 get_project_job_metrics(project_id, job_id, location: nil, start_time: nil, fields: nil, quota_user: nil, options: nil, &block) + def get_project_job_metrics(project_id, job_id, start_time: nil, location: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1b3/projects/{projectId}/jobs/{jobId}/metrics', options) command.response_representation = Google::Apis::DataflowV1b3::JobMetrics::Representation command.response_class = Google::Apis::DataflowV1b3::JobMetrics command.params['projectId'] = project_id unless project_id.nil? command.params['jobId'] = job_id unless job_id.nil? - command.query['location'] = location unless location.nil? command.query['startTime'] = start_time unless start_time.nil? + command.query['location'] = location unless location.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) @@ -899,13 +1140,13 @@ module Google # (i.e. return up to the latest messages available). # @param [String] location # The location which contains the job specified by job_id. - # @param [String] start_time - # If specified, return only messages with timestamps >= start_time. - # The default is the job creation time (i.e. beginning of messages). # @param [String] page_token # If supplied, this should be the value of next_page_token returned # by an earlier call. This will cause the next page of results to # be returned. + # @param [String] start_time + # If specified, return only messages with timestamps >= start_time. + # The default is the job creation time (i.e. beginning of messages). # @param [Fixnum] page_size # If specified, determines the maximum number of messages to # return. If unspecified, the service may choose an appropriate @@ -929,7 +1170,7 @@ 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_project_job_messages(project_id, job_id, end_time: nil, location: nil, start_time: nil, page_token: nil, page_size: nil, minimum_importance: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_project_job_messages(project_id, job_id, end_time: nil, location: nil, page_token: nil, start_time: nil, page_size: nil, minimum_importance: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1b3/projects/{projectId}/jobs/{jobId}/messages', options) command.response_representation = Google::Apis::DataflowV1b3::ListJobMessagesResponse::Representation command.response_class = Google::Apis::DataflowV1b3::ListJobMessagesResponse @@ -937,8 +1178,8 @@ module Google command.params['jobId'] = job_id unless job_id.nil? command.query['endTime'] = end_time unless end_time.nil? command.query['location'] = location unless location.nil? - command.query['startTime'] = start_time unless start_time.nil? command.query['pageToken'] = page_token unless page_token.nil? + command.query['startTime'] = start_time unless start_time.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['minimumImportance'] = minimum_importance unless minimum_importance.nil? command.query['fields'] = fields unless fields.nil? diff --git a/generated/google/apis/dataproc_v1.rb b/generated/google/apis/dataproc_v1.rb index d3a52a228..58006ef9d 100644 --- a/generated/google/apis/dataproc_v1.rb +++ b/generated/google/apis/dataproc_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/dataproc/ module DataprocV1 VERSION = 'V1' - REVISION = '20170502' + REVISION = '20170515' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/dataproc_v1/classes.rb b/generated/google/apis/dataproc_v1/classes.rb index 782d67e6c..461d5070c 100644 --- a/generated/google/apis/dataproc_v1/classes.rb +++ b/generated/google/apis/dataproc_v1/classes.rb @@ -22,35 +22,6 @@ module Google module Apis module DataprocV1 - # Encapsulates the full scoping used to reference a job. - class JobReference - include Google::Apis::Core::Hashable - - # Required. The ID of the Google Cloud Platform project that the job belongs to. - # Corresponds to the JSON property `projectId` - # @return [String] - attr_accessor :project_id - - # Optional. The job ID, which must be unique within the project. The job ID is - # generated by the server upon job submission or provided by the user as a means - # to perform retries without creating duplicate jobs. The ID must contain only - # letters (a-z, A-Z), numbers (0-9), underscores (_), or hyphens (-). The - # maximum length is 100 characters. - # Corresponds to the JSON property `jobId` - # @return [String] - attr_accessor :job_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @project_id = args[:project_id] if args.key?(:project_id) - @job_id = args[:job_id] if args.key?(:job_id) - end - end - # A request to submit a job. class SubmitJobRequest include Google::Apis::Core::Hashable @@ -82,7 +53,7 @@ module Google # user-facing error message is needed, put the localized message in the error # details or localize it in the client. The optional error details may contain # arbitrary information about the error. There is a predefined set of error - # detail types in the package google.rpc which can be used for common error + # detail types in the package google.rpc that can be used for common error # conditions.Language mappingThe Status message is the logical representation of # the error model, but it is not necessarily the actual wire format. When the # Status message is exposed in different client libraries and different wire @@ -95,7 +66,7 @@ module Google # Partial errors. If a service needs to return partial errors to the client, it # may embed the Status in the normal response to indicate the partial errors. # Workflow errors. A typical workflow has multiple steps. Each step may have a - # Status message for error reporting purpose. + # Status message for error reporting. # Batch operations. If a client uses batch request and batch response, the # Status message should be used directly inside batch response, one for each # error sub-response. @@ -107,6 +78,11 @@ module Google class Status include Google::Apis::Core::Hashable + # The status code, which should be an enum value of google.rpc.Code. + # Corresponds to the JSON property `code` + # @return [Fixnum] + attr_accessor :code + # A developer-facing error message, which should be in English. Any user-facing # error message should be localized and sent in the google.rpc.Status.details # field, or localized by the client. @@ -120,20 +96,15 @@ module Google # @return [Array>] attr_accessor :details - # The status code, which should be an enum value of google.rpc.Code. - # Corresponds to the JSON property `code` - # @return [Fixnum] - attr_accessor :code - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @code = args[:code] if args.key?(:code) @message = args[:message] if args.key?(:message) @details = args[:details] if args.key?(:details) - @code = args[:code] if args.key?(:code) end end @@ -170,12 +141,6 @@ module Google # @return [Google::Apis::DataprocV1::DiskConfig] attr_accessor :disk_config - # Output-only. The Google Compute Engine image resource used for cluster - # instances. Inferred from SoftwareConfig.image_version. - # Corresponds to the JSON property `imageUri` - # @return [String] - attr_accessor :image_uri - # Required. The Google Compute Engine machine type used for cluster instances. # Example: https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us- # east1-a/machineTypes/n1-standard-2. @@ -194,6 +159,12 @@ module Google attr_accessor :is_preemptible alias_method :is_preemptible?, :is_preemptible + # Output-only. The Google Compute Engine image resource used for cluster + # instances. Inferred from SoftwareConfig.image_version. + # Corresponds to the JSON property `imageUri` + # @return [String] + attr_accessor :image_uri + # Optional. The list of instance names. Cloud Dataproc derives the names from # cluster_name, num_instances, and the instance group if not set by user ( # recommended practice is to let Cloud Dataproc derive the name). @@ -221,43 +192,16 @@ module Google # Update properties of this object def update!(**args) @disk_config = args[:disk_config] if args.key?(:disk_config) - @image_uri = args[:image_uri] if args.key?(:image_uri) @machine_type_uri = args[:machine_type_uri] if args.key?(:machine_type_uri) @managed_group_config = args[:managed_group_config] if args.key?(:managed_group_config) @is_preemptible = args[:is_preemptible] if args.key?(:is_preemptible) + @image_uri = args[:image_uri] if args.key?(:image_uri) @instance_names = args[:instance_names] if args.key?(:instance_names) @accelerators = args[:accelerators] if args.key?(:accelerators) @num_instances = args[:num_instances] if args.key?(:num_instances) end end - # A list of jobs in a project. - class ListJobsResponse - include Google::Apis::Core::Hashable - - # Output-only. Jobs list. - # Corresponds to the JSON property `jobs` - # @return [Array] - attr_accessor :jobs - - # Optional. This token is included in the response if there are more results to - # fetch. To fetch additional results, provide this value as the page_token in a - # subsequent ListJobsRequest. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @jobs = args[:jobs] if args.key?(:jobs) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - # Specifies an executable to run on a fully configured node and a timeout period # for executable completion. class NodeInitializationAction @@ -287,6 +231,33 @@ module Google end end + # A list of jobs in a project. + class ListJobsResponse + include Google::Apis::Core::Hashable + + # Optional. This token is included in the response if there are more results to + # fetch. To fetch additional results, provide this value as the page_token in a + # subsequent ListJobsRequest. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # Output-only. Jobs list. + # Corresponds to the JSON property `jobs` + # @return [Array] + attr_accessor :jobs + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @jobs = args[:jobs] if args.key?(:jobs) + end + end + # A request to cancel a job. class CancelJobRequest include Google::Apis::Core::Hashable @@ -305,6 +276,16 @@ module Google class SparkSqlJob include Google::Apis::Core::Hashable + # A list of queries to run on a cluster. + # Corresponds to the JSON property `queryList` + # @return [Google::Apis::DataprocV1::QueryList] + attr_accessor :query_list + + # The HCFS URI of the script that contains SQL queries. + # Corresponds to the JSON property `queryFileUri` + # @return [String] + attr_accessor :query_file_uri + # Optional. Mapping of query variable names to values (equivalent to the Spark # SQL command: SET name="value";). # Corresponds to the JSON property `scriptVariables` @@ -328,28 +309,18 @@ module Google # @return [Hash] attr_accessor :properties - # A list of queries to run on a cluster. - # Corresponds to the JSON property `queryList` - # @return [Google::Apis::DataprocV1::QueryList] - attr_accessor :query_list - - # The HCFS URI of the script that contains SQL queries. - # Corresponds to the JSON property `queryFileUri` - # @return [String] - attr_accessor :query_file_uri - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @query_list = args[:query_list] if args.key?(:query_list) + @query_file_uri = args[:query_file_uri] if args.key?(:query_file_uri) @script_variables = args[:script_variables] if args.key?(:script_variables) @jar_file_uris = args[:jar_file_uris] if args.key?(:jar_file_uris) @logging_config = args[:logging_config] if args.key?(:logging_config) @properties = args[:properties] if args.key?(:properties) - @query_list = args[:query_list] if args.key?(:query_list) - @query_file_uri = args[:query_file_uri] if args.key?(:query_file_uri) end end @@ -358,6 +329,27 @@ module Google class Cluster include Google::Apis::Core::Hashable + # Optional. The labels to associate with this cluster. Label keys must contain 1 + # to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/ + # rfc1035.txt). Label values may be empty, but, if present, must contain 1 to 63 + # characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt) + # . No more than 32 labels can be associated with a cluster. + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # Contains cluster daemon metrics, such as HDFS and YARN stats.Beta Feature: + # This report is available for testing purposes only. It may be changed before + # final release. + # Corresponds to the JSON property `metrics` + # @return [Google::Apis::DataprocV1::ClusterMetrics] + attr_accessor :metrics + + # The status of a cluster and its instances. + # Corresponds to the JSON property `status` + # @return [Google::Apis::DataprocV1::ClusterStatus] + attr_accessor :status + # Output-only. The previous cluster status. # Corresponds to the JSON property `statusHistory` # @return [Array] @@ -368,58 +360,37 @@ module Google # @return [Google::Apis::DataprocV1::ClusterConfig] attr_accessor :config - # Output-only. A cluster UUID (Unique Universal Identifier). Cloud Dataproc - # generates this value when it creates the cluster. - # Corresponds to the JSON property `clusterUuid` - # @return [String] - attr_accessor :cluster_uuid - # Required. The cluster name. Cluster names within a project must be unique. # Names of deleted clusters can be reused. # Corresponds to the JSON property `clusterName` # @return [String] attr_accessor :cluster_name + # Output-only. A cluster UUID (Unique Universal Identifier). Cloud Dataproc + # generates this value when it creates the cluster. + # Corresponds to the JSON property `clusterUuid` + # @return [String] + attr_accessor :cluster_uuid + # Required. The Google Cloud Platform project ID that the cluster belongs to. # Corresponds to the JSON property `projectId` # @return [String] attr_accessor :project_id - # Optional. The labels to associate with this cluster. Label keys must contain 1 - # to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/ - # rfc1035.txt). Label values may be empty, but, if present, must contain 1 to 63 - # characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt) - # . No more than 32 labels can be associated with a cluster. - # Corresponds to the JSON property `labels` - # @return [Hash] - attr_accessor :labels - - # The status of a cluster and its instances. - # Corresponds to the JSON property `status` - # @return [Google::Apis::DataprocV1::ClusterStatus] - attr_accessor :status - - # Contains cluster daemon metrics, such as HDFS and YARN stats.Beta Feature: - # This report is available for testing purposes only. It may be changed before - # final release. - # Corresponds to the JSON property `metrics` - # @return [Google::Apis::DataprocV1::ClusterMetrics] - attr_accessor :metrics - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @labels = args[:labels] if args.key?(:labels) + @metrics = args[:metrics] if args.key?(:metrics) + @status = args[:status] if args.key?(:status) @status_history = args[:status_history] if args.key?(:status_history) @config = args[:config] if args.key?(:config) - @cluster_uuid = args[:cluster_uuid] if args.key?(:cluster_uuid) @cluster_name = args[:cluster_name] if args.key?(:cluster_name) + @cluster_uuid = args[:cluster_uuid] if args.key?(:cluster_uuid) @project_id = args[:project_id] if args.key?(:project_id) - @labels = args[:labels] if args.key?(:labels) - @status = args[:status] if args.key?(:status) - @metrics = args[:metrics] if args.key?(:metrics) end end @@ -452,6 +423,41 @@ module Google class OperationMetadata include Google::Apis::Core::Hashable + # Output-only Short description of operation. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # The status of the operation. + # Corresponds to the JSON property `status` + # @return [Google::Apis::DataprocV1::OperationStatus] + attr_accessor :status + + # A message containing any operation metadata details. + # Corresponds to the JSON property `details` + # @return [String] + attr_accessor :details + + # A message containing the operation state. + # Corresponds to the JSON property `state` + # @return [String] + attr_accessor :state + + # Name of the cluster for the operation. + # Corresponds to the JSON property `clusterName` + # @return [String] + attr_accessor :cluster_name + + # Cluster UUId for the operation. + # Corresponds to the JSON property `clusterUuid` + # @return [String] + attr_accessor :cluster_uuid + + # A message containing the detailed operation state. + # Corresponds to the JSON property `innerState` + # @return [String] + attr_accessor :inner_state + # The time that the operation completed. # Corresponds to the JSON property `endTime` # @return [String] @@ -482,60 +488,25 @@ module Google # @return [String] attr_accessor :operation_type - # Output-only Short description of operation. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # The status of the operation. - # Corresponds to the JSON property `status` - # @return [Google::Apis::DataprocV1::OperationStatus] - attr_accessor :status - - # A message containing the operation state. - # Corresponds to the JSON property `state` - # @return [String] - attr_accessor :state - - # A message containing any operation metadata details. - # Corresponds to the JSON property `details` - # @return [String] - attr_accessor :details - - # Cluster UUId for the operation. - # Corresponds to the JSON property `clusterUuid` - # @return [String] - attr_accessor :cluster_uuid - - # Name of the cluster for the operation. - # Corresponds to the JSON property `clusterName` - # @return [String] - attr_accessor :cluster_name - - # A message containing the detailed operation state. - # Corresponds to the JSON property `innerState` - # @return [String] - attr_accessor :inner_state - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @description = args[:description] if args.key?(:description) + @status = args[:status] if args.key?(:status) + @details = args[:details] if args.key?(:details) + @state = args[:state] if args.key?(:state) + @cluster_name = args[:cluster_name] if args.key?(:cluster_name) + @cluster_uuid = args[:cluster_uuid] if args.key?(:cluster_uuid) + @inner_state = args[:inner_state] if args.key?(:inner_state) @end_time = args[:end_time] if args.key?(:end_time) @start_time = args[:start_time] if args.key?(:start_time) @warnings = args[:warnings] if args.key?(:warnings) @insert_time = args[:insert_time] if args.key?(:insert_time) @status_history = args[:status_history] if args.key?(:status_history) @operation_type = args[:operation_type] if args.key?(:operation_type) - @description = args[:description] if args.key?(:description) - @status = args[:status] if args.key?(:status) - @state = args[:state] if args.key?(:state) - @details = args[:details] if args.key?(:details) - @cluster_uuid = args[:cluster_uuid] if args.key?(:cluster_uuid) - @cluster_name = args[:cluster_name] if args.key?(:cluster_name) - @inner_state = args[:inner_state] if args.key?(:inner_state) end end @@ -569,6 +540,13 @@ module Google class SoftwareConfig include Google::Apis::Core::Hashable + # Optional. The version of software inside the cluster. It must match the + # regular expression [0-9]+\.[0-9]+. If unspecified, it defaults to the latest + # version (see Cloud Dataproc Versioning). + # Corresponds to the JSON property `imageVersion` + # @return [String] + attr_accessor :image_version + # Optional. The properties to set on daemon config files.Property keys are # specified in prefix:property format, such as core:fs.defaultFS. The following # are supported prefixes and their mappings: @@ -585,59 +563,14 @@ module Google # @return [Hash] attr_accessor :properties - # Optional. The version of software inside the cluster. It must match the - # regular expression [0-9]+\.[0-9]+. If unspecified, it defaults to the latest - # version (see Cloud Dataproc Versioning). - # Corresponds to the JSON property `imageVersion` - # @return [String] - attr_accessor :image_version - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @properties = args[:properties] if args.key?(:properties) @image_version = args[:image_version] if args.key?(:image_version) - end - end - - # The status of a cluster and its instances. - class ClusterStatus - include Google::Apis::Core::Hashable - - # Output-only. The cluster's state. - # Corresponds to the JSON property `state` - # @return [String] - attr_accessor :state - - # Output-only. Time when this state was entered. - # Corresponds to the JSON property `stateStartTime` - # @return [String] - attr_accessor :state_start_time - - # Output-only. Additional state information that includes status reported by the - # agent. - # Corresponds to the JSON property `substate` - # @return [String] - attr_accessor :substate - - # Output-only. Optional details of cluster's state. - # Corresponds to the JSON property `detail` - # @return [String] - attr_accessor :detail - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @state = args[:state] if args.key?(:state) - @state_start_time = args[:state_start_time] if args.key?(:state_start_time) - @substate = args[:substate] if args.key?(:substate) - @detail = args[:detail] if args.key?(:detail) + @properties = args[:properties] if args.key?(:properties) end end @@ -646,6 +579,23 @@ module Google class PigJob include Google::Apis::Core::Hashable + # Optional. HCFS URIs of jar files to add to the CLASSPATH of the Pig Client and + # Hadoop MapReduce (MR) tasks. Can contain Pig UDFs. + # Corresponds to the JSON property `jarFileUris` + # @return [Array] + attr_accessor :jar_file_uris + + # Optional. Mapping of query variable names to values (equivalent to the Pig + # command: name=[value]). + # Corresponds to the JSON property `scriptVariables` + # @return [Hash] + attr_accessor :script_variables + + # The runtime logging config of the job. + # Corresponds to the JSON property `loggingConfig` + # @return [Google::Apis::DataprocV1::LoggingConfig] + attr_accessor :logging_config + # Optional. A mapping of property names to values, used to configure Pig. # Properties that conflict with values set by the Cloud Dataproc API may be # overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/ @@ -672,22 +622,46 @@ module Google # @return [Google::Apis::DataprocV1::QueryList] attr_accessor :query_list - # Optional. HCFS URIs of jar files to add to the CLASSPATH of the Pig Client and - # Hadoop MapReduce (MR) tasks. Can contain Pig UDFs. - # Corresponds to the JSON property `jarFileUris` - # @return [Array] - attr_accessor :jar_file_uris + def initialize(**args) + update!(**args) + end - # Optional. Mapping of query variable names to values (equivalent to the Pig - # command: name=[value]). - # Corresponds to the JSON property `scriptVariables` - # @return [Hash] - attr_accessor :script_variables + # Update properties of this object + def update!(**args) + @jar_file_uris = args[:jar_file_uris] if args.key?(:jar_file_uris) + @script_variables = args[:script_variables] if args.key?(:script_variables) + @logging_config = args[:logging_config] if args.key?(:logging_config) + @properties = args[:properties] if args.key?(:properties) + @continue_on_failure = args[:continue_on_failure] if args.key?(:continue_on_failure) + @query_file_uri = args[:query_file_uri] if args.key?(:query_file_uri) + @query_list = args[:query_list] if args.key?(:query_list) + end + end - # The runtime logging config of the job. - # Corresponds to the JSON property `loggingConfig` - # @return [Google::Apis::DataprocV1::LoggingConfig] - attr_accessor :logging_config + # The status of a cluster and its instances. + class ClusterStatus + include Google::Apis::Core::Hashable + + # Output-only. Optional details of cluster's state. + # Corresponds to the JSON property `detail` + # @return [String] + attr_accessor :detail + + # Output-only. The cluster's state. + # Corresponds to the JSON property `state` + # @return [String] + attr_accessor :state + + # Output-only. Time when this state was entered. + # Corresponds to the JSON property `stateStartTime` + # @return [String] + attr_accessor :state_start_time + + # Output-only. Additional state information that includes status reported by the + # agent. + # Corresponds to the JSON property `substate` + # @return [String] + attr_accessor :substate def initialize(**args) update!(**args) @@ -695,13 +669,10 @@ module Google # Update properties of this object def update!(**args) - @properties = args[:properties] if args.key?(:properties) - @continue_on_failure = args[:continue_on_failure] if args.key?(:continue_on_failure) - @query_file_uri = args[:query_file_uri] if args.key?(:query_file_uri) - @query_list = args[:query_list] if args.key?(:query_list) - @jar_file_uris = args[:jar_file_uris] if args.key?(:jar_file_uris) - @script_variables = args[:script_variables] if args.key?(:script_variables) - @logging_config = args[:logging_config] if args.key?(:logging_config) + @detail = args[:detail] if args.key?(:detail) + @state = args[:state] if args.key?(:state) + @state_start_time = args[:state_start_time] if args.key?(:state_start_time) + @substate = args[:substate] if args.key?(:substate) end end @@ -737,17 +708,6 @@ module Google class SparkJob include Google::Apis::Core::Hashable - # The HCFS URI of the jar file that contains the main class. - # Corresponds to the JSON property `mainJarFileUri` - # @return [String] - attr_accessor :main_jar_file_uri - - # Optional. HCFS URIs of jar files to add to the CLASSPATHs of the Spark driver - # and tasks. - # Corresponds to the JSON property `jarFileUris` - # @return [Array] - attr_accessor :jar_file_uris - # The runtime logging config of the job. # Corresponds to the JSON property `loggingConfig` # @return [Google::Apis::DataprocV1::LoggingConfig] @@ -787,20 +747,31 @@ module Google # @return [Array] attr_accessor :archive_uris + # The HCFS URI of the jar file that contains the main class. + # Corresponds to the JSON property `mainJarFileUri` + # @return [String] + attr_accessor :main_jar_file_uri + + # Optional. HCFS URIs of jar files to add to the CLASSPATHs of the Spark driver + # and tasks. + # Corresponds to the JSON property `jarFileUris` + # @return [Array] + attr_accessor :jar_file_uris + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @main_jar_file_uri = args[:main_jar_file_uri] if args.key?(:main_jar_file_uri) - @jar_file_uris = args[:jar_file_uris] if args.key?(:jar_file_uris) @logging_config = args[:logging_config] if args.key?(:logging_config) @properties = args[:properties] if args.key?(:properties) @args = args[:args] if args.key?(:args) @file_uris = args[:file_uris] if args.key?(:file_uris) @main_class = args[:main_class] if args.key?(:main_class) @archive_uris = args[:archive_uris] if args.key?(:archive_uris) + @main_jar_file_uri = args[:main_jar_file_uri] if args.key?(:main_jar_file_uri) + @jar_file_uris = args[:jar_file_uris] if args.key?(:jar_file_uris) end end @@ -808,6 +779,23 @@ module Google class Job include Google::Apis::Core::Hashable + # Cloud Dataproc job status. + # Corresponds to the JSON property `status` + # @return [Google::Apis::DataprocV1::JobStatus] + attr_accessor :status + + # Cloud Dataproc job config. + # Corresponds to the JSON property `placement` + # @return [Google::Apis::DataprocV1::JobPlacement] + attr_accessor :placement + + # Output-only. If present, the location of miscellaneous control files which may + # be used as part of job setup and handling. If not present, control files may + # be placed in the same location as driver_output_uri. + # Corresponds to the JSON property `driverControlFilesUri` + # @return [String] + attr_accessor :driver_control_files_uri + # Job scheduling options.Beta Feature: These options are available for testing # purposes only. They may be changed before final release. # Corresponds to the JSON property `scheduling` @@ -841,17 +829,17 @@ module Google # @return [String] attr_accessor :driver_output_resource_uri + # Output-only. The previous job status. + # Corresponds to the JSON property `statusHistory` + # @return [Array] + attr_accessor :status_history + # A Cloud Dataproc job for running Apache Spark (http://spark.apache.org/) # applications on YARN. # Corresponds to the JSON property `sparkJob` # @return [Google::Apis::DataprocV1::SparkJob] attr_accessor :spark_job - # Output-only. The previous job status. - # Corresponds to the JSON property `statusHistory` - # @return [Array] - attr_accessor :status_history - # A Cloud Dataproc job for running Apache Spark SQL (http://spark.apache.org/sql/ # ) queries. # Corresponds to the JSON property `sparkSqlJob` @@ -884,44 +872,27 @@ module Google # @return [Google::Apis::DataprocV1::HadoopJob] attr_accessor :hadoop_job - # Cloud Dataproc job config. - # Corresponds to the JSON property `placement` - # @return [Google::Apis::DataprocV1::JobPlacement] - attr_accessor :placement - - # Cloud Dataproc job status. - # Corresponds to the JSON property `status` - # @return [Google::Apis::DataprocV1::JobStatus] - attr_accessor :status - - # Output-only. If present, the location of miscellaneous control files which may - # be used as part of job setup and handling. If not present, control files may - # be placed in the same location as driver_output_uri. - # Corresponds to the JSON property `driverControlFilesUri` - # @return [String] - attr_accessor :driver_control_files_uri - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @status = args[:status] if args.key?(:status) + @placement = args[:placement] if args.key?(:placement) + @driver_control_files_uri = args[:driver_control_files_uri] if args.key?(:driver_control_files_uri) @scheduling = args[:scheduling] if args.key?(:scheduling) @pig_job = args[:pig_job] if args.key?(:pig_job) @hive_job = args[:hive_job] if args.key?(:hive_job) @labels = args[:labels] if args.key?(:labels) @driver_output_resource_uri = args[:driver_output_resource_uri] if args.key?(:driver_output_resource_uri) - @spark_job = args[:spark_job] if args.key?(:spark_job) @status_history = args[:status_history] if args.key?(:status_history) + @spark_job = args[:spark_job] if args.key?(:spark_job) @spark_sql_job = args[:spark_sql_job] if args.key?(:spark_sql_job) @yarn_applications = args[:yarn_applications] if args.key?(:yarn_applications) @pyspark_job = args[:pyspark_job] if args.key?(:pyspark_job) @reference = args[:reference] if args.key?(:reference) @hadoop_job = args[:hadoop_job] if args.key?(:hadoop_job) - @placement = args[:placement] if args.key?(:placement) - @status = args[:status] if args.key?(:status) - @driver_control_files_uri = args[:driver_control_files_uri] if args.key?(:driver_control_files_uri) end end @@ -994,6 +965,11 @@ module Google class ClusterOperationStatus include Google::Apis::Core::Hashable + # Output-only. A message containing the detailed operation state. + # Corresponds to the JSON property `innerState` + # @return [String] + attr_accessor :inner_state + # Output-only. The time this state was entered. # Corresponds to the JSON property `stateStartTime` # @return [String] @@ -1009,10 +985,79 @@ module Google # @return [String] attr_accessor :details - # Output-only. A message containing the detailed operation state. - # Corresponds to the JSON property `innerState` + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @inner_state = args[:inner_state] if args.key?(:inner_state) + @state_start_time = args[:state_start_time] if args.key?(:state_start_time) + @state = args[:state] if args.key?(:state) + @details = args[:details] if args.key?(:details) + end + end + + # A Cloud Dataproc job for running Apache Hadoop MapReduce (https://hadoop. + # apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/ + # MapReduceTutorial.html) jobs on Apache Hadoop YARN (https://hadoop.apache.org/ + # docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/YARN.html). + class HadoopJob + include Google::Apis::Core::Hashable + + # The HCFS URI of the jar file containing the main class. Examples: 'gs://foo- + # bucket/analytics-binaries/extract-useful-metrics-mr.jar' 'hdfs:/tmp/test- + # samples/custom-wordcount.jar' 'file:///home/usr/lib/hadoop-mapreduce/hadoop- + # mapreduce-examples.jar' + # Corresponds to the JSON property `mainJarFileUri` # @return [String] - attr_accessor :inner_state + attr_accessor :main_jar_file_uri + + # Optional. Jar file URIs to add to the CLASSPATHs of the Hadoop driver and + # tasks. + # Corresponds to the JSON property `jarFileUris` + # @return [Array] + attr_accessor :jar_file_uris + + # The runtime logging config of the job. + # Corresponds to the JSON property `loggingConfig` + # @return [Google::Apis::DataprocV1::LoggingConfig] + attr_accessor :logging_config + + # Optional. A mapping of property names to values, used to configure Hadoop. + # Properties that conflict with values set by the Cloud Dataproc API may be + # overwritten. Can include properties set in /etc/hadoop/conf/*-site and classes + # in user code. + # Corresponds to the JSON property `properties` + # @return [Hash] + attr_accessor :properties + + # Optional. The arguments to pass to the driver. Do not include arguments, such + # as -libjars or -Dfoo=bar, that can be set as job properties, since a collision + # may occur that causes an incorrect job submission. + # Corresponds to the JSON property `args` + # @return [Array] + attr_accessor :args + + # Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied to + # the working directory of Hadoop drivers and distributed tasks. Useful for + # naively parallel tasks. + # Corresponds to the JSON property `fileUris` + # @return [Array] + attr_accessor :file_uris + + # The name of the driver's main class. The jar file containing the class must be + # in the default CLASSPATH or specified in jar_file_uris. + # Corresponds to the JSON property `mainClass` + # @return [String] + attr_accessor :main_class + + # Optional. HCFS URIs of archives to be extracted in the working directory of + # Hadoop drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, or . + # zip. + # Corresponds to the JSON property `archiveUris` + # @return [Array] + attr_accessor :archive_uris def initialize(**args) update!(**args) @@ -1020,10 +1065,45 @@ module Google # Update properties of this object def update!(**args) - @state_start_time = args[:state_start_time] if args.key?(:state_start_time) - @state = args[:state] if args.key?(:state) - @details = args[:details] if args.key?(:details) - @inner_state = args[:inner_state] if args.key?(:inner_state) + @main_jar_file_uri = args[:main_jar_file_uri] if args.key?(:main_jar_file_uri) + @jar_file_uris = args[:jar_file_uris] if args.key?(:jar_file_uris) + @logging_config = args[:logging_config] if args.key?(:logging_config) + @properties = args[:properties] if args.key?(:properties) + @args = args[:args] if args.key?(:args) + @file_uris = args[:file_uris] if args.key?(:file_uris) + @main_class = args[:main_class] if args.key?(:main_class) + @archive_uris = args[:archive_uris] if args.key?(:archive_uris) + end + end + + # A list of queries to run on a cluster. + class QueryList + include Google::Apis::Core::Hashable + + # Required. The queries to execute. You do not need to terminate a query with a + # semicolon. Multiple queries can be specified in one string by separating each + # with a semicolon. Here is an example of an Cloud Dataproc API snippet that + # uses a QueryList to specify a HiveJob: + # "hiveJob": ` + # "queryList": ` + # "queries": [ + # "query1", + # "query2", + # "query3;query4", + # ] + # ` + # ` + # Corresponds to the JSON property `queries` + # @return [Array] + attr_accessor :queries + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @queries = args[:queries] if args.key?(:queries) end end @@ -1070,115 +1150,6 @@ module Google end end - # A list of queries to run on a cluster. - class QueryList - include Google::Apis::Core::Hashable - - # Required. The queries to execute. You do not need to terminate a query with a - # semicolon. Multiple queries can be specified in one string by separating each - # with a semicolon. Here is an example of an Cloud Dataproc API snippet that - # uses a QueryList to specify a HiveJob: - # "hiveJob": ` - # "queryList": ` - # "queries": [ - # "query1", - # "query2", - # "query3;query4", - # ] - # ` - # ` - # Corresponds to the JSON property `queries` - # @return [Array] - attr_accessor :queries - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @queries = args[:queries] if args.key?(:queries) - end - end - - # A Cloud Dataproc job for running Apache Hadoop MapReduce (https://hadoop. - # apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/ - # MapReduceTutorial.html) jobs on Apache Hadoop YARN (https://hadoop.apache.org/ - # docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/YARN.html). - class HadoopJob - include Google::Apis::Core::Hashable - - # The name of the driver's main class. The jar file containing the class must be - # in the default CLASSPATH or specified in jar_file_uris. - # Corresponds to the JSON property `mainClass` - # @return [String] - attr_accessor :main_class - - # Optional. HCFS URIs of archives to be extracted in the working directory of - # Hadoop drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, or . - # zip. - # Corresponds to the JSON property `archiveUris` - # @return [Array] - attr_accessor :archive_uris - - # The HCFS URI of the jar file containing the main class. Examples: 'gs://foo- - # bucket/analytics-binaries/extract-useful-metrics-mr.jar' 'hdfs:/tmp/test- - # samples/custom-wordcount.jar' 'file:///home/usr/lib/hadoop-mapreduce/hadoop- - # mapreduce-examples.jar' - # Corresponds to the JSON property `mainJarFileUri` - # @return [String] - attr_accessor :main_jar_file_uri - - # Optional. Jar file URIs to add to the CLASSPATHs of the Hadoop driver and - # tasks. - # Corresponds to the JSON property `jarFileUris` - # @return [Array] - attr_accessor :jar_file_uris - - # The runtime logging config of the job. - # Corresponds to the JSON property `loggingConfig` - # @return [Google::Apis::DataprocV1::LoggingConfig] - attr_accessor :logging_config - - # Optional. A mapping of property names to values, used to configure Hadoop. - # Properties that conflict with values set by the Cloud Dataproc API may be - # overwritten. Can include properties set in /etc/hadoop/conf/*-site and classes - # in user code. - # Corresponds to the JSON property `properties` - # @return [Hash] - attr_accessor :properties - - # Optional. The arguments to pass to the driver. Do not include arguments, such - # as -libjars or -Dfoo=bar, that can be set as job properties, since a collision - # may occur that causes an incorrect job submission. - # Corresponds to the JSON property `args` - # @return [Array] - attr_accessor :args - - # Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied to - # the working directory of Hadoop drivers and distributed tasks. Useful for - # naively parallel tasks. - # Corresponds to the JSON property `fileUris` - # @return [Array] - attr_accessor :file_uris - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @main_class = args[:main_class] if args.key?(:main_class) - @archive_uris = args[:archive_uris] if args.key?(:archive_uris) - @main_jar_file_uri = args[:main_jar_file_uri] if args.key?(:main_jar_file_uri) - @jar_file_uris = args[:jar_file_uris] if args.key?(:jar_file_uris) - @logging_config = args[:logging_config] if args.key?(:logging_config) - @properties = args[:properties] if args.key?(:properties) - @args = args[:args] if args.key?(:args) - @file_uris = args[:file_uris] if args.key?(:file_uris) - end - end - # A request to collect cluster diagnostic information. class DiagnoseClusterRequest include Google::Apis::Core::Hashable @@ -1225,6 +1196,26 @@ module Google class ClusterOperationMetadata include Google::Apis::Core::Hashable + # The status of the operation. + # Corresponds to the JSON property `status` + # @return [Google::Apis::DataprocV1::ClusterOperationStatus] + attr_accessor :status + + # Output-only. The previous operation status. + # Corresponds to the JSON property `statusHistory` + # @return [Array] + attr_accessor :status_history + + # Output-only. Cluster UUID for the operation. + # Corresponds to the JSON property `clusterUuid` + # @return [String] + attr_accessor :cluster_uuid + + # Output-only. Name of the cluster for the operation. + # Corresponds to the JSON property `clusterName` + # @return [String] + attr_accessor :cluster_name + # Output-only. The operation type. # Corresponds to the JSON property `operationType` # @return [String] @@ -1245,40 +1236,20 @@ module Google # @return [Hash] attr_accessor :labels - # The status of the operation. - # Corresponds to the JSON property `status` - # @return [Google::Apis::DataprocV1::ClusterOperationStatus] - attr_accessor :status - - # Output-only. The previous operation status. - # Corresponds to the JSON property `statusHistory` - # @return [Array] - attr_accessor :status_history - - # Output-only. Name of the cluster for the operation. - # Corresponds to the JSON property `clusterName` - # @return [String] - attr_accessor :cluster_name - - # Output-only. Cluster UUID for the operation. - # Corresponds to the JSON property `clusterUuid` - # @return [String] - attr_accessor :cluster_uuid - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @status = args[:status] if args.key?(:status) + @status_history = args[:status_history] if args.key?(:status_history) + @cluster_uuid = args[:cluster_uuid] if args.key?(:cluster_uuid) + @cluster_name = args[:cluster_name] if args.key?(:cluster_name) @operation_type = args[:operation_type] if args.key?(:operation_type) @description = args[:description] if args.key?(:description) @warnings = args[:warnings] if args.key?(:warnings) @labels = args[:labels] if args.key?(:labels) - @status = args[:status] if args.key?(:status) - @status_history = args[:status_history] if args.key?(:status_history) - @cluster_name = args[:cluster_name] if args.key?(:cluster_name) - @cluster_uuid = args[:cluster_uuid] if args.key?(:cluster_uuid) end end @@ -1306,6 +1277,24 @@ module Google class HiveJob include Google::Apis::Core::Hashable + # Optional. Whether to continue executing queries if a query fails. The default + # value is false. Setting to true can be useful when executing independent + # parallel queries. + # Corresponds to the JSON property `continueOnFailure` + # @return [Boolean] + attr_accessor :continue_on_failure + alias_method :continue_on_failure?, :continue_on_failure + + # A list of queries to run on a cluster. + # Corresponds to the JSON property `queryList` + # @return [Google::Apis::DataprocV1::QueryList] + attr_accessor :query_list + + # The HCFS URI of the script that contains Hive queries. + # Corresponds to the JSON property `queryFileUri` + # @return [String] + attr_accessor :query_file_uri + # Optional. Mapping of query variable names to values (equivalent to the Hive # command: SET name="value";). # Corresponds to the JSON property `scriptVariables` @@ -1326,36 +1315,18 @@ module Google # @return [Hash] attr_accessor :properties - # Optional. Whether to continue executing queries if a query fails. The default - # value is false. Setting to true can be useful when executing independent - # parallel queries. - # Corresponds to the JSON property `continueOnFailure` - # @return [Boolean] - attr_accessor :continue_on_failure - alias_method :continue_on_failure?, :continue_on_failure - - # The HCFS URI of the script that contains Hive queries. - # Corresponds to the JSON property `queryFileUri` - # @return [String] - attr_accessor :query_file_uri - - # A list of queries to run on a cluster. - # Corresponds to the JSON property `queryList` - # @return [Google::Apis::DataprocV1::QueryList] - attr_accessor :query_list - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @continue_on_failure = args[:continue_on_failure] if args.key?(:continue_on_failure) + @query_list = args[:query_list] if args.key?(:query_list) + @query_file_uri = args[:query_file_uri] if args.key?(:query_file_uri) @script_variables = args[:script_variables] if args.key?(:script_variables) @jar_file_uris = args[:jar_file_uris] if args.key?(:jar_file_uris) @properties = args[:properties] if args.key?(:properties) - @continue_on_failure = args[:continue_on_failure] if args.key?(:continue_on_failure) - @query_file_uri = args[:query_file_uri] if args.key?(:query_file_uri) - @query_list = args[:query_list] if args.key?(:query_list) end end @@ -1458,12 +1429,6 @@ module Google class PySparkJob include Google::Apis::Core::Hashable - # Optional. HCFS URIs of jar files to add to the CLASSPATHs of the Python driver - # and tasks. - # Corresponds to the JSON property `jarFileUris` - # @return [Array] - attr_accessor :jar_file_uris - # The runtime logging config of the job. # Corresponds to the JSON property `loggingConfig` # @return [Google::Apis::DataprocV1::LoggingConfig] @@ -1508,13 +1473,18 @@ module Google # @return [Array] attr_accessor :archive_uris + # Optional. HCFS URIs of jar files to add to the CLASSPATHs of the Python driver + # and tasks. + # Corresponds to the JSON property `jarFileUris` + # @return [Array] + attr_accessor :jar_file_uris + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @jar_file_uris = args[:jar_file_uris] if args.key?(:jar_file_uris) @logging_config = args[:logging_config] if args.key?(:logging_config) @properties = args[:properties] if args.key?(:properties) @args = args[:args] if args.key?(:args) @@ -1522,6 +1492,7 @@ module Google @python_file_uris = args[:python_file_uris] if args.key?(:python_file_uris) @main_python_file_uri = args[:main_python_file_uri] if args.key?(:main_python_file_uri) @archive_uris = args[:archive_uris] if args.key?(:archive_uris) + @jar_file_uris = args[:jar_file_uris] if args.key?(:jar_file_uris) end end @@ -1530,6 +1501,23 @@ module Google class GceClusterConfig include Google::Apis::Core::Hashable + # Optional. The Google Compute Engine network to be used for machine + # communications. Cannot be specified with subnetwork_uri. If neither + # network_uri nor subnetwork_uri is specified, the "default" network of the + # project is used, if it exists. Cannot be a "Custom Subnet Network" (see Using + # Subnetworks for more information). Example: https://www.googleapis.com/compute/ + # v1/projects/[project_id]/regions/global/default. + # Corresponds to the JSON property `networkUri` + # @return [String] + attr_accessor :network_uri + + # Required. The zone where the Google Compute Engine cluster will be located. + # Example: https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[ + # zone]. + # Corresponds to the JSON property `zoneUri` + # @return [String] + attr_accessor :zone_uri + # The Google Compute Engine metadata entries to add to all instances (see # Project and instance metadata (https://cloud.google.com/compute/docs/storing- # retrieving-metadata#project_and_instance_metadata)). @@ -1585,37 +1573,20 @@ module Google # @return [String] attr_accessor :subnetwork_uri - # Optional. The Google Compute Engine network to be used for machine - # communications. Cannot be specified with subnetwork_uri. If neither - # network_uri nor subnetwork_uri is specified, the "default" network of the - # project is used, if it exists. Cannot be a "Custom Subnet Network" (see Using - # Subnetworks for more information). Example: https://www.googleapis.com/compute/ - # v1/projects/[project_id]/regions/global/default. - # Corresponds to the JSON property `networkUri` - # @return [String] - attr_accessor :network_uri - - # Required. The zone where the Google Compute Engine cluster will be located. - # Example: https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[ - # zone]. - # Corresponds to the JSON property `zoneUri` - # @return [String] - attr_accessor :zone_uri - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @network_uri = args[:network_uri] if args.key?(:network_uri) + @zone_uri = args[:zone_uri] if args.key?(:zone_uri) @metadata = args[:metadata] if args.key?(:metadata) @internal_ip_only = args[:internal_ip_only] if args.key?(:internal_ip_only) @service_account_scopes = args[:service_account_scopes] if args.key?(:service_account_scopes) @tags = args[:tags] if args.key?(:tags) @service_account = args[:service_account] if args.key?(:service_account) @subnetwork_uri = args[:subnetwork_uri] if args.key?(:subnetwork_uri) - @network_uri = args[:network_uri] if args.key?(:network_uri) - @zone_uri = args[:zone_uri] if args.key?(:zone_uri) end end @@ -1651,11 +1622,6 @@ module Google class AcceleratorConfig include Google::Apis::Core::Hashable - # The number of the accelerator cards of this type exposed to this instance. - # Corresponds to the JSON property `acceleratorCount` - # @return [Fixnum] - attr_accessor :accelerator_count - # Full or partial URI of the accelerator type resource to expose to this # instance. See Google Compute Engine AcceleratorTypes( /compute/docs/reference/ # beta/acceleratorTypes) @@ -1663,14 +1629,19 @@ module Google # @return [String] attr_accessor :accelerator_type_uri + # The number of the accelerator cards of this type exposed to this instance. + # Corresponds to the JSON property `acceleratorCount` + # @return [Fixnum] + attr_accessor :accelerator_count + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @accelerator_count = args[:accelerator_count] if args.key?(:accelerator_count) @accelerator_type_uri = args[:accelerator_type_uri] if args.key?(:accelerator_type_uri) + @accelerator_count = args[:accelerator_count] if args.key?(:accelerator_count) end end @@ -1750,7 +1721,7 @@ module Google # user-facing error message is needed, put the localized message in the error # details or localize it in the client. The optional error details may contain # arbitrary information about the error. There is a predefined set of error - # detail types in the package google.rpc which can be used for common error + # detail types in the package google.rpc that can be used for common error # conditions.Language mappingThe Status message is the logical representation of # the error model, but it is not necessarily the actual wire format. When the # Status message is exposed in different client libraries and different wire @@ -1763,7 +1734,7 @@ module Google # Partial errors. If a service needs to return partial errors to the client, it # may embed the Status in the normal response to indicate the partial errors. # Workflow errors. A typical workflow has multiple steps. Each step may have a - # Status message for error reporting purpose. + # Status message for error reporting. # Batch operations. If a client uses batch request and batch response, the # Status message should be used directly inside batch response, one for each # error sub-response. @@ -1809,11 +1780,6 @@ module Google class OperationStatus include Google::Apis::Core::Hashable - # The time this state was entered. - # Corresponds to the JSON property `stateStartTime` - # @return [String] - attr_accessor :state_start_time - # A message containing the operation state. # Corresponds to the JSON property `state` # @return [String] @@ -1829,16 +1795,50 @@ module Google # @return [String] attr_accessor :inner_state + # The time this state was entered. + # Corresponds to the JSON property `stateStartTime` + # @return [String] + attr_accessor :state_start_time + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @state_start_time = args[:state_start_time] if args.key?(:state_start_time) @state = args[:state] if args.key?(:state) @details = args[:details] if args.key?(:details) @inner_state = args[:inner_state] if args.key?(:inner_state) + @state_start_time = args[:state_start_time] if args.key?(:state_start_time) + end + end + + # Encapsulates the full scoping used to reference a job. + class JobReference + include Google::Apis::Core::Hashable + + # Required. The ID of the Google Cloud Platform project that the job belongs to. + # Corresponds to the JSON property `projectId` + # @return [String] + attr_accessor :project_id + + # Optional. The job ID, which must be unique within the project. The job ID is + # generated by the server upon job submission or provided by the user as a means + # to perform retries without creating duplicate jobs. The ID must contain only + # letters (a-z, A-Z), numbers (0-9), underscores (_), or hyphens (-). The + # maximum length is 100 characters. + # Corresponds to the JSON property `jobId` + # @return [String] + attr_accessor :job_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @project_id = args[:project_id] if args.key?(:project_id) + @job_id = args[:job_id] if args.key?(:job_id) end end end diff --git a/generated/google/apis/dataproc_v1/representations.rb b/generated/google/apis/dataproc_v1/representations.rb index df2466b28..5a622b5f0 100644 --- a/generated/google/apis/dataproc_v1/representations.rb +++ b/generated/google/apis/dataproc_v1/representations.rb @@ -22,12 +22,6 @@ module Google module Apis module DataprocV1 - class JobReference - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class SubmitJobRequest class Representation < Google::Apis::Core::JsonRepresentation; end @@ -52,13 +46,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class ListJobsResponse + class NodeInitializationAction class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class NodeInitializationAction + class ListJobsResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -106,13 +100,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class ClusterStatus + class PigJob class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class PigJob + class ClusterStatus class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -154,7 +148,7 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class YarnApplication + class HadoopJob class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -166,7 +160,7 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class HadoopJob + class YarnApplication class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -263,11 +257,9 @@ module Google end class JobReference - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :project_id, as: 'projectId' - property :job_id, as: 'jobId' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class SubmitJobRequest @@ -281,9 +273,9 @@ module Google class Status # @private class Representation < Google::Apis::Core::JsonRepresentation + property :code, as: 'code' property :message, as: 'message' collection :details, as: 'details' - property :code, as: 'code' end end @@ -299,11 +291,11 @@ module Google class Representation < Google::Apis::Core::JsonRepresentation property :disk_config, as: 'diskConfig', class: Google::Apis::DataprocV1::DiskConfig, decorator: Google::Apis::DataprocV1::DiskConfig::Representation - property :image_uri, as: 'imageUri' property :machine_type_uri, as: 'machineTypeUri' property :managed_group_config, as: 'managedGroupConfig', class: Google::Apis::DataprocV1::ManagedGroupConfig, decorator: Google::Apis::DataprocV1::ManagedGroupConfig::Representation property :is_preemptible, as: 'isPreemptible' + property :image_uri, as: 'imageUri' collection :instance_names, as: 'instanceNames' collection :accelerators, as: 'accelerators', class: Google::Apis::DataprocV1::AcceleratorConfig, decorator: Google::Apis::DataprocV1::AcceleratorConfig::Representation @@ -311,15 +303,6 @@ module Google end end - class ListJobsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :jobs, as: 'jobs', class: Google::Apis::DataprocV1::Job, decorator: Google::Apis::DataprocV1::Job::Representation - - property :next_page_token, as: 'nextPageToken' - end - end - class NodeInitializationAction # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -328,6 +311,15 @@ module Google end end + class ListJobsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :jobs, as: 'jobs', class: Google::Apis::DataprocV1::Job, decorator: Google::Apis::DataprocV1::Job::Representation + + end + end + class CancelJobRequest # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -337,32 +329,32 @@ module Google class SparkSqlJob # @private class Representation < Google::Apis::Core::JsonRepresentation + property :query_list, as: 'queryList', class: Google::Apis::DataprocV1::QueryList, decorator: Google::Apis::DataprocV1::QueryList::Representation + + property :query_file_uri, as: 'queryFileUri' hash :script_variables, as: 'scriptVariables' collection :jar_file_uris, as: 'jarFileUris' property :logging_config, as: 'loggingConfig', class: Google::Apis::DataprocV1::LoggingConfig, decorator: Google::Apis::DataprocV1::LoggingConfig::Representation hash :properties, as: 'properties' - property :query_list, as: 'queryList', class: Google::Apis::DataprocV1::QueryList, decorator: Google::Apis::DataprocV1::QueryList::Representation - - property :query_file_uri, as: 'queryFileUri' end end class Cluster # @private class Representation < Google::Apis::Core::JsonRepresentation + hash :labels, as: 'labels' + property :metrics, as: 'metrics', class: Google::Apis::DataprocV1::ClusterMetrics, decorator: Google::Apis::DataprocV1::ClusterMetrics::Representation + + property :status, as: 'status', class: Google::Apis::DataprocV1::ClusterStatus, decorator: Google::Apis::DataprocV1::ClusterStatus::Representation + collection :status_history, as: 'statusHistory', class: Google::Apis::DataprocV1::ClusterStatus, decorator: Google::Apis::DataprocV1::ClusterStatus::Representation property :config, as: 'config', class: Google::Apis::DataprocV1::ClusterConfig, decorator: Google::Apis::DataprocV1::ClusterConfig::Representation - property :cluster_uuid, as: 'clusterUuid' property :cluster_name, as: 'clusterName' + property :cluster_uuid, as: 'clusterUuid' property :project_id, as: 'projectId' - hash :labels, as: 'labels' - property :status, as: 'status', class: Google::Apis::DataprocV1::ClusterStatus, decorator: Google::Apis::DataprocV1::ClusterStatus::Representation - - property :metrics, as: 'metrics', class: Google::Apis::DataprocV1::ClusterMetrics, decorator: Google::Apis::DataprocV1::ClusterMetrics::Representation - end end @@ -378,6 +370,14 @@ module Google class OperationMetadata # @private class Representation < Google::Apis::Core::JsonRepresentation + property :description, as: 'description' + property :status, as: 'status', class: Google::Apis::DataprocV1::OperationStatus, decorator: Google::Apis::DataprocV1::OperationStatus::Representation + + property :details, as: 'details' + property :state, as: 'state' + property :cluster_name, as: 'clusterName' + property :cluster_uuid, as: 'clusterUuid' + property :inner_state, as: 'innerState' property :end_time, as: 'endTime' property :start_time, as: 'startTime' collection :warnings, as: 'warnings' @@ -385,14 +385,6 @@ module Google collection :status_history, as: 'statusHistory', class: Google::Apis::DataprocV1::OperationStatus, decorator: Google::Apis::DataprocV1::OperationStatus::Representation property :operation_type, as: 'operationType' - property :description, as: 'description' - property :status, as: 'status', class: Google::Apis::DataprocV1::OperationStatus, decorator: Google::Apis::DataprocV1::OperationStatus::Representation - - property :state, as: 'state' - property :details, as: 'details' - property :cluster_uuid, as: 'clusterUuid' - property :cluster_name, as: 'clusterName' - property :inner_state, as: 'innerState' end end @@ -407,33 +399,33 @@ module Google class SoftwareConfig # @private class Representation < Google::Apis::Core::JsonRepresentation - hash :properties, as: 'properties' property :image_version, as: 'imageVersion' - end - end - - class ClusterStatus - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :state, as: 'state' - property :state_start_time, as: 'stateStartTime' - property :substate, as: 'substate' - property :detail, as: 'detail' + hash :properties, as: 'properties' end end class PigJob # @private class Representation < Google::Apis::Core::JsonRepresentation + collection :jar_file_uris, as: 'jarFileUris' + hash :script_variables, as: 'scriptVariables' + property :logging_config, as: 'loggingConfig', class: Google::Apis::DataprocV1::LoggingConfig, decorator: Google::Apis::DataprocV1::LoggingConfig::Representation + hash :properties, as: 'properties' property :continue_on_failure, as: 'continueOnFailure' property :query_file_uri, as: 'queryFileUri' property :query_list, as: 'queryList', class: Google::Apis::DataprocV1::QueryList, decorator: Google::Apis::DataprocV1::QueryList::Representation - collection :jar_file_uris, as: 'jarFileUris' - hash :script_variables, as: 'scriptVariables' - property :logging_config, as: 'loggingConfig', class: Google::Apis::DataprocV1::LoggingConfig, decorator: Google::Apis::DataprocV1::LoggingConfig::Representation + end + end + class ClusterStatus + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :detail, as: 'detail' + property :state, as: 'state' + property :state_start_time, as: 'stateStartTime' + property :substate, as: 'substate' end end @@ -449,8 +441,6 @@ module Google class SparkJob # @private class Representation < Google::Apis::Core::JsonRepresentation - property :main_jar_file_uri, as: 'mainJarFileUri' - collection :jar_file_uris, as: 'jarFileUris' property :logging_config, as: 'loggingConfig', class: Google::Apis::DataprocV1::LoggingConfig, decorator: Google::Apis::DataprocV1::LoggingConfig::Representation hash :properties, as: 'properties' @@ -458,12 +448,19 @@ module Google collection :file_uris, as: 'fileUris' property :main_class, as: 'mainClass' collection :archive_uris, as: 'archiveUris' + property :main_jar_file_uri, as: 'mainJarFileUri' + collection :jar_file_uris, as: 'jarFileUris' end end class Job # @private class Representation < Google::Apis::Core::JsonRepresentation + property :status, as: 'status', class: Google::Apis::DataprocV1::JobStatus, decorator: Google::Apis::DataprocV1::JobStatus::Representation + + property :placement, as: 'placement', class: Google::Apis::DataprocV1::JobPlacement, decorator: Google::Apis::DataprocV1::JobPlacement::Representation + + property :driver_control_files_uri, as: 'driverControlFilesUri' property :scheduling, as: 'scheduling', class: Google::Apis::DataprocV1::JobScheduling, decorator: Google::Apis::DataprocV1::JobScheduling::Representation property :pig_job, as: 'pigJob', class: Google::Apis::DataprocV1::PigJob, decorator: Google::Apis::DataprocV1::PigJob::Representation @@ -472,10 +469,10 @@ module Google hash :labels, as: 'labels' property :driver_output_resource_uri, as: 'driverOutputResourceUri' - property :spark_job, as: 'sparkJob', class: Google::Apis::DataprocV1::SparkJob, decorator: Google::Apis::DataprocV1::SparkJob::Representation - collection :status_history, as: 'statusHistory', class: Google::Apis::DataprocV1::JobStatus, decorator: Google::Apis::DataprocV1::JobStatus::Representation + property :spark_job, as: 'sparkJob', class: Google::Apis::DataprocV1::SparkJob, decorator: Google::Apis::DataprocV1::SparkJob::Representation + property :spark_sql_job, as: 'sparkSqlJob', class: Google::Apis::DataprocV1::SparkSqlJob, decorator: Google::Apis::DataprocV1::SparkSqlJob::Representation collection :yarn_applications, as: 'yarnApplications', class: Google::Apis::DataprocV1::YarnApplication, decorator: Google::Apis::DataprocV1::YarnApplication::Representation @@ -486,11 +483,6 @@ module Google property :hadoop_job, as: 'hadoopJob', class: Google::Apis::DataprocV1::HadoopJob, decorator: Google::Apis::DataprocV1::HadoopJob::Representation - property :placement, as: 'placement', class: Google::Apis::DataprocV1::JobPlacement, decorator: Google::Apis::DataprocV1::JobPlacement::Representation - - property :status, as: 'status', class: Google::Apis::DataprocV1::JobStatus, decorator: Google::Apis::DataprocV1::JobStatus::Representation - - property :driver_control_files_uri, as: 'driverControlFilesUri' end end @@ -515,20 +507,25 @@ module Google class ClusterOperationStatus # @private class Representation < Google::Apis::Core::JsonRepresentation + property :inner_state, as: 'innerState' property :state_start_time, as: 'stateStartTime' property :state, as: 'state' property :details, as: 'details' - property :inner_state, as: 'innerState' end end - class YarnApplication + class HadoopJob # @private class Representation < Google::Apis::Core::JsonRepresentation - property :state, as: 'state' - property :name, as: 'name' - property :tracking_url, as: 'trackingUrl' - property :progress, as: 'progress' + property :main_jar_file_uri, as: 'mainJarFileUri' + collection :jar_file_uris, as: 'jarFileUris' + property :logging_config, as: 'loggingConfig', class: Google::Apis::DataprocV1::LoggingConfig, decorator: Google::Apis::DataprocV1::LoggingConfig::Representation + + hash :properties, as: 'properties' + collection :args, as: 'args' + collection :file_uris, as: 'fileUris' + property :main_class, as: 'mainClass' + collection :archive_uris, as: 'archiveUris' end end @@ -539,18 +536,13 @@ module Google end end - class HadoopJob + class YarnApplication # @private class Representation < Google::Apis::Core::JsonRepresentation - property :main_class, as: 'mainClass' - collection :archive_uris, as: 'archiveUris' - property :main_jar_file_uri, as: 'mainJarFileUri' - collection :jar_file_uris, as: 'jarFileUris' - property :logging_config, as: 'loggingConfig', class: Google::Apis::DataprocV1::LoggingConfig, decorator: Google::Apis::DataprocV1::LoggingConfig::Representation - - hash :properties, as: 'properties' - collection :args, as: 'args' - collection :file_uris, as: 'fileUris' + property :state, as: 'state' + property :name, as: 'name' + property :tracking_url, as: 'trackingUrl' + property :progress, as: 'progress' end end @@ -571,16 +563,16 @@ module Google class ClusterOperationMetadata # @private class Representation < Google::Apis::Core::JsonRepresentation - property :operation_type, as: 'operationType' - property :description, as: 'description' - collection :warnings, as: 'warnings' - hash :labels, as: 'labels' property :status, as: 'status', class: Google::Apis::DataprocV1::ClusterOperationStatus, decorator: Google::Apis::DataprocV1::ClusterOperationStatus::Representation collection :status_history, as: 'statusHistory', class: Google::Apis::DataprocV1::ClusterOperationStatus, decorator: Google::Apis::DataprocV1::ClusterOperationStatus::Representation - property :cluster_name, as: 'clusterName' property :cluster_uuid, as: 'clusterUuid' + property :cluster_name, as: 'clusterName' + property :operation_type, as: 'operationType' + property :description, as: 'description' + collection :warnings, as: 'warnings' + hash :labels, as: 'labels' end end @@ -593,13 +585,13 @@ module Google class HiveJob # @private class Representation < Google::Apis::Core::JsonRepresentation + property :continue_on_failure, as: 'continueOnFailure' + property :query_list, as: 'queryList', class: Google::Apis::DataprocV1::QueryList, decorator: Google::Apis::DataprocV1::QueryList::Representation + + property :query_file_uri, as: 'queryFileUri' hash :script_variables, as: 'scriptVariables' collection :jar_file_uris, as: 'jarFileUris' hash :properties, as: 'properties' - property :continue_on_failure, as: 'continueOnFailure' - property :query_file_uri, as: 'queryFileUri' - property :query_list, as: 'queryList', class: Google::Apis::DataprocV1::QueryList, decorator: Google::Apis::DataprocV1::QueryList::Representation - end end @@ -632,7 +624,6 @@ module Google class PySparkJob # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :jar_file_uris, as: 'jarFileUris' property :logging_config, as: 'loggingConfig', class: Google::Apis::DataprocV1::LoggingConfig, decorator: Google::Apis::DataprocV1::LoggingConfig::Representation hash :properties, as: 'properties' @@ -641,20 +632,21 @@ module Google collection :python_file_uris, as: 'pythonFileUris' property :main_python_file_uri, as: 'mainPythonFileUri' collection :archive_uris, as: 'archiveUris' + collection :jar_file_uris, as: 'jarFileUris' end end class GceClusterConfig # @private class Representation < Google::Apis::Core::JsonRepresentation + property :network_uri, as: 'networkUri' + property :zone_uri, as: 'zoneUri' hash :metadata, as: 'metadata' property :internal_ip_only, as: 'internalIpOnly' collection :service_account_scopes, as: 'serviceAccountScopes' collection :tags, as: 'tags' property :service_account, as: 'serviceAccount' property :subnetwork_uri, as: 'subnetworkUri' - property :network_uri, as: 'networkUri' - property :zone_uri, as: 'zoneUri' end end @@ -669,8 +661,8 @@ module Google class AcceleratorConfig # @private class Representation < Google::Apis::Core::JsonRepresentation - property :accelerator_count, as: 'acceleratorCount' property :accelerator_type_uri, as: 'acceleratorTypeUri' + property :accelerator_count, as: 'acceleratorCount' end end @@ -703,10 +695,18 @@ module Google class OperationStatus # @private class Representation < Google::Apis::Core::JsonRepresentation - property :state_start_time, as: 'stateStartTime' property :state, as: 'state' property :details, as: 'details' property :inner_state, as: 'innerState' + property :state_start_time, as: 'stateStartTime' + end + end + + class JobReference + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :project_id, as: 'projectId' + property :job_id, as: 'jobId' end end end diff --git a/generated/google/apis/dataproc_v1/service.rb b/generated/google/apis/dataproc_v1/service.rb index fcfdc6cde..a7aa36a3b 100644 --- a/generated/google/apis/dataproc_v1/service.rb +++ b/generated/google/apis/dataproc_v1/service.rb @@ -47,6 +47,545 @@ module Google @batch_path = 'batch' end + # Creates a cluster in a project. + # @param [String] project_id + # Required. The ID of the Google Cloud Platform project that the cluster belongs + # to. + # @param [String] region + # Required. The Cloud Dataproc region in which to handle the request. + # @param [Google::Apis::DataprocV1::Cluster] cluster_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::DataprocV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DataprocV1::Operation] + # + # @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_cluster(project_id, region, cluster_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/projects/{projectId}/regions/{region}/clusters', options) + command.request_representation = Google::Apis::DataprocV1::Cluster::Representation + command.request_object = cluster_object + command.response_representation = Google::Apis::DataprocV1::Operation::Representation + command.response_class = Google::Apis::DataprocV1::Operation + command.params['projectId'] = project_id unless project_id.nil? + command.params['region'] = region unless region.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates a cluster in a project. + # @param [String] project_id + # Required. The ID of the Google Cloud Platform project the cluster belongs to. + # @param [String] region + # Required. The Cloud Dataproc region in which to handle the request. + # @param [String] cluster_name + # Required. The cluster name. + # @param [Google::Apis::DataprocV1::Cluster] cluster_object + # @param [String] update_mask + # Required. Specifies the path, relative to Cluster, of the field to update. For + # example, to change the number of workers in a cluster to 5, the update_mask + # parameter would be specified as config.worker_config.num_instances, and the + # PATCH request body would specify the new value, as follows: + # ` + # "config":` + # "workerConfig":` + # "numInstances":"5" + # ` + # ` + # ` + # Similarly, to change the number of preemptible workers in a cluster to 5, the + # update_mask parameter would be config.secondary_worker_config.num_instances, + # and the PATCH request body would be set as follows: + # ` + # "config":` + # "secondaryWorkerConfig":` + # "numInstances":"5" + # ` + # ` + # ` + # Note: Currently, only the following fields can be updated:< + # table> Mask Purpose labels + # Update labels config.worker_config. + # num_instances Resize primary worker group + # config.secondary_worker_config.num_instances Resize secondary worker group + # @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::DataprocV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DataprocV1::Operation] + # + # @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_cluster(project_id, region, cluster_name, cluster_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1/projects/{projectId}/regions/{region}/clusters/{clusterName}', options) + command.request_representation = Google::Apis::DataprocV1::Cluster::Representation + command.request_object = cluster_object + command.response_representation = Google::Apis::DataprocV1::Operation::Representation + command.response_class = Google::Apis::DataprocV1::Operation + command.params['projectId'] = project_id unless project_id.nil? + command.params['region'] = region unless region.nil? + command.params['clusterName'] = cluster_name unless cluster_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 + + # Gets the resource representation for a cluster in a project. + # @param [String] project_id + # Required. The ID of the Google Cloud Platform project that the cluster belongs + # to. + # @param [String] region + # Required. The Cloud Dataproc region in which to handle the request. + # @param [String] cluster_name + # Required. The cluster name. + # @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::DataprocV1::Cluster] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DataprocV1::Cluster] + # + # @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_cluster(project_id, region, cluster_name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/projects/{projectId}/regions/{region}/clusters/{clusterName}', options) + command.response_representation = Google::Apis::DataprocV1::Cluster::Representation + command.response_class = Google::Apis::DataprocV1::Cluster + command.params['projectId'] = project_id unless project_id.nil? + command.params['region'] = region unless region.nil? + command.params['clusterName'] = cluster_name unless cluster_name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a cluster in a project. + # @param [String] project_id + # Required. The ID of the Google Cloud Platform project that the cluster belongs + # to. + # @param [String] region + # Required. The Cloud Dataproc region in which to handle the request. + # @param [String] cluster_name + # Required. The cluster name. + # @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::DataprocV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DataprocV1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_cluster(project_id, region, cluster_name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/projects/{projectId}/regions/{region}/clusters/{clusterName}', options) + command.response_representation = Google::Apis::DataprocV1::Operation::Representation + command.response_class = Google::Apis::DataprocV1::Operation + command.params['projectId'] = project_id unless project_id.nil? + command.params['region'] = region unless region.nil? + command.params['clusterName'] = cluster_name unless cluster_name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets cluster diagnostic information. After the operation completes, the + # Operation.response field contains DiagnoseClusterOutputLocation. + # @param [String] project_id + # Required. The ID of the Google Cloud Platform project that the cluster belongs + # to. + # @param [String] region + # Required. The Cloud Dataproc region in which to handle the request. + # @param [String] cluster_name + # Required. The cluster name. + # @param [Google::Apis::DataprocV1::DiagnoseClusterRequest] diagnose_cluster_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::DataprocV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DataprocV1::Operation] + # + # @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 diagnose_cluster(project_id, region, cluster_name, diagnose_cluster_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/projects/{projectId}/regions/{region}/clusters/{clusterName}:diagnose', options) + command.request_representation = Google::Apis::DataprocV1::DiagnoseClusterRequest::Representation + command.request_object = diagnose_cluster_request_object + command.response_representation = Google::Apis::DataprocV1::Operation::Representation + command.response_class = Google::Apis::DataprocV1::Operation + command.params['projectId'] = project_id unless project_id.nil? + command.params['region'] = region unless region.nil? + command.params['clusterName'] = cluster_name unless cluster_name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists all regions/`region`/clusters in a project. + # @param [String] project_id + # Required. The ID of the Google Cloud Platform project that the cluster belongs + # to. + # @param [String] region + # Required. The Cloud Dataproc region in which to handle the request. + # @param [String] filter + # Optional. A filter constraining the clusters to list. Filters are case- + # sensitive and have the following syntax:field = value AND field = value ... + # where field is one of status.state, clusterName, or labels.[KEY], and [KEY] is + # a label key. value can be * to match all values. status.state can be one of + # the following: ACTIVE, INACTIVE, CREATING, RUNNING, ERROR, DELETING, or + # UPDATING. ACTIVE contains the CREATING, UPDATING, and RUNNING states. INACTIVE + # contains the DELETING and ERROR states. clusterName is the name of the cluster + # provided at creation time. Only the logical AND operator is supported; space- + # separated items are treated as having an implicit AND operator.Example filter: + # status.state = ACTIVE AND clusterName = mycluster AND labels.env = staging AND + # labels.starred = * + # @param [String] page_token + # Optional. The standard List page token. + # @param [Fixnum] page_size + # Optional. The standard List page size. + # @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::DataprocV1::ListClustersResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DataprocV1::ListClustersResponse] + # + # @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_clusters(project_id, region, filter: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/projects/{projectId}/regions/{region}/clusters', options) + command.response_representation = Google::Apis::DataprocV1::ListClustersResponse::Representation + command.response_class = Google::Apis::DataprocV1::ListClustersResponse + command.params['projectId'] = project_id unless project_id.nil? + command.params['region'] = region unless region.nil? + command.query['filter'] = filter unless filter.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.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 operations that match the specified filter in the request. If the server + # doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding + # below allows API services to override the binding to use different resource + # name schemes, such as users/*/operations. + # @param [String] name + # The name of the operation collection. + # @param [String] filter + # The standard list filter. + # @param [String] page_token + # The standard list page token. + # @param [Fixnum] page_size + # The standard list page size. + # @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::DataprocV1::ListOperationsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DataprocV1::ListOperationsResponse] + # + # @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_operations(name, filter: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}', options) + command.response_representation = Google::Apis::DataprocV1::ListOperationsResponse::Representation + command.response_class = Google::Apis::DataprocV1::ListOperationsResponse + command.params['name'] = name unless name.nil? + command.query['filter'] = filter unless filter.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets the latest state of a long-running operation. Clients can use this method + # to poll the operation result at intervals as recommended by the API service. + # @param [String] name + # The name of the operation resource. + # @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::DataprocV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DataprocV1::Operation] + # + # @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_operation(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}', options) + command.response_representation = Google::Apis::DataprocV1::Operation::Representation + command.response_class = Google::Apis::DataprocV1::Operation + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Starts asynchronous cancellation on a long-running operation. The server makes + # a best effort to cancel the operation, but success is not guaranteed. If the + # server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. + # Clients can use Operations.GetOperation or other methods to check whether the + # cancellation succeeded or whether the operation completed despite cancellation. + # On successful cancellation, the operation is not deleted; instead, it becomes + # an operation with an Operation.error value with a google.rpc.Status.code of 1, + # corresponding to Code.CANCELLED. + # @param [String] name + # The name of the operation resource to be cancelled. + # @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::DataprocV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DataprocV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def cancel_operation(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+name}:cancel', options) + command.response_representation = Google::Apis::DataprocV1::Empty::Representation + command.response_class = Google::Apis::DataprocV1::Empty + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a long-running operation. This method indicates that the client is no + # longer interested in the operation result. It does not cancel the operation. + # If the server doesn't support this method, it returns google.rpc.Code. + # UNIMPLEMENTED. + # @param [String] name + # The name of the operation resource to be deleted. + # @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::DataprocV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DataprocV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_operation(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/{+name}', options) + command.response_representation = Google::Apis::DataprocV1::Empty::Representation + command.response_class = Google::Apis::DataprocV1::Empty + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Starts a job cancellation request. To access the job resource after + # cancellation, call regions/`region`/jobs.list or regions/`region`/jobs.get. + # @param [String] project_id + # Required. The ID of the Google Cloud Platform project that the job belongs to. + # @param [String] region + # Required. The Cloud Dataproc region in which to handle the request. + # @param [String] job_id + # Required. The job ID. + # @param [Google::Apis::DataprocV1::CancelJobRequest] cancel_job_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::DataprocV1::Job] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DataprocV1::Job] + # + # @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 cancel_job(project_id, region, job_id, cancel_job_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel', options) + command.request_representation = Google::Apis::DataprocV1::CancelJobRequest::Representation + command.request_object = cancel_job_request_object + command.response_representation = Google::Apis::DataprocV1::Job::Representation + command.response_class = Google::Apis::DataprocV1::Job + command.params['projectId'] = project_id unless project_id.nil? + command.params['region'] = region unless region.nil? + command.params['jobId'] = job_id unless job_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates a job in a project. + # @param [String] project_id + # Required. The ID of the Google Cloud Platform project that the job belongs to. + # @param [String] region + # Required. The Cloud Dataproc region in which to handle the request. + # @param [String] job_id + # Required. The job ID. + # @param [Google::Apis::DataprocV1::Job] job_object + # @param [String] update_mask + # Required. Specifies the path, relative to Job, of the field to + # update. For example, to update the labels of a Job the update_mask + # parameter would be specified as labels, and the PATCH request + # body would specify the new value. Note: Currently, + # labels is the only field that can be updated. + # @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::DataprocV1::Job] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DataprocV1::Job] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def patch_project_region_job(project_id, region, job_id, job_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1/projects/{projectId}/regions/{region}/jobs/{jobId}', options) + command.request_representation = Google::Apis::DataprocV1::Job::Representation + command.request_object = job_object + command.response_representation = Google::Apis::DataprocV1::Job::Representation + command.response_class = Google::Apis::DataprocV1::Job + command.params['projectId'] = project_id unless project_id.nil? + command.params['region'] = region unless region.nil? + command.params['jobId'] = job_id unless job_id.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 + + # Gets the resource representation for a job in a project. + # @param [String] project_id + # Required. The ID of the Google Cloud Platform project that the job belongs to. + # @param [String] region + # Required. The Cloud Dataproc region in which to handle the request. + # @param [String] job_id + # Required. The job ID. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::DataprocV1::Job] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DataprocV1::Job] + # + # @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_job(project_id, region, job_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/projects/{projectId}/regions/{region}/jobs/{jobId}', options) + command.response_representation = Google::Apis::DataprocV1::Job::Representation + command.response_class = Google::Apis::DataprocV1::Job + command.params['projectId'] = project_id unless project_id.nil? + command.params['region'] = region unless region.nil? + command.params['jobId'] = job_id unless job_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Submits a job to a cluster. # @param [String] project_id # Required. The ID of the Google Cloud Platform project that the job belongs to. @@ -176,545 +715,6 @@ module Google command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end - - # Starts a job cancellation request. To access the job resource after - # cancellation, call regions/`region`/jobs.list or regions/`region`/jobs.get. - # @param [String] project_id - # Required. The ID of the Google Cloud Platform project that the job belongs to. - # @param [String] region - # Required. The Cloud Dataproc region in which to handle the request. - # @param [String] job_id - # Required. The job ID. - # @param [Google::Apis::DataprocV1::CancelJobRequest] cancel_job_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::DataprocV1::Job] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DataprocV1::Job] - # - # @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 cancel_job(project_id, region, job_id, cancel_job_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel', options) - command.request_representation = Google::Apis::DataprocV1::CancelJobRequest::Representation - command.request_object = cancel_job_request_object - command.response_representation = Google::Apis::DataprocV1::Job::Representation - command.response_class = Google::Apis::DataprocV1::Job - command.params['projectId'] = project_id unless project_id.nil? - command.params['region'] = region unless region.nil? - command.params['jobId'] = job_id unless job_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Updates a job in a project. - # @param [String] project_id - # Required. The ID of the Google Cloud Platform project that the job belongs to. - # @param [String] region - # Required. The Cloud Dataproc region in which to handle the request. - # @param [String] job_id - # Required. The job ID. - # @param [Google::Apis::DataprocV1::Job] job_object - # @param [String] update_mask - # Required. Specifies the path, relative to Job, of the field to - # update. For example, to update the labels of a Job the update_mask - # parameter would be specified as labels, and the PATCH request - # body would specify the new value. Note: Currently, - # labels is the only field that can be updated. - # @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::DataprocV1::Job] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DataprocV1::Job] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def patch_project_region_job(project_id, region, job_id, job_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:patch, 'v1/projects/{projectId}/regions/{region}/jobs/{jobId}', options) - command.request_representation = Google::Apis::DataprocV1::Job::Representation - command.request_object = job_object - command.response_representation = Google::Apis::DataprocV1::Job::Representation - command.response_class = Google::Apis::DataprocV1::Job - command.params['projectId'] = project_id unless project_id.nil? - command.params['region'] = region unless region.nil? - command.params['jobId'] = job_id unless job_id.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 - - # Gets the resource representation for a job in a project. - # @param [String] project_id - # Required. The ID of the Google Cloud Platform project that the job belongs to. - # @param [String] region - # Required. The Cloud Dataproc region in which to handle the request. - # @param [String] job_id - # Required. The job ID. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::DataprocV1::Job] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DataprocV1::Job] - # - # @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_job(project_id, region, job_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/projects/{projectId}/regions/{region}/jobs/{jobId}', options) - command.response_representation = Google::Apis::DataprocV1::Job::Representation - command.response_class = Google::Apis::DataprocV1::Job - command.params['projectId'] = project_id unless project_id.nil? - command.params['region'] = region unless region.nil? - command.params['jobId'] = job_id unless job_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets cluster diagnostic information. After the operation completes, the - # Operation.response field contains DiagnoseClusterOutputLocation. - # @param [String] project_id - # Required. The ID of the Google Cloud Platform project that the cluster belongs - # to. - # @param [String] region - # Required. The Cloud Dataproc region in which to handle the request. - # @param [String] cluster_name - # Required. The cluster name. - # @param [Google::Apis::DataprocV1::DiagnoseClusterRequest] diagnose_cluster_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::DataprocV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DataprocV1::Operation] - # - # @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 diagnose_cluster(project_id, region, cluster_name, diagnose_cluster_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/projects/{projectId}/regions/{region}/clusters/{clusterName}:diagnose', options) - command.request_representation = Google::Apis::DataprocV1::DiagnoseClusterRequest::Representation - command.request_object = diagnose_cluster_request_object - command.response_representation = Google::Apis::DataprocV1::Operation::Representation - command.response_class = Google::Apis::DataprocV1::Operation - command.params['projectId'] = project_id unless project_id.nil? - command.params['region'] = region unless region.nil? - command.params['clusterName'] = cluster_name unless cluster_name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Deletes a cluster in a project. - # @param [String] project_id - # Required. The ID of the Google Cloud Platform project that the cluster belongs - # to. - # @param [String] region - # Required. The Cloud Dataproc region in which to handle the request. - # @param [String] cluster_name - # Required. The cluster name. - # @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::DataprocV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DataprocV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_cluster(project_id, region, cluster_name, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1/projects/{projectId}/regions/{region}/clusters/{clusterName}', options) - command.response_representation = Google::Apis::DataprocV1::Operation::Representation - command.response_class = Google::Apis::DataprocV1::Operation - command.params['projectId'] = project_id unless project_id.nil? - command.params['region'] = region unless region.nil? - command.params['clusterName'] = cluster_name unless cluster_name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Lists all regions/`region`/clusters in a project. - # @param [String] project_id - # Required. The ID of the Google Cloud Platform project that the cluster belongs - # to. - # @param [String] region - # Required. The Cloud Dataproc region in which to handle the request. - # @param [String] filter - # Optional. A filter constraining the clusters to list. Filters are case- - # sensitive and have the following syntax:field = value AND field = value ... - # where field is one of status.state, clusterName, or labels.[KEY], and [KEY] is - # a label key. value can be * to match all values. status.state can be one of - # the following: ACTIVE, INACTIVE, CREATING, RUNNING, ERROR, DELETING, or - # UPDATING. ACTIVE contains the CREATING, UPDATING, and RUNNING states. INACTIVE - # contains the DELETING and ERROR states. clusterName is the name of the cluster - # provided at creation time. Only the logical AND operator is supported; space- - # separated items are treated as having an implicit AND operator.Example filter: - # status.state = ACTIVE AND clusterName = mycluster AND labels.env = staging AND - # labels.starred = * - # @param [String] page_token - # Optional. The standard List page token. - # @param [Fixnum] page_size - # Optional. The standard List page size. - # @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::DataprocV1::ListClustersResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DataprocV1::ListClustersResponse] - # - # @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_clusters(project_id, region, filter: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/projects/{projectId}/regions/{region}/clusters', options) - command.response_representation = Google::Apis::DataprocV1::ListClustersResponse::Representation - command.response_class = Google::Apis::DataprocV1::ListClustersResponse - command.params['projectId'] = project_id unless project_id.nil? - command.params['region'] = region unless region.nil? - command.query['filter'] = filter unless filter.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Creates a cluster in a project. - # @param [String] project_id - # Required. The ID of the Google Cloud Platform project that the cluster belongs - # to. - # @param [String] region - # Required. The Cloud Dataproc region in which to handle the request. - # @param [Google::Apis::DataprocV1::Cluster] cluster_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::DataprocV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DataprocV1::Operation] - # - # @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_cluster(project_id, region, cluster_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/projects/{projectId}/regions/{region}/clusters', options) - command.request_representation = Google::Apis::DataprocV1::Cluster::Representation - command.request_object = cluster_object - command.response_representation = Google::Apis::DataprocV1::Operation::Representation - command.response_class = Google::Apis::DataprocV1::Operation - command.params['projectId'] = project_id unless project_id.nil? - command.params['region'] = region unless region.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets the resource representation for a cluster in a project. - # @param [String] project_id - # Required. The ID of the Google Cloud Platform project that the cluster belongs - # to. - # @param [String] region - # Required. The Cloud Dataproc region in which to handle the request. - # @param [String] cluster_name - # Required. The cluster name. - # @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::DataprocV1::Cluster] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DataprocV1::Cluster] - # - # @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_cluster(project_id, region, cluster_name, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/projects/{projectId}/regions/{region}/clusters/{clusterName}', options) - command.response_representation = Google::Apis::DataprocV1::Cluster::Representation - command.response_class = Google::Apis::DataprocV1::Cluster - command.params['projectId'] = project_id unless project_id.nil? - command.params['region'] = region unless region.nil? - command.params['clusterName'] = cluster_name unless cluster_name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Updates a cluster in a project. - # @param [String] project_id - # Required. The ID of the Google Cloud Platform project the cluster belongs to. - # @param [String] region - # Required. The Cloud Dataproc region in which to handle the request. - # @param [String] cluster_name - # Required. The cluster name. - # @param [Google::Apis::DataprocV1::Cluster] cluster_object - # @param [String] update_mask - # Required. Specifies the path, relative to Cluster, of the field to update. For - # example, to change the number of workers in a cluster to 5, the update_mask - # parameter would be specified as config.worker_config.num_instances, and the - # PATCH request body would specify the new value, as follows: - # ` - # "config":` - # "workerConfig":` - # "numInstances":"5" - # ` - # ` - # ` - # Similarly, to change the number of preemptible workers in a cluster to 5, the - # update_mask parameter would be config.secondary_worker_config.num_instances, - # and the PATCH request body would be set as follows: - # ` - # "config":` - # "secondaryWorkerConfig":` - # "numInstances":"5" - # ` - # ` - # ` - # Note: Currently, only the following fields can be updated:< - # table> Mask Purpose labels - # Update labels config.worker_config. - # num_instances Resize primary worker group - # config.secondary_worker_config.num_instances Resize secondary worker group - # @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::DataprocV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DataprocV1::Operation] - # - # @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_cluster(project_id, region, cluster_name, cluster_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:patch, 'v1/projects/{projectId}/regions/{region}/clusters/{clusterName}', options) - command.request_representation = Google::Apis::DataprocV1::Cluster::Representation - command.request_object = cluster_object - command.response_representation = Google::Apis::DataprocV1::Operation::Representation - command.response_class = Google::Apis::DataprocV1::Operation - command.params['projectId'] = project_id unless project_id.nil? - command.params['region'] = region unless region.nil? - command.params['clusterName'] = cluster_name unless cluster_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 - - # Starts asynchronous cancellation on a long-running operation. The server makes - # a best effort to cancel the operation, but success is not guaranteed. If the - # server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. - # Clients can use Operations.GetOperation or other methods to check whether the - # cancellation succeeded or whether the operation completed despite cancellation. - # On successful cancellation, the operation is not deleted; instead, it becomes - # an operation with an Operation.error value with a google.rpc.Status.code of 1, - # corresponding to Code.CANCELLED. - # @param [String] name - # The name of the operation resource to be cancelled. - # @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::DataprocV1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DataprocV1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def cancel_operation(name, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+name}:cancel', options) - command.response_representation = Google::Apis::DataprocV1::Empty::Representation - command.response_class = Google::Apis::DataprocV1::Empty - command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Deletes a long-running operation. This method indicates that the client is no - # longer interested in the operation result. It does not cancel the operation. - # If the server doesn't support this method, it returns google.rpc.Code. - # UNIMPLEMENTED. - # @param [String] name - # The name of the operation resource to be deleted. - # @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::DataprocV1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DataprocV1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_operation(name, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1/{+name}', options) - command.response_representation = Google::Apis::DataprocV1::Empty::Representation - command.response_class = Google::Apis::DataprocV1::Empty - command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Lists operations that match the specified filter in the request. If the server - # doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding - # below allows API services to override the binding to use different resource - # name schemes, such as users/*/operations. - # @param [String] name - # The name of the operation collection. - # @param [String] filter - # The standard list filter. - # @param [String] page_token - # The standard list page token. - # @param [Fixnum] page_size - # The standard list page size. - # @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::DataprocV1::ListOperationsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DataprocV1::ListOperationsResponse] - # - # @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_operations(name, filter: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/{+name}', options) - command.response_representation = Google::Apis::DataprocV1::ListOperationsResponse::Representation - command.response_class = Google::Apis::DataprocV1::ListOperationsResponse - command.params['name'] = name unless name.nil? - command.query['filter'] = filter unless filter.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets the latest state of a long-running operation. Clients can use this method - # to poll the operation result at intervals as recommended by the API service. - # @param [String] name - # The name of the operation resource. - # @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::DataprocV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DataprocV1::Operation] - # - # @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_operation(name, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/{+name}', options) - command.response_representation = Google::Apis::DataprocV1::Operation::Representation - command.response_class = Google::Apis::DataprocV1::Operation - command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end protected diff --git a/generated/google/apis/datastore_v1.rb b/generated/google/apis/datastore_v1.rb index f3af5ecf7..dfc246efe 100644 --- a/generated/google/apis/datastore_v1.rb +++ b/generated/google/apis/datastore_v1.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/datastore/ module DatastoreV1 VERSION = 'V1' - REVISION = '20170426' + REVISION = '20170516' # View and manage your Google Cloud Datastore data AUTH_DATASTORE = 'https://www.googleapis.com/auth/datastore' diff --git a/generated/google/apis/datastore_v1/classes.rb b/generated/google/apis/datastore_v1/classes.rb index 886be1234..ffdef90b6 100644 --- a/generated/google/apis/datastore_v1/classes.rb +++ b/generated/google/apis/datastore_v1/classes.rb @@ -22,1101 +22,6 @@ module Google module Apis module DatastoreV1 - # A [GQL query](https://cloud.google.com/datastore/docs/apis/gql/gql_reference). - class GqlQuery - include Google::Apis::Core::Hashable - - # A string of the format described - # [here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference). - # Corresponds to the JSON property `queryString` - # @return [String] - attr_accessor :query_string - - # When false, the query string must not contain any literals and instead must - # bind all values. For example, - # `SELECT * FROM Kind WHERE a = 'string literal'` is not allowed, while - # `SELECT * FROM Kind WHERE a = @value` is. - # Corresponds to the JSON property `allowLiterals` - # @return [Boolean] - attr_accessor :allow_literals - alias_method :allow_literals?, :allow_literals - - # For each non-reserved named binding site in the query string, there must be - # a named parameter with that name, but not necessarily the inverse. - # Key must match regex `A-Za-z_$*`, must not match regex - # `__.*__`, and must not be `""`. - # Corresponds to the JSON property `namedBindings` - # @return [Hash] - attr_accessor :named_bindings - - # Numbered binding site @1 references the first numbered parameter, - # effectively using 1-based indexing, rather than the usual 0. - # For each binding site numbered i in `query_string`, there must be an i-th - # numbered parameter. The inverse must also be true. - # Corresponds to the JSON property `positionalBindings` - # @return [Array] - attr_accessor :positional_bindings - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @query_string = args[:query_string] if args.key?(:query_string) - @allow_literals = args[:allow_literals] if args.key?(:allow_literals) - @named_bindings = args[:named_bindings] if args.key?(:named_bindings) - @positional_bindings = args[:positional_bindings] if args.key?(:positional_bindings) - end - end - - # A holder for any type of filter. - class Filter - include Google::Apis::Core::Hashable - - # A filter that merges multiple other filters using the given operator. - # Corresponds to the JSON property `compositeFilter` - # @return [Google::Apis::DatastoreV1::CompositeFilter] - attr_accessor :composite_filter - - # A filter on a specific property. - # Corresponds to the JSON property `propertyFilter` - # @return [Google::Apis::DatastoreV1::PropertyFilter] - attr_accessor :property_filter - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @composite_filter = args[:composite_filter] if args.key?(:composite_filter) - @property_filter = args[:property_filter] if args.key?(:property_filter) - end - end - - # The request for Datastore.Rollback. - class RollbackRequest - include Google::Apis::Core::Hashable - - # The transaction identifier, returned by a call to - # Datastore.BeginTransaction. - # Corresponds to the JSON property `transaction` - # NOTE: Values are automatically base64 encoded/decoded in the client library. - # @return [String] - attr_accessor :transaction - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @transaction = args[:transaction] if args.key?(:transaction) - end - end - - # The request for Datastore.RunQuery. - class RunQueryRequest - include Google::Apis::Core::Hashable - - # A partition ID identifies a grouping of entities. The grouping is always - # by project and namespace, however the namespace ID may be empty. - # A partition ID contains several dimensions: - # project ID and namespace ID. - # Partition dimensions: - # - May be `""`. - # - Must be valid UTF-8 bytes. - # - Must have values that match regex `[A-Za-z\d\.\-_]`1,100`` - # If the value of any dimension matches regex `__.*__`, the partition is - # reserved/read-only. - # A reserved/read-only partition ID is forbidden in certain documented - # contexts. - # Foreign partition IDs (in which the project ID does - # not match the context project ID ) are discouraged. - # Reads and writes of foreign partition IDs may fail if the project is not in an - # active state. - # Corresponds to the JSON property `partitionId` - # @return [Google::Apis::DatastoreV1::PartitionId] - attr_accessor :partition_id - - # A [GQL query](https://cloud.google.com/datastore/docs/apis/gql/gql_reference). - # Corresponds to the JSON property `gqlQuery` - # @return [Google::Apis::DatastoreV1::GqlQuery] - attr_accessor :gql_query - - # The options shared by read requests. - # Corresponds to the JSON property `readOptions` - # @return [Google::Apis::DatastoreV1::ReadOptions] - attr_accessor :read_options - - # A query for entities. - # Corresponds to the JSON property `query` - # @return [Google::Apis::DatastoreV1::Query] - attr_accessor :query - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @partition_id = args[:partition_id] if args.key?(:partition_id) - @gql_query = args[:gql_query] if args.key?(:gql_query) - @read_options = args[:read_options] if args.key?(:read_options) - @query = args[:query] if args.key?(:query) - end - end - - # A filter that merges multiple other filters using the given operator. - class CompositeFilter - include Google::Apis::Core::Hashable - - # The list of filters to combine. - # Must contain at least one filter. - # Corresponds to the JSON property `filters` - # @return [Array] - attr_accessor :filters - - # The operator for combining multiple filters. - # Corresponds to the JSON property `op` - # @return [String] - attr_accessor :op - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @filters = args[:filters] if args.key?(:filters) - @op = args[:op] if args.key?(:op) - end - end - - # The response for Datastore.AllocateIds. - class AllocateIdsResponse - include Google::Apis::Core::Hashable - - # The keys specified in the request (in the same order), each with - # its key path completed with a newly allocated ID. - # Corresponds to the JSON property `keys` - # @return [Array] - attr_accessor :keys - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @keys = args[:keys] if args.key?(:keys) - end - end - - # A query for entities. - class Query - include Google::Apis::Core::Hashable - - # The projection to return. Defaults to returning all properties. - # Corresponds to the JSON property `projection` - # @return [Array] - attr_accessor :projection - - # An ending point for the query results. Query cursors are - # returned in query result batches and - # [can only be used to limit the same query](https://cloud.google.com/datastore/ - # docs/concepts/queries#cursors_limits_and_offsets). - # Corresponds to the JSON property `endCursor` - # NOTE: Values are automatically base64 encoded/decoded in the client library. - # @return [String] - attr_accessor :end_cursor - - # A holder for any type of filter. - # Corresponds to the JSON property `filter` - # @return [Google::Apis::DatastoreV1::Filter] - attr_accessor :filter - - # The maximum number of results to return. Applies after all other - # constraints. Optional. - # Unspecified is interpreted as no limit. - # Must be >= 0 if specified. - # Corresponds to the JSON property `limit` - # @return [Fixnum] - attr_accessor :limit - - # The number of results to skip. Applies before limit, but after all other - # constraints. Optional. Must be >= 0 if specified. - # Corresponds to the JSON property `offset` - # @return [Fixnum] - attr_accessor :offset - - # A starting point for the query results. Query cursors are - # returned in query result batches and - # [can only be used to continue the same query](https://cloud.google.com/ - # datastore/docs/concepts/queries#cursors_limits_and_offsets). - # Corresponds to the JSON property `startCursor` - # NOTE: Values are automatically base64 encoded/decoded in the client library. - # @return [String] - attr_accessor :start_cursor - - # The kinds to query (if empty, returns entities of all kinds). - # Currently at most 1 kind may be specified. - # Corresponds to the JSON property `kind` - # @return [Array] - attr_accessor :kind - - # The properties to make distinct. The query results will contain the first - # result for each distinct combination of values for the given properties - # (if empty, all results are returned). - # Corresponds to the JSON property `distinctOn` - # @return [Array] - attr_accessor :distinct_on - - # The order to apply to the query results (if empty, order is unspecified). - # Corresponds to the JSON property `order` - # @return [Array] - attr_accessor :order - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @projection = args[:projection] if args.key?(:projection) - @end_cursor = args[:end_cursor] if args.key?(:end_cursor) - @filter = args[:filter] if args.key?(:filter) - @limit = args[:limit] if args.key?(:limit) - @offset = args[:offset] if args.key?(:offset) - @start_cursor = args[:start_cursor] if args.key?(:start_cursor) - @kind = args[:kind] if args.key?(:kind) - @distinct_on = args[:distinct_on] if args.key?(:distinct_on) - @order = args[:order] if args.key?(:order) - end - end - - # A filter on a specific property. - class PropertyFilter - include Google::Apis::Core::Hashable - - # A message that can hold any of the supported value types and associated - # metadata. - # Corresponds to the JSON property `value` - # @return [Google::Apis::DatastoreV1::Value] - attr_accessor :value - - # A reference to a property relative to the kind expressions. - # Corresponds to the JSON property `property` - # @return [Google::Apis::DatastoreV1::PropertyReference] - attr_accessor :property - - # The operator to filter by. - # Corresponds to the JSON property `op` - # @return [String] - attr_accessor :op - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @value = args[:value] if args.key?(:value) - @property = args[:property] if args.key?(:property) - @op = args[:op] if args.key?(:op) - end - end - - # The result of fetching an entity from Datastore. - class EntityResult - include Google::Apis::Core::Hashable - - # A cursor that points to the position after the result entity. - # Set only when the `EntityResult` is part of a `QueryResultBatch` message. - # Corresponds to the JSON property `cursor` - # NOTE: Values are automatically base64 encoded/decoded in the client library. - # @return [String] - attr_accessor :cursor - - # The version of the entity, a strictly positive number that monotonically - # increases with changes to the entity. - # This field is set for `FULL` entity - # results. - # For missing entities in `LookupResponse`, this - # is the version of the snapshot that was used to look up the entity, and it - # is always set except for eventually consistent reads. - # Corresponds to the JSON property `version` - # @return [Fixnum] - attr_accessor :version - - # A Datastore data object. - # An entity is limited to 1 megabyte when stored. That _roughly_ - # corresponds to a limit of 1 megabyte for the serialized form of this - # message. - # Corresponds to the JSON property `entity` - # @return [Google::Apis::DatastoreV1::Entity] - attr_accessor :entity - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @cursor = args[:cursor] if args.key?(:cursor) - @version = args[:version] if args.key?(:version) - @entity = args[:entity] if args.key?(:entity) - end - end - - # A message that can hold any of the supported value types and associated - # metadata. - class Value - include Google::Apis::Core::Hashable - - # An object representing a latitude/longitude pair. This is expressed as a pair - # of doubles representing degrees latitude and degrees longitude. Unless - # specified otherwise, this must conform to the - # WGS84 - # standard. Values must be within normalized ranges. - # Example of normalization code in Python: - # def NormalizeLongitude(longitude): - # """Wraps decimal degrees longitude to [-180.0, 180.0].""" - # q, r = divmod(longitude, 360.0) - # if r > 180.0 or (r == 180.0 and q <= -1.0): - # return r - 360.0 - # return r - # def NormalizeLatLng(latitude, longitude): - # """Wraps decimal degrees latitude and longitude to - # [-90.0, 90.0] and [-180.0, 180.0], respectively.""" - # r = latitude % 360.0 - # if r <= 90.0: - # return r, NormalizeLongitude(longitude) - # elif r >= 270.0: - # return r - 360, NormalizeLongitude(longitude) - # else: - # return 180 - r, NormalizeLongitude(longitude + 180.0) - # assert 180.0 == NormalizeLongitude(180.0) - # assert -180.0 == NormalizeLongitude(-180.0) - # assert -179.0 == NormalizeLongitude(181.0) - # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0) - # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0) - # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) - # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0) - # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0) - # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0) - # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0) - # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) - # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) - # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) - # The code in logs/storage/validator/logs_validator_traits.cc treats this type - # as if it were annotated as ST_LOCATION. - # Corresponds to the JSON property `geoPointValue` - # @return [Google::Apis::DatastoreV1::LatLng] - attr_accessor :geo_point_value - - # A unique identifier for an entity. - # If a key's partition ID or any of its path kinds or names are - # reserved/read-only, the key is reserved/read-only. - # A reserved/read-only key is forbidden in certain documented contexts. - # Corresponds to the JSON property `keyValue` - # @return [Google::Apis::DatastoreV1::Key] - attr_accessor :key_value - - # An integer value. - # Corresponds to the JSON property `integerValue` - # @return [Fixnum] - attr_accessor :integer_value - - # A UTF-8 encoded string value. - # When `exclude_from_indexes` is false (it is indexed) , may have at most 1500 - # bytes. - # Otherwise, may be set to at least 1,000,000 bytes. - # Corresponds to the JSON property `stringValue` - # @return [String] - attr_accessor :string_value - - # If the value should be excluded from all indexes including those defined - # explicitly. - # Corresponds to the JSON property `excludeFromIndexes` - # @return [Boolean] - attr_accessor :exclude_from_indexes - alias_method :exclude_from_indexes?, :exclude_from_indexes - - # A double value. - # Corresponds to the JSON property `doubleValue` - # @return [Float] - attr_accessor :double_value - - # A timestamp value. - # When stored in the Datastore, precise only to microseconds; - # any additional precision is rounded down. - # Corresponds to the JSON property `timestampValue` - # @return [String] - attr_accessor :timestamp_value - - # A null value. - # Corresponds to the JSON property `nullValue` - # @return [String] - attr_accessor :null_value - - # A boolean value. - # Corresponds to the JSON property `booleanValue` - # @return [Boolean] - attr_accessor :boolean_value - alias_method :boolean_value?, :boolean_value - - # A blob value. - # May have at most 1,000,000 bytes. - # When `exclude_from_indexes` is false, may have at most 1500 bytes. - # In JSON requests, must be base64-encoded. - # Corresponds to the JSON property `blobValue` - # NOTE: Values are automatically base64 encoded/decoded in the client library. - # @return [String] - attr_accessor :blob_value - - # The `meaning` field should only be populated for backwards compatibility. - # Corresponds to the JSON property `meaning` - # @return [Fixnum] - attr_accessor :meaning - - # An array value. - # Corresponds to the JSON property `arrayValue` - # @return [Google::Apis::DatastoreV1::ArrayValue] - attr_accessor :array_value - - # A Datastore data object. - # An entity is limited to 1 megabyte when stored. That _roughly_ - # corresponds to a limit of 1 megabyte for the serialized form of this - # message. - # Corresponds to the JSON property `entityValue` - # @return [Google::Apis::DatastoreV1::Entity] - attr_accessor :entity_value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @geo_point_value = args[:geo_point_value] if args.key?(:geo_point_value) - @key_value = args[:key_value] if args.key?(:key_value) - @integer_value = args[:integer_value] if args.key?(:integer_value) - @string_value = args[:string_value] if args.key?(:string_value) - @exclude_from_indexes = args[:exclude_from_indexes] if args.key?(:exclude_from_indexes) - @double_value = args[:double_value] if args.key?(:double_value) - @timestamp_value = args[:timestamp_value] if args.key?(:timestamp_value) - @null_value = args[:null_value] if args.key?(:null_value) - @boolean_value = args[:boolean_value] if args.key?(:boolean_value) - @blob_value = args[:blob_value] if args.key?(:blob_value) - @meaning = args[:meaning] if args.key?(:meaning) - @array_value = args[:array_value] if args.key?(:array_value) - @entity_value = args[:entity_value] if args.key?(:entity_value) - end - end - - # The response for Datastore.Commit. - class CommitResponse - include Google::Apis::Core::Hashable - - # The number of index entries updated during the commit, or zero if none were - # updated. - # Corresponds to the JSON property `indexUpdates` - # @return [Fixnum] - attr_accessor :index_updates - - # The result of performing the mutations. - # The i-th mutation result corresponds to the i-th mutation in the request. - # Corresponds to the JSON property `mutationResults` - # @return [Array] - attr_accessor :mutation_results - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @index_updates = args[:index_updates] if args.key?(:index_updates) - @mutation_results = args[:mutation_results] if args.key?(:mutation_results) - end - end - - # A partition ID identifies a grouping of entities. The grouping is always - # by project and namespace, however the namespace ID may be empty. - # A partition ID contains several dimensions: - # project ID and namespace ID. - # Partition dimensions: - # - May be `""`. - # - Must be valid UTF-8 bytes. - # - Must have values that match regex `[A-Za-z\d\.\-_]`1,100`` - # If the value of any dimension matches regex `__.*__`, the partition is - # reserved/read-only. - # A reserved/read-only partition ID is forbidden in certain documented - # contexts. - # Foreign partition IDs (in which the project ID does - # not match the context project ID ) are discouraged. - # Reads and writes of foreign partition IDs may fail if the project is not in an - # active state. - class PartitionId - include Google::Apis::Core::Hashable - - # If not empty, the ID of the namespace to which the entities belong. - # Corresponds to the JSON property `namespaceId` - # @return [String] - attr_accessor :namespace_id - - # The ID of the project to which the entities belong. - # Corresponds to the JSON property `projectId` - # @return [String] - attr_accessor :project_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @namespace_id = args[:namespace_id] if args.key?(:namespace_id) - @project_id = args[:project_id] if args.key?(:project_id) - end - end - - # A Datastore data object. - # An entity is limited to 1 megabyte when stored. That _roughly_ - # corresponds to a limit of 1 megabyte for the serialized form of this - # message. - class Entity - include Google::Apis::Core::Hashable - - # The entity's properties. - # The map's keys are property names. - # A property name matching regex `__.*__` is reserved. - # A reserved property name is forbidden in certain documented contexts. - # The name must not contain more than 500 characters. - # The name cannot be `""`. - # Corresponds to the JSON property `properties` - # @return [Hash] - attr_accessor :properties - - # A unique identifier for an entity. - # If a key's partition ID or any of its path kinds or names are - # reserved/read-only, the key is reserved/read-only. - # A reserved/read-only key is forbidden in certain documented contexts. - # Corresponds to the JSON property `key` - # @return [Google::Apis::DatastoreV1::Key] - attr_accessor :key - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @properties = args[:properties] if args.key?(:properties) - @key = args[:key] if args.key?(:key) - end - end - - # A batch of results produced by a query. - class QueryResultBatch - include Google::Apis::Core::Hashable - - # The results for this batch. - # Corresponds to the JSON property `entityResults` - # @return [Array] - attr_accessor :entity_results - - # The state of the query after the current batch. - # Corresponds to the JSON property `moreResults` - # @return [String] - attr_accessor :more_results - - # A cursor that points to the position after the last result in the batch. - # Corresponds to the JSON property `endCursor` - # NOTE: Values are automatically base64 encoded/decoded in the client library. - # @return [String] - attr_accessor :end_cursor - - # The version number of the snapshot this batch was returned from. - # This applies to the range of results from the query's `start_cursor` (or - # the beginning of the query if no cursor was given) to this batch's - # `end_cursor` (not the query's `end_cursor`). - # In a single transaction, subsequent query result batches for the same query - # can have a greater snapshot version number. Each batch's snapshot version - # is valid for all preceding batches. - # The value will be zero for eventually consistent queries. - # Corresponds to the JSON property `snapshotVersion` - # @return [Fixnum] - attr_accessor :snapshot_version - - # A cursor that points to the position after the last skipped result. - # Will be set when `skipped_results` != 0. - # Corresponds to the JSON property `skippedCursor` - # NOTE: Values are automatically base64 encoded/decoded in the client library. - # @return [String] - attr_accessor :skipped_cursor - - # The number of results skipped, typically because of an offset. - # Corresponds to the JSON property `skippedResults` - # @return [Fixnum] - attr_accessor :skipped_results - - # The result type for every entity in `entity_results`. - # Corresponds to the JSON property `entityResultType` - # @return [String] - attr_accessor :entity_result_type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @entity_results = args[:entity_results] if args.key?(:entity_results) - @more_results = args[:more_results] if args.key?(:more_results) - @end_cursor = args[:end_cursor] if args.key?(:end_cursor) - @snapshot_version = args[:snapshot_version] if args.key?(:snapshot_version) - @skipped_cursor = args[:skipped_cursor] if args.key?(:skipped_cursor) - @skipped_results = args[:skipped_results] if args.key?(:skipped_results) - @entity_result_type = args[:entity_result_type] if args.key?(:entity_result_type) - end - end - - # The request for Datastore.Lookup. - class LookupRequest - include Google::Apis::Core::Hashable - - # The options shared by read requests. - # Corresponds to the JSON property `readOptions` - # @return [Google::Apis::DatastoreV1::ReadOptions] - attr_accessor :read_options - - # Keys of entities to look up. - # Corresponds to the JSON property `keys` - # @return [Array] - attr_accessor :keys - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @read_options = args[:read_options] if args.key?(:read_options) - @keys = args[:keys] if args.key?(:keys) - end - end - - # A (kind, ID/name) pair used to construct a key path. - # If either name or ID is set, the element is complete. - # If neither is set, the element is incomplete. - class PathElement - include Google::Apis::Core::Hashable - - # The auto-allocated ID of the entity. - # Never equal to zero. Values less than zero are discouraged and may not - # be supported in the future. - # Corresponds to the JSON property `id` - # @return [Fixnum] - attr_accessor :id - - # The name of the entity. - # A name matching regex `__.*__` is reserved/read-only. - # A name must not be more than 1500 bytes when UTF-8 encoded. - # Cannot be `""`. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The kind of the entity. - # A kind matching regex `__.*__` is reserved/read-only. - # A kind must not contain more than 1500 bytes when UTF-8 encoded. - # Cannot be `""`. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] if args.key?(:id) - @name = args[:name] if args.key?(:name) - @kind = args[:kind] if args.key?(:kind) - end - end - - # A binding parameter for a GQL query. - class GqlQueryParameter - include Google::Apis::Core::Hashable - - # A query cursor. Query cursors are returned in query - # result batches. - # Corresponds to the JSON property `cursor` - # NOTE: Values are automatically base64 encoded/decoded in the client library. - # @return [String] - attr_accessor :cursor - - # A message that can hold any of the supported value types and associated - # metadata. - # Corresponds to the JSON property `value` - # @return [Google::Apis::DatastoreV1::Value] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @cursor = args[:cursor] if args.key?(:cursor) - @value = args[:value] if args.key?(:value) - end - end - - # The response for Datastore.BeginTransaction. - class BeginTransactionResponse - include Google::Apis::Core::Hashable - - # The transaction identifier (always present). - # Corresponds to the JSON property `transaction` - # NOTE: Values are automatically base64 encoded/decoded in the client library. - # @return [String] - attr_accessor :transaction - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @transaction = args[:transaction] if args.key?(:transaction) - end - end - - # The request for Datastore.AllocateIds. - class AllocateIdsRequest - include Google::Apis::Core::Hashable - - # A list of keys with incomplete key paths for which to allocate IDs. - # No key may be reserved/read-only. - # Corresponds to the JSON property `keys` - # @return [Array] - attr_accessor :keys - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @keys = args[:keys] if args.key?(:keys) - end - end - - # The response for Datastore.Lookup. - class LookupResponse - include Google::Apis::Core::Hashable - - # A list of keys that were not looked up due to resource constraints. The - # order of results in this field is undefined and has no relation to the - # order of the keys in the input. - # Corresponds to the JSON property `deferred` - # @return [Array] - attr_accessor :deferred - - # Entities found as `ResultType.FULL` entities. The order of results in this - # field is undefined and has no relation to the order of the keys in the - # input. - # Corresponds to the JSON property `found` - # @return [Array] - attr_accessor :found - - # Entities not found as `ResultType.KEY_ONLY` entities. The order of results - # in this field is undefined and has no relation to the order of the keys - # in the input. - # Corresponds to the JSON property `missing` - # @return [Array] - attr_accessor :missing - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @deferred = args[:deferred] if args.key?(:deferred) - @found = args[:found] if args.key?(:found) - @missing = args[:missing] if args.key?(:missing) - end - end - - # The response for Datastore.RunQuery. - class RunQueryResponse - include Google::Apis::Core::Hashable - - # A query for entities. - # Corresponds to the JSON property `query` - # @return [Google::Apis::DatastoreV1::Query] - attr_accessor :query - - # A batch of results produced by a query. - # Corresponds to the JSON property `batch` - # @return [Google::Apis::DatastoreV1::QueryResultBatch] - attr_accessor :batch - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @query = args[:query] if args.key?(:query) - @batch = args[:batch] if args.key?(:batch) - end - end - - # The request for Datastore.Commit. - class CommitRequest - include Google::Apis::Core::Hashable - - # The mutations to perform. - # When mode is `TRANSACTIONAL`, mutations affecting a single entity are - # applied in order. The following sequences of mutations affecting a single - # entity are not permitted in a single `Commit` request: - # - `insert` followed by `insert` - # - `update` followed by `insert` - # - `upsert` followed by `insert` - # - `delete` followed by `update` - # When mode is `NON_TRANSACTIONAL`, no two mutations may affect a single - # entity. - # Corresponds to the JSON property `mutations` - # @return [Array] - attr_accessor :mutations - - # The identifier of the transaction associated with the commit. A - # transaction identifier is returned by a call to - # Datastore.BeginTransaction. - # Corresponds to the JSON property `transaction` - # NOTE: Values are automatically base64 encoded/decoded in the client library. - # @return [String] - attr_accessor :transaction - - # The type of commit to perform. Defaults to `TRANSACTIONAL`. - # Corresponds to the JSON property `mode` - # @return [String] - attr_accessor :mode - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @mutations = args[:mutations] if args.key?(:mutations) - @transaction = args[:transaction] if args.key?(:transaction) - @mode = args[:mode] if args.key?(:mode) - end - end - - # The request for Datastore.BeginTransaction. - class BeginTransactionRequest - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # The desired order for a specific property. - class PropertyOrder - include Google::Apis::Core::Hashable - - # A reference to a property relative to the kind expressions. - # Corresponds to the JSON property `property` - # @return [Google::Apis::DatastoreV1::PropertyReference] - attr_accessor :property - - # The direction to order by. Defaults to `ASCENDING`. - # Corresponds to the JSON property `direction` - # @return [String] - attr_accessor :direction - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @property = args[:property] if args.key?(:property) - @direction = args[:direction] if args.key?(:direction) - end - end - - # A representation of a kind. - class KindExpression - include Google::Apis::Core::Hashable - - # The name of the kind. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @name = args[:name] if args.key?(:name) - end - end - - # An object representing a latitude/longitude pair. This is expressed as a pair - # of doubles representing degrees latitude and degrees longitude. Unless - # specified otherwise, this must conform to the - # WGS84 - # standard. Values must be within normalized ranges. - # Example of normalization code in Python: - # def NormalizeLongitude(longitude): - # """Wraps decimal degrees longitude to [-180.0, 180.0].""" - # q, r = divmod(longitude, 360.0) - # if r > 180.0 or (r == 180.0 and q <= -1.0): - # return r - 360.0 - # return r - # def NormalizeLatLng(latitude, longitude): - # """Wraps decimal degrees latitude and longitude to - # [-90.0, 90.0] and [-180.0, 180.0], respectively.""" - # r = latitude % 360.0 - # if r <= 90.0: - # return r, NormalizeLongitude(longitude) - # elif r >= 270.0: - # return r - 360, NormalizeLongitude(longitude) - # else: - # return 180 - r, NormalizeLongitude(longitude + 180.0) - # assert 180.0 == NormalizeLongitude(180.0) - # assert -180.0 == NormalizeLongitude(-180.0) - # assert -179.0 == NormalizeLongitude(181.0) - # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0) - # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0) - # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) - # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0) - # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0) - # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0) - # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0) - # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) - # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) - # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) - # The code in logs/storage/validator/logs_validator_traits.cc treats this type - # as if it were annotated as ST_LOCATION. - class LatLng - include Google::Apis::Core::Hashable - - # The longitude in degrees. It must be in the range [-180.0, +180.0]. - # Corresponds to the JSON property `longitude` - # @return [Float] - attr_accessor :longitude - - # The latitude in degrees. It must be in the range [-90.0, +90.0]. - # Corresponds to the JSON property `latitude` - # @return [Float] - attr_accessor :latitude - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @longitude = args[:longitude] if args.key?(:longitude) - @latitude = args[:latitude] if args.key?(:latitude) - end - end - - # A unique identifier for an entity. - # If a key's partition ID or any of its path kinds or names are - # reserved/read-only, the key is reserved/read-only. - # A reserved/read-only key is forbidden in certain documented contexts. - class Key - include Google::Apis::Core::Hashable - - # The entity path. - # An entity path consists of one or more elements composed of a kind and a - # string or numerical identifier, which identify entities. The first - # element identifies a _root entity_, the second element identifies - # a _child_ of the root entity, the third element identifies a child of the - # second entity, and so forth. The entities identified by all prefixes of - # the path are called the element's _ancestors_. - # An entity path is always fully complete: *all* of the entity's ancestors - # are required to be in the path along with the entity identifier itself. - # The only exception is that in some documented cases, the identifier in the - # last path element (for the entity) itself may be omitted. For example, - # the last path element of the key of `Mutation.insert` may have no - # identifier. - # A path can never be empty, and a path can have at most 100 elements. - # Corresponds to the JSON property `path` - # @return [Array] - attr_accessor :path - - # A partition ID identifies a grouping of entities. The grouping is always - # by project and namespace, however the namespace ID may be empty. - # A partition ID contains several dimensions: - # project ID and namespace ID. - # Partition dimensions: - # - May be `""`. - # - Must be valid UTF-8 bytes. - # - Must have values that match regex `[A-Za-z\d\.\-_]`1,100`` - # If the value of any dimension matches regex `__.*__`, the partition is - # reserved/read-only. - # A reserved/read-only partition ID is forbidden in certain documented - # contexts. - # Foreign partition IDs (in which the project ID does - # not match the context project ID ) are discouraged. - # Reads and writes of foreign partition IDs may fail if the project is not in an - # active state. - # Corresponds to the JSON property `partitionId` - # @return [Google::Apis::DatastoreV1::PartitionId] - attr_accessor :partition_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @path = args[:path] if args.key?(:path) - @partition_id = args[:partition_id] if args.key?(:partition_id) - end - end - - # A reference to a property relative to the kind expressions. - class PropertyReference - include Google::Apis::Core::Hashable - - # The name of the property. - # If name includes "."s, it may be interpreted as a property name path. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @name = args[:name] if args.key?(:name) - end - end - # An array value. class ArrayValue include Google::Apis::Core::Hashable @@ -1295,6 +200,1097 @@ module Google @key = args[:key] if args.key?(:key) end end + + # A [GQL query](https://cloud.google.com/datastore/docs/apis/gql/gql_reference). + class GqlQuery + include Google::Apis::Core::Hashable + + # A string of the format described + # [here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference). + # Corresponds to the JSON property `queryString` + # @return [String] + attr_accessor :query_string + + # When false, the query string must not contain any literals and instead must + # bind all values. For example, + # `SELECT * FROM Kind WHERE a = 'string literal'` is not allowed, while + # `SELECT * FROM Kind WHERE a = @value` is. + # Corresponds to the JSON property `allowLiterals` + # @return [Boolean] + attr_accessor :allow_literals + alias_method :allow_literals?, :allow_literals + + # For each non-reserved named binding site in the query string, there must be + # a named parameter with that name, but not necessarily the inverse. + # Key must match regex `A-Za-z_$*`, must not match regex + # `__.*__`, and must not be `""`. + # Corresponds to the JSON property `namedBindings` + # @return [Hash] + attr_accessor :named_bindings + + # Numbered binding site @1 references the first numbered parameter, + # effectively using 1-based indexing, rather than the usual 0. + # For each binding site numbered i in `query_string`, there must be an i-th + # numbered parameter. The inverse must also be true. + # Corresponds to the JSON property `positionalBindings` + # @return [Array] + attr_accessor :positional_bindings + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @query_string = args[:query_string] if args.key?(:query_string) + @allow_literals = args[:allow_literals] if args.key?(:allow_literals) + @named_bindings = args[:named_bindings] if args.key?(:named_bindings) + @positional_bindings = args[:positional_bindings] if args.key?(:positional_bindings) + end + end + + # A holder for any type of filter. + class Filter + include Google::Apis::Core::Hashable + + # A filter that merges multiple other filters using the given operator. + # Corresponds to the JSON property `compositeFilter` + # @return [Google::Apis::DatastoreV1::CompositeFilter] + attr_accessor :composite_filter + + # A filter on a specific property. + # Corresponds to the JSON property `propertyFilter` + # @return [Google::Apis::DatastoreV1::PropertyFilter] + attr_accessor :property_filter + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @composite_filter = args[:composite_filter] if args.key?(:composite_filter) + @property_filter = args[:property_filter] if args.key?(:property_filter) + end + end + + # The request for Datastore.RunQuery. + class RunQueryRequest + include Google::Apis::Core::Hashable + + # A partition ID identifies a grouping of entities. The grouping is always + # by project and namespace, however the namespace ID may be empty. + # A partition ID contains several dimensions: + # project ID and namespace ID. + # Partition dimensions: + # - May be `""`. + # - Must be valid UTF-8 bytes. + # - Must have values that match regex `[A-Za-z\d\.\-_]`1,100`` + # If the value of any dimension matches regex `__.*__`, the partition is + # reserved/read-only. + # A reserved/read-only partition ID is forbidden in certain documented + # contexts. + # Foreign partition IDs (in which the project ID does + # not match the context project ID ) are discouraged. + # Reads and writes of foreign partition IDs may fail if the project is not in an + # active state. + # Corresponds to the JSON property `partitionId` + # @return [Google::Apis::DatastoreV1::PartitionId] + attr_accessor :partition_id + + # A [GQL query](https://cloud.google.com/datastore/docs/apis/gql/gql_reference). + # Corresponds to the JSON property `gqlQuery` + # @return [Google::Apis::DatastoreV1::GqlQuery] + attr_accessor :gql_query + + # The options shared by read requests. + # Corresponds to the JSON property `readOptions` + # @return [Google::Apis::DatastoreV1::ReadOptions] + attr_accessor :read_options + + # A query for entities. + # Corresponds to the JSON property `query` + # @return [Google::Apis::DatastoreV1::Query] + attr_accessor :query + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @partition_id = args[:partition_id] if args.key?(:partition_id) + @gql_query = args[:gql_query] if args.key?(:gql_query) + @read_options = args[:read_options] if args.key?(:read_options) + @query = args[:query] if args.key?(:query) + end + end + + # The request for Datastore.Rollback. + class RollbackRequest + include Google::Apis::Core::Hashable + + # The transaction identifier, returned by a call to + # Datastore.BeginTransaction. + # Corresponds to the JSON property `transaction` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :transaction + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @transaction = args[:transaction] if args.key?(:transaction) + end + end + + # A filter that merges multiple other filters using the given operator. + class CompositeFilter + include Google::Apis::Core::Hashable + + # The list of filters to combine. + # Must contain at least one filter. + # Corresponds to the JSON property `filters` + # @return [Array] + attr_accessor :filters + + # The operator for combining multiple filters. + # Corresponds to the JSON property `op` + # @return [String] + attr_accessor :op + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @filters = args[:filters] if args.key?(:filters) + @op = args[:op] if args.key?(:op) + end + end + + # The response for Datastore.AllocateIds. + class AllocateIdsResponse + include Google::Apis::Core::Hashable + + # The keys specified in the request (in the same order), each with + # its key path completed with a newly allocated ID. + # Corresponds to the JSON property `keys` + # @return [Array] + attr_accessor :keys + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @keys = args[:keys] if args.key?(:keys) + end + end + + # A query for entities. + class Query + include Google::Apis::Core::Hashable + + # A starting point for the query results. Query cursors are + # returned in query result batches and + # [can only be used to continue the same query](https://cloud.google.com/ + # datastore/docs/concepts/queries#cursors_limits_and_offsets). + # Corresponds to the JSON property `startCursor` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :start_cursor + + # The number of results to skip. Applies before limit, but after all other + # constraints. Optional. Must be >= 0 if specified. + # Corresponds to the JSON property `offset` + # @return [Fixnum] + attr_accessor :offset + + # The kinds to query (if empty, returns entities of all kinds). + # Currently at most 1 kind may be specified. + # Corresponds to the JSON property `kind` + # @return [Array] + attr_accessor :kind + + # The properties to make distinct. The query results will contain the first + # result for each distinct combination of values for the given properties + # (if empty, all results are returned). + # Corresponds to the JSON property `distinctOn` + # @return [Array] + attr_accessor :distinct_on + + # The order to apply to the query results (if empty, order is unspecified). + # Corresponds to the JSON property `order` + # @return [Array] + attr_accessor :order + + # The projection to return. Defaults to returning all properties. + # Corresponds to the JSON property `projection` + # @return [Array] + attr_accessor :projection + + # An ending point for the query results. Query cursors are + # returned in query result batches and + # [can only be used to limit the same query](https://cloud.google.com/datastore/ + # docs/concepts/queries#cursors_limits_and_offsets). + # Corresponds to the JSON property `endCursor` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :end_cursor + + # A holder for any type of filter. + # Corresponds to the JSON property `filter` + # @return [Google::Apis::DatastoreV1::Filter] + attr_accessor :filter + + # The maximum number of results to return. Applies after all other + # constraints. Optional. + # Unspecified is interpreted as no limit. + # Must be >= 0 if specified. + # Corresponds to the JSON property `limit` + # @return [Fixnum] + attr_accessor :limit + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @start_cursor = args[:start_cursor] if args.key?(:start_cursor) + @offset = args[:offset] if args.key?(:offset) + @kind = args[:kind] if args.key?(:kind) + @distinct_on = args[:distinct_on] if args.key?(:distinct_on) + @order = args[:order] if args.key?(:order) + @projection = args[:projection] if args.key?(:projection) + @end_cursor = args[:end_cursor] if args.key?(:end_cursor) + @filter = args[:filter] if args.key?(:filter) + @limit = args[:limit] if args.key?(:limit) + end + end + + # A filter on a specific property. + class PropertyFilter + include Google::Apis::Core::Hashable + + # A message that can hold any of the supported value types and associated + # metadata. + # Corresponds to the JSON property `value` + # @return [Google::Apis::DatastoreV1::Value] + attr_accessor :value + + # A reference to a property relative to the kind expressions. + # Corresponds to the JSON property `property` + # @return [Google::Apis::DatastoreV1::PropertyReference] + attr_accessor :property + + # The operator to filter by. + # Corresponds to the JSON property `op` + # @return [String] + attr_accessor :op + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @value = args[:value] if args.key?(:value) + @property = args[:property] if args.key?(:property) + @op = args[:op] if args.key?(:op) + end + end + + # The result of fetching an entity from Datastore. + class EntityResult + include Google::Apis::Core::Hashable + + # A cursor that points to the position after the result entity. + # Set only when the `EntityResult` is part of a `QueryResultBatch` message. + # Corresponds to the JSON property `cursor` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :cursor + + # The version of the entity, a strictly positive number that monotonically + # increases with changes to the entity. + # This field is set for `FULL` entity + # results. + # For missing entities in `LookupResponse`, this + # is the version of the snapshot that was used to look up the entity, and it + # is always set except for eventually consistent reads. + # Corresponds to the JSON property `version` + # @return [Fixnum] + attr_accessor :version + + # A Datastore data object. + # An entity is limited to 1 megabyte when stored. That _roughly_ + # corresponds to a limit of 1 megabyte for the serialized form of this + # message. + # Corresponds to the JSON property `entity` + # @return [Google::Apis::DatastoreV1::Entity] + attr_accessor :entity + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @cursor = args[:cursor] if args.key?(:cursor) + @version = args[:version] if args.key?(:version) + @entity = args[:entity] if args.key?(:entity) + end + end + + # The response for Datastore.Commit. + class CommitResponse + include Google::Apis::Core::Hashable + + # The result of performing the mutations. + # The i-th mutation result corresponds to the i-th mutation in the request. + # Corresponds to the JSON property `mutationResults` + # @return [Array] + attr_accessor :mutation_results + + # The number of index entries updated during the commit, or zero if none were + # updated. + # Corresponds to the JSON property `indexUpdates` + # @return [Fixnum] + attr_accessor :index_updates + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @mutation_results = args[:mutation_results] if args.key?(:mutation_results) + @index_updates = args[:index_updates] if args.key?(:index_updates) + end + end + + # A message that can hold any of the supported value types and associated + # metadata. + class Value + include Google::Apis::Core::Hashable + + # A Datastore data object. + # An entity is limited to 1 megabyte when stored. That _roughly_ + # corresponds to a limit of 1 megabyte for the serialized form of this + # message. + # Corresponds to the JSON property `entityValue` + # @return [Google::Apis::DatastoreV1::Entity] + attr_accessor :entity_value + + # An object representing a latitude/longitude pair. This is expressed as a pair + # of doubles representing degrees latitude and degrees longitude. Unless + # specified otherwise, this must conform to the + # WGS84 + # standard. Values must be within normalized ranges. + # Example of normalization code in Python: + # def NormalizeLongitude(longitude): + # """Wraps decimal degrees longitude to [-180.0, 180.0].""" + # q, r = divmod(longitude, 360.0) + # if r > 180.0 or (r == 180.0 and q <= -1.0): + # return r - 360.0 + # return r + # def NormalizeLatLng(latitude, longitude): + # """Wraps decimal degrees latitude and longitude to + # [-90.0, 90.0] and [-180.0, 180.0], respectively.""" + # r = latitude % 360.0 + # if r <= 90.0: + # return r, NormalizeLongitude(longitude) + # elif r >= 270.0: + # return r - 360, NormalizeLongitude(longitude) + # else: + # return 180 - r, NormalizeLongitude(longitude + 180.0) + # assert 180.0 == NormalizeLongitude(180.0) + # assert -180.0 == NormalizeLongitude(-180.0) + # assert -179.0 == NormalizeLongitude(181.0) + # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0) + # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0) + # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) + # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0) + # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0) + # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0) + # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0) + # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) + # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) + # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) + # Corresponds to the JSON property `geoPointValue` + # @return [Google::Apis::DatastoreV1::LatLng] + attr_accessor :geo_point_value + + # A unique identifier for an entity. + # If a key's partition ID or any of its path kinds or names are + # reserved/read-only, the key is reserved/read-only. + # A reserved/read-only key is forbidden in certain documented contexts. + # Corresponds to the JSON property `keyValue` + # @return [Google::Apis::DatastoreV1::Key] + attr_accessor :key_value + + # An integer value. + # Corresponds to the JSON property `integerValue` + # @return [Fixnum] + attr_accessor :integer_value + + # A UTF-8 encoded string value. + # When `exclude_from_indexes` is false (it is indexed) , may have at most 1500 + # bytes. + # Otherwise, may be set to at least 1,000,000 bytes. + # Corresponds to the JSON property `stringValue` + # @return [String] + attr_accessor :string_value + + # If the value should be excluded from all indexes including those defined + # explicitly. + # Corresponds to the JSON property `excludeFromIndexes` + # @return [Boolean] + attr_accessor :exclude_from_indexes + alias_method :exclude_from_indexes?, :exclude_from_indexes + + # A double value. + # Corresponds to the JSON property `doubleValue` + # @return [Float] + attr_accessor :double_value + + # A timestamp value. + # When stored in the Datastore, precise only to microseconds; + # any additional precision is rounded down. + # Corresponds to the JSON property `timestampValue` + # @return [String] + attr_accessor :timestamp_value + + # A boolean value. + # Corresponds to the JSON property `booleanValue` + # @return [Boolean] + attr_accessor :boolean_value + alias_method :boolean_value?, :boolean_value + + # A null value. + # Corresponds to the JSON property `nullValue` + # @return [String] + attr_accessor :null_value + + # A blob value. + # May have at most 1,000,000 bytes. + # When `exclude_from_indexes` is false, may have at most 1500 bytes. + # In JSON requests, must be base64-encoded. + # Corresponds to the JSON property `blobValue` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :blob_value + + # The `meaning` field should only be populated for backwards compatibility. + # Corresponds to the JSON property `meaning` + # @return [Fixnum] + attr_accessor :meaning + + # An array value. + # Corresponds to the JSON property `arrayValue` + # @return [Google::Apis::DatastoreV1::ArrayValue] + attr_accessor :array_value + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @entity_value = args[:entity_value] if args.key?(:entity_value) + @geo_point_value = args[:geo_point_value] if args.key?(:geo_point_value) + @key_value = args[:key_value] if args.key?(:key_value) + @integer_value = args[:integer_value] if args.key?(:integer_value) + @string_value = args[:string_value] if args.key?(:string_value) + @exclude_from_indexes = args[:exclude_from_indexes] if args.key?(:exclude_from_indexes) + @double_value = args[:double_value] if args.key?(:double_value) + @timestamp_value = args[:timestamp_value] if args.key?(:timestamp_value) + @boolean_value = args[:boolean_value] if args.key?(:boolean_value) + @null_value = args[:null_value] if args.key?(:null_value) + @blob_value = args[:blob_value] if args.key?(:blob_value) + @meaning = args[:meaning] if args.key?(:meaning) + @array_value = args[:array_value] if args.key?(:array_value) + end + end + + # A partition ID identifies a grouping of entities. The grouping is always + # by project and namespace, however the namespace ID may be empty. + # A partition ID contains several dimensions: + # project ID and namespace ID. + # Partition dimensions: + # - May be `""`. + # - Must be valid UTF-8 bytes. + # - Must have values that match regex `[A-Za-z\d\.\-_]`1,100`` + # If the value of any dimension matches regex `__.*__`, the partition is + # reserved/read-only. + # A reserved/read-only partition ID is forbidden in certain documented + # contexts. + # Foreign partition IDs (in which the project ID does + # not match the context project ID ) are discouraged. + # Reads and writes of foreign partition IDs may fail if the project is not in an + # active state. + class PartitionId + include Google::Apis::Core::Hashable + + # The ID of the project to which the entities belong. + # Corresponds to the JSON property `projectId` + # @return [String] + attr_accessor :project_id + + # If not empty, the ID of the namespace to which the entities belong. + # Corresponds to the JSON property `namespaceId` + # @return [String] + attr_accessor :namespace_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @project_id = args[:project_id] if args.key?(:project_id) + @namespace_id = args[:namespace_id] if args.key?(:namespace_id) + end + end + + # A Datastore data object. + # An entity is limited to 1 megabyte when stored. That _roughly_ + # corresponds to a limit of 1 megabyte for the serialized form of this + # message. + class Entity + include Google::Apis::Core::Hashable + + # A unique identifier for an entity. + # If a key's partition ID or any of its path kinds or names are + # reserved/read-only, the key is reserved/read-only. + # A reserved/read-only key is forbidden in certain documented contexts. + # Corresponds to the JSON property `key` + # @return [Google::Apis::DatastoreV1::Key] + attr_accessor :key + + # The entity's properties. + # The map's keys are property names. + # A property name matching regex `__.*__` is reserved. + # A reserved property name is forbidden in certain documented contexts. + # The name must not contain more than 500 characters. + # The name cannot be `""`. + # Corresponds to the JSON property `properties` + # @return [Hash] + attr_accessor :properties + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @key = args[:key] if args.key?(:key) + @properties = args[:properties] if args.key?(:properties) + end + end + + # A batch of results produced by a query. + class QueryResultBatch + include Google::Apis::Core::Hashable + + # The version number of the snapshot this batch was returned from. + # This applies to the range of results from the query's `start_cursor` (or + # the beginning of the query if no cursor was given) to this batch's + # `end_cursor` (not the query's `end_cursor`). + # In a single transaction, subsequent query result batches for the same query + # can have a greater snapshot version number. Each batch's snapshot version + # is valid for all preceding batches. + # The value will be zero for eventually consistent queries. + # Corresponds to the JSON property `snapshotVersion` + # @return [Fixnum] + attr_accessor :snapshot_version + + # A cursor that points to the position after the last skipped result. + # Will be set when `skipped_results` != 0. + # Corresponds to the JSON property `skippedCursor` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :skipped_cursor + + # The number of results skipped, typically because of an offset. + # Corresponds to the JSON property `skippedResults` + # @return [Fixnum] + attr_accessor :skipped_results + + # The result type for every entity in `entity_results`. + # Corresponds to the JSON property `entityResultType` + # @return [String] + attr_accessor :entity_result_type + + # The results for this batch. + # Corresponds to the JSON property `entityResults` + # @return [Array] + attr_accessor :entity_results + + # A cursor that points to the position after the last result in the batch. + # Corresponds to the JSON property `endCursor` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :end_cursor + + # The state of the query after the current batch. + # Corresponds to the JSON property `moreResults` + # @return [String] + attr_accessor :more_results + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @snapshot_version = args[:snapshot_version] if args.key?(:snapshot_version) + @skipped_cursor = args[:skipped_cursor] if args.key?(:skipped_cursor) + @skipped_results = args[:skipped_results] if args.key?(:skipped_results) + @entity_result_type = args[:entity_result_type] if args.key?(:entity_result_type) + @entity_results = args[:entity_results] if args.key?(:entity_results) + @end_cursor = args[:end_cursor] if args.key?(:end_cursor) + @more_results = args[:more_results] if args.key?(:more_results) + end + end + + # The request for Datastore.Lookup. + class LookupRequest + include Google::Apis::Core::Hashable + + # The options shared by read requests. + # Corresponds to the JSON property `readOptions` + # @return [Google::Apis::DatastoreV1::ReadOptions] + attr_accessor :read_options + + # Keys of entities to look up. + # Corresponds to the JSON property `keys` + # @return [Array] + attr_accessor :keys + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @read_options = args[:read_options] if args.key?(:read_options) + @keys = args[:keys] if args.key?(:keys) + end + end + + # A (kind, ID/name) pair used to construct a key path. + # If either name or ID is set, the element is complete. + # If neither is set, the element is incomplete. + class PathElement + include Google::Apis::Core::Hashable + + # The name of the entity. + # A name matching regex `__.*__` is reserved/read-only. + # A name must not be more than 1500 bytes when UTF-8 encoded. + # Cannot be `""`. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The kind of the entity. + # A kind matching regex `__.*__` is reserved/read-only. + # A kind must not contain more than 1500 bytes when UTF-8 encoded. + # Cannot be `""`. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # The auto-allocated ID of the entity. + # Never equal to zero. Values less than zero are discouraged and may not + # be supported in the future. + # Corresponds to the JSON property `id` + # @return [Fixnum] + attr_accessor :id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @name = args[:name] if args.key?(:name) + @kind = args[:kind] if args.key?(:kind) + @id = args[:id] if args.key?(:id) + end + end + + # A binding parameter for a GQL query. + class GqlQueryParameter + include Google::Apis::Core::Hashable + + # A query cursor. Query cursors are returned in query + # result batches. + # Corresponds to the JSON property `cursor` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :cursor + + # A message that can hold any of the supported value types and associated + # metadata. + # Corresponds to the JSON property `value` + # @return [Google::Apis::DatastoreV1::Value] + attr_accessor :value + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @cursor = args[:cursor] if args.key?(:cursor) + @value = args[:value] if args.key?(:value) + end + end + + # The response for Datastore.BeginTransaction. + class BeginTransactionResponse + include Google::Apis::Core::Hashable + + # The transaction identifier (always present). + # Corresponds to the JSON property `transaction` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :transaction + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @transaction = args[:transaction] if args.key?(:transaction) + end + end + + # The response for Datastore.RunQuery. + class RunQueryResponse + include Google::Apis::Core::Hashable + + # A batch of results produced by a query. + # Corresponds to the JSON property `batch` + # @return [Google::Apis::DatastoreV1::QueryResultBatch] + attr_accessor :batch + + # A query for entities. + # Corresponds to the JSON property `query` + # @return [Google::Apis::DatastoreV1::Query] + attr_accessor :query + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @batch = args[:batch] if args.key?(:batch) + @query = args[:query] if args.key?(:query) + end + end + + # The response for Datastore.Lookup. + class LookupResponse + include Google::Apis::Core::Hashable + + # Entities found as `ResultType.FULL` entities. The order of results in this + # field is undefined and has no relation to the order of the keys in the + # input. + # Corresponds to the JSON property `found` + # @return [Array] + attr_accessor :found + + # Entities not found as `ResultType.KEY_ONLY` entities. The order of results + # in this field is undefined and has no relation to the order of the keys + # in the input. + # Corresponds to the JSON property `missing` + # @return [Array] + attr_accessor :missing + + # A list of keys that were not looked up due to resource constraints. The + # order of results in this field is undefined and has no relation to the + # order of the keys in the input. + # Corresponds to the JSON property `deferred` + # @return [Array] + attr_accessor :deferred + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @found = args[:found] if args.key?(:found) + @missing = args[:missing] if args.key?(:missing) + @deferred = args[:deferred] if args.key?(:deferred) + end + end + + # The request for Datastore.AllocateIds. + class AllocateIdsRequest + include Google::Apis::Core::Hashable + + # A list of keys with incomplete key paths for which to allocate IDs. + # No key may be reserved/read-only. + # Corresponds to the JSON property `keys` + # @return [Array] + attr_accessor :keys + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @keys = args[:keys] if args.key?(:keys) + end + end + + # The request for Datastore.Commit. + class CommitRequest + include Google::Apis::Core::Hashable + + # The identifier of the transaction associated with the commit. A + # transaction identifier is returned by a call to + # Datastore.BeginTransaction. + # Corresponds to the JSON property `transaction` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :transaction + + # The type of commit to perform. Defaults to `TRANSACTIONAL`. + # Corresponds to the JSON property `mode` + # @return [String] + attr_accessor :mode + + # The mutations to perform. + # When mode is `TRANSACTIONAL`, mutations affecting a single entity are + # applied in order. The following sequences of mutations affecting a single + # entity are not permitted in a single `Commit` request: + # - `insert` followed by `insert` + # - `update` followed by `insert` + # - `upsert` followed by `insert` + # - `delete` followed by `update` + # When mode is `NON_TRANSACTIONAL`, no two mutations may affect a single + # entity. + # Corresponds to the JSON property `mutations` + # @return [Array] + attr_accessor :mutations + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @transaction = args[:transaction] if args.key?(:transaction) + @mode = args[:mode] if args.key?(:mode) + @mutations = args[:mutations] if args.key?(:mutations) + end + end + + # The request for Datastore.BeginTransaction. + class BeginTransactionRequest + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # The desired order for a specific property. + class PropertyOrder + include Google::Apis::Core::Hashable + + # A reference to a property relative to the kind expressions. + # Corresponds to the JSON property `property` + # @return [Google::Apis::DatastoreV1::PropertyReference] + attr_accessor :property + + # The direction to order by. Defaults to `ASCENDING`. + # Corresponds to the JSON property `direction` + # @return [String] + attr_accessor :direction + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @property = args[:property] if args.key?(:property) + @direction = args[:direction] if args.key?(:direction) + end + end + + # A representation of a kind. + class KindExpression + include Google::Apis::Core::Hashable + + # The name of the kind. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @name = args[:name] if args.key?(:name) + end + end + + # An object representing a latitude/longitude pair. This is expressed as a pair + # of doubles representing degrees latitude and degrees longitude. Unless + # specified otherwise, this must conform to the + # WGS84 + # standard. Values must be within normalized ranges. + # Example of normalization code in Python: + # def NormalizeLongitude(longitude): + # """Wraps decimal degrees longitude to [-180.0, 180.0].""" + # q, r = divmod(longitude, 360.0) + # if r > 180.0 or (r == 180.0 and q <= -1.0): + # return r - 360.0 + # return r + # def NormalizeLatLng(latitude, longitude): + # """Wraps decimal degrees latitude and longitude to + # [-90.0, 90.0] and [-180.0, 180.0], respectively.""" + # r = latitude % 360.0 + # if r <= 90.0: + # return r, NormalizeLongitude(longitude) + # elif r >= 270.0: + # return r - 360, NormalizeLongitude(longitude) + # else: + # return 180 - r, NormalizeLongitude(longitude + 180.0) + # assert 180.0 == NormalizeLongitude(180.0) + # assert -180.0 == NormalizeLongitude(-180.0) + # assert -179.0 == NormalizeLongitude(181.0) + # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0) + # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0) + # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) + # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0) + # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0) + # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0) + # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0) + # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) + # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) + # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) + class LatLng + include Google::Apis::Core::Hashable + + # The latitude in degrees. It must be in the range [-90.0, +90.0]. + # Corresponds to the JSON property `latitude` + # @return [Float] + attr_accessor :latitude + + # The longitude in degrees. It must be in the range [-180.0, +180.0]. + # Corresponds to the JSON property `longitude` + # @return [Float] + attr_accessor :longitude + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @latitude = args[:latitude] if args.key?(:latitude) + @longitude = args[:longitude] if args.key?(:longitude) + end + end + + # A unique identifier for an entity. + # If a key's partition ID or any of its path kinds or names are + # reserved/read-only, the key is reserved/read-only. + # A reserved/read-only key is forbidden in certain documented contexts. + class Key + include Google::Apis::Core::Hashable + + # The entity path. + # An entity path consists of one or more elements composed of a kind and a + # string or numerical identifier, which identify entities. The first + # element identifies a _root entity_, the second element identifies + # a _child_ of the root entity, the third element identifies a child of the + # second entity, and so forth. The entities identified by all prefixes of + # the path are called the element's _ancestors_. + # An entity path is always fully complete: *all* of the entity's ancestors + # are required to be in the path along with the entity identifier itself. + # The only exception is that in some documented cases, the identifier in the + # last path element (for the entity) itself may be omitted. For example, + # the last path element of the key of `Mutation.insert` may have no + # identifier. + # A path can never be empty, and a path can have at most 100 elements. + # Corresponds to the JSON property `path` + # @return [Array] + attr_accessor :path + + # A partition ID identifies a grouping of entities. The grouping is always + # by project and namespace, however the namespace ID may be empty. + # A partition ID contains several dimensions: + # project ID and namespace ID. + # Partition dimensions: + # - May be `""`. + # - Must be valid UTF-8 bytes. + # - Must have values that match regex `[A-Za-z\d\.\-_]`1,100`` + # If the value of any dimension matches regex `__.*__`, the partition is + # reserved/read-only. + # A reserved/read-only partition ID is forbidden in certain documented + # contexts. + # Foreign partition IDs (in which the project ID does + # not match the context project ID ) are discouraged. + # Reads and writes of foreign partition IDs may fail if the project is not in an + # active state. + # Corresponds to the JSON property `partitionId` + # @return [Google::Apis::DatastoreV1::PartitionId] + attr_accessor :partition_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @path = args[:path] if args.key?(:path) + @partition_id = args[:partition_id] if args.key?(:partition_id) + end + end + + # A reference to a property relative to the kind expressions. + class PropertyReference + include Google::Apis::Core::Hashable + + # The name of the property. + # If name includes "."s, it may be interpreted as a property name path. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @name = args[:name] if args.key?(:name) + end + end end end end diff --git a/generated/google/apis/datastore_v1/representations.rb b/generated/google/apis/datastore_v1/representations.rb index 1dcc9c21b..3f2d75783 100644 --- a/generated/google/apis/datastore_v1/representations.rb +++ b/generated/google/apis/datastore_v1/representations.rb @@ -22,174 +22,6 @@ module Google module Apis module DatastoreV1 - class GqlQuery - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Filter - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class RollbackRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class RunQueryRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CompositeFilter - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AllocateIdsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Query - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class PropertyFilter - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class EntityResult - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Value - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CommitResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class PartitionId - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Entity - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class QueryResultBatch - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class LookupRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class PathElement - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class GqlQueryParameter - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BeginTransactionResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AllocateIdsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class LookupResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class RunQueryResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CommitRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BeginTransactionRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class PropertyOrder - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class KindExpression - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class LatLng - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Key - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class PropertyReference - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class ArrayValue class Representation < Google::Apis::Core::JsonRepresentation; end @@ -227,290 +59,171 @@ module Google end class GqlQuery - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :query_string, as: 'queryString' - property :allow_literals, as: 'allowLiterals' - hash :named_bindings, as: 'namedBindings', class: Google::Apis::DatastoreV1::GqlQueryParameter, decorator: Google::Apis::DatastoreV1::GqlQueryParameter::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - collection :positional_bindings, as: 'positionalBindings', class: Google::Apis::DatastoreV1::GqlQueryParameter, decorator: Google::Apis::DatastoreV1::GqlQueryParameter::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class Filter - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :composite_filter, as: 'compositeFilter', class: Google::Apis::DatastoreV1::CompositeFilter, decorator: Google::Apis::DatastoreV1::CompositeFilter::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :property_filter, as: 'propertyFilter', class: Google::Apis::DatastoreV1::PropertyFilter, decorator: Google::Apis::DatastoreV1::PropertyFilter::Representation - - end - end - - class RollbackRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :transaction, :base64 => true, as: 'transaction' - end + include Google::Apis::Core::JsonObjectSupport end class RunQueryRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :partition_id, as: 'partitionId', class: Google::Apis::DatastoreV1::PartitionId, decorator: Google::Apis::DatastoreV1::PartitionId::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :gql_query, as: 'gqlQuery', class: Google::Apis::DatastoreV1::GqlQuery, decorator: Google::Apis::DatastoreV1::GqlQuery::Representation + include Google::Apis::Core::JsonObjectSupport + end - property :read_options, as: 'readOptions', class: Google::Apis::DatastoreV1::ReadOptions, decorator: Google::Apis::DatastoreV1::ReadOptions::Representation + class RollbackRequest + class Representation < Google::Apis::Core::JsonRepresentation; end - property :query, as: 'query', class: Google::Apis::DatastoreV1::Query, decorator: Google::Apis::DatastoreV1::Query::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class CompositeFilter - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :filters, as: 'filters', class: Google::Apis::DatastoreV1::Filter, decorator: Google::Apis::DatastoreV1::Filter::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :op, as: 'op' - end + include Google::Apis::Core::JsonObjectSupport end class AllocateIdsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :keys, as: 'keys', class: Google::Apis::DatastoreV1::Key, decorator: Google::Apis::DatastoreV1::Key::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class Query - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :projection, as: 'projection', class: Google::Apis::DatastoreV1::Projection, decorator: Google::Apis::DatastoreV1::Projection::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :end_cursor, :base64 => true, as: 'endCursor' - property :filter, as: 'filter', class: Google::Apis::DatastoreV1::Filter, decorator: Google::Apis::DatastoreV1::Filter::Representation - - property :limit, as: 'limit' - property :offset, as: 'offset' - property :start_cursor, :base64 => true, as: 'startCursor' - collection :kind, as: 'kind', class: Google::Apis::DatastoreV1::KindExpression, decorator: Google::Apis::DatastoreV1::KindExpression::Representation - - collection :distinct_on, as: 'distinctOn', class: Google::Apis::DatastoreV1::PropertyReference, decorator: Google::Apis::DatastoreV1::PropertyReference::Representation - - collection :order, as: 'order', class: Google::Apis::DatastoreV1::PropertyOrder, decorator: Google::Apis::DatastoreV1::PropertyOrder::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class PropertyFilter - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :value, as: 'value', class: Google::Apis::DatastoreV1::Value, decorator: Google::Apis::DatastoreV1::Value::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :property, as: 'property', class: Google::Apis::DatastoreV1::PropertyReference, decorator: Google::Apis::DatastoreV1::PropertyReference::Representation - - property :op, as: 'op' - end + include Google::Apis::Core::JsonObjectSupport end class EntityResult - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :cursor, :base64 => true, as: 'cursor' - property :version, :numeric_string => true, as: 'version' - property :entity, as: 'entity', class: Google::Apis::DatastoreV1::Entity, decorator: Google::Apis::DatastoreV1::Entity::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class Value - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :geo_point_value, as: 'geoPointValue', class: Google::Apis::DatastoreV1::LatLng, decorator: Google::Apis::DatastoreV1::LatLng::Representation - - property :key_value, as: 'keyValue', class: Google::Apis::DatastoreV1::Key, decorator: Google::Apis::DatastoreV1::Key::Representation - - property :integer_value, :numeric_string => true, as: 'integerValue' - property :string_value, as: 'stringValue' - property :exclude_from_indexes, as: 'excludeFromIndexes' - property :double_value, as: 'doubleValue' - property :timestamp_value, as: 'timestampValue' - property :null_value, as: 'nullValue' - property :boolean_value, as: 'booleanValue' - property :blob_value, :base64 => true, as: 'blobValue' - property :meaning, as: 'meaning' - property :array_value, as: 'arrayValue', class: Google::Apis::DatastoreV1::ArrayValue, decorator: Google::Apis::DatastoreV1::ArrayValue::Representation - - property :entity_value, as: 'entityValue', class: Google::Apis::DatastoreV1::Entity, decorator: Google::Apis::DatastoreV1::Entity::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class CommitResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :index_updates, as: 'indexUpdates' - collection :mutation_results, as: 'mutationResults', class: Google::Apis::DatastoreV1::MutationResult, decorator: Google::Apis::DatastoreV1::MutationResult::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport + end + + class Value + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class PartitionId - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :namespace_id, as: 'namespaceId' - property :project_id, as: 'projectId' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class Entity - # @private - class Representation < Google::Apis::Core::JsonRepresentation - hash :properties, as: 'properties', class: Google::Apis::DatastoreV1::Value, decorator: Google::Apis::DatastoreV1::Value::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :key, as: 'key', class: Google::Apis::DatastoreV1::Key, decorator: Google::Apis::DatastoreV1::Key::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class QueryResultBatch - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :entity_results, as: 'entityResults', class: Google::Apis::DatastoreV1::EntityResult, decorator: Google::Apis::DatastoreV1::EntityResult::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :more_results, as: 'moreResults' - property :end_cursor, :base64 => true, as: 'endCursor' - property :snapshot_version, :numeric_string => true, as: 'snapshotVersion' - property :skipped_cursor, :base64 => true, as: 'skippedCursor' - property :skipped_results, as: 'skippedResults' - property :entity_result_type, as: 'entityResultType' - end + include Google::Apis::Core::JsonObjectSupport end class LookupRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :read_options, as: 'readOptions', class: Google::Apis::DatastoreV1::ReadOptions, decorator: Google::Apis::DatastoreV1::ReadOptions::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - collection :keys, as: 'keys', class: Google::Apis::DatastoreV1::Key, decorator: Google::Apis::DatastoreV1::Key::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class PathElement - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :id, :numeric_string => true, as: 'id' - property :name, as: 'name' - property :kind, as: 'kind' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class GqlQueryParameter - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :cursor, :base64 => true, as: 'cursor' - property :value, as: 'value', class: Google::Apis::DatastoreV1::Value, decorator: Google::Apis::DatastoreV1::Value::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class BeginTransactionResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :transaction, :base64 => true, as: 'transaction' - end - end + class Representation < Google::Apis::Core::JsonRepresentation; end - class AllocateIdsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :keys, as: 'keys', class: Google::Apis::DatastoreV1::Key, decorator: Google::Apis::DatastoreV1::Key::Representation - - end - end - - class LookupResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :deferred, as: 'deferred', class: Google::Apis::DatastoreV1::Key, decorator: Google::Apis::DatastoreV1::Key::Representation - - collection :found, as: 'found', class: Google::Apis::DatastoreV1::EntityResult, decorator: Google::Apis::DatastoreV1::EntityResult::Representation - - collection :missing, as: 'missing', class: Google::Apis::DatastoreV1::EntityResult, decorator: Google::Apis::DatastoreV1::EntityResult::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class RunQueryResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :query, as: 'query', class: Google::Apis::DatastoreV1::Query, decorator: Google::Apis::DatastoreV1::Query::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :batch, as: 'batch', class: Google::Apis::DatastoreV1::QueryResultBatch, decorator: Google::Apis::DatastoreV1::QueryResultBatch::Representation + include Google::Apis::Core::JsonObjectSupport + end - end + class LookupResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AllocateIdsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class CommitRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :mutations, as: 'mutations', class: Google::Apis::DatastoreV1::Mutation, decorator: Google::Apis::DatastoreV1::Mutation::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :transaction, :base64 => true, as: 'transaction' - property :mode, as: 'mode' - end + include Google::Apis::Core::JsonObjectSupport end class BeginTransactionRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class PropertyOrder - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :property, as: 'property', class: Google::Apis::DatastoreV1::PropertyReference, decorator: Google::Apis::DatastoreV1::PropertyReference::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :direction, as: 'direction' - end + include Google::Apis::Core::JsonObjectSupport end class KindExpression - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class LatLng - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :longitude, as: 'longitude' - property :latitude, as: 'latitude' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class Key - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :path, as: 'path', class: Google::Apis::DatastoreV1::PathElement, decorator: Google::Apis::DatastoreV1::PathElement::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :partition_id, as: 'partitionId', class: Google::Apis::DatastoreV1::PartitionId, decorator: Google::Apis::DatastoreV1::PartitionId::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class PropertyReference - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ArrayValue @@ -567,6 +280,293 @@ module Google end end + + class GqlQuery + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :query_string, as: 'queryString' + property :allow_literals, as: 'allowLiterals' + hash :named_bindings, as: 'namedBindings', class: Google::Apis::DatastoreV1::GqlQueryParameter, decorator: Google::Apis::DatastoreV1::GqlQueryParameter::Representation + + collection :positional_bindings, as: 'positionalBindings', class: Google::Apis::DatastoreV1::GqlQueryParameter, decorator: Google::Apis::DatastoreV1::GqlQueryParameter::Representation + + end + end + + class Filter + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :composite_filter, as: 'compositeFilter', class: Google::Apis::DatastoreV1::CompositeFilter, decorator: Google::Apis::DatastoreV1::CompositeFilter::Representation + + property :property_filter, as: 'propertyFilter', class: Google::Apis::DatastoreV1::PropertyFilter, decorator: Google::Apis::DatastoreV1::PropertyFilter::Representation + + end + end + + class RunQueryRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :partition_id, as: 'partitionId', class: Google::Apis::DatastoreV1::PartitionId, decorator: Google::Apis::DatastoreV1::PartitionId::Representation + + property :gql_query, as: 'gqlQuery', class: Google::Apis::DatastoreV1::GqlQuery, decorator: Google::Apis::DatastoreV1::GqlQuery::Representation + + property :read_options, as: 'readOptions', class: Google::Apis::DatastoreV1::ReadOptions, decorator: Google::Apis::DatastoreV1::ReadOptions::Representation + + property :query, as: 'query', class: Google::Apis::DatastoreV1::Query, decorator: Google::Apis::DatastoreV1::Query::Representation + + end + end + + class RollbackRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :transaction, :base64 => true, as: 'transaction' + end + end + + class CompositeFilter + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :filters, as: 'filters', class: Google::Apis::DatastoreV1::Filter, decorator: Google::Apis::DatastoreV1::Filter::Representation + + property :op, as: 'op' + end + end + + class AllocateIdsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :keys, as: 'keys', class: Google::Apis::DatastoreV1::Key, decorator: Google::Apis::DatastoreV1::Key::Representation + + end + end + + class Query + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :start_cursor, :base64 => true, as: 'startCursor' + property :offset, as: 'offset' + collection :kind, as: 'kind', class: Google::Apis::DatastoreV1::KindExpression, decorator: Google::Apis::DatastoreV1::KindExpression::Representation + + collection :distinct_on, as: 'distinctOn', class: Google::Apis::DatastoreV1::PropertyReference, decorator: Google::Apis::DatastoreV1::PropertyReference::Representation + + collection :order, as: 'order', class: Google::Apis::DatastoreV1::PropertyOrder, decorator: Google::Apis::DatastoreV1::PropertyOrder::Representation + + collection :projection, as: 'projection', class: Google::Apis::DatastoreV1::Projection, decorator: Google::Apis::DatastoreV1::Projection::Representation + + property :end_cursor, :base64 => true, as: 'endCursor' + property :filter, as: 'filter', class: Google::Apis::DatastoreV1::Filter, decorator: Google::Apis::DatastoreV1::Filter::Representation + + property :limit, as: 'limit' + end + end + + class PropertyFilter + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :value, as: 'value', class: Google::Apis::DatastoreV1::Value, decorator: Google::Apis::DatastoreV1::Value::Representation + + property :property, as: 'property', class: Google::Apis::DatastoreV1::PropertyReference, decorator: Google::Apis::DatastoreV1::PropertyReference::Representation + + property :op, as: 'op' + end + end + + class EntityResult + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :cursor, :base64 => true, as: 'cursor' + property :version, :numeric_string => true, as: 'version' + property :entity, as: 'entity', class: Google::Apis::DatastoreV1::Entity, decorator: Google::Apis::DatastoreV1::Entity::Representation + + end + end + + class CommitResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :mutation_results, as: 'mutationResults', class: Google::Apis::DatastoreV1::MutationResult, decorator: Google::Apis::DatastoreV1::MutationResult::Representation + + property :index_updates, as: 'indexUpdates' + end + end + + class Value + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :entity_value, as: 'entityValue', class: Google::Apis::DatastoreV1::Entity, decorator: Google::Apis::DatastoreV1::Entity::Representation + + property :geo_point_value, as: 'geoPointValue', class: Google::Apis::DatastoreV1::LatLng, decorator: Google::Apis::DatastoreV1::LatLng::Representation + + property :key_value, as: 'keyValue', class: Google::Apis::DatastoreV1::Key, decorator: Google::Apis::DatastoreV1::Key::Representation + + property :integer_value, :numeric_string => true, as: 'integerValue' + property :string_value, as: 'stringValue' + property :exclude_from_indexes, as: 'excludeFromIndexes' + property :double_value, as: 'doubleValue' + property :timestamp_value, as: 'timestampValue' + property :boolean_value, as: 'booleanValue' + property :null_value, as: 'nullValue' + property :blob_value, :base64 => true, as: 'blobValue' + property :meaning, as: 'meaning' + property :array_value, as: 'arrayValue', class: Google::Apis::DatastoreV1::ArrayValue, decorator: Google::Apis::DatastoreV1::ArrayValue::Representation + + end + end + + class PartitionId + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :project_id, as: 'projectId' + property :namespace_id, as: 'namespaceId' + end + end + + class Entity + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :key, as: 'key', class: Google::Apis::DatastoreV1::Key, decorator: Google::Apis::DatastoreV1::Key::Representation + + hash :properties, as: 'properties', class: Google::Apis::DatastoreV1::Value, decorator: Google::Apis::DatastoreV1::Value::Representation + + end + end + + class QueryResultBatch + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :snapshot_version, :numeric_string => true, as: 'snapshotVersion' + property :skipped_cursor, :base64 => true, as: 'skippedCursor' + property :skipped_results, as: 'skippedResults' + property :entity_result_type, as: 'entityResultType' + collection :entity_results, as: 'entityResults', class: Google::Apis::DatastoreV1::EntityResult, decorator: Google::Apis::DatastoreV1::EntityResult::Representation + + property :end_cursor, :base64 => true, as: 'endCursor' + property :more_results, as: 'moreResults' + end + end + + class LookupRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :read_options, as: 'readOptions', class: Google::Apis::DatastoreV1::ReadOptions, decorator: Google::Apis::DatastoreV1::ReadOptions::Representation + + collection :keys, as: 'keys', class: Google::Apis::DatastoreV1::Key, decorator: Google::Apis::DatastoreV1::Key::Representation + + end + end + + class PathElement + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :name, as: 'name' + property :kind, as: 'kind' + property :id, :numeric_string => true, as: 'id' + end + end + + class GqlQueryParameter + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :cursor, :base64 => true, as: 'cursor' + property :value, as: 'value', class: Google::Apis::DatastoreV1::Value, decorator: Google::Apis::DatastoreV1::Value::Representation + + end + end + + class BeginTransactionResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :transaction, :base64 => true, as: 'transaction' + end + end + + class RunQueryResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :batch, as: 'batch', class: Google::Apis::DatastoreV1::QueryResultBatch, decorator: Google::Apis::DatastoreV1::QueryResultBatch::Representation + + property :query, as: 'query', class: Google::Apis::DatastoreV1::Query, decorator: Google::Apis::DatastoreV1::Query::Representation + + end + end + + class LookupResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :found, as: 'found', class: Google::Apis::DatastoreV1::EntityResult, decorator: Google::Apis::DatastoreV1::EntityResult::Representation + + collection :missing, as: 'missing', class: Google::Apis::DatastoreV1::EntityResult, decorator: Google::Apis::DatastoreV1::EntityResult::Representation + + collection :deferred, as: 'deferred', class: Google::Apis::DatastoreV1::Key, decorator: Google::Apis::DatastoreV1::Key::Representation + + end + end + + class AllocateIdsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :keys, as: 'keys', class: Google::Apis::DatastoreV1::Key, decorator: Google::Apis::DatastoreV1::Key::Representation + + end + end + + class CommitRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :transaction, :base64 => true, as: 'transaction' + property :mode, as: 'mode' + collection :mutations, as: 'mutations', class: Google::Apis::DatastoreV1::Mutation, decorator: Google::Apis::DatastoreV1::Mutation::Representation + + end + end + + class BeginTransactionRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class PropertyOrder + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :property, as: 'property', class: Google::Apis::DatastoreV1::PropertyReference, decorator: Google::Apis::DatastoreV1::PropertyReference::Representation + + property :direction, as: 'direction' + end + end + + class KindExpression + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :name, as: 'name' + end + end + + class LatLng + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :latitude, as: 'latitude' + property :longitude, as: 'longitude' + end + end + + class Key + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :path, as: 'path', class: Google::Apis::DatastoreV1::PathElement, decorator: Google::Apis::DatastoreV1::PathElement::Representation + + property :partition_id, as: 'partitionId', class: Google::Apis::DatastoreV1::PartitionId, decorator: Google::Apis::DatastoreV1::PartitionId::Representation + + end + end + + class PropertyReference + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :name, as: 'name' + end + end end end end diff --git a/generated/google/apis/datastore_v1/service.rb b/generated/google/apis/datastore_v1/service.rb index 678fc6a24..0f2bf1764 100644 --- a/generated/google/apis/datastore_v1/service.rb +++ b/generated/google/apis/datastore_v1/service.rb @@ -48,6 +48,105 @@ module Google @batch_path = 'batch' end + # Queries for entities. + # @param [String] project_id + # The ID of the project against which to make the request. + # @param [Google::Apis::DatastoreV1::RunQueryRequest] run_query_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::DatastoreV1::RunQueryResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DatastoreV1::RunQueryResponse] + # + # @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 run_project_query(project_id, run_query_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/projects/{projectId}:runQuery', options) + command.request_representation = Google::Apis::DatastoreV1::RunQueryRequest::Representation + command.request_object = run_query_request_object + command.response_representation = Google::Apis::DatastoreV1::RunQueryResponse::Representation + command.response_class = Google::Apis::DatastoreV1::RunQueryResponse + command.params['projectId'] = project_id unless project_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Rolls back a transaction. + # @param [String] project_id + # The ID of the project against which to make the request. + # @param [Google::Apis::DatastoreV1::RollbackRequest] rollback_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::DatastoreV1::RollbackResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DatastoreV1::RollbackResponse] + # + # @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 rollback_project(project_id, rollback_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/projects/{projectId}:rollback', options) + command.request_representation = Google::Apis::DatastoreV1::RollbackRequest::Representation + command.request_object = rollback_request_object + command.response_representation = Google::Apis::DatastoreV1::RollbackResponse::Representation + command.response_class = Google::Apis::DatastoreV1::RollbackResponse + command.params['projectId'] = project_id unless project_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Looks up entities by key. + # @param [String] project_id + # The ID of the project against which to make the request. + # @param [Google::Apis::DatastoreV1::LookupRequest] lookup_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::DatastoreV1::LookupResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DatastoreV1::LookupResponse] + # + # @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 lookup_project(project_id, lookup_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/projects/{projectId}:lookup', options) + command.request_representation = Google::Apis::DatastoreV1::LookupRequest::Representation + command.request_object = lookup_request_object + command.response_representation = Google::Apis::DatastoreV1::LookupResponse::Representation + command.response_class = Google::Apis::DatastoreV1::LookupResponse + command.params['projectId'] = project_id unless project_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Allocates IDs for the given keys, which is useful for referencing an entity # before it is inserted. # @param [String] project_id @@ -148,105 +247,6 @@ module Google command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end - - # Queries for entities. - # @param [String] project_id - # The ID of the project against which to make the request. - # @param [Google::Apis::DatastoreV1::RunQueryRequest] run_query_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::DatastoreV1::RunQueryResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DatastoreV1::RunQueryResponse] - # - # @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 run_project_query(project_id, run_query_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/projects/{projectId}:runQuery', options) - command.request_representation = Google::Apis::DatastoreV1::RunQueryRequest::Representation - command.request_object = run_query_request_object - command.response_representation = Google::Apis::DatastoreV1::RunQueryResponse::Representation - command.response_class = Google::Apis::DatastoreV1::RunQueryResponse - command.params['projectId'] = project_id unless project_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Rolls back a transaction. - # @param [String] project_id - # The ID of the project against which to make the request. - # @param [Google::Apis::DatastoreV1::RollbackRequest] rollback_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::DatastoreV1::RollbackResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DatastoreV1::RollbackResponse] - # - # @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 rollback_project(project_id, rollback_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/projects/{projectId}:rollback', options) - command.request_representation = Google::Apis::DatastoreV1::RollbackRequest::Representation - command.request_object = rollback_request_object - command.response_representation = Google::Apis::DatastoreV1::RollbackResponse::Representation - command.response_class = Google::Apis::DatastoreV1::RollbackResponse - command.params['projectId'] = project_id unless project_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Looks up entities by key. - # @param [String] project_id - # The ID of the project against which to make the request. - # @param [Google::Apis::DatastoreV1::LookupRequest] lookup_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::DatastoreV1::LookupResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DatastoreV1::LookupResponse] - # - # @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 lookup_project(project_id, lookup_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/projects/{projectId}:lookup', options) - command.request_representation = Google::Apis::DatastoreV1::LookupRequest::Representation - command.request_object = lookup_request_object - command.response_representation = Google::Apis::DatastoreV1::LookupResponse::Representation - command.response_class = Google::Apis::DatastoreV1::LookupResponse - command.params['projectId'] = project_id unless project_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end protected diff --git a/generated/google/apis/dns_v1.rb b/generated/google/apis/dns_v1.rb index aaae00cf3..a987b748a 100644 --- a/generated/google/apis/dns_v1.rb +++ b/generated/google/apis/dns_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/cloud-dns module DnsV1 VERSION = 'V1' - REVISION = '20170427' + REVISION = '20170518' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/dns_v2beta1.rb b/generated/google/apis/dns_v2beta1.rb index 920e6b133..abb00a892 100644 --- a/generated/google/apis/dns_v2beta1.rb +++ b/generated/google/apis/dns_v2beta1.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/cloud-dns module DnsV2beta1 VERSION = 'V2beta1' - REVISION = '20170427' + REVISION = '20170518' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/doubleclickbidmanager_v1.rb b/generated/google/apis/doubleclickbidmanager_v1.rb index 1e82a1ad0..ab0d535d3 100644 --- a/generated/google/apis/doubleclickbidmanager_v1.rb +++ b/generated/google/apis/doubleclickbidmanager_v1.rb @@ -26,6 +26,9 @@ module Google module DoubleclickbidmanagerV1 VERSION = 'V1' REVISION = '20170224' + + # View and manage your reports in DoubleClick Bid Manager + AUTH_DOUBLECLICKBIDMANAGER = 'https://www.googleapis.com/auth/doubleclickbidmanager' end end end diff --git a/generated/google/apis/doubleclicksearch_v2.rb b/generated/google/apis/doubleclicksearch_v2.rb index 9981270d5..97ebfed08 100644 --- a/generated/google/apis/doubleclicksearch_v2.rb +++ b/generated/google/apis/doubleclicksearch_v2.rb @@ -26,7 +26,7 @@ module Google # @see https://developers.google.com/doubleclick-search/ module DoubleclicksearchV2 VERSION = 'V2' - REVISION = '20170426' + REVISION = '20170516' # View and manage your advertising data in DoubleClick Search AUTH_DOUBLECLICKSEARCH = 'https://www.googleapis.com/auth/doubleclicksearch' diff --git a/generated/google/apis/drive_v2.rb b/generated/google/apis/drive_v2.rb index ea01ab393..ea2e0dc11 100644 --- a/generated/google/apis/drive_v2.rb +++ b/generated/google/apis/drive_v2.rb @@ -26,7 +26,7 @@ module Google # @see https://developers.google.com/drive/ module DriveV2 VERSION = 'V2' - REVISION = '20170420' + REVISION = '20170519' # View and manage the files in your Google Drive AUTH_DRIVE = 'https://www.googleapis.com/auth/drive' diff --git a/generated/google/apis/drive_v2/classes.rb b/generated/google/apis/drive_v2/classes.rb index 20e2af72d..46584d8d9 100644 --- a/generated/google/apis/drive_v2/classes.rb +++ b/generated/google/apis/drive_v2/classes.rb @@ -1396,7 +1396,9 @@ module Google attr_accessor :has_augmented_permissions alias_method :has_augmented_permissions?, :has_augmented_permissions - # Whether this file has a thumbnail. + # Whether this file has a thumbnail. This does not indicate whether the + # requesting app has access to the thumbnail. To check access, look for the + # presence of the thumbnailLink field. # Corresponds to the JSON property `hasThumbnail` # @return [Boolean] attr_accessor :has_thumbnail @@ -2377,8 +2379,8 @@ module Google # @return [String] attr_accessor :auth_key - # Whether the account of the permission has been deleted. This field only - # pertains to user and group permissions. + # Whether the account associated with this permission has been deleted. This + # field only pertains to user and group permissions. # Corresponds to the JSON property `deleted` # @return [Boolean] attr_accessor :deleted @@ -2937,9 +2939,9 @@ module Google include Google::Apis::Core::Hashable # An image file and cropping parameters from which a background image for this - # Team Drive is set. This is a write only field that can only be set on a drive. - # teamdrives.update request that does not set themeId. When specified, all - # fields of the backgroundImageFile must be set. + # Team Drive is set. This is a write only field; it can only be set on drive. + # teamdrives.update requests that don't set themeId. When specified, all fields + # of the backgroundImageFile must be set. # Corresponds to the JSON property `backgroundImageFile` # @return [Google::Apis::DriveV2::TeamDrive::BackgroundImageFile] attr_accessor :background_image_file @@ -2980,8 +2982,8 @@ module Google # set of possible teamDriveThemes can be retrieved from a drive.about.get # response. When not specified on a drive.teamdrives.insert request, a random # theme is chosen from which the background image and color are set. This is a - # write only field that can only be set on a request that does not set colorRgb - # or backgroundImageFile. + # write-only field; it can only be set on requests that don't set colorRgb or + # backgroundImageFile. # Corresponds to the JSON property `themeId` # @return [String] attr_accessor :theme_id @@ -3003,9 +3005,9 @@ module Google end # An image file and cropping parameters from which a background image for this - # Team Drive is set. This is a write only field that can only be set on a drive. - # teamdrives.update request that does not set themeId. When specified, all - # fields of the backgroundImageFile must be set. + # Team Drive is set. This is a write only field; it can only be set on drive. + # teamdrives.update requests that don't set themeId. When specified, all fields + # of the backgroundImageFile must be set. class BackgroundImageFile include Google::Apis::Core::Hashable @@ -3014,26 +3016,27 @@ module Google # @return [String] attr_accessor :id - # The width of the cropped image in the closed range of 0 to 1, which is the - # width of the cropped image divided by the width of the entire image. The - # height is computed by applying a width to height aspect ratio of 80 to 9. The - # resulting image must be at least 1280 pixels wide and 144 pixels high. + # The width of the cropped image in the closed range of 0 to 1. This value + # represents the width of the cropped image divided by the width of the entire + # image. The height is computed by applying a width to height aspect ratio of 80 + # to 9. The resulting image must be at least 1280 pixels wide and 144 pixels + # high. # Corresponds to the JSON property `width` # @return [Float] attr_accessor :width # The X coordinate of the upper left corner of the cropping area in the - # background image. This is a value in the closed range of 0 to 1 which is the - # horizontal distance from the left side of the entire image to the left side of - # the cropping area divided by the width of the entire image. + # background image. This is a value in the closed range of 0 to 1. This value + # represents the horizontal distance from the left side of the entire image to + # the left side of the cropping area divided by the width of the entire image. # Corresponds to the JSON property `xCoordinate` # @return [Float] attr_accessor :x_coordinate # The Y coordinate of the upper left corner of the cropping area in the - # background image. This is a value in the closed range of 0 to 1 which is the - # vertical distance from the top side of the entire image to the top side of the - # cropping area divided by the height of the entire image. + # background image. This is a value in the closed range of 0 to 1. This value + # represents the vertical distance from the top side of the entire image to the + # top side of the cropping area divided by the height of the entire image. # Corresponds to the JSON property `yCoordinate` # @return [Float] attr_accessor :y_coordinate diff --git a/generated/google/apis/drive_v3.rb b/generated/google/apis/drive_v3.rb index 71d75629e..6d13ce8b2 100644 --- a/generated/google/apis/drive_v3.rb +++ b/generated/google/apis/drive_v3.rb @@ -26,7 +26,7 @@ module Google # @see https://developers.google.com/drive/ module DriveV3 VERSION = 'V3' - REVISION = '20170420' + REVISION = '20170519' # View and manage the files in your Google Drive AUTH_DRIVE = 'https://www.googleapis.com/auth/drive' diff --git a/generated/google/apis/drive_v3/classes.rb b/generated/google/apis/drive_v3/classes.rb index 72c7c27e8..e66e81dca 100644 --- a/generated/google/apis/drive_v3/classes.rb +++ b/generated/google/apis/drive_v3/classes.rb @@ -578,7 +578,9 @@ module Google attr_accessor :has_augmented_permissions alias_method :has_augmented_permissions?, :has_augmented_permissions - # Whether this file has a thumbnail. + # Whether this file has a thumbnail. This does not indicate whether the + # requesting app has access to the thumbnail. To check access, look for the + # presence of the thumbnailLink field. # Corresponds to the JSON property `hasThumbnail` # @return [Boolean] attr_accessor :has_thumbnail @@ -1383,8 +1385,8 @@ module Google attr_accessor :allow_file_discovery alias_method :allow_file_discovery?, :allow_file_discovery - # Whether the account of the permission has been deleted. This field only - # pertains to user and group permissions. + # Whether the account associated with this permission has been deleted. This + # field only pertains to user and group permissions. # Corresponds to the JSON property `deleted` # @return [Boolean] attr_accessor :deleted @@ -1508,7 +1510,6 @@ module Google # The Team Drive permission type for this user. While new values may be added in # future, the following are currently possible: # - file - # - # - member # Corresponds to the JSON property `teamDrivePermissionType` # @return [String] @@ -1839,9 +1840,9 @@ module Google include Google::Apis::Core::Hashable # An image file and cropping parameters from which a background image for this - # Team Drive is set. This is a write only field that can only be set on a drive. - # teamdrives.update request that does not set themeId. When specified, all - # fields of the backgroundImageFile must be set. + # Team Drive is set. This is a write only field; it can only be set on drive. + # teamdrives.update requests that don't set themeId. When specified, all fields + # of the backgroundImageFile must be set. # Corresponds to the JSON property `backgroundImageFile` # @return [Google::Apis::DriveV3::TeamDrive::BackgroundImageFile] attr_accessor :background_image_file @@ -1883,8 +1884,8 @@ module Google # set of possible teamDriveThemes can be retrieved from a drive.about.get # response. When not specified on a drive.teamdrives.create request, a random # theme is chosen from which the background image and color are set. This is a - # write only field that can only be set on a request that does not set colorRgb - # or backgroundImageFile. + # write-only field; it can only be set on requests that don't set colorRgb or + # backgroundImageFile. # Corresponds to the JSON property `themeId` # @return [String] attr_accessor :theme_id @@ -1906,9 +1907,9 @@ module Google end # An image file and cropping parameters from which a background image for this - # Team Drive is set. This is a write only field that can only be set on a drive. - # teamdrives.update request that does not set themeId. When specified, all - # fields of the backgroundImageFile must be set. + # Team Drive is set. This is a write only field; it can only be set on drive. + # teamdrives.update requests that don't set themeId. When specified, all fields + # of the backgroundImageFile must be set. class BackgroundImageFile include Google::Apis::Core::Hashable @@ -1917,26 +1918,27 @@ module Google # @return [String] attr_accessor :id - # The width of the cropped image in the closed range of 0 to 1, which is the - # width of the cropped image divided by the width of the entire image. The - # height is computed by applying a width to height aspect ratio of 80 to 9. The - # resulting image must be at least 1280 pixels wide and 144 pixels high. + # The width of the cropped image in the closed range of 0 to 1. This value + # represents the width of the cropped image divided by the width of the entire + # image. The height is computed by applying a width to height aspect ratio of 80 + # to 9. The resulting image must be at least 1280 pixels wide and 144 pixels + # high. # Corresponds to the JSON property `width` # @return [Float] attr_accessor :width # The X coordinate of the upper left corner of the cropping area in the - # background image. This is a value in the closed range of 0 to 1 which is the - # horizontal distance from the left side of the entire image to the left side of - # the cropping area divided by the width of the entire image. + # background image. This is a value in the closed range of 0 to 1. This value + # represents the horizontal distance from the left side of the entire image to + # the left side of the cropping area divided by the width of the entire image. # Corresponds to the JSON property `xCoordinate` # @return [Float] attr_accessor :x_coordinate # The Y coordinate of the upper left corner of the cropping area in the - # background image. This is a value in the closed range of 0 to 1 which is the - # vertical distance from the top side of the entire image to the top side of the - # cropping area divided by the height of the entire image. + # background image. This is a value in the closed range of 0 to 1. This value + # represents the vertical distance from the top side of the entire image to the + # top side of the cropping area divided by the height of the entire image. # Corresponds to the JSON property `yCoordinate` # @return [Float] attr_accessor :y_coordinate diff --git a/generated/google/apis/firebasedynamiclinks_v1.rb b/generated/google/apis/firebasedynamiclinks_v1.rb index e8beb8a9f..f441e76fe 100644 --- a/generated/google/apis/firebasedynamiclinks_v1.rb +++ b/generated/google/apis/firebasedynamiclinks_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://firebase.google.com/docs/dynamic-links/ module FirebasedynamiclinksV1 VERSION = 'V1' - REVISION = '20170503' + REVISION = '20170517' # View and administer all your Firebase data and settings AUTH_FIREBASE = 'https://www.googleapis.com/auth/firebase' diff --git a/generated/google/apis/firebasedynamiclinks_v1/classes.rb b/generated/google/apis/firebasedynamiclinks_v1/classes.rb index ba4fec62b..ac1b0e3a7 100644 --- a/generated/google/apis/firebasedynamiclinks_v1/classes.rb +++ b/generated/google/apis/firebasedynamiclinks_v1/classes.rb @@ -22,6 +22,78 @@ module Google module Apis module FirebasedynamiclinksV1 + # Information of navigation behavior. + class NavigationInfo + include Google::Apis::Core::Hashable + + # If this option is on, FDL click will be forced to redirect rather than + # show an interstitial page. + # Corresponds to the JSON property `enableForcedRedirect` + # @return [Boolean] + attr_accessor :enable_forced_redirect + alias_method :enable_forced_redirect?, :enable_forced_redirect + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @enable_forced_redirect = args[:enable_forced_redirect] if args.key?(:enable_forced_redirect) + end + end + + # iOS related attributes to the Dynamic Link.. + class IosInfo + include Google::Apis::Core::Hashable + + # Custom (destination) scheme to use for iOS. By default, we’ll use the + # bundle ID as the custom scheme. Developer can override this behavior using + # this param. + # Corresponds to the JSON property `iosCustomScheme` + # @return [String] + attr_accessor :ios_custom_scheme + + # iOS bundle ID of the app. + # Corresponds to the JSON property `iosBundleId` + # @return [String] + attr_accessor :ios_bundle_id + + # Link to open on iOS if the app is not installed. + # Corresponds to the JSON property `iosFallbackLink` + # @return [String] + attr_accessor :ios_fallback_link + + # iOS App Store ID. + # Corresponds to the JSON property `iosAppStoreId` + # @return [String] + attr_accessor :ios_app_store_id + + # If specified, this overrides the ios_fallback_link value on iPads. + # Corresponds to the JSON property `iosIpadFallbackLink` + # @return [String] + attr_accessor :ios_ipad_fallback_link + + # iPad bundle ID of the app. + # Corresponds to the JSON property `iosIpadBundleId` + # @return [String] + attr_accessor :ios_ipad_bundle_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @ios_custom_scheme = args[:ios_custom_scheme] if args.key?(:ios_custom_scheme) + @ios_bundle_id = args[:ios_bundle_id] if args.key?(:ios_bundle_id) + @ios_fallback_link = args[:ios_fallback_link] if args.key?(:ios_fallback_link) + @ios_app_store_id = args[:ios_app_store_id] if args.key?(:ios_app_store_id) + @ios_ipad_fallback_link = args[:ios_ipad_fallback_link] if args.key?(:ios_ipad_fallback_link) + @ios_ipad_bundle_id = args[:ios_ipad_bundle_id] if args.key?(:ios_ipad_bundle_id) + end + end + # Tracking parameters supported by Dynamic Link. class AnalyticsInfo include Google::Apis::Core::Hashable @@ -53,11 +125,6 @@ module Google class CreateShortDynamicLinkRequest include Google::Apis::Core::Hashable - # Short Dynamic Link suffix. - # Corresponds to the JSON property `suffix` - # @return [Google::Apis::FirebasedynamiclinksV1::Suffix] - attr_accessor :suffix - # Information about a Dynamic Link. # Corresponds to the JSON property `dynamicLinkInfo` # @return [Google::Apis::FirebasedynamiclinksV1::DynamicLinkInfo] @@ -72,15 +139,20 @@ module Google # @return [String] attr_accessor :long_dynamic_link + # Short Dynamic Link suffix. + # Corresponds to the JSON property `suffix` + # @return [Google::Apis::FirebasedynamiclinksV1::Suffix] + attr_accessor :suffix + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @suffix = args[:suffix] if args.key?(:suffix) @dynamic_link_info = args[:dynamic_link_info] if args.key?(:dynamic_link_info) @long_dynamic_link = args[:long_dynamic_link] if args.key?(:long_dynamic_link) + @suffix = args[:suffix] if args.key?(:suffix) end end @@ -88,11 +160,6 @@ module Google class CreateShortDynamicLinkResponse include Google::Apis::Core::Hashable - # Information about potential warnings on link creation. - # Corresponds to the JSON property `warning` - # @return [Array] - attr_accessor :warning - # Short Dynamic Link value. e.g. https://abcd.app.goo.gl/wxyz # Corresponds to the JSON property `shortLink` # @return [String] @@ -103,15 +170,20 @@ module Google # @return [String] attr_accessor :preview_link + # Information about potential warnings on link creation. + # Corresponds to the JSON property `warning` + # @return [Array] + attr_accessor :warning + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @warning = args[:warning] if args.key?(:warning) @short_link = args[:short_link] if args.key?(:short_link) @preview_link = args[:preview_link] if args.key?(:preview_link) + @warning = args[:warning] if args.key?(:warning) end end @@ -156,12 +228,6 @@ module Google # @return [String] attr_accessor :utm_source - # Campaign name; used for keyword analysis to identify a specific product - # promotion or strategic campaign. - # Corresponds to the JSON property `utmCampaign` - # @return [String] - attr_accessor :utm_campaign - # [AdWords autotagging parameter](https://support.google.com/analytics/answer/ # 1033981?hl=en); # used to measure Google AdWords ads. This value is generated dynamically @@ -170,6 +236,12 @@ module Google # @return [String] attr_accessor :gclid + # Campaign name; used for keyword analysis to identify a specific product + # promotion or strategic campaign. + # Corresponds to the JSON property `utmCampaign` + # @return [String] + attr_accessor :utm_campaign + # Campaign content; used for A/B testing and content-targeted ads to # differentiate ads or links that point to the same URL. # Corresponds to the JSON property `utmContent` @@ -185,8 +257,8 @@ module Google @utm_medium = args[:utm_medium] if args.key?(:utm_medium) @utm_term = args[:utm_term] if args.key?(:utm_term) @utm_source = args[:utm_source] if args.key?(:utm_source) - @utm_campaign = args[:utm_campaign] if args.key?(:utm_campaign) @gclid = args[:gclid] if args.key?(:gclid) + @utm_campaign = args[:utm_campaign] if args.key?(:utm_campaign) @utm_content = args[:utm_content] if args.key?(:utm_content) end end @@ -195,25 +267,6 @@ module Google class DynamicLinkInfo include Google::Apis::Core::Hashable - # Dynamic Links domain that the project owns, e.g. abcd.app.goo.gl - # [Learn more](https://firebase.google.com/docs/dynamic-links/android#set-up- - # firebase-and-the-dynamic-links-sdk) - # on how to set up Dynamic Link domain associated with your Firebase project. - # Required. - # Corresponds to the JSON property `dynamicLinkDomain` - # @return [String] - attr_accessor :dynamic_link_domain - - # The link your app will open, You can specify any URL your app can handle. - # This link must be a well-formatted URL, be properly URL-encoded, and use - # the HTTP or HTTPS scheme. See 'link' parameters in the - # [documentation](https://firebase.google.com/docs/dynamic-links/android#create- - # a-dynamic-link-programmatically). - # Required. - # Corresponds to the JSON property `link` - # @return [String] - attr_accessor :link - # iOS related attributes to the Dynamic Link.. # Corresponds to the JSON property `iosInfo` # @return [Google::Apis::FirebasedynamiclinksV1::IosInfo] @@ -240,19 +293,37 @@ module Google # @return [Google::Apis::FirebasedynamiclinksV1::AnalyticsInfo] attr_accessor :analytics_info + # Dynamic Links domain that the project owns, e.g. abcd.app.goo.gl + # [Learn more](https://firebase.google.com/docs/dynamic-links/android/receive) + # on how to set up Dynamic Link domain associated with your Firebase project. + # Required. + # Corresponds to the JSON property `dynamicLinkDomain` + # @return [String] + attr_accessor :dynamic_link_domain + + # The link your app will open, You can specify any URL your app can handle. + # This link must be a well-formatted URL, be properly URL-encoded, and use + # the HTTP or HTTPS scheme. See 'link' parameters in the + # [documentation](https://firebase.google.com/docs/dynamic-links/create-manually) + # . + # Required. + # Corresponds to the JSON property `link` + # @return [String] + attr_accessor :link + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @dynamic_link_domain = args[:dynamic_link_domain] if args.key?(:dynamic_link_domain) - @link = args[:link] if args.key?(:link) @ios_info = args[:ios_info] if args.key?(:ios_info) @social_meta_tag_info = args[:social_meta_tag_info] if args.key?(:social_meta_tag_info) @android_info = args[:android_info] if args.key?(:android_info) @navigation_info = args[:navigation_info] if args.key?(:navigation_info) @analytics_info = args[:analytics_info] if args.key?(:analytics_info) + @dynamic_link_domain = args[:dynamic_link_domain] if args.key?(:dynamic_link_domain) + @link = args[:link] if args.key?(:link) end end @@ -260,6 +331,11 @@ module Google class ITunesConnectAnalytics include Google::Apis::Core::Hashable + # Affiliate token used to create affiliate-coded links. + # Corresponds to the JSON property `at` + # @return [String] + attr_accessor :at + # Campaign text that developers can optionally add to any link in order to # track sales from a specific marketing campaign. # Corresponds to the JSON property `ct` @@ -277,21 +353,16 @@ module Google # @return [String] attr_accessor :pt - # Affiliate token used to create affiliate-coded links. - # Corresponds to the JSON property `at` - # @return [String] - attr_accessor :at - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @at = args[:at] if args.key?(:at) @ct = args[:ct] if args.key?(:ct) @mt = args[:mt] if args.key?(:mt) @pt = args[:pt] if args.key?(:pt) - @at = args[:at] if args.key?(:at) end end @@ -300,11 +371,6 @@ module Google class SocialMetaTagInfo include Google::Apis::Core::Hashable - # A short description of the link. Optional. - # Corresponds to the JSON property `socialDescription` - # @return [String] - attr_accessor :social_description - # Title to be displayed. Optional. # Corresponds to the JSON property `socialTitle` # @return [String] @@ -315,15 +381,45 @@ module Google # @return [String] attr_accessor :social_image_link + # A short description of the link. Optional. + # Corresponds to the JSON property `socialDescription` + # @return [String] + attr_accessor :social_description + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @social_description = args[:social_description] if args.key?(:social_description) @social_title = args[:social_title] if args.key?(:social_title) @social_image_link = args[:social_image_link] if args.key?(:social_image_link) + @social_description = args[:social_description] if args.key?(:social_description) + end + end + + # Dynamic Links warning messages. + class DynamicLinkWarning + include Google::Apis::Core::Hashable + + # The warning message to help developers improve their requests. + # Corresponds to the JSON property `warningMessage` + # @return [String] + attr_accessor :warning_message + + # The warning code. + # Corresponds to the JSON property `warningCode` + # @return [String] + attr_accessor :warning_code + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @warning_message = args[:warning_message] if args.key?(:warning_message) + @warning_code = args[:warning_code] if args.key?(:warning_code) end end @@ -364,103 +460,6 @@ module Google @android_min_package_version_code = args[:android_min_package_version_code] if args.key?(:android_min_package_version_code) end end - - # Dynamic Links warning messages. - class DynamicLinkWarning - include Google::Apis::Core::Hashable - - # The warning code. - # Corresponds to the JSON property `warningCode` - # @return [String] - attr_accessor :warning_code - - # The warning message to help developers improve their requests. - # Corresponds to the JSON property `warningMessage` - # @return [String] - attr_accessor :warning_message - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @warning_code = args[:warning_code] if args.key?(:warning_code) - @warning_message = args[:warning_message] if args.key?(:warning_message) - end - end - - # Information of navigation behavior. - class NavigationInfo - include Google::Apis::Core::Hashable - - # If this option is on, FDL click will be forced to redirect rather than - # show an interstitial page. - # Corresponds to the JSON property `enableForcedRedirect` - # @return [Boolean] - attr_accessor :enable_forced_redirect - alias_method :enable_forced_redirect?, :enable_forced_redirect - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @enable_forced_redirect = args[:enable_forced_redirect] if args.key?(:enable_forced_redirect) - end - end - - # iOS related attributes to the Dynamic Link.. - class IosInfo - include Google::Apis::Core::Hashable - - # If specified, this overrides the ios_fallback_link value on iPads. - # Corresponds to the JSON property `iosIpadFallbackLink` - # @return [String] - attr_accessor :ios_ipad_fallback_link - - # iPad bundle ID of the app. - # Corresponds to the JSON property `iosIpadBundleId` - # @return [String] - attr_accessor :ios_ipad_bundle_id - - # Custom (destination) scheme to use for iOS. By default, we’ll use the - # bundle ID as the custom scheme. Developer can override this behavior using - # this param. - # Corresponds to the JSON property `iosCustomScheme` - # @return [String] - attr_accessor :ios_custom_scheme - - # iOS bundle ID of the app. - # Corresponds to the JSON property `iosBundleId` - # @return [String] - attr_accessor :ios_bundle_id - - # Link to open on iOS if the app is not installed. - # Corresponds to the JSON property `iosFallbackLink` - # @return [String] - attr_accessor :ios_fallback_link - - # iOS App Store ID. - # Corresponds to the JSON property `iosAppStoreId` - # @return [String] - attr_accessor :ios_app_store_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @ios_ipad_fallback_link = args[:ios_ipad_fallback_link] if args.key?(:ios_ipad_fallback_link) - @ios_ipad_bundle_id = args[:ios_ipad_bundle_id] if args.key?(:ios_ipad_bundle_id) - @ios_custom_scheme = args[:ios_custom_scheme] if args.key?(:ios_custom_scheme) - @ios_bundle_id = args[:ios_bundle_id] if args.key?(:ios_bundle_id) - @ios_fallback_link = args[:ios_fallback_link] if args.key?(:ios_fallback_link) - @ios_app_store_id = args[:ios_app_store_id] if args.key?(:ios_app_store_id) - end - end end end end diff --git a/generated/google/apis/firebasedynamiclinks_v1/representations.rb b/generated/google/apis/firebasedynamiclinks_v1/representations.rb index 2d1cd470f..7ff719524 100644 --- a/generated/google/apis/firebasedynamiclinks_v1/representations.rb +++ b/generated/google/apis/firebasedynamiclinks_v1/representations.rb @@ -22,6 +22,18 @@ module Google module Apis module FirebasedynamiclinksV1 + class NavigationInfo + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class IosInfo + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class AnalyticsInfo class Representation < Google::Apis::Core::JsonRepresentation; end @@ -70,28 +82,35 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class AndroidInfo - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class DynamicLinkWarning class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class NavigationInfo + class AndroidInfo class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class IosInfo - class Representation < Google::Apis::Core::JsonRepresentation; end + class NavigationInfo + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :enable_forced_redirect, as: 'enableForcedRedirect' + end + end - include Google::Apis::Core::JsonObjectSupport + class IosInfo + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :ios_custom_scheme, as: 'iosCustomScheme' + property :ios_bundle_id, as: 'iosBundleId' + property :ios_fallback_link, as: 'iosFallbackLink' + property :ios_app_store_id, as: 'iosAppStoreId' + property :ios_ipad_fallback_link, as: 'iosIpadFallbackLink' + property :ios_ipad_bundle_id, as: 'iosIpadBundleId' + end end class AnalyticsInfo @@ -107,21 +126,21 @@ module Google class CreateShortDynamicLinkRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :suffix, as: 'suffix', class: Google::Apis::FirebasedynamiclinksV1::Suffix, decorator: Google::Apis::FirebasedynamiclinksV1::Suffix::Representation - property :dynamic_link_info, as: 'dynamicLinkInfo', class: Google::Apis::FirebasedynamiclinksV1::DynamicLinkInfo, decorator: Google::Apis::FirebasedynamiclinksV1::DynamicLinkInfo::Representation property :long_dynamic_link, as: 'longDynamicLink' + property :suffix, as: 'suffix', class: Google::Apis::FirebasedynamiclinksV1::Suffix, decorator: Google::Apis::FirebasedynamiclinksV1::Suffix::Representation + end end class CreateShortDynamicLinkResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :warning, as: 'warning', class: Google::Apis::FirebasedynamiclinksV1::DynamicLinkWarning, decorator: Google::Apis::FirebasedynamiclinksV1::DynamicLinkWarning::Representation - property :short_link, as: 'shortLink' property :preview_link, as: 'previewLink' + collection :warning, as: 'warning', class: Google::Apis::FirebasedynamiclinksV1::DynamicLinkWarning, decorator: Google::Apis::FirebasedynamiclinksV1::DynamicLinkWarning::Representation + end end @@ -138,8 +157,8 @@ module Google property :utm_medium, as: 'utmMedium' property :utm_term, as: 'utmTerm' property :utm_source, as: 'utmSource' - property :utm_campaign, as: 'utmCampaign' property :gclid, as: 'gclid' + property :utm_campaign, as: 'utmCampaign' property :utm_content, as: 'utmContent' end end @@ -147,8 +166,6 @@ module Google class DynamicLinkInfo # @private class Representation < Google::Apis::Core::JsonRepresentation - property :dynamic_link_domain, as: 'dynamicLinkDomain' - property :link, as: 'link' property :ios_info, as: 'iosInfo', class: Google::Apis::FirebasedynamiclinksV1::IosInfo, decorator: Google::Apis::FirebasedynamiclinksV1::IosInfo::Representation property :social_meta_tag_info, as: 'socialMetaTagInfo', class: Google::Apis::FirebasedynamiclinksV1::SocialMetaTagInfo, decorator: Google::Apis::FirebasedynamiclinksV1::SocialMetaTagInfo::Representation @@ -159,25 +176,35 @@ module Google property :analytics_info, as: 'analyticsInfo', class: Google::Apis::FirebasedynamiclinksV1::AnalyticsInfo, decorator: Google::Apis::FirebasedynamiclinksV1::AnalyticsInfo::Representation + property :dynamic_link_domain, as: 'dynamicLinkDomain' + property :link, as: 'link' end end class ITunesConnectAnalytics # @private class Representation < Google::Apis::Core::JsonRepresentation + property :at, as: 'at' property :ct, as: 'ct' property :mt, as: 'mt' property :pt, as: 'pt' - property :at, as: 'at' end end class SocialMetaTagInfo # @private class Representation < Google::Apis::Core::JsonRepresentation - property :social_description, as: 'socialDescription' property :social_title, as: 'socialTitle' property :social_image_link, as: 'socialImageLink' + property :social_description, as: 'socialDescription' + end + end + + class DynamicLinkWarning + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :warning_message, as: 'warningMessage' + property :warning_code, as: 'warningCode' end end @@ -190,33 +217,6 @@ module Google property :android_min_package_version_code, as: 'androidMinPackageVersionCode' end end - - class DynamicLinkWarning - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :warning_code, as: 'warningCode' - property :warning_message, as: 'warningMessage' - end - end - - class NavigationInfo - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :enable_forced_redirect, as: 'enableForcedRedirect' - end - end - - class IosInfo - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :ios_ipad_fallback_link, as: 'iosIpadFallbackLink' - property :ios_ipad_bundle_id, as: 'iosIpadBundleId' - property :ios_custom_scheme, as: 'iosCustomScheme' - property :ios_bundle_id, as: 'iosBundleId' - property :ios_fallback_link, as: 'iosFallbackLink' - property :ios_app_store_id, as: 'iosAppStoreId' - end - end end end end diff --git a/generated/google/apis/firebaserules_v1/classes.rb b/generated/google/apis/firebaserules_v1/classes.rb index 92c720937..ea3e140fa 100644 --- a/generated/google/apis/firebaserules_v1/classes.rb +++ b/generated/google/apis/firebaserules_v1/classes.rb @@ -65,6 +65,11 @@ module Google class SourcePosition include Google::Apis::Core::Hashable + # First column on the source line associated with the source fragment. + # Corresponds to the JSON property `column` + # @return [Fixnum] + attr_accessor :column + # Name of the `File`. # Corresponds to the JSON property `fileName` # @return [String] @@ -75,55 +80,15 @@ module Google # @return [Fixnum] attr_accessor :line - # First column on the source line associated with the source fragment. - # Corresponds to the JSON property `column` - # @return [Fixnum] - attr_accessor :column - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @column = args[:column] if args.key?(:column) @file_name = args[:file_name] if args.key?(:file_name) @line = args[:line] if args.key?(:line) - @column = args[:column] if args.key?(:column) - end - end - - # `Ruleset` is an immutable copy of `Source` with a globally unique identifier - # and a creation time. - class Ruleset - include Google::Apis::Core::Hashable - - # `Source` is one or more `File` messages comprising a logical set of rules. - # Corresponds to the JSON property `source` - # @return [Google::Apis::FirebaserulesV1::Source] - attr_accessor :source - - # Time the `Ruleset` was created. - # Output only. - # Corresponds to the JSON property `createTime` - # @return [String] - attr_accessor :create_time - - # Name of the `Ruleset`. The ruleset_id is auto generated by the service. - # Format: `projects/`project_id`/rulesets/`ruleset_id`` - # Output only. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @source = args[:source] if args.key?(:source) - @create_time = args[:create_time] if args.key?(:create_time) - @name = args[:name] if args.key?(:name) end end @@ -146,10 +111,50 @@ module Google end end + # `Ruleset` is an immutable copy of `Source` with a globally unique identifier + # and a creation time. + class Ruleset + include Google::Apis::Core::Hashable + + # Time the `Ruleset` was created. + # Output only. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # Name of the `Ruleset`. The ruleset_id is auto generated by the service. + # Format: `projects/`project_id`/rulesets/`ruleset_id`` + # Output only. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # `Source` is one or more `File` messages comprising a logical set of rules. + # Corresponds to the JSON property `source` + # @return [Google::Apis::FirebaserulesV1::Source] + attr_accessor :source + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @create_time = args[:create_time] if args.key?(:create_time) + @name = args[:name] if args.key?(:name) + @source = args[:source] if args.key?(:source) + end + end + # Issues include warnings, errors, and deprecation notices. class Issue include Google::Apis::Core::Hashable + # Short error description. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + # Position in the `Source` content including its line, column number, and an # index of the `File` in the `Source` message. Used for debug purposes. # Corresponds to the JSON property `sourcePosition` @@ -161,10 +166,32 @@ module Google # @return [String] attr_accessor :severity - # Short error description. - # Corresponds to the JSON property `description` + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @description = args[:description] if args.key?(:description) + @source_position = args[:source_position] if args.key?(:source_position) + @severity = args[:severity] if args.key?(:severity) + end + end + + # Represents a service-defined function call that was invoked during test + # execution. + class FunctionCall + include Google::Apis::Core::Hashable + + # The arguments that were provided to the function. + # Corresponds to the JSON property `args` + # @return [Array] + attr_accessor :args + + # Name of the function invoked. + # Corresponds to the JSON property `function` # @return [String] - attr_accessor :description + attr_accessor :function def initialize(**args) update!(**args) @@ -172,9 +199,8 @@ module Google # Update properties of this object def update!(**args) - @source_position = args[:source_position] if args.key?(:source_position) - @severity = args[:severity] if args.key?(:severity) - @description = args[:description] if args.key?(:description) + @args = args[:args] if args.key?(:args) + @function = args[:function] if args.key?(:function) end end @@ -208,12 +234,6 @@ module Google class File include Google::Apis::Core::Hashable - # Fingerprint (e.g. github sha) associated with the `File`. - # Corresponds to the JSON property `fingerprint` - # NOTE: Values are automatically base64 encoded/decoded in the client library. - # @return [String] - attr_accessor :fingerprint - # File name. # Corresponds to the JSON property `name` # @return [String] @@ -224,41 +244,21 @@ module Google # @return [String] attr_accessor :content + # Fingerprint (e.g. github sha) associated with the `File`. + # Corresponds to the JSON property `fingerprint` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :fingerprint + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @fingerprint = args[:fingerprint] if args.key?(:fingerprint) @name = args[:name] if args.key?(:name) @content = args[:content] if args.key?(:content) - end - end - - # Represents a service-defined function call that was invoked during test - # execution. - class FunctionCall - include Google::Apis::Core::Hashable - - # The arguments that were provided to the function. - # Corresponds to the JSON property `args` - # @return [Array] - attr_accessor :args - - # Name of the function invoked. - # Corresponds to the JSON property `function` - # @return [String] - attr_accessor :function - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @args = args[:args] if args.key?(:args) - @function = args[:function] if args.key?(:function) + @fingerprint = args[:fingerprint] if args.key?(:fingerprint) end end @@ -380,12 +380,6 @@ module Google class TestResult include Google::Apis::Core::Hashable - # Position in the `Source` content including its line, column number, and an - # index of the `File` in the `Source` message. Used for debug purposes. - # Corresponds to the JSON property `errorPosition` - # @return [Google::Apis::FirebaserulesV1::SourcePosition] - attr_accessor :error_position - # The set of function calls made to service-defined methods. # Function calls are included in the order in which they are encountered # during evaluation, are provided for both mocked and unmocked functions, @@ -408,16 +402,22 @@ module Google # @return [Array] attr_accessor :debug_messages + # Position in the `Source` content including its line, column number, and an + # index of the `File` in the `Source` message. Used for debug purposes. + # Corresponds to the JSON property `errorPosition` + # @return [Google::Apis::FirebaserulesV1::SourcePosition] + attr_accessor :error_position + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @error_position = args[:error_position] if args.key?(:error_position) @function_calls = args[:function_calls] if args.key?(:function_calls) @state = args[:state] if args.key?(:state) @debug_messages = args[:debug_messages] if args.key?(:debug_messages) + @error_position = args[:error_position] if args.key?(:error_position) end end end diff --git a/generated/google/apis/firebaserules_v1/representations.rb b/generated/google/apis/firebaserules_v1/representations.rb index 74b0584bc..ec2a49de1 100644 --- a/generated/google/apis/firebaserules_v1/representations.rb +++ b/generated/google/apis/firebaserules_v1/representations.rb @@ -40,24 +40,30 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class Ruleset - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class TestRulesetRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class Ruleset + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class Issue class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class FunctionCall + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class ListReleasesResponse class Representation < Google::Apis::Core::JsonRepresentation; end @@ -70,12 +76,6 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class FunctionCall - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class Release class Representation < Google::Apis::Core::JsonRepresentation; end @@ -117,19 +117,9 @@ module Google class SourcePosition # @private class Representation < Google::Apis::Core::JsonRepresentation + property :column, as: 'column' property :file_name, as: 'fileName' property :line, as: 'line' - property :column, as: 'column' - end - end - - class Ruleset - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :source, as: 'source', class: Google::Apis::FirebaserulesV1::Source, decorator: Google::Apis::FirebaserulesV1::Source::Representation - - property :create_time, as: 'createTime' - property :name, as: 'name' end end @@ -141,13 +131,31 @@ module Google end end + class Ruleset + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :create_time, as: 'createTime' + property :name, as: 'name' + property :source, as: 'source', class: Google::Apis::FirebaserulesV1::Source, decorator: Google::Apis::FirebaserulesV1::Source::Representation + + end + end + class Issue # @private class Representation < Google::Apis::Core::JsonRepresentation + property :description, as: 'description' property :source_position, as: 'sourcePosition', class: Google::Apis::FirebaserulesV1::SourcePosition, decorator: Google::Apis::FirebaserulesV1::SourcePosition::Representation property :severity, as: 'severity' - property :description, as: 'description' + end + end + + class FunctionCall + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :args, as: 'args' + property :function, as: 'function' end end @@ -163,17 +171,9 @@ module Google class File # @private class Representation < Google::Apis::Core::JsonRepresentation - property :fingerprint, :base64 => true, as: 'fingerprint' property :name, as: 'name' property :content, as: 'content' - end - end - - class FunctionCall - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :args, as: 'args' - property :function, as: 'function' + property :fingerprint, :base64 => true, as: 'fingerprint' end end @@ -209,12 +209,12 @@ module Google class TestResult # @private class Representation < Google::Apis::Core::JsonRepresentation - property :error_position, as: 'errorPosition', class: Google::Apis::FirebaserulesV1::SourcePosition, decorator: Google::Apis::FirebaserulesV1::SourcePosition::Representation - collection :function_calls, as: 'functionCalls', class: Google::Apis::FirebaserulesV1::FunctionCall, decorator: Google::Apis::FirebaserulesV1::FunctionCall::Representation property :state, as: 'state' collection :debug_messages, as: 'debugMessages' + property :error_position, as: 'errorPosition', class: Google::Apis::FirebaserulesV1::SourcePosition, decorator: Google::Apis::FirebaserulesV1::SourcePosition::Representation + end end end diff --git a/generated/google/apis/firebaserules_v1/service.rb b/generated/google/apis/firebaserules_v1/service.rb index 2051b9bbb..3e47c058f 100644 --- a/generated/google/apis/firebaserules_v1/service.rb +++ b/generated/google/apis/firebaserules_v1/service.rb @@ -172,6 +172,11 @@ module Google # @param [String] name # Resource name for the project. # Format: `projects/`project_id`` + # @param [Fixnum] page_size + # Page size to load. Maximum of 100. Defaults to 10. + # Note: `page_size` is just a hint and the service may choose to load less + # than `page_size` due to the size of the output. To traverse all of the + # releases, caller should iterate until the `page_token` is empty. # @param [String] filter # `Ruleset` filter. The list method supports filters with restrictions on # `Ruleset.name`. @@ -180,11 +185,6 @@ module Google # Example: `create_time > date("2017-01-01") AND name=UUID-*` # @param [String] page_token # Next page token for loading the next batch of `Ruleset` instances. - # @param [Fixnum] page_size - # Page size to load. Maximum of 100. Defaults to 10. - # Note: `page_size` is just a hint and the service may choose to load less - # than `page_size` due to the size of the output. To traverse all of the - # releases, caller should iterate until the `page_token` is empty. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -202,14 +202,14 @@ 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_project_rulesets(name, filter: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_project_rulesets(name, page_size: nil, filter: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}/rulesets', options) command.response_representation = Google::Apis::FirebaserulesV1::ListRulesetsResponse::Representation command.response_class = Google::Apis::FirebaserulesV1::ListRulesetsResponse command.params['name'] = name unless name.nil? + command.query['pageSize'] = page_size unless page_size.nil? command.query['filter'] = filter unless filter.nil? command.query['pageToken'] = page_token unless page_token.nil? - command.query['pageSize'] = page_size unless page_size.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) @@ -253,6 +253,57 @@ module Google execute_or_queue_command(command, &block) end + # Create a `Release`. + # Release names should reflect the developer's deployment practices. For + # example, the release name may include the environment name, application + # name, application version, or any other name meaningful to the developer. + # Once a `Release` refers to a `Ruleset`, the rules can be enforced by + # Firebase Rules-enabled services. + # More than one `Release` may be 'live' concurrently. Consider the following + # three `Release` names for `projects/foo` and the `Ruleset` to which they + # refer. + # Release Name | Ruleset Name + # --------------------------------|------------- + # projects/foo/releases/prod | projects/foo/rulesets/uuid123 + # projects/foo/releases/prod/beta | projects/foo/rulesets/uuid123 + # projects/foo/releases/prod/v23 | projects/foo/rulesets/uuid456 + # The table reflects the `Ruleset` rollout in progress. The `prod` and + # `prod/beta` releases refer to the same `Ruleset`. However, `prod/v23` + # refers to a new `Ruleset`. The `Ruleset` reference for a `Release` may be + # updated using the UpdateRelease method. + # @param [String] name + # Resource name for the project which owns this `Release`. + # Format: `projects/`project_id`` + # @param [Google::Apis::FirebaserulesV1::Release] release_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::FirebaserulesV1::Release] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::FirebaserulesV1::Release] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_project_release(name, release_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+name}/releases', options) + command.request_representation = Google::Apis::FirebaserulesV1::Release::Representation + command.request_object = release_object + command.response_representation = Google::Apis::FirebaserulesV1::Release::Representation + command.response_class = Google::Apis::FirebaserulesV1::Release + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Delete a `Release` by resource name. # @param [String] name # Resource name for the `Release` to delete. @@ -321,6 +372,14 @@ module Google # @param [String] name # Resource name for the project. # Format: `projects/`project_id`` + # @param [String] page_token + # Next page token for the next batch of `Release` instances. + # @param [Fixnum] page_size + # Page size to load. Maximum of 100. Defaults to 10. + # Note: `page_size` is just a hint and the service may choose to load fewer + # than `page_size` results due to the size of the output. To traverse all of + # the releases, the caller should iterate until the `page_token` on the + # response is empty. # @param [String] filter # `Release` filter. The list method supports filters with restrictions on the # `Release.name`, `Release.ruleset_name`, and `Release.test_suite_name`. @@ -341,14 +400,6 @@ module Google # In the examples, the filter parameters refer to the search filters are # relative to the project. Fully qualified prefixed may also be used. e.g. # `test_suite_name=projects/foo/testsuites/uuid1` - # @param [String] page_token - # Next page token for the next batch of `Release` instances. - # @param [Fixnum] page_size - # Page size to load. Maximum of 100. Defaults to 10. - # Note: `page_size` is just a hint and the service may choose to load fewer - # than `page_size` results due to the size of the output. To traverse all of - # the releases, the caller should iterate until the `page_token` on the - # response is empty. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -366,14 +417,14 @@ 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_project_releases(name, filter: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_project_releases(name, page_token: nil, page_size: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}/releases', options) command.response_representation = Google::Apis::FirebaserulesV1::ListReleasesResponse::Representation command.response_class = Google::Apis::FirebaserulesV1::ListReleasesResponse command.params['name'] = name unless name.nil? - command.query['filter'] = filter unless filter.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? + command.query['filter'] = filter unless filter.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) @@ -432,57 +483,6 @@ module Google command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end - - # Create a `Release`. - # Release names should reflect the developer's deployment practices. For - # example, the release name may include the environment name, application - # name, application version, or any other name meaningful to the developer. - # Once a `Release` refers to a `Ruleset`, the rules can be enforced by - # Firebase Rules-enabled services. - # More than one `Release` may be 'live' concurrently. Consider the following - # three `Release` names for `projects/foo` and the `Ruleset` to which they - # refer. - # Release Name | Ruleset Name - # --------------------------------|------------- - # projects/foo/releases/prod | projects/foo/rulesets/uuid123 - # projects/foo/releases/prod/beta | projects/foo/rulesets/uuid123 - # projects/foo/releases/prod/v23 | projects/foo/rulesets/uuid456 - # The table reflects the `Ruleset` rollout in progress. The `prod` and - # `prod/beta` releases refer to the same `Ruleset`. However, `prod/v23` - # refers to a new `Ruleset`. The `Ruleset` reference for a `Release` may be - # updated using the UpdateRelease method. - # @param [String] name - # Resource name for the project which owns this `Release`. - # Format: `projects/`project_id`` - # @param [Google::Apis::FirebaserulesV1::Release] release_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::FirebaserulesV1::Release] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::FirebaserulesV1::Release] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_project_release(name, release_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+name}/releases', options) - command.request_representation = Google::Apis::FirebaserulesV1::Release::Representation - command.request_object = release_object - command.response_representation = Google::Apis::FirebaserulesV1::Release::Representation - command.response_class = Google::Apis::FirebaserulesV1::Release - command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end protected diff --git a/generated/google/apis/games_configuration_v1configuration.rb b/generated/google/apis/games_configuration_v1configuration.rb index 5cc4074bb..2e3d2befe 100644 --- a/generated/google/apis/games_configuration_v1configuration.rb +++ b/generated/google/apis/games_configuration_v1configuration.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/games/services module GamesConfigurationV1configuration VERSION = 'V1configuration' - REVISION = '20170427' + REVISION = '20170518' # View and manage your Google Play Developer account AUTH_ANDROIDPUBLISHER = 'https://www.googleapis.com/auth/androidpublisher' diff --git a/generated/google/apis/games_management_v1management.rb b/generated/google/apis/games_management_v1management.rb index 64b3b4279..73be29ae5 100644 --- a/generated/google/apis/games_management_v1management.rb +++ b/generated/google/apis/games_management_v1management.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/games/services module GamesManagementV1management VERSION = 'V1management' - REVISION = '20170427' + REVISION = '20170518' # Share your Google+ profile information and view and manage your game activity AUTH_GAMES = 'https://www.googleapis.com/auth/games' diff --git a/generated/google/apis/games_v1.rb b/generated/google/apis/games_v1.rb index 005fe526e..f6815c0a0 100644 --- a/generated/google/apis/games_v1.rb +++ b/generated/google/apis/games_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/games/services/ module GamesV1 VERSION = 'V1' - REVISION = '20170427' + REVISION = '20170518' # View and manage its own configuration data in your Google Drive AUTH_DRIVE_APPDATA = 'https://www.googleapis.com/auth/drive.appdata' diff --git a/generated/google/apis/genomics_v1.rb b/generated/google/apis/genomics_v1.rb index e3eef9a8e..d08809706 100644 --- a/generated/google/apis/genomics_v1.rb +++ b/generated/google/apis/genomics_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/genomics module GenomicsV1 VERSION = 'V1' - REVISION = '20170504' + REVISION = '20170525' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/genomics_v1/classes.rb b/generated/google/apis/genomics_v1/classes.rb index bef5a3d77..d5d53737e 100644 --- a/generated/google/apis/genomics_v1/classes.rb +++ b/generated/google/apis/genomics_v1/classes.rb @@ -22,6 +22,908 @@ module Google module Apis module GenomicsV1 + # Request message for `TestIamPermissions` method. + class TestIamPermissionsRequest + include Google::Apis::Core::Hashable + + # REQUIRED: The set of permissions to check for the 'resource'. + # Permissions with wildcards (such as '*' or 'storage.*') are not allowed. + # Allowed permissions are: + # * `genomics.datasets.create` + # * `genomics.datasets.delete` + # * `genomics.datasets.get` + # * `genomics.datasets.list` + # * `genomics.datasets.update` + # * `genomics.datasets.getIamPolicy` + # * `genomics.datasets.setIamPolicy` + # Corresponds to the JSON property `permissions` + # @return [Array] + 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 + + # + class Exon + include Google::Apis::Core::Hashable + + # The start position of the exon on this annotation's reference sequence, + # 0-based inclusive. Note that this is relative to the reference start, and + # **not** the containing annotation start. + # Corresponds to the JSON property `start` + # @return [Fixnum] + attr_accessor :start + + # The end position of the exon on this annotation's reference sequence, + # 0-based exclusive. Note that this is relative to the reference start, and + # *not* the containing annotation start. + # Corresponds to the JSON property `end` + # @return [Fixnum] + attr_accessor :end + + # The frame of this exon. Contains a value of 0, 1, or 2, which indicates + # the offset of the first coding base of the exon within the reading frame + # of the coding DNA sequence, if any. This field is dependent on the + # strandedness of this annotation (see + # Annotation.reverse_strand). + # For forward stranded annotations, this offset is relative to the + # exon.start. For reverse + # strand annotations, this offset is relative to the + # exon.end `- 1`. + # Unset if this exon does not intersect the coding sequence. Upon creation + # of a transcript, the frame must be populated for all or none of the + # coding exons. + # Corresponds to the JSON property `frame` + # @return [Fixnum] + attr_accessor :frame + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @start = args[:start] if args.key?(:start) + @end = args[:end] if args.key?(:end) + @frame = args[:frame] if args.key?(:frame) + end + end + + # The read group set export request. + class ExportReadGroupSetRequest + include Google::Apis::Core::Hashable + + # Required. A Google Cloud Storage URI for the exported BAM file. + # The currently authenticated user must have write access to the new file. + # An error will be returned if the URI already contains data. + # Corresponds to the JSON property `exportUri` + # @return [String] + attr_accessor :export_uri + + # The reference names to export. If this is not specified, all reference + # sequences, including unmapped reads, are exported. + # Use `*` to export only unmapped reads. + # Corresponds to the JSON property `referenceNames` + # @return [Array] + attr_accessor :reference_names + + # Required. The Google Cloud project ID that owns this + # export. The caller must have WRITE access to this project. + # Corresponds to the JSON property `projectId` + # @return [String] + attr_accessor :project_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @export_uri = args[:export_uri] if args.key?(:export_uri) + @reference_names = args[:reference_names] if args.key?(:reference_names) + @project_id = args[:project_id] if args.key?(:project_id) + end + end + + # A call set is a collection of variant calls, typically for one sample. It + # belongs to a variant set. + # For more genomics resource definitions, see [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + class CallSet + include Google::Apis::Core::Hashable + + # A map of additional call set information. This must be of the form + # map (string key mapping to a list of string values). + # Corresponds to the JSON property `info` + # @return [Hash>] + attr_accessor :info + + # The IDs of the variant sets this call set belongs to. This field must + # have exactly length one, as a call set belongs to a single variant set. + # This field is repeated for compatibility with the + # [GA4GH 0.5.1 + # API](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/ + # variants.avdl#L76). + # Corresponds to the JSON property `variantSetIds` + # @return [Array] + attr_accessor :variant_set_ids + + # The server-generated call set ID, unique across all call sets. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # The date this call set was created in milliseconds from the epoch. + # Corresponds to the JSON property `created` + # @return [Fixnum] + attr_accessor :created + + # The sample ID this call set corresponds to. + # Corresponds to the JSON property `sampleId` + # @return [String] + attr_accessor :sample_id + + # The call set name. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @info = args[:info] if args.key?(:info) + @variant_set_ids = args[:variant_set_ids] if args.key?(:variant_set_ids) + @id = args[:id] if args.key?(:id) + @created = args[:created] if args.key?(:created) + @sample_id = args[:sample_id] if args.key?(:sample_id) + @name = args[:name] if args.key?(:name) + end + end + + # + class SearchAnnotationSetsResponse + include Google::Apis::Core::Hashable + + # The continuation token, which is used to page through large result sets. + # Provide this value in a subsequent request to return the next page of + # results. This field will be empty if there aren't any additional results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The matching annotation sets. + # Corresponds to the JSON property `annotationSets` + # @return [Array] + attr_accessor :annotation_sets + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @annotation_sets = args[:annotation_sets] if args.key?(:annotation_sets) + end + end + + # The variant data import request. + class ImportVariantsRequest + include Google::Apis::Core::Hashable + + # A mapping between info field keys and the InfoMergeOperations to + # be performed on them. This is plumbed down to the MergeVariantRequests + # generated by the resulting import job. + # Corresponds to the JSON property `infoMergeConfig` + # @return [Hash] + attr_accessor :info_merge_config + + # Required. The variant set to which variant data should be imported. + # Corresponds to the JSON property `variantSetId` + # @return [String] + attr_accessor :variant_set_id + + # A list of URIs referencing variant files in Google Cloud Storage. URIs can + # include wildcards [as described + # here](https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames). + # Note that recursive wildcards ('**') are not supported. + # Corresponds to the JSON property `sourceUris` + # @return [Array] + attr_accessor :source_uris + + # Convert reference names to the canonical representation. + # hg19 haploytypes (those reference names containing "_hap") + # are not modified in any way. + # All other reference names are modified according to the following rules: + # The reference name is capitalized. + # The "chr" prefix is dropped for all autosomes and sex chromsomes. + # For example "chr17" becomes "17" and "chrX" becomes "X". + # All mitochondrial chromosomes ("chrM", "chrMT", etc) become "MT". + # Corresponds to the JSON property `normalizeReferenceNames` + # @return [Boolean] + attr_accessor :normalize_reference_names + alias_method :normalize_reference_names?, :normalize_reference_names + + # The format of the variant data being imported. If unspecified, defaults to + # to `VCF`. + # 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) + @info_merge_config = args[:info_merge_config] if args.key?(:info_merge_config) + @variant_set_id = args[:variant_set_id] if args.key?(:variant_set_id) + @source_uris = args[:source_uris] if args.key?(:source_uris) + @normalize_reference_names = args[:normalize_reference_names] if args.key?(:normalize_reference_names) + @format = args[:format] if args.key?(:format) + end + end + + # + class VariantAnnotation + include Google::Apis::Core::Hashable + + # Effect of the variant on the coding sequence. + # Corresponds to the JSON property `effect` + # @return [String] + attr_accessor :effect + + # Google annotation IDs of the transcripts affected by this variant. These + # should be provided when the variant is created. + # Corresponds to the JSON property `transcriptIds` + # @return [Array] + attr_accessor :transcript_ids + + # Type has been adapted from ClinVar's list of variant types. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # The alternate allele for this variant. If multiple alternate alleles + # exist at this location, create a separate variant for each one, as they + # may represent distinct conditions. + # Corresponds to the JSON property `alternateBases` + # @return [String] + attr_accessor :alternate_bases + + # Google annotation ID of the gene affected by this variant. This should + # be provided when the variant is created. + # Corresponds to the JSON property `geneId` + # @return [String] + attr_accessor :gene_id + + # Describes the clinical significance of a variant. + # It is adapted from the ClinVar controlled vocabulary for clinical + # significance described at: + # http://www.ncbi.nlm.nih.gov/clinvar/docs/clinsig/ + # Corresponds to the JSON property `clinicalSignificance` + # @return [String] + attr_accessor :clinical_significance + + # The set of conditions associated with this variant. + # A condition describes the way a variant influences human health. + # Corresponds to the JSON property `conditions` + # @return [Array] + attr_accessor :conditions + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @effect = args[:effect] if args.key?(:effect) + @transcript_ids = args[:transcript_ids] if args.key?(:transcript_ids) + @type = args[:type] if args.key?(:type) + @alternate_bases = args[:alternate_bases] if args.key?(:alternate_bases) + @gene_id = args[:gene_id] if args.key?(:gene_id) + @clinical_significance = args[:clinical_significance] if args.key?(:clinical_significance) + @conditions = args[:conditions] if args.key?(:conditions) + end + end + + # + class ListCoverageBucketsResponse + include Google::Apis::Core::Hashable + + # The continuation token, which is used to page through large result sets. + # Provide this value in a subsequent request to return the next page of + # results. This field will be empty if there aren't any additional results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The length of each coverage bucket in base pairs. Note that buckets at the + # end of a reference sequence may be shorter. This value is omitted if the + # bucket width is infinity (the default behaviour, with no range or + # `targetBucketWidth`). + # Corresponds to the JSON property `bucketWidth` + # @return [Fixnum] + attr_accessor :bucket_width + + # The coverage buckets. The list of buckets is sparse; a bucket with 0 + # overlapping reads is not returned. A bucket never crosses more than one + # reference sequence. Each bucket has width `bucketWidth`, unless + # its end is the end of the reference sequence. + # Corresponds to the JSON property `coverageBuckets` + # @return [Array] + attr_accessor :coverage_buckets + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @bucket_width = args[:bucket_width] if args.key?(:bucket_width) + @coverage_buckets = args[:coverage_buckets] if args.key?(:coverage_buckets) + end + end + + # The variant data export request. + class ExportVariantSetRequest + include Google::Apis::Core::Hashable + + # The format for the exported data. + # Corresponds to the JSON property `format` + # @return [String] + attr_accessor :format + + # Required. The BigQuery dataset to export data to. This dataset must already + # exist. Note that this is distinct from the Genomics concept of "dataset". + # Corresponds to the JSON property `bigqueryDataset` + # @return [String] + attr_accessor :bigquery_dataset + + # Required. The BigQuery table to export data to. + # If the table doesn't exist, it will be created. If it already exists, it + # will be overwritten. + # Corresponds to the JSON property `bigqueryTable` + # @return [String] + attr_accessor :bigquery_table + + # If provided, only variant call information from the specified call sets + # will be exported. By default all variant calls are exported. + # Corresponds to the JSON property `callSetIds` + # @return [Array] + attr_accessor :call_set_ids + + # Required. The Google Cloud project ID that owns the destination + # BigQuery dataset. The caller must have WRITE access to this project. This + # project will also own the resulting export job. + # Corresponds to the JSON property `projectId` + # @return [String] + attr_accessor :project_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @format = args[:format] if args.key?(:format) + @bigquery_dataset = args[:bigquery_dataset] if args.key?(:bigquery_dataset) + @bigquery_table = args[:bigquery_table] if args.key?(:bigquery_table) + @call_set_ids = args[:call_set_ids] if args.key?(:call_set_ids) + @project_id = args[:project_id] if args.key?(:project_id) + end + end + + # + class SearchAnnotationsRequest + include Google::Apis::Core::Hashable + + # The ID of the reference to query. + # Corresponds to the JSON property `referenceId` + # @return [String] + attr_accessor :reference_id + + # The end position of the range on the reference, 0-based exclusive. If + # referenceId or + # referenceName + # must be specified, Defaults to the length of the reference. + # Corresponds to the JSON property `end` + # @return [Fixnum] + attr_accessor :end + + # The continuation token, which is used to page through large result sets. + # To get the next page of results, set this parameter to the value of + # `nextPageToken` from the previous response. + # Corresponds to the JSON property `pageToken` + # @return [String] + attr_accessor :page_token + + # The maximum number of results to return in a single page. If unspecified, + # defaults to 256. The maximum value is 2048. + # Corresponds to the JSON property `pageSize` + # @return [Fixnum] + attr_accessor :page_size + + # The start position of the range on the reference, 0-based inclusive. If + # specified, + # referenceId or + # referenceName + # must be specified. Defaults to 0. + # Corresponds to the JSON property `start` + # @return [Fixnum] + attr_accessor :start + + # Required. The annotation sets to search within. The caller must have + # `READ` access to these annotation sets. + # All queried annotation sets must have the same type. + # Corresponds to the JSON property `annotationSetIds` + # @return [Array] + attr_accessor :annotation_set_ids + + # The name of the reference to query, within the reference set associated + # with this query. + # Corresponds to the JSON property `referenceName` + # @return [String] + attr_accessor :reference_name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @reference_id = args[:reference_id] if args.key?(:reference_id) + @end = args[:end] if args.key?(:end) + @page_token = args[:page_token] if args.key?(:page_token) + @page_size = args[:page_size] if args.key?(:page_size) + @start = args[:start] if args.key?(:start) + @annotation_set_ids = args[:annotation_set_ids] if args.key?(:annotation_set_ids) + @reference_name = args[:reference_name] if args.key?(:reference_name) + end + end + + # An event that occurred during an Operation. + class OperationEvent + include Google::Apis::Core::Hashable + + # Optional time of when event finished. An event can have a start time and no + # finish time. If an event has a finish time, there must be a start time. + # Corresponds to the JSON property `endTime` + # @return [String] + attr_accessor :end_time + + # Optional time of when event started. + # Corresponds to the JSON property `startTime` + # @return [String] + attr_accessor :start_time + + # Required description of event. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @end_time = args[:end_time] if args.key?(:end_time) + @start_time = args[:start_time] if args.key?(:start_time) + @description = args[:description] if args.key?(:description) + end + end + + # + class CodingSequence + include Google::Apis::Core::Hashable + + # The start of the coding sequence on this annotation's reference sequence, + # 0-based inclusive. Note that this position is relative to the reference + # start, and *not* the containing annotation start. + # Corresponds to the JSON property `start` + # @return [Fixnum] + attr_accessor :start + + # The end of the coding sequence on this annotation's reference sequence, + # 0-based exclusive. Note that this position is relative to the reference + # start, and *not* the containing annotation start. + # Corresponds to the JSON property `end` + # @return [Fixnum] + attr_accessor :end + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @start = args[:start] if args.key?(:start) + @end = args[:end] if args.key?(:end) + 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] + 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 + + # Request message for `GetIamPolicy` method. + class GetIamPolicyRequest + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # + class SearchReferencesResponse + include Google::Apis::Core::Hashable + + # The matching references. + # Corresponds to the JSON property `references` + # @return [Array] + attr_accessor :references + + # The continuation token, which is used to page through large result sets. + # Provide this value in a subsequent request to return the next page of + # results. This field will be empty if there aren't any additional results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @references = args[:references] if args.key?(:references) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # + class SearchAnnotationSetsRequest + include Google::Apis::Core::Hashable + + # Required. The dataset IDs to search within. Caller must have `READ` access + # to these datasets. + # Corresponds to the JSON property `datasetIds` + # @return [Array] + attr_accessor :dataset_ids + + # If specified, only annotation sets that have any of these types are + # returned. + # Corresponds to the JSON property `types` + # @return [Array] + attr_accessor :types + + # Only return annotations sets for which a substring of the name matches this + # string (case insensitive). + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # If specified, only annotation sets associated with the given reference set + # are returned. + # Corresponds to the JSON property `referenceSetId` + # @return [String] + attr_accessor :reference_set_id + + # The continuation token, which is used to page through large result sets. + # To get the next page of results, set this parameter to the value of + # `nextPageToken` from the previous response. + # Corresponds to the JSON property `pageToken` + # @return [String] + attr_accessor :page_token + + # The maximum number of results to return in a single page. If unspecified, + # defaults to 128. The maximum value is 1024. + # Corresponds to the JSON property `pageSize` + # @return [Fixnum] + attr_accessor :page_size + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @dataset_ids = args[:dataset_ids] if args.key?(:dataset_ids) + @types = args[:types] if args.key?(:types) + @name = args[:name] if args.key?(:name) + @reference_set_id = args[:reference_set_id] if args.key?(:reference_set_id) + @page_token = args[:page_token] if args.key?(:page_token) + @page_size = args[:page_size] if args.key?(:page_size) + end + end + + # The read group set search response. + class SearchReadGroupSetsResponse + include Google::Apis::Core::Hashable + + # The continuation token, which is used to page through large result sets. + # Provide this value in a subsequent request to return the next page of + # results. This field will be empty if there aren't any additional results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The list of matching read group sets. + # Corresponds to the JSON property `readGroupSets` + # @return [Array] + attr_accessor :read_group_sets + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @read_group_sets = args[:read_group_sets] if args.key?(:read_group_sets) + end + end + + # A linear alignment can be represented by one CIGAR string. Describes the + # mapped position and local alignment of the read to the reference. + class LinearAlignment + include Google::Apis::Core::Hashable + + # An abstraction for referring to a genomic position, in relation to some + # already known reference. For now, represents a genomic position as a + # reference name, a base number on that reference (0-based), and a + # determination of forward or reverse strand. + # Corresponds to the JSON property `position` + # @return [Google::Apis::GenomicsV1::Position] + attr_accessor :position + + # Represents the local alignment of this sequence (alignment matches, indels, + # etc) against the reference. + # Corresponds to the JSON property `cigar` + # @return [Array] + attr_accessor :cigar + + # The mapping quality of this alignment. Represents how likely + # the read maps to this position as opposed to other locations. + # Specifically, this is -10 log10 Pr(mapping position is wrong), rounded to + # the nearest integer. + # Corresponds to the JSON property `mappingQuality` + # @return [Fixnum] + attr_accessor :mapping_quality + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @position = args[:position] if args.key?(:position) + @cigar = args[:cigar] if args.key?(:cigar) + @mapping_quality = args[:mapping_quality] if args.key?(:mapping_quality) + end + end + + # + class SearchReferencesRequest + include Google::Apis::Core::Hashable + + # If present, return references for which the + # md5checksum matches exactly. + # Corresponds to the JSON property `md5checksums` + # @return [Array] + attr_accessor :md5checksums + + # If present, return references for which a prefix of any of + # sourceAccessions match + # any of these strings. Accession numbers typically have a main number and a + # version, for example `GCF_000001405.26`. + # Corresponds to the JSON property `accessions` + # @return [Array] + attr_accessor :accessions + + # The continuation token, which is used to page through large result sets. + # To get the next page of results, set this parameter to the value of + # `nextPageToken` from the previous response. + # Corresponds to the JSON property `pageToken` + # @return [String] + attr_accessor :page_token + + # If present, return only references which belong to this reference set. + # Corresponds to the JSON property `referenceSetId` + # @return [String] + attr_accessor :reference_set_id + + # The maximum number of results to return in a single page. If unspecified, + # defaults to 1024. The maximum value is 4096. + # Corresponds to the JSON property `pageSize` + # @return [Fixnum] + attr_accessor :page_size + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @md5checksums = args[:md5checksums] if args.key?(:md5checksums) + @accessions = args[:accessions] if args.key?(:accessions) + @page_token = args[:page_token] if args.key?(:page_token) + @reference_set_id = args[:reference_set_id] if args.key?(:reference_set_id) + @page_size = args[:page_size] if args.key?(:page_size) + end + end + + # A Dataset is a collection of genomic data. + # For more genomics resource definitions, see [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + class Dataset + include Google::Apis::Core::Hashable + + # The server-generated dataset ID, unique across all datasets. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # The time this dataset was created, in seconds from the epoch. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # The dataset name. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The Google Cloud project ID that this dataset belongs to. + # Corresponds to the JSON property `projectId` + # @return [String] + attr_accessor :project_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @id = args[:id] if args.key?(:id) + @create_time = args[:create_time] if args.key?(:create_time) + @name = args[:name] if args.key?(:name) + @project_id = args[:project_id] if args.key?(:project_id) + end + end + + # The variant data import response. + class ImportVariantsResponse + include Google::Apis::Core::Hashable + + # IDs of the call sets created during the import. + # Corresponds to the JSON property `callSetIds` + # @return [Array] + attr_accessor :call_set_ids + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @call_set_ids = args[:call_set_ids] if args.key?(:call_set_ids) + end + end + + # A read group is all the data that's processed the same way by the sequencer. + class ReadGroup + include Google::Apis::Core::Hashable + + # A map of additional read group information. This must be of the form + # map (string key mapping to a list of string values). + # Corresponds to the JSON property `info` + # @return [Hash>] + attr_accessor :info + + # The server-generated read group ID, unique for all read groups. + # Note: This is different than the @RG ID field in the SAM spec. For that + # value, see name. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # The programs used to generate this read group. Programs are always + # identical for all read groups within a read group set. For this reason, + # only the first read group in a returned set will have this field + # populated. + # Corresponds to the JSON property `programs` + # @return [Array] + attr_accessor :programs + + # The predicted insert size of this read group. The insert size is the length + # the sequenced DNA fragment from end-to-end, not including the adapters. + # Corresponds to the JSON property `predictedInsertSize` + # @return [Fixnum] + attr_accessor :predicted_insert_size + + # A free-form text description of this read group. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # A client-supplied sample identifier for the reads in this read group. + # Corresponds to the JSON property `sampleId` + # @return [String] + attr_accessor :sample_id + + # The dataset to which this read group belongs. + # Corresponds to the JSON property `datasetId` + # @return [String] + attr_accessor :dataset_id + + # The experiment used to generate this read group. + # Corresponds to the JSON property `experiment` + # @return [Google::Apis::GenomicsV1::Experiment] + attr_accessor :experiment + + # The read group name. This corresponds to the @RG ID field in the SAM spec. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The reference set the reads in this read group are aligned to. + # Corresponds to the JSON property `referenceSetId` + # @return [String] + attr_accessor :reference_set_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @info = args[:info] if args.key?(:info) + @id = args[:id] if args.key?(:id) + @programs = args[:programs] if args.key?(:programs) + @predicted_insert_size = args[:predicted_insert_size] if args.key?(:predicted_insert_size) + @description = args[:description] if args.key?(:description) + @sample_id = args[:sample_id] if args.key?(:sample_id) + @dataset_id = args[:dataset_id] if args.key?(:dataset_id) + @experiment = args[:experiment] if args.key?(:experiment) + @name = args[:name] if args.key?(:name) + @reference_set_id = args[:reference_set_id] if args.key?(:reference_set_id) + end + end + # A read group set is a logical collection of read groups, which are # collections of reads produced by a sequencer. A read group set typically # models reads corresponding to one sample, sequenced one way, and aligned one @@ -34,6 +936,28 @@ module Google class ReadGroupSet include Google::Apis::Core::Hashable + # The filename of the original source file for this read group set, if any. + # Corresponds to the JSON property `filename` + # @return [String] + attr_accessor :filename + + # The read groups in this set. There are typically 1-10 read groups in a read + # group set. + # Corresponds to the JSON property `readGroups` + # @return [Array] + attr_accessor :read_groups + + # The read group set name. By default this will be initialized to the sample + # name of the sequenced data contained in this set. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The reference set to which the reads in this read group set are aligned. + # Corresponds to the JSON property `referenceSetId` + # @return [String] + attr_accessor :reference_set_id + # A map of additional read group set information. # Corresponds to the JSON property `info` # @return [Hash>] @@ -49,41 +973,19 @@ module Google # @return [String] attr_accessor :dataset_id - # The read groups in this set. There are typically 1-10 read groups in a read - # group set. - # Corresponds to the JSON property `readGroups` - # @return [Array] - attr_accessor :read_groups - - # The filename of the original source file for this read group set, if any. - # Corresponds to the JSON property `filename` - # @return [String] - attr_accessor :filename - - # The read group set name. By default this will be initialized to the sample - # name of the sequenced data contained in this set. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The reference set to which the reads in this read group set are aligned. - # Corresponds to the JSON property `referenceSetId` - # @return [String] - attr_accessor :reference_set_id - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @filename = args[:filename] if args.key?(:filename) + @read_groups = args[:read_groups] if args.key?(:read_groups) + @name = args[:name] if args.key?(:name) + @reference_set_id = args[:reference_set_id] if args.key?(:reference_set_id) @info = args[:info] if args.key?(:info) @id = args[:id] if args.key?(:id) @dataset_id = args[:dataset_id] if args.key?(:dataset_id) - @read_groups = args[:read_groups] if args.key?(:read_groups) - @filename = args[:filename] if args.key?(:filename) - @name = args[:name] if args.key?(:name) - @reference_set_id = args[:reference_set_id] if args.key?(:reference_set_id) end end @@ -91,6 +993,11 @@ module Google class SearchVariantSetsResponse include Google::Apis::Core::Hashable + # The variant sets belonging to the requested dataset. + # Corresponds to the JSON property `variantSets` + # @return [Array] + attr_accessor :variant_sets + # The continuation token, which is used to page through large result sets. # Provide this value in a subsequent request to return the next page of # results. This field will be empty if there aren't any additional results. @@ -98,19 +1005,14 @@ module Google # @return [String] attr_accessor :next_page_token - # The variant sets belonging to the requested dataset. - # Corresponds to the JSON property `variantSets` - # @return [Array] - attr_accessor :variant_sets - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) @variant_sets = args[:variant_sets] if args.key?(:variant_sets) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) end end @@ -151,7 +1053,7 @@ module Google # error message is needed, put the localized message in the error details or # localize it in the client. The optional error details may contain arbitrary # information about the error. There is a predefined set of error detail types - # in the package `google.rpc` which can be used for common error conditions. + # in the package `google.rpc` that can be used for common error conditions. # # Language mapping # The `Status` message is the logical representation of the error model, but it # is not necessarily the actual wire format. When the `Status` message is @@ -208,13 +1110,6 @@ module Google class Position include Google::Apis::Core::Hashable - # Whether this position is on the reverse strand, as opposed to the forward - # strand. - # Corresponds to the JSON property `reverseStrand` - # @return [Boolean] - attr_accessor :reverse_strand - alias_method :reverse_strand?, :reverse_strand - # The 0-based offset from the start of the forward strand for that reference. # Corresponds to the JSON property `position` # @return [Fixnum] @@ -225,15 +1120,22 @@ module Google # @return [String] attr_accessor :reference_name + # Whether this position is on the reverse strand, as opposed to the forward + # strand. + # Corresponds to the JSON property `reverseStrand` + # @return [Boolean] + attr_accessor :reverse_strand + alias_method :reverse_strand?, :reverse_strand + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @reverse_strand = args[:reverse_strand] if args.key?(:reverse_strand) @position = args[:position] if args.key?(:position) @reference_name = args[:reference_name] if args.key?(:reference_name) + @reverse_strand = args[:reverse_strand] if args.key?(:reverse_strand) end end @@ -241,6 +1143,11 @@ module Google class SearchReferenceSetsResponse include Google::Apis::Core::Hashable + # The matching references sets. + # Corresponds to the JSON property `referenceSets` + # @return [Array] + attr_accessor :reference_sets + # The continuation token, which is used to page through large result sets. # Provide this value in a subsequent request to return the next page of # results. This field will be empty if there aren't any additional results. @@ -248,19 +1155,14 @@ module Google # @return [String] attr_accessor :next_page_token - # The matching references sets. - # Corresponds to the JSON property `referenceSets` - # @return [Array] - attr_accessor :reference_sets - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) @reference_sets = args[:reference_sets] if args.key?(:reference_sets) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) end end @@ -268,6 +1170,18 @@ module Google class SearchCallSetsRequest include Google::Apis::Core::Hashable + # The maximum number of results to return in a single page. If unspecified, + # defaults to 1024. + # Corresponds to the JSON property `pageSize` + # @return [Fixnum] + attr_accessor :page_size + + # Restrict the query to call sets within the given variant sets. At least one + # ID must be provided. + # Corresponds to the JSON property `variantSetIds` + # @return [Array] + attr_accessor :variant_set_ids + # Only return call sets for which a substring of the name matches this # string. # Corresponds to the JSON property `name` @@ -281,28 +1195,16 @@ module Google # @return [String] attr_accessor :page_token - # The maximum number of results to return in a single page. If unspecified, - # defaults to 1024. - # Corresponds to the JSON property `pageSize` - # @return [Fixnum] - attr_accessor :page_size - - # Restrict the query to call sets within the given variant sets. At least one - # ID must be provided. - # Corresponds to the JSON property `variantSetIds` - # @return [Array] - attr_accessor :variant_set_ids - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @name = args[:name] if args.key?(:name) - @page_token = args[:page_token] if args.key?(:page_token) @page_size = args[:page_size] if args.key?(:page_size) @variant_set_ids = args[:variant_set_ids] if args.key?(:variant_set_ids) + @name = args[:name] if args.key?(:name) + @page_token = args[:page_token] if args.key?(:page_token) end end @@ -310,6 +1212,19 @@ module Google class ImportReadGroupSetsRequest include Google::Apis::Core::Hashable + # A list of URIs pointing at [BAM + # files](https://samtools.github.io/hts-specs/SAMv1.pdf) + # in Google Cloud Storage. + # Those URIs can include wildcards (*), but do not add or remove + # matching files before import has completed. + # Note that Google Cloud Storage object listing is only eventually + # consistent: files added may be not be immediately visible to + # everyone. Thus, if using a wildcard it is preferable not to start + # the import immediately after the files are created. + # Corresponds to the JSON property `sourceUris` + # @return [Array] + attr_accessor :source_uris + # The reference set to which the imported read group sets are aligned to, if # any. The reference names of this reference set must be a superset of those # found in the imported file headers. If no reference set id is provided, a @@ -330,29 +1245,16 @@ module Google # @return [String] attr_accessor :dataset_id - # A list of URIs pointing at [BAM - # files](https://samtools.github.io/hts-specs/SAMv1.pdf) - # in Google Cloud Storage. - # Those URIs can include wildcards (*), but do not add or remove - # matching files before import has completed. - # Note that Google Cloud Storage object listing is only eventually - # consistent: files added may be not be immediately visible to - # everyone. Thus, if using a wildcard it is preferable not to start - # the import immediately after the files are created. - # Corresponds to the JSON property `sourceUris` - # @return [Array] - attr_accessor :source_uris - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @source_uris = args[:source_uris] if args.key?(:source_uris) @reference_set_id = args[:reference_set_id] if args.key?(:reference_set_id) @partition_strategy = args[:partition_strategy] if args.key?(:partition_strategy) @dataset_id = args[:dataset_id] if args.key?(:dataset_id) - @source_uris = args[:source_uris] if args.key?(:source_uris) end end @@ -385,11 +1287,6 @@ module Google class Policy include Google::Apis::Core::Hashable - # Version of the `Policy`. The default version is 0. - # Corresponds to the JSON property `version` - # @return [Fixnum] - attr_accessor :version - # Associates a list of `members` to a `role`. # Multiple `bindings` must not be specified for the same `role`. # `bindings` with no members will result in an error. @@ -411,128 +1308,20 @@ module Google # @return [String] attr_accessor :etag + # Version of the `Policy`. The default version is 0. + # 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) - @version = args[:version] if args.key?(:version) @bindings = args[:bindings] if args.key?(:bindings) @etag = args[:etag] if args.key?(:etag) - end - end - - # An annotation describes a region of reference genome. The value of an - # annotation may be one of several canonical types, supplemented by arbitrary - # info tags. An annotation is not inherently associated with a specific - # sample or individual (though a client could choose to use annotations in - # this way). Example canonical annotation types are `GENE` and - # `VARIANT`. - class Annotation - include Google::Apis::Core::Hashable - - # The display name corresponding to the reference specified by - # `referenceId`, for example `chr1`, `1`, or `chrX`. - # Corresponds to the JSON property `referenceName` - # @return [String] - attr_accessor :reference_name - - # The data type for this annotation. Must match the containing annotation - # set's type. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # A map of additional read alignment information. This must be of the form - # map (string key mapping to a list of string values). - # Corresponds to the JSON property `info` - # @return [Hash>] - attr_accessor :info - - # The end position of the range on the reference, 0-based exclusive. - # Corresponds to the JSON property `end` - # @return [Fixnum] - attr_accessor :end - - # A transcript represents the assertion that a particular region of the - # reference genome may be transcribed as RNA. - # Corresponds to the JSON property `transcript` - # @return [Google::Apis::GenomicsV1::Transcript] - attr_accessor :transcript - - # The start position of the range on the reference, 0-based inclusive. - # Corresponds to the JSON property `start` - # @return [Fixnum] - attr_accessor :start - - # The annotation set to which this annotation belongs. - # Corresponds to the JSON property `annotationSetId` - # @return [String] - attr_accessor :annotation_set_id - - # The display name of this annotation. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # A variant annotation, which describes the effect of a variant on the - # genome, the coding sequence, and/or higher level consequences at the - # organism level e.g. pathogenicity. This field is only set for annotations - # of type `VARIANT`. - # Corresponds to the JSON property `variant` - # @return [Google::Apis::GenomicsV1::VariantAnnotation] - attr_accessor :variant - - # The server-generated annotation ID, unique across all annotations. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The ID of the Google Genomics reference associated with this range. - # Corresponds to the JSON property `referenceId` - # @return [String] - attr_accessor :reference_id - - # Whether this range refers to the reverse strand, as opposed to the forward - # strand. Note that regardless of this field, the start/end position of the - # range always refer to the forward strand. - # Corresponds to the JSON property `reverseStrand` - # @return [Boolean] - attr_accessor :reverse_strand - alias_method :reverse_strand?, :reverse_strand - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @reference_name = args[:reference_name] if args.key?(:reference_name) - @type = args[:type] if args.key?(:type) - @info = args[:info] if args.key?(:info) - @end = args[:end] if args.key?(:end) - @transcript = args[:transcript] if args.key?(:transcript) - @start = args[:start] if args.key?(:start) - @annotation_set_id = args[:annotation_set_id] if args.key?(:annotation_set_id) - @name = args[:name] if args.key?(:name) - @variant = args[:variant] if args.key?(:variant) - @id = args[:id] if args.key?(:id) - @reference_id = args[:reference_id] if args.key?(:reference_id) - @reverse_strand = args[:reverse_strand] if args.key?(:reverse_strand) - end - end - - # The request message for Operations.CancelOperation. - class CancelOperationRequest - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) + @version = args[:version] if args.key?(:version) end end @@ -603,6 +1392,119 @@ module Google end end + # The request message for Operations.CancelOperation. + class CancelOperationRequest + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # An annotation describes a region of reference genome. The value of an + # annotation may be one of several canonical types, supplemented by arbitrary + # info tags. An annotation is not inherently associated with a specific + # sample or individual (though a client could choose to use annotations in + # this way). Example canonical annotation types are `GENE` and + # `VARIANT`. + class Annotation + include Google::Apis::Core::Hashable + + # The start position of the range on the reference, 0-based inclusive. + # Corresponds to the JSON property `start` + # @return [Fixnum] + attr_accessor :start + + # The annotation set to which this annotation belongs. + # Corresponds to the JSON property `annotationSetId` + # @return [String] + attr_accessor :annotation_set_id + + # The display name of this annotation. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # A variant annotation, which describes the effect of a variant on the + # genome, the coding sequence, and/or higher level consequences at the + # organism level e.g. pathogenicity. This field is only set for annotations + # of type `VARIANT`. + # Corresponds to the JSON property `variant` + # @return [Google::Apis::GenomicsV1::VariantAnnotation] + attr_accessor :variant + + # The ID of the Google Genomics reference associated with this range. + # Corresponds to the JSON property `referenceId` + # @return [String] + attr_accessor :reference_id + + # The server-generated annotation ID, unique across all annotations. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # Whether this range refers to the reverse strand, as opposed to the forward + # strand. Note that regardless of this field, the start/end position of the + # range always refer to the forward strand. + # Corresponds to the JSON property `reverseStrand` + # @return [Boolean] + attr_accessor :reverse_strand + alias_method :reverse_strand?, :reverse_strand + + # The display name corresponding to the reference specified by + # `referenceId`, for example `chr1`, `1`, or `chrX`. + # Corresponds to the JSON property `referenceName` + # @return [String] + attr_accessor :reference_name + + # The data type for this annotation. Must match the containing annotation + # set's type. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # A map of additional read alignment information. This must be of the form + # map (string key mapping to a list of string values). + # Corresponds to the JSON property `info` + # @return [Hash>] + attr_accessor :info + + # The end position of the range on the reference, 0-based exclusive. + # Corresponds to the JSON property `end` + # @return [Fixnum] + attr_accessor :end + + # A transcript represents the assertion that a particular region of the + # reference genome may be transcribed as RNA. + # Corresponds to the JSON property `transcript` + # @return [Google::Apis::GenomicsV1::Transcript] + attr_accessor :transcript + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @start = args[:start] if args.key?(:start) + @annotation_set_id = args[:annotation_set_id] if args.key?(:annotation_set_id) + @name = args[:name] if args.key?(:name) + @variant = args[:variant] if args.key?(:variant) + @reference_id = args[:reference_id] if args.key?(:reference_id) + @id = args[:id] if args.key?(:id) + @reverse_strand = args[:reverse_strand] if args.key?(:reverse_strand) + @reference_name = args[:reference_name] if args.key?(:reference_name) + @type = args[:type] if args.key?(:type) + @info = args[:info] if args.key?(:info) + @end = args[:end] if args.key?(:end) + @transcript = args[:transcript] if args.key?(:transcript) + end + end + # Runtime metadata that will be populated in the # runtimeMetadata # field of the Operation associated with a RunPipeline execution. @@ -630,14 +1532,6 @@ module Google class Operation include Google::Apis::Core::Hashable - # If the value is `false`, it means the operation is still in progress. - # If true, the operation is completed, and either `error` or `response` is - # available. - # Corresponds to the JSON property `done` - # @return [Boolean] - attr_accessor :done - alias_method :done?, :done - # If importing ReadGroupSets, an ImportReadGroupSetsResponse is returned. If # importing Variants, an ImportVariantsResponse is returned. For pipelines and # exports, an empty response is returned. @@ -666,7 +1560,7 @@ module Google # error message is needed, put the localized message in the error details or # localize it in the client. The optional error details may contain arbitrary # information about the error. There is a predefined set of error detail types - # in the package `google.rpc` which can be used for common error conditions. + # in the package `google.rpc` that can be used for common error conditions. # # Language mapping # The `Status` message is the logical representation of the error model, but it # is not necessarily the actual wire format. When the `Status` message is @@ -700,17 +1594,25 @@ module Google # @return [Hash] attr_accessor :metadata + # If the value is `false`, it means the operation is still in progress. + # If true, the operation is completed, and either `error` or `response` is + # available. + # Corresponds to the JSON property `done` + # @return [Boolean] + attr_accessor :done + alias_method :done?, :done + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @done = args[:done] if args.key?(:done) @response = args[:response] if args.key?(:response) @name = args[:name] if args.key?(:name) @error = args[:error] if args.key?(:error) @metadata = args[:metadata] if args.key?(:metadata) + @done = args[:done] if args.key?(:done) end end @@ -740,15 +1642,6 @@ module Google class VariantCall include Google::Apis::Core::Hashable - # If this field is present, this variant call's genotype ordering implies - # the phase of the bases and is consistent with any other variant calls in - # the same reference sequence which have the same phaseset value. - # When importing data from VCF, if the genotype data was phased but no - # phase set was specified this field will be set to `*`. - # Corresponds to the JSON property `phaseset` - # @return [String] - attr_accessor :phaseset - # A map of additional variant call information. This must be of the form # map (string key mapping to a list of string values). # Corresponds to the JSON property `info` @@ -791,18 +1684,27 @@ module Google # @return [Array] attr_accessor :genotype + # If this field is present, this variant call's genotype ordering implies + # the phase of the bases and is consistent with any other variant calls in + # the same reference sequence which have the same phaseset value. + # When importing data from VCF, if the genotype data was phased but no + # phase set was specified this field will be set to `*`. + # Corresponds to the JSON property `phaseset` + # @return [String] + attr_accessor :phaseset + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @phaseset = args[:phaseset] if args.key?(:phaseset) @info = args[:info] if args.key?(:info) @call_set_name = args[:call_set_name] if args.key?(:call_set_name) @genotype_likelihood = args[:genotype_likelihood] if args.key?(:genotype_likelihood) @call_set_id = args[:call_set_id] if args.key?(:call_set_id) @genotype = args[:genotype] if args.key?(:genotype) + @phaseset = args[:phaseset] if args.key?(:phaseset) end end @@ -810,11 +1712,6 @@ module Google class SearchVariantsResponse include Google::Apis::Core::Hashable - # The list of matching Variants. - # Corresponds to the JSON property `variants` - # @return [Array] - attr_accessor :variants - # The continuation token, which is used to page through large result sets. # Provide this value in a subsequent request to return the next page of # results. This field will be empty if there aren't any additional results. @@ -822,14 +1719,19 @@ module Google # @return [String] attr_accessor :next_page_token + # The list of matching Variants. + # Corresponds to the JSON property `variants` + # @return [Array] + attr_accessor :variants + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @variants = args[:variants] if args.key?(:variants) @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @variants = args[:variants] if args.key?(:variants) end end @@ -837,11 +1739,6 @@ module Google class ListBasesResponse include Google::Apis::Core::Hashable - # A substring of the bases that make up this reference. - # Corresponds to the JSON property `sequence` - # @return [String] - attr_accessor :sequence - # The offset position (0-based) of the given `sequence` from the # start of this `Reference`. This value will differ for each page # in a paginated request. @@ -856,15 +1753,20 @@ module Google # @return [String] attr_accessor :next_page_token + # A substring of the bases that make up this reference. + # Corresponds to the JSON property `sequence` + # @return [String] + attr_accessor :sequence + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @sequence = args[:sequence] if args.key?(:sequence) @offset = args[:offset] if args.key?(:offset) @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @sequence = args[:sequence] if args.key?(:sequence) end end @@ -882,7 +1784,7 @@ module Google # error message is needed, put the localized message in the error details or # localize it in the client. The optional error details may contain arbitrary # information about the error. There is a predefined set of error detail types - # in the package `google.rpc` which can be used for common error conditions. + # in the package `google.rpc` that can be used for common error conditions. # # Language mapping # The `Status` message is the logical representation of the error model, but it # is not necessarily the actual wire format. When the `Status` message is @@ -910,6 +1812,12 @@ module Google class Status include Google::Apis::Core::Hashable + # A list of messages that carry the error details. There will be a + # common set of message types for APIs to use. + # Corresponds to the JSON property `details` + # @return [Array>] + attr_accessor :details + # The status code, which should be an enum value of google.rpc.Code. # Corresponds to the JSON property `code` # @return [Fixnum] @@ -922,21 +1830,15 @@ module Google # @return [String] attr_accessor :message - # A list of messages that carry the error details. There will be a - # common set of message types for APIs to use. - # Corresponds to the JSON property `details` - # @return [Array>] - attr_accessor :details - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @details = args[:details] if args.key?(:details) @code = args[:code] if args.key?(:code) @message = args[:message] if args.key?(:message) - @details = args[:details] if args.key?(:details) end end @@ -1092,6 +1994,33 @@ module Google end end + # ReferenceBound records an upper bound for the starting coordinate of + # variants in a particular reference. + class ReferenceBound + include Google::Apis::Core::Hashable + + # The name of the reference associated with this reference bound. + # Corresponds to the JSON property `referenceName` + # @return [String] + attr_accessor :reference_name + + # An upper bound (inclusive) on the starting coordinate of any + # variant in the reference sequence. + # Corresponds to the JSON property `upperBound` + # @return [Fixnum] + attr_accessor :upper_bound + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @reference_name = args[:reference_name] if args.key?(:reference_name) + @upper_bound = args[:upper_bound] if args.key?(:upper_bound) + end + end + # class BatchCreateAnnotationsResponse include Google::Apis::Core::Hashable @@ -1112,55 +2041,30 @@ module Google end end - # ReferenceBound records an upper bound for the starting coordinate of - # variants in a particular reference. - class ReferenceBound + # The call set search response. + class SearchCallSetsResponse include Google::Apis::Core::Hashable - # An upper bound (inclusive) on the starting coordinate of any - # variant in the reference sequence. - # Corresponds to the JSON property `upperBound` - # @return [Fixnum] - attr_accessor :upper_bound - - # The name of the reference associated with this reference bound. - # Corresponds to the JSON property `referenceName` - # @return [String] - attr_accessor :reference_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @upper_bound = args[:upper_bound] if args.key?(:upper_bound) - @reference_name = args[:reference_name] if args.key?(:reference_name) - end - end - - # The response message for Operations.ListOperations. - class ListOperationsResponse - include Google::Apis::Core::Hashable - - # A list of operations that matches the specified filter in the request. - # Corresponds to the JSON property `operations` - # @return [Array] - attr_accessor :operations - - # The standard List next-page token. + # The continuation token, which is used to page through large result sets. + # Provide this value in a subsequent request to return the next page of + # results. This field will be empty if there aren't any additional results. # Corresponds to the JSON property `nextPageToken` # @return [String] attr_accessor :next_page_token + # The list of matching call sets. + # Corresponds to the JSON property `callSets` + # @return [Array] + attr_accessor :call_sets + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @operations = args[:operations] if args.key?(:operations) @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @call_sets = args[:call_sets] if args.key?(:call_sets) end end @@ -1177,6 +2081,48 @@ module Google class Variant include Google::Apis::Core::Hashable + # A map of additional variant information. This must be of the form + # map (string key mapping to a list of string values). + # Corresponds to the JSON property `info` + # @return [Hash>] + attr_accessor :info + + # The reference bases for this variant. They start at the given + # position. + # Corresponds to the JSON property `referenceBases` + # @return [String] + attr_accessor :reference_bases + + # The bases that appear instead of the reference bases. + # Corresponds to the JSON property `alternateBases` + # @return [Array] + attr_accessor :alternate_bases + + # Names for the variant, for example a RefSNP ID. + # Corresponds to the JSON property `names` + # @return [Array] + attr_accessor :names + + # A list of filters (normally quality filters) this variant has failed. + # `PASS` indicates this variant has passed all filters. + # Corresponds to the JSON property `filter` + # @return [Array] + attr_accessor :filter + + # The end position (0-based) of this variant. This corresponds to the first + # base after the last base in the reference allele. So, the length of + # the reference allele is (end - start). This is useful for variants + # that don't explicitly give alternate bases, for example large deletions. + # Corresponds to the JSON property `end` + # @return [Fixnum] + attr_accessor :end + + # The variant calls for this particular variant. Each one represents the + # determination of genotype with respect to this variant. + # Corresponds to the JSON property `calls` + # @return [Array] + attr_accessor :calls + # The date this variant was created, in milliseconds from the epoch. # Corresponds to the JSON property `created` # @return [Fixnum] @@ -1210,85 +2156,41 @@ module Google # @return [String] attr_accessor :reference_name - # A map of additional variant information. This must be of the form - # map (string key mapping to a list of string values). - # Corresponds to the JSON property `info` - # @return [Hash>] - attr_accessor :info - - # The reference bases for this variant. They start at the given - # position. - # Corresponds to the JSON property `referenceBases` - # @return [String] - attr_accessor :reference_bases - - # Names for the variant, for example a RefSNP ID. - # Corresponds to the JSON property `names` - # @return [Array] - attr_accessor :names - - # The bases that appear instead of the reference bases. - # Corresponds to the JSON property `alternateBases` - # @return [Array] - attr_accessor :alternate_bases - - # A list of filters (normally quality filters) this variant has failed. - # `PASS` indicates this variant has passed all filters. - # Corresponds to the JSON property `filter` - # @return [Array] - attr_accessor :filter - - # The end position (0-based) of this variant. This corresponds to the first - # base after the last base in the reference allele. So, the length of - # the reference allele is (end - start). This is useful for variants - # that don't explicitly give alternate bases, for example large deletions. - # Corresponds to the JSON property `end` - # @return [Fixnum] - attr_accessor :end - - # The variant calls for this particular variant. Each one represents the - # determination of genotype with respect to this variant. - # Corresponds to the JSON property `calls` - # @return [Array] - attr_accessor :calls - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @info = args[:info] if args.key?(:info) + @reference_bases = args[:reference_bases] if args.key?(:reference_bases) + @alternate_bases = args[:alternate_bases] if args.key?(:alternate_bases) + @names = args[:names] if args.key?(:names) + @filter = args[:filter] if args.key?(:filter) + @end = args[:end] if args.key?(:end) + @calls = args[:calls] if args.key?(:calls) @created = args[:created] if args.key?(:created) @start = args[:start] if args.key?(:start) @quality = args[:quality] if args.key?(:quality) @id = args[:id] if args.key?(:id) @variant_set_id = args[:variant_set_id] if args.key?(:variant_set_id) @reference_name = args[:reference_name] if args.key?(:reference_name) - @info = args[:info] if args.key?(:info) - @reference_bases = args[:reference_bases] if args.key?(:reference_bases) - @names = args[:names] if args.key?(:names) - @alternate_bases = args[:alternate_bases] if args.key?(:alternate_bases) - @filter = args[:filter] if args.key?(:filter) - @end = args[:end] if args.key?(:end) - @calls = args[:calls] if args.key?(:calls) end end - # The call set search response. - class SearchCallSetsResponse + # The response message for Operations.ListOperations. + class ListOperationsResponse include Google::Apis::Core::Hashable - # The continuation token, which is used to page through large result sets. - # Provide this value in a subsequent request to return the next page of - # results. This field will be empty if there aren't any additional results. + # The standard List next-page token. # Corresponds to the JSON property `nextPageToken` # @return [String] attr_accessor :next_page_token - # The list of matching call sets. - # Corresponds to the JSON property `callSets` - # @return [Array] - attr_accessor :call_sets + # A list of operations that matches the specified filter in the request. + # Corresponds to the JSON property `operations` + # @return [Array] + attr_accessor :operations def initialize(**args) update!(**args) @@ -1297,86 +2199,7 @@ module Google # Update properties of this object def update!(**args) @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @call_sets = args[:call_sets] if args.key?(:call_sets) - end - end - - # The variant search request. - class SearchVariantsRequest - include Google::Apis::Core::Hashable - - # Only return variant calls which belong to call sets with these ids. - # Leaving this blank returns all variant calls. If a variant has no - # calls belonging to any of these call sets, it won't be returned at all. - # Corresponds to the JSON property `callSetIds` - # @return [Array] - attr_accessor :call_set_ids - - # Only return variants which have exactly this name. - # Corresponds to the JSON property `variantName` - # @return [String] - attr_accessor :variant_name - - # The beginning of the window (0-based, inclusive) for which - # overlapping variants should be returned. If unspecified, defaults to 0. - # Corresponds to the JSON property `start` - # @return [Fixnum] - attr_accessor :start - - # Required. Only return variants in this reference sequence. - # Corresponds to the JSON property `referenceName` - # @return [String] - attr_accessor :reference_name - - # At most one variant set ID must be provided. Only variants from this - # variant set will be returned. If omitted, a call set id must be included in - # the request. - # Corresponds to the JSON property `variantSetIds` - # @return [Array] - attr_accessor :variant_set_ids - - # The end of the window, 0-based exclusive. If unspecified or 0, defaults to - # the length of the reference. - # Corresponds to the JSON property `end` - # @return [Fixnum] - attr_accessor :end - - # The continuation token, which is used to page through large result sets. - # To get the next page of results, set this parameter to the value of - # `nextPageToken` from the previous response. - # Corresponds to the JSON property `pageToken` - # @return [String] - attr_accessor :page_token - - # The maximum number of calls to return in a single page. Note that this - # limit may be exceeded in the event that a matching variant contains more - # calls than the requested maximum. If unspecified, defaults to 5000. The - # maximum value is 10000. - # Corresponds to the JSON property `maxCalls` - # @return [Fixnum] - attr_accessor :max_calls - - # The maximum number of variants to return in a single page. If unspecified, - # defaults to 5000. The maximum value is 10000. - # Corresponds to the JSON property `pageSize` - # @return [Fixnum] - attr_accessor :page_size - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @call_set_ids = args[:call_set_ids] if args.key?(:call_set_ids) - @variant_name = args[:variant_name] if args.key?(:variant_name) - @start = args[:start] if args.key?(:start) - @reference_name = args[:reference_name] if args.key?(:reference_name) - @variant_set_ids = args[:variant_set_ids] if args.key?(:variant_set_ids) - @end = args[:end] if args.key?(:end) - @page_token = args[:page_token] if args.key?(:page_token) - @max_calls = args[:max_calls] if args.key?(:max_calls) - @page_size = args[:page_size] if args.key?(:page_size) + @operations = args[:operations] if args.key?(:operations) end end @@ -1384,6 +2207,17 @@ module Google class OperationMetadata include Google::Apis::Core::Hashable + # The time at which the job was submitted to the Genomics service. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # Optionally provided by the caller when submitting the request that creates + # the operation. + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + # The Google Cloud Project in which the job is scoped. # Corresponds to the JSON property `projectId` # @return [String] @@ -1424,23 +2258,14 @@ module Google # @return [Hash] attr_accessor :runtime_metadata - # The time at which the job was submitted to the Genomics service. - # Corresponds to the JSON property `createTime` - # @return [String] - attr_accessor :create_time - - # Optionally provided by the caller when submitting the request that creates - # the operation. - # Corresponds to the JSON property `labels` - # @return [Hash] - attr_accessor :labels - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @create_time = args[:create_time] if args.key?(:create_time) + @labels = args[:labels] if args.key?(:labels) @project_id = args[:project_id] if args.key?(:project_id) @client_id = args[:client_id] if args.key?(:client_id) @events = args[:events] if args.key?(:events) @@ -1448,8 +2273,85 @@ module Google @start_time = args[:start_time] if args.key?(:start_time) @request = args[:request] if args.key?(:request) @runtime_metadata = args[:runtime_metadata] if args.key?(:runtime_metadata) - @create_time = args[:create_time] if args.key?(:create_time) - @labels = args[:labels] if args.key?(:labels) + end + end + + # The variant search request. + class SearchVariantsRequest + include Google::Apis::Core::Hashable + + # Required. Only return variants in this reference sequence. + # Corresponds to the JSON property `referenceName` + # @return [String] + attr_accessor :reference_name + + # At most one variant set ID must be provided. Only variants from this + # variant set will be returned. If omitted, a call set id must be included in + # the request. + # Corresponds to the JSON property `variantSetIds` + # @return [Array] + attr_accessor :variant_set_ids + + # The end of the window, 0-based exclusive. If unspecified or 0, defaults to + # the length of the reference. + # Corresponds to the JSON property `end` + # @return [Fixnum] + attr_accessor :end + + # The maximum number of calls to return in a single page. Note that this + # limit may be exceeded in the event that a matching variant contains more + # calls than the requested maximum. If unspecified, defaults to 5000. The + # maximum value is 10000. + # Corresponds to the JSON property `maxCalls` + # @return [Fixnum] + attr_accessor :max_calls + + # The continuation token, which is used to page through large result sets. + # To get the next page of results, set this parameter to the value of + # `nextPageToken` from the previous response. + # Corresponds to the JSON property `pageToken` + # @return [String] + attr_accessor :page_token + + # The maximum number of variants to return in a single page. If unspecified, + # defaults to 5000. The maximum value is 10000. + # Corresponds to the JSON property `pageSize` + # @return [Fixnum] + attr_accessor :page_size + + # Only return variant calls which belong to call sets with these ids. + # Leaving this blank returns all variant calls. If a variant has no + # calls belonging to any of these call sets, it won't be returned at all. + # Corresponds to the JSON property `callSetIds` + # @return [Array] + attr_accessor :call_set_ids + + # The beginning of the window (0-based, inclusive) for which + # overlapping variants should be returned. If unspecified, defaults to 0. + # Corresponds to the JSON property `start` + # @return [Fixnum] + attr_accessor :start + + # Only return variants which have exactly this name. + # Corresponds to the JSON property `variantName` + # @return [String] + attr_accessor :variant_name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @reference_name = args[:reference_name] if args.key?(:reference_name) + @variant_set_ids = args[:variant_set_ids] if args.key?(:variant_set_ids) + @end = args[:end] if args.key?(:end) + @max_calls = args[:max_calls] if args.key?(:max_calls) + @page_token = args[:page_token] if args.key?(:page_token) + @page_size = args[:page_size] if args.key?(:page_size) + @call_set_ids = args[:call_set_ids] if args.key?(:call_set_ids) + @start = args[:start] if args.key?(:start) + @variant_name = args[:variant_name] if args.key?(:variant_name) end end @@ -1457,6 +2359,12 @@ module Google class SearchReadGroupSetsRequest include Google::Apis::Core::Hashable + # Restricts this query to read group sets within the given datasets. At least + # one ID must be provided. + # Corresponds to the JSON property `datasetIds` + # @return [Array] + attr_accessor :dataset_ids + # Only return read group sets for which a substring of the name matches this # string. # Corresponds to the JSON property `name` @@ -1476,22 +2384,16 @@ module Google # @return [Fixnum] attr_accessor :page_size - # Restricts this query to read group sets within the given datasets. At least - # one ID must be provided. - # Corresponds to the JSON property `datasetIds` - # @return [Array] - attr_accessor :dataset_ids - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @dataset_ids = args[:dataset_ids] if args.key?(:dataset_ids) @name = args[:name] if args.key?(:name) @page_token = args[:page_token] if args.key?(:page_token) @page_size = args[:page_size] if args.key?(:page_size) - @dataset_ids = args[:dataset_ids] if args.key?(:dataset_ids) end end @@ -1522,6 +2424,45 @@ module Google end end + # + class ClinicalCondition + include Google::Apis::Core::Hashable + + # A set of names for the condition. + # Corresponds to the JSON property `names` + # @return [Array] + attr_accessor :names + + # The OMIM id for this condition. + # Search for these IDs at http://omim.org/ + # Corresponds to the JSON property `omimId` + # @return [String] + attr_accessor :omim_id + + # The set of external IDs for this condition. + # Corresponds to the JSON property `externalIds` + # @return [Array] + attr_accessor :external_ids + + # The MedGen concept id associated with this gene. + # Search for these IDs at http://www.ncbi.nlm.nih.gov/medgen/ + # Corresponds to the JSON property `conceptId` + # @return [String] + attr_accessor :concept_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @names = args[:names] if args.key?(:names) + @omim_id = args[:omim_id] if args.key?(:omim_id) + @external_ids = args[:external_ids] if args.key?(:external_ids) + @concept_id = args[:concept_id] if args.key?(:concept_id) + end + end + # The read search response. class SearchReadsResponse include Google::Apis::Core::Hashable @@ -1552,60 +2493,10 @@ module Google end end - # - class ClinicalCondition - include Google::Apis::Core::Hashable - - # The MedGen concept id associated with this gene. - # Search for these IDs at http://www.ncbi.nlm.nih.gov/medgen/ - # Corresponds to the JSON property `conceptId` - # @return [String] - attr_accessor :concept_id - - # A set of names for the condition. - # Corresponds to the JSON property `names` - # @return [Array] - attr_accessor :names - - # The OMIM id for this condition. - # Search for these IDs at http://omim.org/ - # Corresponds to the JSON property `omimId` - # @return [String] - attr_accessor :omim_id - - # The set of external IDs for this condition. - # Corresponds to the JSON property `externalIds` - # @return [Array] - attr_accessor :external_ids - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @concept_id = args[:concept_id] if args.key?(:concept_id) - @names = args[:names] if args.key?(:names) - @omim_id = args[:omim_id] if args.key?(:omim_id) - @external_ids = args[:external_ids] if args.key?(:external_ids) - end - end - # class Program include Google::Apis::Core::Hashable - # The user specified locally unique ID of the program. Used along with - # `prevProgramId` to define an ordering between programs. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The version of the program run. - # Corresponds to the JSON property `version` - # @return [String] - attr_accessor :version - # The display name of the program. This is typically the colloquial name of # the tool used, for example 'bwa' or 'picard'. # Corresponds to the JSON property `name` @@ -1622,17 +2513,28 @@ module Google # @return [String] attr_accessor :prev_program_id + # The user specified locally unique ID of the program. Used along with + # `prevProgramId` to define an ordering between programs. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # The version of the program run. + # Corresponds to the JSON property `version` + # @return [String] + attr_accessor :version + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @id = args[:id] if args.key?(:id) - @version = args[:version] if args.key?(:version) @name = args[:name] if args.key?(:name) @command_line = args[:command_line] if args.key?(:command_line) @prev_program_id = args[:prev_program_id] if args.key?(:prev_program_id) + @id = args[:id] if args.key?(:id) + @version = args[:version] if args.key?(:version) end end @@ -1641,25 +2543,25 @@ module Google class CoverageBucket include Google::Apis::Core::Hashable - # A 0-based half-open genomic coordinate range for search requests. - # Corresponds to the JSON property `range` - # @return [Google::Apis::GenomicsV1::Range] - attr_accessor :range - # The average number of reads which are aligned to each individual # reference base in this bucket. # Corresponds to the JSON property `meanCoverage` # @return [Float] attr_accessor :mean_coverage + # A 0-based half-open genomic coordinate range for search requests. + # Corresponds to the JSON property `range` + # @return [Google::Apis::GenomicsV1::Range] + attr_accessor :range + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @range = args[:range] if args.key?(:range) @mean_coverage = args[:mean_coverage] if args.key?(:mean_coverage) + @range = args[:range] if args.key?(:range) end end @@ -1668,16 +2570,6 @@ module Google class ComputeEngine include Google::Apis::Core::Hashable - # The instance on which the operation is running. - # Corresponds to the JSON property `instanceName` - # @return [String] - attr_accessor :instance_name - - # The availability zone in which the instance resides. - # Corresponds to the JSON property `zone` - # @return [String] - attr_accessor :zone - # The machine type of the instance. # Corresponds to the JSON property `machineType` # @return [String] @@ -1688,16 +2580,26 @@ module Google # @return [Array] attr_accessor :disk_names + # The instance on which the operation is running. + # Corresponds to the JSON property `instanceName` + # @return [String] + attr_accessor :instance_name + + # The availability zone in which the instance resides. + # Corresponds to the JSON property `zone` + # @return [String] + attr_accessor :zone + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @instance_name = args[:instance_name] if args.key?(:instance_name) - @zone = args[:zone] if args.key?(:zone) @machine_type = args[:machine_type] if args.key?(:machine_type) @disk_names = args[:disk_names] if args.key?(:disk_names) + @instance_name = args[:instance_name] if args.key?(:instance_name) + @zone = args[:zone] if args.key?(:zone) end end @@ -1705,24 +2607,24 @@ module Google class ExternalId include Google::Apis::Core::Hashable - # The id used by the source of this data. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - # The name of the source of this data. # Corresponds to the JSON property `sourceName` # @return [String] attr_accessor :source_name + # The id used by the source of this data. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @id = args[:id] if args.key?(:id) @source_name = args[:source_name] if args.key?(:source_name) + @id = args[:id] if args.key?(:id) end end @@ -1735,17 +2637,23 @@ module Google class Reference include Google::Apis::Core::Hashable - # The URI from which the sequence was obtained. Typically specifies a FASTA - # format file. - # Corresponds to the JSON property `sourceUri` - # @return [String] - attr_accessor :source_uri + # All known corresponding accession IDs in INSDC (GenBank/ENA/DDBJ) ideally + # with a version number, for example `GCF_000001405.26`. + # Corresponds to the JSON property `sourceAccessions` + # @return [Array] + attr_accessor :source_accessions # ID from http://www.ncbi.nlm.nih.gov/taxonomy. For example, 9606 for human. # Corresponds to the JSON property `ncbiTaxonId` # @return [Fixnum] attr_accessor :ncbi_taxon_id + # The URI from which the sequence was obtained. Typically specifies a FASTA + # format file. + # Corresponds to the JSON property `sourceUri` + # @return [String] + attr_accessor :source_uri + # The name of this reference, for example `22`. # Corresponds to the JSON property `name` # @return [String] @@ -1768,25 +2676,19 @@ module Google # @return [Fixnum] attr_accessor :length - # All known corresponding accession IDs in INSDC (GenBank/ENA/DDBJ) ideally - # with a version number, for example `GCF_000001405.26`. - # Corresponds to the JSON property `sourceAccessions` - # @return [Array] - attr_accessor :source_accessions - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @source_uri = args[:source_uri] if args.key?(:source_uri) + @source_accessions = args[:source_accessions] if args.key?(:source_accessions) @ncbi_taxon_id = args[:ncbi_taxon_id] if args.key?(:ncbi_taxon_id) + @source_uri = args[:source_uri] if args.key?(:source_uri) @name = args[:name] if args.key?(:name) @md5checksum = args[:md5checksum] if args.key?(:md5checksum) @id = args[:id] if args.key?(:id) @length = args[:length] if args.key?(:length) - @source_accessions = args[:source_accessions] if args.key?(:source_accessions) end end @@ -1797,11 +2699,15 @@ module Google class VariantSetMetadata include Google::Apis::Core::Hashable - # The type of data. Possible types include: Integer, Float, - # Flag, Character, and String. - # Corresponds to the JSON property `type` + # The top-level key. + # Corresponds to the JSON property `key` # @return [String] - attr_accessor :type + attr_accessor :key + + # A textual description of this metadata. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description # Remaining structured metadata key-value pairs. This must be of the form # map (string key mapping to a list of string values). @@ -1809,6 +2715,12 @@ module Google # @return [Hash>] attr_accessor :info + # The type of data. Possible types include: Integer, Float, + # Flag, Character, and String. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + # The value field for simple metadata # Corresponds to the JSON property `value` # @return [String] @@ -1827,29 +2739,19 @@ module Google # @return [String] attr_accessor :number - # The top-level key. - # Corresponds to the JSON property `key` - # @return [String] - attr_accessor :key - - # A textual description of this metadata. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @type = args[:type] if args.key?(:type) + @key = args[:key] if args.key?(:key) + @description = args[:description] if args.key?(:description) @info = args[:info] if args.key?(:info) + @type = args[:type] if args.key?(:type) @value = args[:value] if args.key?(:value) @id = args[:id] if args.key?(:id) @number = args[:number] if args.key?(:number) - @key = args[:key] if args.key?(:key) - @description = args[:description] if args.key?(:description) end end @@ -1857,12 +2759,6 @@ module Google class SearchVariantSetsRequest include Google::Apis::Core::Hashable - # Exactly one dataset ID must be provided here. Only variant sets which - # belong to this dataset will be returned. - # Corresponds to the JSON property `datasetIds` - # @return [Array] - attr_accessor :dataset_ids - # The continuation token, which is used to page through large result sets. # To get the next page of results, set this parameter to the value of # `nextPageToken` from the previous response. @@ -1876,15 +2772,21 @@ module Google # @return [Fixnum] attr_accessor :page_size + # Exactly one dataset ID must be provided here. Only variant sets which + # belong to this dataset will be returned. + # Corresponds to the JSON property `datasetIds` + # @return [Array] + attr_accessor :dataset_ids + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @dataset_ids = args[:dataset_ids] if args.key?(:dataset_ids) @page_token = args[:page_token] if args.key?(:page_token) @page_size = args[:page_size] if args.key?(:page_size) + @dataset_ids = args[:dataset_ids] if args.key?(:dataset_ids) end end @@ -1892,12 +2794,6 @@ module Google class SearchReferenceSetsRequest include Google::Apis::Core::Hashable - # If present, return reference sets for which the - # md5checksum matches exactly. - # Corresponds to the JSON property `md5checksums` - # @return [Array] - attr_accessor :md5checksums - # If present, return reference sets for which a prefix of any of # sourceAccessions # match any of these strings. Accession numbers typically have a main number @@ -1925,17 +2821,23 @@ module Google # @return [String] attr_accessor :assembly_id + # If present, return reference sets for which the + # md5checksum matches exactly. + # Corresponds to the JSON property `md5checksums` + # @return [Array] + attr_accessor :md5checksums + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @md5checksums = args[:md5checksums] if args.key?(:md5checksums) @accessions = args[:accessions] if args.key?(:accessions) @page_token = args[:page_token] if args.key?(:page_token) @page_size = args[:page_size] if args.key?(:page_size) @assembly_id = args[:assembly_id] if args.key?(:assembly_id) + @md5checksums = args[:md5checksums] if args.key?(:md5checksums) end end @@ -1987,12 +2889,6 @@ module Google class MergeVariantsRequest include Google::Apis::Core::Hashable - # A mapping between info field keys and the InfoMergeOperations to - # be performed on them. - # Corresponds to the JSON property `infoMergeConfig` - # @return [Hash] - attr_accessor :info_merge_config - # The destination variant set. # Corresponds to the JSON property `variantSetId` # @return [String] @@ -2003,15 +2899,21 @@ module Google # @return [Array] attr_accessor :variants + # A mapping between info field keys and the InfoMergeOperations to + # be performed on them. + # Corresponds to the JSON property `infoMergeConfig` + # @return [Hash] + attr_accessor :info_merge_config + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @info_merge_config = args[:info_merge_config] if args.key?(:info_merge_config) @variant_set_id = args[:variant_set_id] if args.key?(:variant_set_id) @variants = args[:variants] if args.key?(:variants) + @info_merge_config = args[:info_merge_config] if args.key?(:info_merge_config) end end @@ -2090,52 +2992,6 @@ module Google class Read include Google::Apis::Core::Hashable - # The orientation and the distance between reads from the fragment are - # consistent with the sequencing protocol (SAM flag 0x2). - # Corresponds to the JSON property `properPlacement` - # @return [Boolean] - attr_accessor :proper_placement - alias_method :proper_placement?, :proper_placement - - # Whether this alignment is supplementary. Equivalent to SAM flag 0x800. - # Supplementary alignments are used in the representation of a chimeric - # alignment. In a chimeric alignment, a read is split into multiple - # linear alignments that map to different reference contigs. The first - # linear alignment in the read will be designated as the representative - # alignment; the remaining linear alignments will be designated as - # supplementary alignments. These alignments may have different mapping - # quality scores. In each linear alignment in a chimeric alignment, the read - # will be hard clipped. The `alignedSequence` and - # `alignedQuality` fields in the alignment record will only - # represent the bases for its respective linear alignment. - # Corresponds to the JSON property `supplementaryAlignment` - # @return [Boolean] - attr_accessor :supplementary_alignment - alias_method :supplementary_alignment?, :supplementary_alignment - - # The observed length of the fragment, equivalent to TLEN in SAM. - # Corresponds to the JSON property `fragmentLength` - # @return [Fixnum] - attr_accessor :fragment_length - - # Whether this read did not pass filters, such as platform or vendor quality - # controls (SAM flag 0x200). - # Corresponds to the JSON property `failedVendorQualityChecks` - # @return [Boolean] - attr_accessor :failed_vendor_quality_checks - alias_method :failed_vendor_quality_checks?, :failed_vendor_quality_checks - - # The quality of the read sequence contained in this alignment record - # (equivalent to QUAL in SAM). - # `alignedSequence` and `alignedQuality` may be shorter than the full read - # sequence and quality. This will occur if the alignment is part of a - # chimeric alignment, or if the read was trimmed. When this occurs, the CIGAR - # for this read will begin/end with a hard clip operator that will indicate - # the length of the excised sequence. - # Corresponds to the JSON property `alignedQuality` - # @return [Array] - attr_accessor :aligned_quality - # A linear alignment can be represented by one CIGAR string. Describes the # mapped position and local alignment of the read to the reference. # Corresponds to the JSON property `alignment` @@ -2187,6 +3043,14 @@ module Google # @return [Fixnum] attr_accessor :read_number + # The ID of the read group this read belongs to. A read belongs to exactly + # one read group. This is a server-generated ID which is distinct from SAM's + # RG tag (for that value, see + # ReadGroup.name). + # Corresponds to the JSON property `readGroupId` + # @return [String] + attr_accessor :read_group_id + # The bases of the read sequence contained in this alignment record, # **without CIGAR operations applied** (equivalent to SEQ in SAM). # `alignedSequence` and `alignedQuality` may be @@ -2198,13 +3062,11 @@ module Google # @return [String] attr_accessor :aligned_sequence - # The ID of the read group this read belongs to. A read belongs to exactly - # one read group. This is a server-generated ID which is distinct from SAM's - # RG tag (for that value, see - # ReadGroup.name). - # Corresponds to the JSON property `readGroupId` - # @return [String] - attr_accessor :read_group_id + # A map of additional read alignment information. This must be of the form + # map (string key mapping to a list of string values). + # Corresponds to the JSON property `info` + # @return [Hash>] + attr_accessor :info # An abstraction for referring to a genomic position, in relation to some # already known reference. For now, represents a genomic position as a @@ -2214,11 +3076,51 @@ module Google # @return [Google::Apis::GenomicsV1::Position] attr_accessor :next_mate_position - # A map of additional read alignment information. This must be of the form - # map (string key mapping to a list of string values). - # Corresponds to the JSON property `info` - # @return [Hash>] - attr_accessor :info + # Whether this alignment is supplementary. Equivalent to SAM flag 0x800. + # Supplementary alignments are used in the representation of a chimeric + # alignment. In a chimeric alignment, a read is split into multiple + # linear alignments that map to different reference contigs. The first + # linear alignment in the read will be designated as the representative + # alignment; the remaining linear alignments will be designated as + # supplementary alignments. These alignments may have different mapping + # quality scores. In each linear alignment in a chimeric alignment, the read + # will be hard clipped. The `alignedSequence` and + # `alignedQuality` fields in the alignment record will only + # represent the bases for its respective linear alignment. + # Corresponds to the JSON property `supplementaryAlignment` + # @return [Boolean] + attr_accessor :supplementary_alignment + alias_method :supplementary_alignment?, :supplementary_alignment + + # The orientation and the distance between reads from the fragment are + # consistent with the sequencing protocol (SAM flag 0x2). + # Corresponds to the JSON property `properPlacement` + # @return [Boolean] + attr_accessor :proper_placement + alias_method :proper_placement?, :proper_placement + + # The observed length of the fragment, equivalent to TLEN in SAM. + # Corresponds to the JSON property `fragmentLength` + # @return [Fixnum] + attr_accessor :fragment_length + + # Whether this read did not pass filters, such as platform or vendor quality + # controls (SAM flag 0x200). + # Corresponds to the JSON property `failedVendorQualityChecks` + # @return [Boolean] + attr_accessor :failed_vendor_quality_checks + alias_method :failed_vendor_quality_checks?, :failed_vendor_quality_checks + + # The quality of the read sequence contained in this alignment record + # (equivalent to QUAL in SAM). + # `alignedSequence` and `alignedQuality` may be shorter than the full read + # sequence and quality. This will occur if the alignment is part of a + # chimeric alignment, or if the read was trimmed. When this occurs, the CIGAR + # for this read will begin/end with a hard clip operator that will indicate + # the length of the excised sequence. + # Corresponds to the JSON property `alignedQuality` + # @return [Array] + attr_accessor :aligned_quality def initialize(**args) update!(**args) @@ -2226,11 +3128,6 @@ module Google # Update properties of this object def update!(**args) - @proper_placement = args[:proper_placement] if args.key?(:proper_placement) - @supplementary_alignment = args[:supplementary_alignment] if args.key?(:supplementary_alignment) - @fragment_length = args[:fragment_length] if args.key?(:fragment_length) - @failed_vendor_quality_checks = args[:failed_vendor_quality_checks] if args.key?(:failed_vendor_quality_checks) - @aligned_quality = args[:aligned_quality] if args.key?(:aligned_quality) @alignment = args[:alignment] if args.key?(:alignment) @number_reads = args[:number_reads] if args.key?(:number_reads) @id = args[:id] if args.key?(:id) @@ -2239,10 +3136,15 @@ module Google @read_group_set_id = args[:read_group_set_id] if args.key?(:read_group_set_id) @duplicate_fragment = args[:duplicate_fragment] if args.key?(:duplicate_fragment) @read_number = args[:read_number] if args.key?(:read_number) - @aligned_sequence = args[:aligned_sequence] if args.key?(:aligned_sequence) @read_group_id = args[:read_group_id] if args.key?(:read_group_id) - @next_mate_position = args[:next_mate_position] if args.key?(:next_mate_position) + @aligned_sequence = args[:aligned_sequence] if args.key?(:aligned_sequence) @info = args[:info] if args.key?(:info) + @next_mate_position = args[:next_mate_position] if args.key?(:next_mate_position) + @supplementary_alignment = args[:supplementary_alignment] if args.key?(:supplementary_alignment) + @proper_placement = args[:proper_placement] if args.key?(:proper_placement) + @fragment_length = args[:fragment_length] if args.key?(:fragment_length) + @failed_vendor_quality_checks = args[:failed_vendor_quality_checks] if args.key?(:failed_vendor_quality_checks) + @aligned_quality = args[:aligned_quality] if args.key?(:aligned_quality) end end @@ -2322,24 +3224,10 @@ module Google class ReferenceSet include Google::Apis::Core::Hashable - # Order-independent MD5 checksum which identifies this reference set. The - # checksum is computed by sorting all lower case hexidecimal string - # `reference.md5checksum` (for all reference in this set) in - # ascending lexicographic order, concatenating, and taking the MD5 of that - # value. The resulting value is represented in lower case hexadecimal format. - # Corresponds to the JSON property `md5checksum` + # Free text description of this reference set. + # Corresponds to the JSON property `description` # @return [String] - attr_accessor :md5checksum - - # Public id of this reference set, such as `GRCh37`. - # Corresponds to the JSON property `assemblyId` - # @return [String] - attr_accessor :assembly_id - - # The server-generated reference set ID, unique across all reference sets. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id + attr_accessor :description # All known corresponding accession IDs in INSDC (GenBank/ENA/DDBJ) ideally # with a version number, for example `NC_000001.11`. @@ -2347,16 +3235,6 @@ module Google # @return [Array] attr_accessor :source_accessions - # Free text description of this reference set. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # The URI from which the references were obtained. - # Corresponds to the JSON property `sourceUri` - # @return [String] - attr_accessor :source_uri - # ID from http://www.ncbi.nlm.nih.gov/taxonomy (for example, 9606 for human) # indicating the species which this reference set is intended to model. Note # that contained references may specify a different `ncbiTaxonId`, as @@ -2366,26 +3244,50 @@ module Google # @return [Fixnum] attr_accessor :ncbi_taxon_id + # The URI from which the references were obtained. + # Corresponds to the JSON property `sourceUri` + # @return [String] + attr_accessor :source_uri + # The IDs of the reference objects that are part of this set. # `Reference.md5checksum` must be unique within this set. # Corresponds to the JSON property `referenceIds` # @return [Array] attr_accessor :reference_ids + # Public id of this reference set, such as `GRCh37`. + # Corresponds to the JSON property `assemblyId` + # @return [String] + attr_accessor :assembly_id + + # Order-independent MD5 checksum which identifies this reference set. The + # checksum is computed by sorting all lower case hexidecimal string + # `reference.md5checksum` (for all reference in this set) in + # ascending lexicographic order, concatenating, and taking the MD5 of that + # value. The resulting value is represented in lower case hexadecimal format. + # Corresponds to the JSON property `md5checksum` + # @return [String] + attr_accessor :md5checksum + + # The server-generated reference set ID, unique across all reference sets. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @md5checksum = args[:md5checksum] if args.key?(:md5checksum) - @assembly_id = args[:assembly_id] if args.key?(:assembly_id) - @id = args[:id] if args.key?(:id) - @source_accessions = args[:source_accessions] if args.key?(:source_accessions) @description = args[:description] if args.key?(:description) - @source_uri = args[:source_uri] if args.key?(:source_uri) + @source_accessions = args[:source_accessions] if args.key?(:source_accessions) @ncbi_taxon_id = args[:ncbi_taxon_id] if args.key?(:ncbi_taxon_id) + @source_uri = args[:source_uri] if args.key?(:source_uri) @reference_ids = args[:reference_ids] if args.key?(:reference_ids) + @assembly_id = args[:assembly_id] if args.key?(:assembly_id) + @md5checksum = args[:md5checksum] if args.key?(:md5checksum) + @id = args[:id] if args.key?(:id) end end @@ -2394,6 +3296,11 @@ module Google class Transcript include Google::Apis::Core::Hashable + # The annotation ID of the gene from which this transcript is transcribed. + # Corresponds to the JSON property `geneId` + # @return [String] + attr_accessor :gene_id + # The exons that compose # this transcript. This field should be unset for genomes where transcript # splicing does not occur, for example prokaryotes. @@ -2425,20 +3332,15 @@ module Google # @return [Google::Apis::GenomicsV1::CodingSequence] attr_accessor :coding_sequence - # The annotation ID of the gene from which this transcript is transcribed. - # Corresponds to the JSON property `geneId` - # @return [String] - attr_accessor :gene_id - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @gene_id = args[:gene_id] if args.key?(:gene_id) @exons = args[:exons] if args.key?(:exons) @coding_sequence = args[:coding_sequence] if args.key?(:coding_sequence) - @gene_id = args[:gene_id] if args.key?(:gene_id) end end @@ -2448,33 +3350,6 @@ module Google class AnnotationSet include Google::Apis::Core::Hashable - # The display name for this annotation set. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The ID of the reference set that defines the coordinate space for this - # set's annotations. - # Corresponds to the JSON property `referenceSetId` - # @return [String] - attr_accessor :reference_set_id - - # The type of annotations contained within this set. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # A map of additional read alignment information. This must be of the form - # map (string key mapping to a list of string values). - # Corresponds to the JSON property `info` - # @return [Hash>] - attr_accessor :info - - # The server-generated annotation set ID, unique across all annotation sets. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - # The source URI describing the file from which this annotation set was # generated, if any. # Corresponds to the JSON property `sourceUri` @@ -2486,19 +3361,46 @@ module Google # @return [String] attr_accessor :dataset_id + # The display name for this annotation set. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The ID of the reference set that defines the coordinate space for this + # set's annotations. + # Corresponds to the JSON property `referenceSetId` + # @return [String] + attr_accessor :reference_set_id + + # A map of additional read alignment information. This must be of the form + # map (string key mapping to a list of string values). + # Corresponds to the JSON property `info` + # @return [Hash>] + attr_accessor :info + + # The type of annotations contained within this set. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # The server-generated annotation set ID, unique across all annotation sets. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @name = args[:name] if args.key?(:name) - @reference_set_id = args[:reference_set_id] if args.key?(:reference_set_id) - @type = args[:type] if args.key?(:type) - @info = args[:info] if args.key?(:info) - @id = args[:id] if args.key?(:id) @source_uri = args[:source_uri] if args.key?(:source_uri) @dataset_id = args[:dataset_id] if args.key?(:dataset_id) + @name = args[:name] if args.key?(:name) + @reference_set_id = args[:reference_set_id] if args.key?(:reference_set_id) + @info = args[:info] if args.key?(:info) + @type = args[:type] if args.key?(:type) + @id = args[:id] if args.key?(:id) end end @@ -2506,6 +3408,11 @@ module Google class Experiment include Google::Apis::Core::Hashable + # The sequencing center used as part of this experiment. + # Corresponds to the JSON property `sequencingCenter` + # @return [String] + attr_accessor :sequencing_center + # The platform unit used as part of this experiment, for example # flowcell-barcode.lane for Illumina or slide for SOLiD. Corresponds to the # @RG PU field in the SAM spec. @@ -2527,21 +3434,16 @@ module Google # @return [String] attr_accessor :instrument_model - # The sequencing center used as part of this experiment. - # Corresponds to the JSON property `sequencingCenter` - # @return [String] - attr_accessor :sequencing_center - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @sequencing_center = args[:sequencing_center] if args.key?(:sequencing_center) @platform_unit = args[:platform_unit] if args.key?(:platform_unit) @library_id = args[:library_id] if args.key?(:library_id) @instrument_model = args[:instrument_model] if args.key?(:instrument_model) - @sequencing_center = args[:sequencing_center] if args.key?(:sequencing_center) end end @@ -2571,908 +3473,6 @@ module Google @next_page_token = args[:next_page_token] if args.key?(:next_page_token) end end - - # Request message for `TestIamPermissions` method. - class TestIamPermissionsRequest - include Google::Apis::Core::Hashable - - # REQUIRED: The set of permissions to check for the 'resource'. - # Permissions with wildcards (such as '*' or 'storage.*') are not allowed. - # Allowed permissions are: - # * `genomics.datasets.create` - # * `genomics.datasets.delete` - # * `genomics.datasets.get` - # * `genomics.datasets.list` - # * `genomics.datasets.update` - # * `genomics.datasets.getIamPolicy` - # * `genomics.datasets.setIamPolicy` - # Corresponds to the JSON property `permissions` - # @return [Array] - 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 - - # - class Exon - include Google::Apis::Core::Hashable - - # The start position of the exon on this annotation's reference sequence, - # 0-based inclusive. Note that this is relative to the reference start, and - # **not** the containing annotation start. - # Corresponds to the JSON property `start` - # @return [Fixnum] - attr_accessor :start - - # The end position of the exon on this annotation's reference sequence, - # 0-based exclusive. Note that this is relative to the reference start, and - # *not* the containing annotation start. - # Corresponds to the JSON property `end` - # @return [Fixnum] - attr_accessor :end - - # The frame of this exon. Contains a value of 0, 1, or 2, which indicates - # the offset of the first coding base of the exon within the reading frame - # of the coding DNA sequence, if any. This field is dependent on the - # strandedness of this annotation (see - # Annotation.reverse_strand). - # For forward stranded annotations, this offset is relative to the - # exon.start. For reverse - # strand annotations, this offset is relative to the - # exon.end `- 1`. - # Unset if this exon does not intersect the coding sequence. Upon creation - # of a transcript, the frame must be populated for all or none of the - # coding exons. - # Corresponds to the JSON property `frame` - # @return [Fixnum] - attr_accessor :frame - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @start = args[:start] if args.key?(:start) - @end = args[:end] if args.key?(:end) - @frame = args[:frame] if args.key?(:frame) - end - end - - # The read group set export request. - class ExportReadGroupSetRequest - include Google::Apis::Core::Hashable - - # Required. The Google Cloud project ID that owns this - # export. The caller must have WRITE access to this project. - # Corresponds to the JSON property `projectId` - # @return [String] - attr_accessor :project_id - - # Required. A Google Cloud Storage URI for the exported BAM file. - # The currently authenticated user must have write access to the new file. - # An error will be returned if the URI already contains data. - # Corresponds to the JSON property `exportUri` - # @return [String] - attr_accessor :export_uri - - # The reference names to export. If this is not specified, all reference - # sequences, including unmapped reads, are exported. - # Use `*` to export only unmapped reads. - # Corresponds to the JSON property `referenceNames` - # @return [Array] - attr_accessor :reference_names - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @project_id = args[:project_id] if args.key?(:project_id) - @export_uri = args[:export_uri] if args.key?(:export_uri) - @reference_names = args[:reference_names] if args.key?(:reference_names) - end - end - - # A call set is a collection of variant calls, typically for one sample. It - # belongs to a variant set. - # For more genomics resource definitions, see [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - class CallSet - include Google::Apis::Core::Hashable - - # The call set name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # A map of additional call set information. This must be of the form - # map (string key mapping to a list of string values). - # Corresponds to the JSON property `info` - # @return [Hash>] - attr_accessor :info - - # The IDs of the variant sets this call set belongs to. This field must - # have exactly length one, as a call set belongs to a single variant set. - # This field is repeated for compatibility with the - # [GA4GH 0.5.1 - # API](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/ - # variants.avdl#L76). - # Corresponds to the JSON property `variantSetIds` - # @return [Array] - attr_accessor :variant_set_ids - - # The server-generated call set ID, unique across all call sets. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The date this call set was created in milliseconds from the epoch. - # Corresponds to the JSON property `created` - # @return [Fixnum] - attr_accessor :created - - # The sample ID this call set corresponds to. - # Corresponds to the JSON property `sampleId` - # @return [String] - attr_accessor :sample_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @name = args[:name] if args.key?(:name) - @info = args[:info] if args.key?(:info) - @variant_set_ids = args[:variant_set_ids] if args.key?(:variant_set_ids) - @id = args[:id] if args.key?(:id) - @created = args[:created] if args.key?(:created) - @sample_id = args[:sample_id] if args.key?(:sample_id) - end - end - - # - class SearchAnnotationSetsResponse - include Google::Apis::Core::Hashable - - # The continuation token, which is used to page through large result sets. - # Provide this value in a subsequent request to return the next page of - # results. This field will be empty if there aren't any additional results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # The matching annotation sets. - # Corresponds to the JSON property `annotationSets` - # @return [Array] - attr_accessor :annotation_sets - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @annotation_sets = args[:annotation_sets] if args.key?(:annotation_sets) - end - end - - # The variant data import request. - class ImportVariantsRequest - include Google::Apis::Core::Hashable - - # Convert reference names to the canonical representation. - # hg19 haploytypes (those reference names containing "_hap") - # are not modified in any way. - # All other reference names are modified according to the following rules: - # The reference name is capitalized. - # The "chr" prefix is dropped for all autosomes and sex chromsomes. - # For example "chr17" becomes "17" and "chrX" becomes "X". - # All mitochondrial chromosomes ("chrM", "chrMT", etc) become "MT". - # Corresponds to the JSON property `normalizeReferenceNames` - # @return [Boolean] - attr_accessor :normalize_reference_names - alias_method :normalize_reference_names?, :normalize_reference_names - - # The format of the variant data being imported. If unspecified, defaults to - # to `VCF`. - # Corresponds to the JSON property `format` - # @return [String] - attr_accessor :format - - # A mapping between info field keys and the InfoMergeOperations to - # be performed on them. This is plumbed down to the MergeVariantRequests - # generated by the resulting import job. - # Corresponds to the JSON property `infoMergeConfig` - # @return [Hash] - attr_accessor :info_merge_config - - # Required. The variant set to which variant data should be imported. - # Corresponds to the JSON property `variantSetId` - # @return [String] - attr_accessor :variant_set_id - - # A list of URIs referencing variant files in Google Cloud Storage. URIs can - # include wildcards [as described - # here](https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames). - # Note that recursive wildcards ('**') are not supported. - # Corresponds to the JSON property `sourceUris` - # @return [Array] - attr_accessor :source_uris - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @normalize_reference_names = args[:normalize_reference_names] if args.key?(:normalize_reference_names) - @format = args[:format] if args.key?(:format) - @info_merge_config = args[:info_merge_config] if args.key?(:info_merge_config) - @variant_set_id = args[:variant_set_id] if args.key?(:variant_set_id) - @source_uris = args[:source_uris] if args.key?(:source_uris) - end - end - - # - class VariantAnnotation - include Google::Apis::Core::Hashable - - # The alternate allele for this variant. If multiple alternate alleles - # exist at this location, create a separate variant for each one, as they - # may represent distinct conditions. - # Corresponds to the JSON property `alternateBases` - # @return [String] - attr_accessor :alternate_bases - - # Google annotation ID of the gene affected by this variant. This should - # be provided when the variant is created. - # Corresponds to the JSON property `geneId` - # @return [String] - attr_accessor :gene_id - - # Describes the clinical significance of a variant. - # It is adapted from the ClinVar controlled vocabulary for clinical - # significance described at: - # http://www.ncbi.nlm.nih.gov/clinvar/docs/clinsig/ - # Corresponds to the JSON property `clinicalSignificance` - # @return [String] - attr_accessor :clinical_significance - - # The set of conditions associated with this variant. - # A condition describes the way a variant influences human health. - # Corresponds to the JSON property `conditions` - # @return [Array] - attr_accessor :conditions - - # Effect of the variant on the coding sequence. - # Corresponds to the JSON property `effect` - # @return [String] - attr_accessor :effect - - # Google annotation IDs of the transcripts affected by this variant. These - # should be provided when the variant is created. - # Corresponds to the JSON property `transcriptIds` - # @return [Array] - attr_accessor :transcript_ids - - # Type has been adapted from ClinVar's list of variant types. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @alternate_bases = args[:alternate_bases] if args.key?(:alternate_bases) - @gene_id = args[:gene_id] if args.key?(:gene_id) - @clinical_significance = args[:clinical_significance] if args.key?(:clinical_significance) - @conditions = args[:conditions] if args.key?(:conditions) - @effect = args[:effect] if args.key?(:effect) - @transcript_ids = args[:transcript_ids] if args.key?(:transcript_ids) - @type = args[:type] if args.key?(:type) - end - end - - # - class ListCoverageBucketsResponse - include Google::Apis::Core::Hashable - - # The length of each coverage bucket in base pairs. Note that buckets at the - # end of a reference sequence may be shorter. This value is omitted if the - # bucket width is infinity (the default behaviour, with no range or - # `targetBucketWidth`). - # Corresponds to the JSON property `bucketWidth` - # @return [Fixnum] - attr_accessor :bucket_width - - # The coverage buckets. The list of buckets is sparse; a bucket with 0 - # overlapping reads is not returned. A bucket never crosses more than one - # reference sequence. Each bucket has width `bucketWidth`, unless - # its end is the end of the reference sequence. - # Corresponds to the JSON property `coverageBuckets` - # @return [Array] - attr_accessor :coverage_buckets - - # The continuation token, which is used to page through large result sets. - # Provide this value in a subsequent request to return the next page of - # results. This field will be empty if there aren't any additional results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @bucket_width = args[:bucket_width] if args.key?(:bucket_width) - @coverage_buckets = args[:coverage_buckets] if args.key?(:coverage_buckets) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # The variant data export request. - class ExportVariantSetRequest - include Google::Apis::Core::Hashable - - # The format for the exported data. - # Corresponds to the JSON property `format` - # @return [String] - attr_accessor :format - - # Required. The BigQuery dataset to export data to. This dataset must already - # exist. Note that this is distinct from the Genomics concept of "dataset". - # Corresponds to the JSON property `bigqueryDataset` - # @return [String] - attr_accessor :bigquery_dataset - - # Required. The BigQuery table to export data to. - # If the table doesn't exist, it will be created. If it already exists, it - # will be overwritten. - # Corresponds to the JSON property `bigqueryTable` - # @return [String] - attr_accessor :bigquery_table - - # If provided, only variant call information from the specified call sets - # will be exported. By default all variant calls are exported. - # Corresponds to the JSON property `callSetIds` - # @return [Array] - attr_accessor :call_set_ids - - # Required. The Google Cloud project ID that owns the destination - # BigQuery dataset. The caller must have WRITE access to this project. This - # project will also own the resulting export job. - # Corresponds to the JSON property `projectId` - # @return [String] - attr_accessor :project_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @format = args[:format] if args.key?(:format) - @bigquery_dataset = args[:bigquery_dataset] if args.key?(:bigquery_dataset) - @bigquery_table = args[:bigquery_table] if args.key?(:bigquery_table) - @call_set_ids = args[:call_set_ids] if args.key?(:call_set_ids) - @project_id = args[:project_id] if args.key?(:project_id) - end - end - - # - class SearchAnnotationsRequest - include Google::Apis::Core::Hashable - - # The end position of the range on the reference, 0-based exclusive. If - # referenceId or - # referenceName - # must be specified, Defaults to the length of the reference. - # Corresponds to the JSON property `end` - # @return [Fixnum] - attr_accessor :end - - # The continuation token, which is used to page through large result sets. - # To get the next page of results, set this parameter to the value of - # `nextPageToken` from the previous response. - # Corresponds to the JSON property `pageToken` - # @return [String] - attr_accessor :page_token - - # The maximum number of results to return in a single page. If unspecified, - # defaults to 256. The maximum value is 2048. - # Corresponds to the JSON property `pageSize` - # @return [Fixnum] - attr_accessor :page_size - - # The start position of the range on the reference, 0-based inclusive. If - # specified, - # referenceId or - # referenceName - # must be specified. Defaults to 0. - # Corresponds to the JSON property `start` - # @return [Fixnum] - attr_accessor :start - - # Required. The annotation sets to search within. The caller must have - # `READ` access to these annotation sets. - # All queried annotation sets must have the same type. - # Corresponds to the JSON property `annotationSetIds` - # @return [Array] - attr_accessor :annotation_set_ids - - # The name of the reference to query, within the reference set associated - # with this query. - # Corresponds to the JSON property `referenceName` - # @return [String] - attr_accessor :reference_name - - # The ID of the reference to query. - # Corresponds to the JSON property `referenceId` - # @return [String] - attr_accessor :reference_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @end = args[:end] if args.key?(:end) - @page_token = args[:page_token] if args.key?(:page_token) - @page_size = args[:page_size] if args.key?(:page_size) - @start = args[:start] if args.key?(:start) - @annotation_set_ids = args[:annotation_set_ids] if args.key?(:annotation_set_ids) - @reference_name = args[:reference_name] if args.key?(:reference_name) - @reference_id = args[:reference_id] if args.key?(:reference_id) - end - end - - # An event that occurred during an Operation. - class OperationEvent - include Google::Apis::Core::Hashable - - # Optional time of when event started. - # Corresponds to the JSON property `startTime` - # @return [String] - attr_accessor :start_time - - # Required description of event. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Optional time of when event finished. An event can have a start time and no - # finish time. If an event has a finish time, there must be a start time. - # Corresponds to the JSON property `endTime` - # @return [String] - attr_accessor :end_time - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @start_time = args[:start_time] if args.key?(:start_time) - @description = args[:description] if args.key?(:description) - @end_time = args[:end_time] if args.key?(:end_time) - end - end - - # - class CodingSequence - include Google::Apis::Core::Hashable - - # The end of the coding sequence on this annotation's reference sequence, - # 0-based exclusive. Note that this position is relative to the reference - # start, and *not* the containing annotation start. - # Corresponds to the JSON property `end` - # @return [Fixnum] - attr_accessor :end - - # The start of the coding sequence on this annotation's reference sequence, - # 0-based inclusive. Note that this position is relative to the reference - # start, and *not* the containing annotation start. - # Corresponds to the JSON property `start` - # @return [Fixnum] - attr_accessor :start - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @end = args[:end] if args.key?(:end) - @start = args[:start] if args.key?(:start) - 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] - 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 - - # - class SearchReferencesResponse - include Google::Apis::Core::Hashable - - # The matching references. - # Corresponds to the JSON property `references` - # @return [Array] - attr_accessor :references - - # The continuation token, which is used to page through large result sets. - # Provide this value in a subsequent request to return the next page of - # results. This field will be empty if there aren't any additional results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @references = args[:references] if args.key?(:references) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # Request message for `GetIamPolicy` method. - class GetIamPolicyRequest - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # - class SearchAnnotationSetsRequest - include Google::Apis::Core::Hashable - - # The continuation token, which is used to page through large result sets. - # To get the next page of results, set this parameter to the value of - # `nextPageToken` from the previous response. - # Corresponds to the JSON property `pageToken` - # @return [String] - attr_accessor :page_token - - # The maximum number of results to return in a single page. If unspecified, - # defaults to 128. The maximum value is 1024. - # Corresponds to the JSON property `pageSize` - # @return [Fixnum] - attr_accessor :page_size - - # Required. The dataset IDs to search within. Caller must have `READ` access - # to these datasets. - # Corresponds to the JSON property `datasetIds` - # @return [Array] - attr_accessor :dataset_ids - - # If specified, only annotation sets that have any of these types are - # returned. - # Corresponds to the JSON property `types` - # @return [Array] - attr_accessor :types - - # Only return annotations sets for which a substring of the name matches this - # string (case insensitive). - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # If specified, only annotation sets associated with the given reference set - # are returned. - # Corresponds to the JSON property `referenceSetId` - # @return [String] - attr_accessor :reference_set_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @page_token = args[:page_token] if args.key?(:page_token) - @page_size = args[:page_size] if args.key?(:page_size) - @dataset_ids = args[:dataset_ids] if args.key?(:dataset_ids) - @types = args[:types] if args.key?(:types) - @name = args[:name] if args.key?(:name) - @reference_set_id = args[:reference_set_id] if args.key?(:reference_set_id) - end - end - - # The read group set search response. - class SearchReadGroupSetsResponse - include Google::Apis::Core::Hashable - - # The continuation token, which is used to page through large result sets. - # Provide this value in a subsequent request to return the next page of - # results. This field will be empty if there aren't any additional results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # The list of matching read group sets. - # Corresponds to the JSON property `readGroupSets` - # @return [Array] - attr_accessor :read_group_sets - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @read_group_sets = args[:read_group_sets] if args.key?(:read_group_sets) - end - end - - # A linear alignment can be represented by one CIGAR string. Describes the - # mapped position and local alignment of the read to the reference. - class LinearAlignment - include Google::Apis::Core::Hashable - - # The mapping quality of this alignment. Represents how likely - # the read maps to this position as opposed to other locations. - # Specifically, this is -10 log10 Pr(mapping position is wrong), rounded to - # the nearest integer. - # Corresponds to the JSON property `mappingQuality` - # @return [Fixnum] - attr_accessor :mapping_quality - - # An abstraction for referring to a genomic position, in relation to some - # already known reference. For now, represents a genomic position as a - # reference name, a base number on that reference (0-based), and a - # determination of forward or reverse strand. - # Corresponds to the JSON property `position` - # @return [Google::Apis::GenomicsV1::Position] - attr_accessor :position - - # Represents the local alignment of this sequence (alignment matches, indels, - # etc) against the reference. - # Corresponds to the JSON property `cigar` - # @return [Array] - attr_accessor :cigar - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @mapping_quality = args[:mapping_quality] if args.key?(:mapping_quality) - @position = args[:position] if args.key?(:position) - @cigar = args[:cigar] if args.key?(:cigar) - end - end - - # - class SearchReferencesRequest - include Google::Apis::Core::Hashable - - # If present, return references for which a prefix of any of - # sourceAccessions match - # any of these strings. Accession numbers typically have a main number and a - # version, for example `GCF_000001405.26`. - # Corresponds to the JSON property `accessions` - # @return [Array] - attr_accessor :accessions - - # The continuation token, which is used to page through large result sets. - # To get the next page of results, set this parameter to the value of - # `nextPageToken` from the previous response. - # Corresponds to the JSON property `pageToken` - # @return [String] - attr_accessor :page_token - - # If present, return only references which belong to this reference set. - # Corresponds to the JSON property `referenceSetId` - # @return [String] - attr_accessor :reference_set_id - - # The maximum number of results to return in a single page. If unspecified, - # defaults to 1024. The maximum value is 4096. - # Corresponds to the JSON property `pageSize` - # @return [Fixnum] - attr_accessor :page_size - - # If present, return references for which the - # md5checksum matches exactly. - # Corresponds to the JSON property `md5checksums` - # @return [Array] - attr_accessor :md5checksums - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @accessions = args[:accessions] if args.key?(:accessions) - @page_token = args[:page_token] if args.key?(:page_token) - @reference_set_id = args[:reference_set_id] if args.key?(:reference_set_id) - @page_size = args[:page_size] if args.key?(:page_size) - @md5checksums = args[:md5checksums] if args.key?(:md5checksums) - end - end - - # A Dataset is a collection of genomic data. - # For more genomics resource definitions, see [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - class Dataset - include Google::Apis::Core::Hashable - - # The Google Cloud project ID that this dataset belongs to. - # Corresponds to the JSON property `projectId` - # @return [String] - attr_accessor :project_id - - # The server-generated dataset ID, unique across all datasets. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The time this dataset was created, in seconds from the epoch. - # Corresponds to the JSON property `createTime` - # @return [String] - attr_accessor :create_time - - # The dataset name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @project_id = args[:project_id] if args.key?(:project_id) - @id = args[:id] if args.key?(:id) - @create_time = args[:create_time] if args.key?(:create_time) - @name = args[:name] if args.key?(:name) - end - end - - # The variant data import response. - class ImportVariantsResponse - include Google::Apis::Core::Hashable - - # IDs of the call sets created during the import. - # Corresponds to the JSON property `callSetIds` - # @return [Array] - attr_accessor :call_set_ids - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @call_set_ids = args[:call_set_ids] if args.key?(:call_set_ids) - end - end - - # A read group is all the data that's processed the same way by the sequencer. - class ReadGroup - include Google::Apis::Core::Hashable - - # The reference set the reads in this read group are aligned to. - # Corresponds to the JSON property `referenceSetId` - # @return [String] - attr_accessor :reference_set_id - - # A map of additional read group information. This must be of the form - # map (string key mapping to a list of string values). - # Corresponds to the JSON property `info` - # @return [Hash>] - attr_accessor :info - - # The server-generated read group ID, unique for all read groups. - # Note: This is different than the @RG ID field in the SAM spec. For that - # value, see name. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The predicted insert size of this read group. The insert size is the length - # the sequenced DNA fragment from end-to-end, not including the adapters. - # Corresponds to the JSON property `predictedInsertSize` - # @return [Fixnum] - attr_accessor :predicted_insert_size - - # The programs used to generate this read group. Programs are always - # identical for all read groups within a read group set. For this reason, - # only the first read group in a returned set will have this field - # populated. - # Corresponds to the JSON property `programs` - # @return [Array] - attr_accessor :programs - - # A free-form text description of this read group. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # A client-supplied sample identifier for the reads in this read group. - # Corresponds to the JSON property `sampleId` - # @return [String] - attr_accessor :sample_id - - # The dataset to which this read group belongs. - # Corresponds to the JSON property `datasetId` - # @return [String] - attr_accessor :dataset_id - - # The experiment used to generate this read group. - # Corresponds to the JSON property `experiment` - # @return [Google::Apis::GenomicsV1::Experiment] - attr_accessor :experiment - - # The read group name. This corresponds to the @RG ID field in the SAM spec. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @reference_set_id = args[:reference_set_id] if args.key?(:reference_set_id) - @info = args[:info] if args.key?(:info) - @id = args[:id] if args.key?(:id) - @predicted_insert_size = args[:predicted_insert_size] if args.key?(:predicted_insert_size) - @programs = args[:programs] if args.key?(:programs) - @description = args[:description] if args.key?(:description) - @sample_id = args[:sample_id] if args.key?(:sample_id) - @dataset_id = args[:dataset_id] if args.key?(:dataset_id) - @experiment = args[:experiment] if args.key?(:experiment) - @name = args[:name] if args.key?(:name) - end - end end end end diff --git a/generated/google/apis/genomics_v1/representations.rb b/generated/google/apis/genomics_v1/representations.rb index 23c1c453f..cedf798a3 100644 --- a/generated/google/apis/genomics_v1/representations.rb +++ b/generated/google/apis/genomics_v1/representations.rb @@ -22,6 +22,138 @@ module Google module Apis module GenomicsV1 + class TestIamPermissionsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Exon + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ExportReadGroupSetRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CallSet + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SearchAnnotationSetsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ImportVariantsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class VariantAnnotation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListCoverageBucketsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ExportVariantSetRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SearchAnnotationsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class OperationEvent + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CodingSequence + 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 GetIamPolicyRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SearchReferencesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SearchAnnotationSetsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SearchReadGroupSetsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class LinearAlignment + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SearchReferencesRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Dataset + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ImportVariantsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ReadGroup + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class ReadGroupSet class Representation < Google::Apis::Core::JsonRepresentation; end @@ -76,7 +208,7 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class Annotation + class SearchReadsRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -88,7 +220,7 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class SearchReadsRequest + class Annotation class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -160,25 +292,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class BatchCreateAnnotationsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class ReferenceBound class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class ListOperationsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Variant + class BatchCreateAnnotationsResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -190,7 +310,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class SearchVariantsRequest + class Variant + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListOperationsResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -202,6 +328,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class SearchVariantsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class SearchReadGroupSetsRequest class Representation < Google::Apis::Core::JsonRepresentation; end @@ -214,13 +346,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class SearchReadsResponse + class ClinicalCondition class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class ClinicalCondition + class SearchReadsResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -335,138 +467,214 @@ module Google end class TestIamPermissionsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :permissions, as: 'permissions' + end end class Exon - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :start, :numeric_string => true, as: 'start' + property :end, :numeric_string => true, as: 'end' + property :frame, as: 'frame' + end end class ExportReadGroupSetRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :export_uri, as: 'exportUri' + collection :reference_names, as: 'referenceNames' + property :project_id, as: 'projectId' + end end class CallSet - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + hash :info, as: 'info', :class => Array do + include Representable::JSON::Collection + items + end - include Google::Apis::Core::JsonObjectSupport + collection :variant_set_ids, as: 'variantSetIds' + property :id, as: 'id' + property :created, :numeric_string => true, as: 'created' + property :sample_id, as: 'sampleId' + property :name, as: 'name' + end end class SearchAnnotationSetsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :annotation_sets, as: 'annotationSets', class: Google::Apis::GenomicsV1::AnnotationSet, decorator: Google::Apis::GenomicsV1::AnnotationSet::Representation - include Google::Apis::Core::JsonObjectSupport + end end class ImportVariantsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + hash :info_merge_config, as: 'infoMergeConfig' + property :variant_set_id, as: 'variantSetId' + collection :source_uris, as: 'sourceUris' + property :normalize_reference_names, as: 'normalizeReferenceNames' + property :format, as: 'format' + end end class VariantAnnotation - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :effect, as: 'effect' + collection :transcript_ids, as: 'transcriptIds' + property :type, as: 'type' + property :alternate_bases, as: 'alternateBases' + property :gene_id, as: 'geneId' + property :clinical_significance, as: 'clinicalSignificance' + collection :conditions, as: 'conditions', class: Google::Apis::GenomicsV1::ClinicalCondition, decorator: Google::Apis::GenomicsV1::ClinicalCondition::Representation - include Google::Apis::Core::JsonObjectSupport + end end class ListCoverageBucketsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + property :bucket_width, :numeric_string => true, as: 'bucketWidth' + collection :coverage_buckets, as: 'coverageBuckets', class: Google::Apis::GenomicsV1::CoverageBucket, decorator: Google::Apis::GenomicsV1::CoverageBucket::Representation - include Google::Apis::Core::JsonObjectSupport + end end class ExportVariantSetRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :format, as: 'format' + property :bigquery_dataset, as: 'bigqueryDataset' + property :bigquery_table, as: 'bigqueryTable' + collection :call_set_ids, as: 'callSetIds' + property :project_id, as: 'projectId' + end end class SearchAnnotationsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :reference_id, as: 'referenceId' + property :end, :numeric_string => true, as: 'end' + property :page_token, as: 'pageToken' + property :page_size, as: 'pageSize' + property :start, :numeric_string => true, as: 'start' + collection :annotation_set_ids, as: 'annotationSetIds' + property :reference_name, as: 'referenceName' + end end class OperationEvent - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :end_time, as: 'endTime' + property :start_time, as: 'startTime' + property :description, as: 'description' + end end class CodingSequence - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :start, :numeric_string => true, as: 'start' + property :end, :numeric_string => true, as: 'end' + end end class TestIamPermissionsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SearchReferencesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :permissions, as: 'permissions' + end end class GetIamPolicyRequest - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end - include Google::Apis::Core::JsonObjectSupport + class SearchReferencesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :references, as: 'references', class: Google::Apis::GenomicsV1::Reference, decorator: Google::Apis::GenomicsV1::Reference::Representation + + property :next_page_token, as: 'nextPageToken' + end end class SearchAnnotationSetsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :dataset_ids, as: 'datasetIds' + collection :types, as: 'types' + property :name, as: 'name' + property :reference_set_id, as: 'referenceSetId' + property :page_token, as: 'pageToken' + property :page_size, as: 'pageSize' + end end class SearchReadGroupSetsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :read_group_sets, as: 'readGroupSets', class: Google::Apis::GenomicsV1::ReadGroupSet, decorator: Google::Apis::GenomicsV1::ReadGroupSet::Representation - include Google::Apis::Core::JsonObjectSupport + end end class LinearAlignment - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :position, as: 'position', class: Google::Apis::GenomicsV1::Position, decorator: Google::Apis::GenomicsV1::Position::Representation - include Google::Apis::Core::JsonObjectSupport + collection :cigar, as: 'cigar', class: Google::Apis::GenomicsV1::CigarUnit, decorator: Google::Apis::GenomicsV1::CigarUnit::Representation + + property :mapping_quality, as: 'mappingQuality' + end end class SearchReferencesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :md5checksums, as: 'md5checksums' + collection :accessions, as: 'accessions' + property :page_token, as: 'pageToken' + property :reference_set_id, as: 'referenceSetId' + property :page_size, as: 'pageSize' + end end class Dataset - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :id, as: 'id' + property :create_time, as: 'createTime' + property :name, as: 'name' + property :project_id, as: 'projectId' + end end class ImportVariantsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :call_set_ids, as: 'callSetIds' + end end class ReadGroup - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ReadGroupSet # @private class Representation < Google::Apis::Core::JsonRepresentation hash :info, as: 'info', :class => Array do @@ -475,21 +683,43 @@ module Google end property :id, as: 'id' - property :dataset_id, as: 'datasetId' - collection :read_groups, as: 'readGroups', class: Google::Apis::GenomicsV1::ReadGroup, decorator: Google::Apis::GenomicsV1::ReadGroup::Representation + collection :programs, as: 'programs', class: Google::Apis::GenomicsV1::Program, decorator: Google::Apis::GenomicsV1::Program::Representation + + property :predicted_insert_size, as: 'predictedInsertSize' + property :description, as: 'description' + property :sample_id, as: 'sampleId' + property :dataset_id, as: 'datasetId' + property :experiment, as: 'experiment', class: Google::Apis::GenomicsV1::Experiment, decorator: Google::Apis::GenomicsV1::Experiment::Representation - property :filename, as: 'filename' property :name, as: 'name' property :reference_set_id, as: 'referenceSetId' end end + class ReadGroupSet + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :filename, as: 'filename' + collection :read_groups, as: 'readGroups', class: Google::Apis::GenomicsV1::ReadGroup, decorator: Google::Apis::GenomicsV1::ReadGroup::Representation + + property :name, as: 'name' + property :reference_set_id, as: 'referenceSetId' + hash :info, as: 'info', :class => Array do + include Representable::JSON::Collection + items + end + + property :id, as: 'id' + property :dataset_id, as: 'datasetId' + end + end + class SearchVariantSetsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' collection :variant_sets, as: 'variantSets', class: Google::Apis::GenomicsV1::VariantSet, decorator: Google::Apis::GenomicsV1::VariantSet::Representation + property :next_page_token, as: 'nextPageToken' end end @@ -512,78 +742,48 @@ module Google class Position # @private class Representation < Google::Apis::Core::JsonRepresentation - property :reverse_strand, as: 'reverseStrand' property :position, :numeric_string => true, as: 'position' property :reference_name, as: 'referenceName' + property :reverse_strand, as: 'reverseStrand' end end class SearchReferenceSetsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' collection :reference_sets, as: 'referenceSets', class: Google::Apis::GenomicsV1::ReferenceSet, decorator: Google::Apis::GenomicsV1::ReferenceSet::Representation + property :next_page_token, as: 'nextPageToken' end end class SearchCallSetsRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - property :page_token, as: 'pageToken' property :page_size, as: 'pageSize' collection :variant_set_ids, as: 'variantSetIds' + property :name, as: 'name' + property :page_token, as: 'pageToken' end end class ImportReadGroupSetsRequest # @private class Representation < Google::Apis::Core::JsonRepresentation + collection :source_uris, as: 'sourceUris' property :reference_set_id, as: 'referenceSetId' property :partition_strategy, as: 'partitionStrategy' property :dataset_id, as: 'datasetId' - collection :source_uris, as: 'sourceUris' end end class Policy # @private class Representation < Google::Apis::Core::JsonRepresentation - property :version, as: 'version' collection :bindings, as: 'bindings', class: Google::Apis::GenomicsV1::Binding, decorator: Google::Apis::GenomicsV1::Binding::Representation property :etag, :base64 => true, as: 'etag' - end - end - - class Annotation - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :reference_name, as: 'referenceName' - property :type, as: 'type' - hash :info, as: 'info', :class => Array do - include Representable::JSON::Collection - items - end - - property :end, :numeric_string => true, as: 'end' - property :transcript, as: 'transcript', class: Google::Apis::GenomicsV1::Transcript, decorator: Google::Apis::GenomicsV1::Transcript::Representation - - property :start, :numeric_string => true, as: 'start' - property :annotation_set_id, as: 'annotationSetId' - property :name, as: 'name' - property :variant, as: 'variant', class: Google::Apis::GenomicsV1::VariantAnnotation, decorator: Google::Apis::GenomicsV1::VariantAnnotation::Representation - - property :id, as: 'id' - property :reference_id, as: 'referenceId' - property :reverse_strand, as: 'reverseStrand' - end - end - - class CancelOperationRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation + property :version, as: 'version' end end @@ -600,6 +800,36 @@ module Google end end + class CancelOperationRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class Annotation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :start, :numeric_string => true, as: 'start' + property :annotation_set_id, as: 'annotationSetId' + property :name, as: 'name' + property :variant, as: 'variant', class: Google::Apis::GenomicsV1::VariantAnnotation, decorator: Google::Apis::GenomicsV1::VariantAnnotation::Representation + + property :reference_id, as: 'referenceId' + property :id, as: 'id' + property :reverse_strand, as: 'reverseStrand' + property :reference_name, as: 'referenceName' + property :type, as: 'type' + hash :info, as: 'info', :class => Array do + include Representable::JSON::Collection + items + end + + property :end, :numeric_string => true, as: 'end' + property :transcript, as: 'transcript', class: Google::Apis::GenomicsV1::Transcript, decorator: Google::Apis::GenomicsV1::Transcript::Representation + + end + end + class RuntimeMetadata # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -611,12 +841,12 @@ module Google class Operation # @private class Representation < Google::Apis::Core::JsonRepresentation - property :done, as: 'done' hash :response, as: 'response' property :name, as: 'name' property :error, as: 'error', class: Google::Apis::GenomicsV1::Status, decorator: Google::Apis::GenomicsV1::Status::Representation hash :metadata, as: 'metadata' + property :done, as: 'done' end end @@ -630,7 +860,6 @@ module Google class VariantCall # @private class Representation < Google::Apis::Core::JsonRepresentation - property :phaseset, as: 'phaseset' hash :info, as: 'info', :class => Array do include Representable::JSON::Collection items @@ -640,33 +869,34 @@ module Google collection :genotype_likelihood, as: 'genotypeLikelihood' property :call_set_id, as: 'callSetId' collection :genotype, as: 'genotype' + property :phaseset, as: 'phaseset' end end class SearchVariantsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' collection :variants, as: 'variants', class: Google::Apis::GenomicsV1::Variant, decorator: Google::Apis::GenomicsV1::Variant::Representation - property :next_page_token, as: 'nextPageToken' end end class ListBasesResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - property :sequence, as: 'sequence' property :offset, :numeric_string => true, as: 'offset' property :next_page_token, as: 'nextPageToken' + property :sequence, as: 'sequence' end end class Status # @private class Representation < Google::Apis::Core::JsonRepresentation + collection :details, as: 'details' property :code, as: 'code' property :message, as: 'message' - collection :details, as: 'details' end end @@ -708,6 +938,14 @@ module Google end end + class ReferenceBound + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :reference_name, as: 'referenceName' + property :upper_bound, :numeric_string => true, as: 'upperBound' + end + end + class BatchCreateAnnotationsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -716,47 +954,6 @@ module Google end end - class ReferenceBound - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :upper_bound, :numeric_string => true, as: 'upperBound' - property :reference_name, as: 'referenceName' - end - end - - class ListOperationsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :operations, as: 'operations', class: Google::Apis::GenomicsV1::Operation, decorator: Google::Apis::GenomicsV1::Operation::Representation - - property :next_page_token, as: 'nextPageToken' - end - end - - class Variant - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :created, :numeric_string => true, as: 'created' - property :start, :numeric_string => true, as: 'start' - property :quality, as: 'quality' - property :id, as: 'id' - property :variant_set_id, as: 'variantSetId' - property :reference_name, as: 'referenceName' - hash :info, as: 'info', :class => Array do - include Representable::JSON::Collection - items - end - - property :reference_bases, as: 'referenceBases' - collection :names, as: 'names' - collection :alternate_bases, as: 'alternateBases' - collection :filter, as: 'filter' - property :end, :numeric_string => true, as: 'end' - collection :calls, as: 'calls', class: Google::Apis::GenomicsV1::VariantCall, decorator: Google::Apis::GenomicsV1::VariantCall::Representation - - end - end - class SearchCallSetsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -766,24 +963,44 @@ module Google end end - class SearchVariantsRequest + class Variant # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :call_set_ids, as: 'callSetIds' - property :variant_name, as: 'variantName' - property :start, :numeric_string => true, as: 'start' - property :reference_name, as: 'referenceName' - collection :variant_set_ids, as: 'variantSetIds' + hash :info, as: 'info', :class => Array do + include Representable::JSON::Collection + items + end + + property :reference_bases, as: 'referenceBases' + collection :alternate_bases, as: 'alternateBases' + collection :names, as: 'names' + collection :filter, as: 'filter' property :end, :numeric_string => true, as: 'end' - property :page_token, as: 'pageToken' - property :max_calls, as: 'maxCalls' - property :page_size, as: 'pageSize' + collection :calls, as: 'calls', class: Google::Apis::GenomicsV1::VariantCall, decorator: Google::Apis::GenomicsV1::VariantCall::Representation + + property :created, :numeric_string => true, as: 'created' + property :start, :numeric_string => true, as: 'start' + property :quality, as: 'quality' + property :id, as: 'id' + property :variant_set_id, as: 'variantSetId' + property :reference_name, as: 'referenceName' + end + end + + class ListOperationsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :operations, as: 'operations', class: Google::Apis::GenomicsV1::Operation, decorator: Google::Apis::GenomicsV1::Operation::Representation + end end class OperationMetadata # @private class Representation < Google::Apis::Core::JsonRepresentation + property :create_time, as: 'createTime' + hash :labels, as: 'labels' property :project_id, as: 'projectId' property :client_id, as: 'clientId' collection :events, as: 'events', class: Google::Apis::GenomicsV1::OperationEvent, decorator: Google::Apis::GenomicsV1::OperationEvent::Representation @@ -792,18 +1009,31 @@ module Google property :start_time, as: 'startTime' hash :request, as: 'request' hash :runtime_metadata, as: 'runtimeMetadata' - property :create_time, as: 'createTime' - hash :labels, as: 'labels' + end + end + + class SearchVariantsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :reference_name, as: 'referenceName' + collection :variant_set_ids, as: 'variantSetIds' + property :end, :numeric_string => true, as: 'end' + property :max_calls, as: 'maxCalls' + property :page_token, as: 'pageToken' + property :page_size, as: 'pageSize' + collection :call_set_ids, as: 'callSetIds' + property :start, :numeric_string => true, as: 'start' + property :variant_name, as: 'variantName' end end class SearchReadGroupSetsRequest # @private class Representation < Google::Apis::Core::JsonRepresentation + collection :dataset_ids, as: 'datasetIds' property :name, as: 'name' property :page_token, as: 'pageToken' property :page_size, as: 'pageSize' - collection :dataset_ids, as: 'datasetIds' end end @@ -816,6 +1046,17 @@ module Google end end + class ClinicalCondition + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :names, as: 'names' + property :omim_id, as: 'omimId' + collection :external_ids, as: 'externalIds', class: Google::Apis::GenomicsV1::ExternalId, decorator: Google::Apis::GenomicsV1::ExternalId::Representation + + property :concept_id, as: 'conceptId' + end + end + class SearchReadsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -825,102 +1066,91 @@ module Google end end - class ClinicalCondition - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :concept_id, as: 'conceptId' - collection :names, as: 'names' - property :omim_id, as: 'omimId' - collection :external_ids, as: 'externalIds', class: Google::Apis::GenomicsV1::ExternalId, decorator: Google::Apis::GenomicsV1::ExternalId::Representation - - end - end - class Program # @private class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :version, as: 'version' property :name, as: 'name' property :command_line, as: 'commandLine' property :prev_program_id, as: 'prevProgramId' + property :id, as: 'id' + property :version, as: 'version' end end class CoverageBucket # @private class Representation < Google::Apis::Core::JsonRepresentation + property :mean_coverage, as: 'meanCoverage' property :range, as: 'range', class: Google::Apis::GenomicsV1::Range, decorator: Google::Apis::GenomicsV1::Range::Representation - property :mean_coverage, as: 'meanCoverage' end end class ComputeEngine # @private class Representation < Google::Apis::Core::JsonRepresentation - property :instance_name, as: 'instanceName' - property :zone, as: 'zone' property :machine_type, as: 'machineType' collection :disk_names, as: 'diskNames' + property :instance_name, as: 'instanceName' + property :zone, as: 'zone' end end class ExternalId # @private class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' property :source_name, as: 'sourceName' + property :id, as: 'id' end end class Reference # @private class Representation < Google::Apis::Core::JsonRepresentation - property :source_uri, as: 'sourceUri' + collection :source_accessions, as: 'sourceAccessions' property :ncbi_taxon_id, as: 'ncbiTaxonId' + property :source_uri, as: 'sourceUri' property :name, as: 'name' property :md5checksum, as: 'md5checksum' property :id, as: 'id' property :length, :numeric_string => true, as: 'length' - collection :source_accessions, as: 'sourceAccessions' end end class VariantSetMetadata # @private class Representation < Google::Apis::Core::JsonRepresentation - property :type, as: 'type' + property :key, as: 'key' + property :description, as: 'description' hash :info, as: 'info', :class => Array do include Representable::JSON::Collection items end + property :type, as: 'type' property :value, as: 'value' property :id, as: 'id' property :number, as: 'number' - property :key, as: 'key' - property :description, as: 'description' end end class SearchVariantSetsRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :dataset_ids, as: 'datasetIds' property :page_token, as: 'pageToken' property :page_size, as: 'pageSize' + collection :dataset_ids, as: 'datasetIds' end end class SearchReferenceSetsRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :md5checksums, as: 'md5checksums' collection :accessions, as: 'accessions' property :page_token, as: 'pageToken' property :page_size, as: 'pageSize' property :assembly_id, as: 'assemblyId' + collection :md5checksums, as: 'md5checksums' end end @@ -935,21 +1165,16 @@ module Google class MergeVariantsRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - hash :info_merge_config, as: 'infoMergeConfig' property :variant_set_id, as: 'variantSetId' collection :variants, as: 'variants', class: Google::Apis::GenomicsV1::Variant, decorator: Google::Apis::GenomicsV1::Variant::Representation + hash :info_merge_config, as: 'infoMergeConfig' end end class Read # @private class Representation < Google::Apis::Core::JsonRepresentation - property :proper_placement, as: 'properPlacement' - property :supplementary_alignment, as: 'supplementaryAlignment' - property :fragment_length, as: 'fragmentLength' - property :failed_vendor_quality_checks, as: 'failedVendorQualityChecks' - collection :aligned_quality, as: 'alignedQuality' property :alignment, as: 'alignment', class: Google::Apis::GenomicsV1::LinearAlignment, decorator: Google::Apis::GenomicsV1::LinearAlignment::Representation property :number_reads, as: 'numberReads' @@ -959,15 +1184,20 @@ module Google property :read_group_set_id, as: 'readGroupSetId' property :duplicate_fragment, as: 'duplicateFragment' property :read_number, as: 'readNumber' - property :aligned_sequence, as: 'alignedSequence' property :read_group_id, as: 'readGroupId' - property :next_mate_position, as: 'nextMatePosition', class: Google::Apis::GenomicsV1::Position, decorator: Google::Apis::GenomicsV1::Position::Representation - + property :aligned_sequence, as: 'alignedSequence' hash :info, as: 'info', :class => Array do include Representable::JSON::Collection items end + property :next_mate_position, as: 'nextMatePosition', class: Google::Apis::GenomicsV1::Position, decorator: Google::Apis::GenomicsV1::Position::Representation + + property :supplementary_alignment, as: 'supplementaryAlignment' + property :proper_placement, as: 'properPlacement' + property :fragment_length, as: 'fragmentLength' + property :failed_vendor_quality_checks, as: 'failedVendorQualityChecks' + collection :aligned_quality, as: 'alignedQuality' end end @@ -992,52 +1222,52 @@ module Google class ReferenceSet # @private class Representation < Google::Apis::Core::JsonRepresentation - property :md5checksum, as: 'md5checksum' - property :assembly_id, as: 'assemblyId' - property :id, as: 'id' - collection :source_accessions, as: 'sourceAccessions' property :description, as: 'description' - property :source_uri, as: 'sourceUri' + collection :source_accessions, as: 'sourceAccessions' property :ncbi_taxon_id, as: 'ncbiTaxonId' + property :source_uri, as: 'sourceUri' collection :reference_ids, as: 'referenceIds' + property :assembly_id, as: 'assemblyId' + property :md5checksum, as: 'md5checksum' + property :id, as: 'id' end end class Transcript # @private class Representation < Google::Apis::Core::JsonRepresentation + property :gene_id, as: 'geneId' collection :exons, as: 'exons', class: Google::Apis::GenomicsV1::Exon, decorator: Google::Apis::GenomicsV1::Exon::Representation property :coding_sequence, as: 'codingSequence', class: Google::Apis::GenomicsV1::CodingSequence, decorator: Google::Apis::GenomicsV1::CodingSequence::Representation - property :gene_id, as: 'geneId' end end class AnnotationSet # @private class Representation < Google::Apis::Core::JsonRepresentation + property :source_uri, as: 'sourceUri' + property :dataset_id, as: 'datasetId' property :name, as: 'name' property :reference_set_id, as: 'referenceSetId' - property :type, as: 'type' hash :info, as: 'info', :class => Array do include Representable::JSON::Collection items end + property :type, as: 'type' property :id, as: 'id' - property :source_uri, as: 'sourceUri' - property :dataset_id, as: 'datasetId' end end class Experiment # @private class Representation < Google::Apis::Core::JsonRepresentation + property :sequencing_center, as: 'sequencingCenter' property :platform_unit, as: 'platformUnit' property :library_id, as: 'libraryId' property :instrument_model, as: 'instrumentModel' - property :sequencing_center, as: 'sequencingCenter' end end @@ -1049,236 +1279,6 @@ module Google property :next_page_token, as: 'nextPageToken' end end - - class TestIamPermissionsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :permissions, as: 'permissions' - end - end - - class Exon - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :start, :numeric_string => true, as: 'start' - property :end, :numeric_string => true, as: 'end' - property :frame, as: 'frame' - end - end - - class ExportReadGroupSetRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :project_id, as: 'projectId' - property :export_uri, as: 'exportUri' - collection :reference_names, as: 'referenceNames' - end - end - - class CallSet - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - hash :info, as: 'info', :class => Array do - include Representable::JSON::Collection - items - end - - collection :variant_set_ids, as: 'variantSetIds' - property :id, as: 'id' - property :created, :numeric_string => true, as: 'created' - property :sample_id, as: 'sampleId' - end - end - - class SearchAnnotationSetsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - collection :annotation_sets, as: 'annotationSets', class: Google::Apis::GenomicsV1::AnnotationSet, decorator: Google::Apis::GenomicsV1::AnnotationSet::Representation - - end - end - - class ImportVariantsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :normalize_reference_names, as: 'normalizeReferenceNames' - property :format, as: 'format' - hash :info_merge_config, as: 'infoMergeConfig' - property :variant_set_id, as: 'variantSetId' - collection :source_uris, as: 'sourceUris' - end - end - - class VariantAnnotation - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :alternate_bases, as: 'alternateBases' - property :gene_id, as: 'geneId' - property :clinical_significance, as: 'clinicalSignificance' - collection :conditions, as: 'conditions', class: Google::Apis::GenomicsV1::ClinicalCondition, decorator: Google::Apis::GenomicsV1::ClinicalCondition::Representation - - property :effect, as: 'effect' - collection :transcript_ids, as: 'transcriptIds' - property :type, as: 'type' - end - end - - class ListCoverageBucketsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :bucket_width, :numeric_string => true, as: 'bucketWidth' - collection :coverage_buckets, as: 'coverageBuckets', class: Google::Apis::GenomicsV1::CoverageBucket, decorator: Google::Apis::GenomicsV1::CoverageBucket::Representation - - property :next_page_token, as: 'nextPageToken' - end - end - - class ExportVariantSetRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :format, as: 'format' - property :bigquery_dataset, as: 'bigqueryDataset' - property :bigquery_table, as: 'bigqueryTable' - collection :call_set_ids, as: 'callSetIds' - property :project_id, as: 'projectId' - end - end - - class SearchAnnotationsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :end, :numeric_string => true, as: 'end' - property :page_token, as: 'pageToken' - property :page_size, as: 'pageSize' - property :start, :numeric_string => true, as: 'start' - collection :annotation_set_ids, as: 'annotationSetIds' - property :reference_name, as: 'referenceName' - property :reference_id, as: 'referenceId' - end - end - - class OperationEvent - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :start_time, as: 'startTime' - property :description, as: 'description' - property :end_time, as: 'endTime' - end - end - - class CodingSequence - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :end, :numeric_string => true, as: 'end' - property :start, :numeric_string => true, as: 'start' - end - end - - class TestIamPermissionsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :permissions, as: 'permissions' - end - end - - class SearchReferencesResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :references, as: 'references', class: Google::Apis::GenomicsV1::Reference, decorator: Google::Apis::GenomicsV1::Reference::Representation - - property :next_page_token, as: 'nextPageToken' - end - end - - class GetIamPolicyRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end - end - - class SearchAnnotationSetsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :page_token, as: 'pageToken' - property :page_size, as: 'pageSize' - collection :dataset_ids, as: 'datasetIds' - collection :types, as: 'types' - property :name, as: 'name' - property :reference_set_id, as: 'referenceSetId' - end - end - - class SearchReadGroupSetsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - collection :read_group_sets, as: 'readGroupSets', class: Google::Apis::GenomicsV1::ReadGroupSet, decorator: Google::Apis::GenomicsV1::ReadGroupSet::Representation - - end - end - - class LinearAlignment - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :mapping_quality, as: 'mappingQuality' - property :position, as: 'position', class: Google::Apis::GenomicsV1::Position, decorator: Google::Apis::GenomicsV1::Position::Representation - - collection :cigar, as: 'cigar', class: Google::Apis::GenomicsV1::CigarUnit, decorator: Google::Apis::GenomicsV1::CigarUnit::Representation - - end - end - - class SearchReferencesRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :accessions, as: 'accessions' - property :page_token, as: 'pageToken' - property :reference_set_id, as: 'referenceSetId' - property :page_size, as: 'pageSize' - collection :md5checksums, as: 'md5checksums' - end - end - - class Dataset - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :project_id, as: 'projectId' - property :id, as: 'id' - property :create_time, as: 'createTime' - property :name, as: 'name' - end - end - - class ImportVariantsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :call_set_ids, as: 'callSetIds' - end - end - - class ReadGroup - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :reference_set_id, as: 'referenceSetId' - hash :info, as: 'info', :class => Array do - include Representable::JSON::Collection - items - end - - property :id, as: 'id' - property :predicted_insert_size, as: 'predictedInsertSize' - collection :programs, as: 'programs', class: Google::Apis::GenomicsV1::Program, decorator: Google::Apis::GenomicsV1::Program::Representation - - property :description, as: 'description' - property :sample_id, as: 'sampleId' - property :dataset_id, as: 'datasetId' - property :experiment, as: 'experiment', class: Google::Apis::GenomicsV1::Experiment, decorator: Google::Apis::GenomicsV1::Experiment::Representation - - property :name, as: 'name' - end - end end end end diff --git a/generated/google/apis/genomics_v1/service.rb b/generated/google/apis/genomics_v1/service.rb index d42d29cc9..8938eda9d 100644 --- a/generated/google/apis/genomics_v1/service.rb +++ b/generated/google/apis/genomics_v1/service.rb @@ -47,1045 +47,6 @@ module Google @batch_path = 'batch' end - # Searches for references which match the given criteria. - # For the definitions of references and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # Implements - # [GlobalAllianceApi.searchReferences](https://github.com/ga4gh/schemas/blob/v0. - # 5.1/src/main/resources/avro/referencemethods.avdl#L146). - # @param [Google::Apis::GenomicsV1::SearchReferencesRequest] search_references_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::GenomicsV1::SearchReferencesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::SearchReferencesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def search_references(search_references_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/references/search', options) - command.request_representation = Google::Apis::GenomicsV1::SearchReferencesRequest::Representation - command.request_object = search_references_request_object - command.response_representation = Google::Apis::GenomicsV1::SearchReferencesResponse::Representation - command.response_class = Google::Apis::GenomicsV1::SearchReferencesResponse - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets a reference. - # For the definitions of references and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # Implements - # [GlobalAllianceApi.getReference](https://github.com/ga4gh/schemas/blob/v0.5.1/ - # src/main/resources/avro/referencemethods.avdl#L158). - # @param [String] reference_id - # The ID of the reference. - # @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::GenomicsV1::Reference] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Reference] - # - # @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_reference(reference_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/references/{referenceId}', options) - command.response_representation = Google::Apis::GenomicsV1::Reference::Representation - command.response_class = Google::Apis::GenomicsV1::Reference - command.params['referenceId'] = reference_id unless reference_id.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 bases in a reference, optionally restricted to a range. - # For the definitions of references and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # Implements - # [GlobalAllianceApi.getReferenceBases](https://github.com/ga4gh/schemas/blob/v0. - # 5.1/src/main/resources/avro/referencemethods.avdl#L221). - # @param [String] reference_id - # The ID of the reference. - # @param [String] page_token - # The continuation token, which is used to page through large result sets. - # To get the next page of results, set this parameter to the value of - # `nextPageToken` from the previous response. - # @param [Fixnum] page_size - # The maximum number of bases to return in a single page. If unspecified, - # defaults to 200Kbp (kilo base pairs). The maximum value is 10Mbp (mega base - # pairs). - # @param [Fixnum] start_position - # The start position (0-based) of this query. Defaults to 0. - # @param [Fixnum] end_position - # The end position (0-based, exclusive) of this query. Defaults to the length - # of this reference. - # @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::GenomicsV1::ListBasesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::ListBasesResponse] - # - # @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_reference_bases(reference_id, page_token: nil, page_size: nil, start_position: nil, end_position: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/references/{referenceId}/bases', options) - command.response_representation = Google::Apis::GenomicsV1::ListBasesResponse::Representation - command.response_class = Google::Apis::GenomicsV1::ListBasesResponse - command.params['referenceId'] = reference_id unless reference_id.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['start'] = start_position unless start_position.nil? - command.query['end'] = end_position unless end_position.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 datasets within a project. - # For the definitions of datasets and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # @param [String] page_token - # The continuation token, which is used to page through large result sets. - # To get the next page of results, set this parameter to the value of - # `nextPageToken` from the previous response. - # @param [Fixnum] page_size - # The maximum number of results to return in a single page. If unspecified, - # defaults to 50. The maximum value is 1024. - # @param [String] project_id - # Required. The Google Cloud project ID to list datasets for. - # @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::GenomicsV1::ListDatasetsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::ListDatasetsResponse] - # - # @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_datasets(page_token: nil, page_size: nil, project_id: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/datasets', options) - command.response_representation = Google::Apis::GenomicsV1::ListDatasetsResponse::Representation - command.response_class = Google::Apis::GenomicsV1::ListDatasetsResponse - command.query['pageToken'] = page_token unless page_token.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['projectId'] = project_id unless project_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Creates a new dataset. - # For the definitions of datasets and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # @param [Google::Apis::GenomicsV1::Dataset] dataset_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::GenomicsV1::Dataset] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Dataset] - # - # @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_dataset(dataset_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/datasets', options) - command.request_representation = Google::Apis::GenomicsV1::Dataset::Representation - command.request_object = dataset_object - command.response_representation = Google::Apis::GenomicsV1::Dataset::Representation - command.response_class = Google::Apis::GenomicsV1::Dataset - 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 on the specified dataset. Replaces any - # existing policy. - # For the definitions of datasets and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # See Setting a - # Policy for more information. - # @param [String] resource - # REQUIRED: The resource for which policy is being specified. Format is - # `datasets/`. - # @param [Google::Apis::GenomicsV1::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::GenomicsV1::Policy] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::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_dataset_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::GenomicsV1::SetIamPolicyRequest::Representation - command.request_object = set_iam_policy_request_object - command.response_representation = Google::Apis::GenomicsV1::Policy::Representation - command.response_class = Google::Apis::GenomicsV1::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 - - # Gets the access control policy for the dataset. This is empty if the - # policy or resource does not exist. - # See Getting a - # Policy for more information. - # For the definitions of datasets and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # @param [String] resource - # REQUIRED: The resource for which policy is being specified. Format is - # `datasets/`. - # @param [Google::Apis::GenomicsV1::GetIamPolicyRequest] get_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::GenomicsV1::Policy] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::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_dataset_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options) - command.request_representation = Google::Apis::GenomicsV1::GetIamPolicyRequest::Representation - command.request_object = get_iam_policy_request_object - command.response_representation = Google::Apis::GenomicsV1::Policy::Representation - command.response_class = Google::Apis::GenomicsV1::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 - - # Undeletes a dataset by restoring a dataset which was deleted via this API. - # For the definitions of datasets and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # This operation is only possible for a week after the deletion occurred. - # @param [String] dataset_id - # The ID of the dataset to be undeleted. - # @param [Google::Apis::GenomicsV1::UndeleteDatasetRequest] undelete_dataset_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::GenomicsV1::Dataset] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Dataset] - # - # @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 undelete_dataset(dataset_id, undelete_dataset_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/datasets/{datasetId}:undelete', options) - command.request_representation = Google::Apis::GenomicsV1::UndeleteDatasetRequest::Representation - command.request_object = undelete_dataset_request_object - command.response_representation = Google::Apis::GenomicsV1::Dataset::Representation - command.response_class = Google::Apis::GenomicsV1::Dataset - command.params['datasetId'] = dataset_id unless dataset_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets a dataset by ID. - # For the definitions of datasets and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # @param [String] dataset_id - # The ID of the dataset. - # @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::GenomicsV1::Dataset] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Dataset] - # - # @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_dataset(dataset_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/datasets/{datasetId}', options) - command.response_representation = Google::Apis::GenomicsV1::Dataset::Representation - command.response_class = Google::Apis::GenomicsV1::Dataset - command.params['datasetId'] = dataset_id unless dataset_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Updates a dataset. - # For the definitions of datasets and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # This method supports patch semantics. - # @param [String] dataset_id - # The ID of the dataset to be updated. - # @param [Google::Apis::GenomicsV1::Dataset] dataset_object - # @param [String] update_mask - # An optional mask specifying which fields to update. At this time, the only - # mutable field is name. The only - # acceptable value is "name". If unspecified, all mutable fields will be - # updated. - # @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::GenomicsV1::Dataset] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Dataset] - # - # @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_dataset(dataset_id, dataset_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:patch, 'v1/datasets/{datasetId}', options) - command.request_representation = Google::Apis::GenomicsV1::Dataset::Representation - command.request_object = dataset_object - command.response_representation = Google::Apis::GenomicsV1::Dataset::Representation - command.response_class = Google::Apis::GenomicsV1::Dataset - command.params['datasetId'] = dataset_id unless dataset_id.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 - - # Returns permissions that a caller has on the specified resource. - # See Testing - # Permissions for more information. - # For the definitions of datasets and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # @param [String] resource - # REQUIRED: The resource for which policy is being specified. Format is - # `datasets/`. - # @param [Google::Apis::GenomicsV1::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::GenomicsV1::TestIamPermissionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::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_dataset_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::GenomicsV1::TestIamPermissionsRequest::Representation - command.request_object = test_iam_permissions_request_object - command.response_representation = Google::Apis::GenomicsV1::TestIamPermissionsResponse::Representation - command.response_class = Google::Apis::GenomicsV1::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 - - # Deletes a dataset and all of its contents (all read group sets, - # reference sets, variant sets, call sets, annotation sets, etc.) - # This is reversible (up to one week after the deletion) via - # the - # datasets.undelete - # operation. - # For the definitions of datasets and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # @param [String] dataset_id - # The ID of the dataset to be deleted. - # @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::GenomicsV1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_dataset(dataset_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1/datasets/{datasetId}', options) - command.response_representation = Google::Apis::GenomicsV1::Empty::Representation - command.response_class = Google::Apis::GenomicsV1::Empty - command.params['datasetId'] = dataset_id unless dataset_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Updates an annotation. Caller must have - # WRITE permission for the associated dataset. - # @param [String] annotation_id - # The ID of the annotation to be updated. - # @param [Google::Apis::GenomicsV1::Annotation] annotation_object - # @param [String] update_mask - # An optional mask specifying which fields to update. Mutable fields are - # name, - # variant, - # transcript, and - # info. If unspecified, all mutable - # fields will be updated. - # @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::GenomicsV1::Annotation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Annotation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_annotation(annotation_id, annotation_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:put, 'v1/annotations/{annotationId}', options) - command.request_representation = Google::Apis::GenomicsV1::Annotation::Representation - command.request_object = annotation_object - command.response_representation = Google::Apis::GenomicsV1::Annotation::Representation - command.response_class = Google::Apis::GenomicsV1::Annotation - command.params['annotationId'] = annotation_id unless annotation_id.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 - - # Deletes an annotation. Caller must have WRITE permission for - # the associated annotation set. - # @param [String] annotation_id - # The ID of the annotation to be deleted. - # @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::GenomicsV1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_annotation(annotation_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1/annotations/{annotationId}', options) - command.response_representation = Google::Apis::GenomicsV1::Empty::Representation - command.response_class = Google::Apis::GenomicsV1::Empty - command.params['annotationId'] = annotation_id unless annotation_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Creates a new annotation. Caller must have WRITE permission - # for the associated annotation set. - # The following fields are required: - # * annotationSetId - # * referenceName or - # referenceId - # ### Transcripts - # For annotations of type TRANSCRIPT, the following fields of - # transcript must be provided: - # * exons.start - # * exons.end - # All other fields may be optionally specified, unless documented as being - # server-generated (for example, the `id` field). The annotated - # range must be no longer than 100Mbp (mega base pairs). See the - # Annotation resource - # for additional restrictions on each field. - # @param [Google::Apis::GenomicsV1::Annotation] annotation_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::GenomicsV1::Annotation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Annotation] - # - # @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_annotation(annotation_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/annotations', options) - command.request_representation = Google::Apis::GenomicsV1::Annotation::Representation - command.request_object = annotation_object - command.response_representation = Google::Apis::GenomicsV1::Annotation::Representation - command.response_class = Google::Apis::GenomicsV1::Annotation - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Creates one or more new annotations atomically. All annotations must - # belong to the same annotation set. Caller must have WRITE - # permission for this annotation set. For optimal performance, batch - # positionally adjacent annotations together. - # If the request has a systemic issue, such as an attempt to write to - # an inaccessible annotation set, the entire RPC will fail accordingly. For - # lesser data issues, when possible an error will be isolated to the - # corresponding batch entry in the response; the remaining well formed - # annotations will be created normally. - # For details on the requirements for each individual annotation resource, - # see - # CreateAnnotation. - # @param [Google::Apis::GenomicsV1::BatchCreateAnnotationsRequest] batch_create_annotations_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::GenomicsV1::BatchCreateAnnotationsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::BatchCreateAnnotationsResponse] - # - # @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 batch_create_annotations(batch_create_annotations_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/annotations:batchCreate', options) - command.request_representation = Google::Apis::GenomicsV1::BatchCreateAnnotationsRequest::Representation - command.request_object = batch_create_annotations_request_object - command.response_representation = Google::Apis::GenomicsV1::BatchCreateAnnotationsResponse::Representation - command.response_class = Google::Apis::GenomicsV1::BatchCreateAnnotationsResponse - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Searches for annotations that match the given criteria. Results are - # ordered by genomic coordinate (by reference sequence, then position). - # Annotations with equivalent genomic coordinates are returned in an - # unspecified order. This order is consistent, such that two queries for the - # same content (regardless of page size) yield annotations in the same order - # across their respective streams of paginated responses. Caller must have - # READ permission for the queried annotation sets. - # @param [Google::Apis::GenomicsV1::SearchAnnotationsRequest] search_annotations_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::GenomicsV1::SearchAnnotationsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::SearchAnnotationsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def search_annotations(search_annotations_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/annotations/search', options) - command.request_representation = Google::Apis::GenomicsV1::SearchAnnotationsRequest::Representation - command.request_object = search_annotations_request_object - command.response_representation = Google::Apis::GenomicsV1::SearchAnnotationsResponse::Representation - command.response_class = Google::Apis::GenomicsV1::SearchAnnotationsResponse - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets an annotation. Caller must have READ permission - # for the associated annotation set. - # @param [String] annotation_id - # The ID of the annotation to be retrieved. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::Annotation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Annotation] - # - # @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_annotation(annotation_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/annotations/{annotationId}', options) - command.response_representation = Google::Apis::GenomicsV1::Annotation::Representation - command.response_class = Google::Apis::GenomicsV1::Annotation - command.params['annotationId'] = annotation_id unless annotation_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Deletes a variant set including all variants, call sets, and calls within. - # This is not reversible. - # For the definitions of variant sets and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # @param [String] variant_set_id - # The ID of the variant set to be deleted. - # @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::GenomicsV1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_variantset(variant_set_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1/variantsets/{variantSetId}', options) - command.response_representation = Google::Apis::GenomicsV1::Empty::Representation - command.response_class = Google::Apis::GenomicsV1::Empty - command.params['variantSetId'] = variant_set_id unless variant_set_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Creates a new variant set. - # For the definitions of variant sets and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # The provided variant set must have a valid `datasetId` set - all other - # fields are optional. Note that the `id` field will be ignored, as this is - # assigned by the server. - # @param [Google::Apis::GenomicsV1::VariantSet] variant_set_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::GenomicsV1::VariantSet] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::VariantSet] - # - # @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_variantset(variant_set_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/variantsets', options) - command.request_representation = Google::Apis::GenomicsV1::VariantSet::Representation - command.request_object = variant_set_object - command.response_representation = Google::Apis::GenomicsV1::VariantSet::Representation - command.response_class = Google::Apis::GenomicsV1::VariantSet - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Exports variant set data to an external destination. - # For the definitions of variant sets and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # @param [String] variant_set_id - # Required. The ID of the variant set that contains variant data which - # should be exported. The caller must have READ access to this variant set. - # @param [Google::Apis::GenomicsV1::ExportVariantSetRequest] export_variant_set_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::GenomicsV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Operation] - # - # @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 export_variant_set(variant_set_id, export_variant_set_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/variantsets/{variantSetId}:export', options) - command.request_representation = Google::Apis::GenomicsV1::ExportVariantSetRequest::Representation - command.request_object = export_variant_set_request_object - command.response_representation = Google::Apis::GenomicsV1::Operation::Representation - command.response_class = Google::Apis::GenomicsV1::Operation - command.params['variantSetId'] = variant_set_id unless variant_set_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Returns a list of all variant sets matching search criteria. - # For the definitions of variant sets and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # Implements - # [GlobalAllianceApi.searchVariantSets](https://github.com/ga4gh/schemas/blob/v0. - # 5.1/src/main/resources/avro/variantmethods.avdl#L49). - # @param [Google::Apis::GenomicsV1::SearchVariantSetsRequest] search_variant_sets_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::GenomicsV1::SearchVariantSetsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::SearchVariantSetsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def search_variant_sets(search_variant_sets_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/variantsets/search', options) - command.request_representation = Google::Apis::GenomicsV1::SearchVariantSetsRequest::Representation - command.request_object = search_variant_sets_request_object - command.response_representation = Google::Apis::GenomicsV1::SearchVariantSetsResponse::Representation - command.response_class = Google::Apis::GenomicsV1::SearchVariantSetsResponse - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets a variant set by ID. - # For the definitions of variant sets and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # @param [String] variant_set_id - # Required. The ID of the variant set. - # @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::GenomicsV1::VariantSet] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::VariantSet] - # - # @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_variantset(variant_set_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/variantsets/{variantSetId}', options) - command.response_representation = Google::Apis::GenomicsV1::VariantSet::Representation - command.response_class = Google::Apis::GenomicsV1::VariantSet - command.params['variantSetId'] = variant_set_id unless variant_set_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Updates a variant set using patch semantics. - # For the definitions of variant sets and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # @param [String] variant_set_id - # The ID of the variant to be updated (must already exist). - # @param [Google::Apis::GenomicsV1::VariantSet] variant_set_object - # @param [String] update_mask - # An optional mask specifying which fields to update. Supported fields: - # * metadata. - # * name. - # * description. - # Leaving `updateMask` unset is equivalent to specifying all mutable - # fields. - # @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::GenomicsV1::VariantSet] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::VariantSet] - # - # @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_variantset(variant_set_id, variant_set_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:patch, 'v1/variantsets/{variantSetId}', options) - command.request_representation = Google::Apis::GenomicsV1::VariantSet::Representation - command.request_object = variant_set_object - command.response_representation = Google::Apis::GenomicsV1::VariantSet::Representation - command.response_class = Google::Apis::GenomicsV1::VariantSet - command.params['variantSetId'] = variant_set_id unless variant_set_id.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 - - # Lists operations that match the specified filter in the request. - # @param [String] name - # The name of the operation collection. - # @param [String] filter - # A string for filtering Operations. - # The following filter fields are supported: - # * projectId: Required. Corresponds to - # OperationMetadata.projectId. - # * createTime: The time this job was created, in seconds from the - # [epoch](http://en.wikipedia.org/wiki/Unix_time). Can use `>=` and/or `<=` - # operators. - # * status: Can be `RUNNING`, `SUCCESS`, `FAILURE`, or `CANCELED`. Only - # one status may be specified. - # * labels.key where key is a label key. - # Examples: - # * `projectId = my-project AND createTime >= 1432140000` - # * `projectId = my-project AND createTime >= 1432140000 AND createTime <= - # 1432150000 AND status = RUNNING` - # * `projectId = my-project AND labels.color = *` - # * `projectId = my-project AND labels.color = red` - # @param [String] page_token - # The standard list page token. - # @param [Fixnum] page_size - # The maximum number of results to return. If unspecified, defaults to - # 256. The maximum value is 2048. - # @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::GenomicsV1::ListOperationsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::ListOperationsResponse] - # - # @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_operations(name, filter: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/{+name}', options) - command.response_representation = Google::Apis::GenomicsV1::ListOperationsResponse::Representation - command.response_class = Google::Apis::GenomicsV1::ListOperationsResponse - command.params['name'] = name unless name.nil? - command.query['filter'] = filter unless filter.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # @param [String] name - # The name of the operation resource. - # @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::GenomicsV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Operation] - # - # @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_operation(name, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/{+name}', options) - command.response_representation = Google::Apis::GenomicsV1::Operation::Representation - command.response_class = Google::Apis::GenomicsV1::Operation - command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Starts asynchronous cancellation on a long-running operation. The server makes - # a best effort to cancel the operation, but success is not guaranteed. Clients - # may use Operations.GetOperation or Operations.ListOperations to check whether - # the cancellation succeeded or the operation completed despite cancellation. - # @param [String] name - # The name of the operation resource to be cancelled. - # @param [Google::Apis::GenomicsV1::CancelOperationRequest] cancel_operation_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::GenomicsV1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+name}:cancel', options) - command.request_representation = Google::Apis::GenomicsV1::CancelOperationRequest::Representation - command.request_object = cancel_operation_request_object - command.response_representation = Google::Apis::GenomicsV1::Empty::Representation - command.response_class = Google::Apis::GenomicsV1::Empty - command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - # Searches for reference sets which match the given criteria. # For the definitions of references and other genomics resources, see # [Fundamentals of Google @@ -1094,11 +55,11 @@ module Google # [GlobalAllianceApi.searchReferenceSets](https://github.com/ga4gh/schemas/blob/ # v0.5.1/src/main/resources/avro/referencemethods.avdl#L71) # @param [Google::Apis::GenomicsV1::SearchReferenceSetsRequest] search_reference_sets_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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -1111,14 +72,14 @@ 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 search_reference_sets(search_reference_sets_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def search_reference_sets(search_reference_sets_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/referencesets/search', options) command.request_representation = Google::Apis::GenomicsV1::SearchReferenceSetsRequest::Representation command.request_object = search_reference_sets_request_object command.response_representation = Google::Apis::GenomicsV1::SearchReferenceSetsResponse::Representation command.response_class = Google::Apis::GenomicsV1::SearchReferenceSetsResponse - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -1131,11 +92,11 @@ module Google # 1/src/main/resources/avro/referencemethods.avdl#L83). # @param [String] reference_set_id # The ID of the reference set. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -1148,49 +109,13 @@ 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 get_reference_set(reference_set_id, fields: nil, quota_user: nil, options: nil, &block) + def get_reference_set(reference_set_id, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/referencesets/{referenceSetId}', options) command.response_representation = Google::Apis::GenomicsV1::ReferenceSet::Representation command.response_class = Google::Apis::GenomicsV1::ReferenceSet command.params['referenceSetId'] = reference_set_id unless reference_set_id.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets a list of call sets matching the criteria. - # For the definitions of call sets and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # Implements - # [GlobalAllianceApi.searchCallSets](https://github.com/ga4gh/schemas/blob/v0.5. - # 1/src/main/resources/avro/variantmethods.avdl#L178). - # @param [Google::Apis::GenomicsV1::SearchCallSetsRequest] search_call_sets_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::GenomicsV1::SearchCallSetsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::SearchCallSetsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def search_call_sets(search_call_sets_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/callsets/search', options) - command.request_representation = Google::Apis::GenomicsV1::SearchCallSetsRequest::Representation - command.request_object = search_call_sets_request_object - command.response_representation = Google::Apis::GenomicsV1::SearchCallSetsResponse::Representation - command.response_class = Google::Apis::GenomicsV1::SearchCallSetsResponse command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -1207,11 +132,11 @@ module Google # mutable field is name. The only # acceptable value is "name". If unspecified, all mutable fields will be # updated. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -1224,7 +149,7 @@ 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 patch_call_set(call_set_id, call_set_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + def patch_call_set(call_set_id, call_set_object = nil, update_mask: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/callsets/{callSetId}', options) command.request_representation = Google::Apis::GenomicsV1::CallSet::Representation command.request_object = call_set_object @@ -1232,8 +157,8 @@ module Google command.response_class = Google::Apis::GenomicsV1::CallSet command.params['callSetId'] = call_set_id unless call_set_id.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? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -1243,11 +168,11 @@ module Google # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) # @param [String] call_set_id # The ID of the call set. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -1260,13 +185,13 @@ 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 get_call_set(call_set_id, fields: nil, quota_user: nil, options: nil, &block) + def get_call_set(call_set_id, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/callsets/{callSetId}', options) command.response_representation = Google::Apis::GenomicsV1::CallSet::Representation command.response_class = Google::Apis::GenomicsV1::CallSet command.params['callSetId'] = call_set_id unless call_set_id.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -1275,11 +200,11 @@ module Google # [Fundamentals of Google # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) # @param [Google::Apis::GenomicsV1::CallSet] call_set_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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -1292,14 +217,14 @@ 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 create_call_set(call_set_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def create_call_set(call_set_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/callsets', options) command.request_representation = Google::Apis::GenomicsV1::CallSet::Representation command.request_object = call_set_object command.response_representation = Google::Apis::GenomicsV1::CallSet::Representation command.response_class = Google::Apis::GenomicsV1::CallSet - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -1309,11 +234,11 @@ module Google # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) # @param [String] call_set_id # The ID of the call set to be deleted. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -1326,13 +251,49 @@ 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 delete_call_set(call_set_id, fields: nil, quota_user: nil, options: nil, &block) + def delete_call_set(call_set_id, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/callsets/{callSetId}', options) command.response_representation = Google::Apis::GenomicsV1::Empty::Representation command.response_class = Google::Apis::GenomicsV1::Empty command.params['callSetId'] = call_set_id unless call_set_id.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Gets a list of call sets matching the criteria. + # For the definitions of call sets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # Implements + # [GlobalAllianceApi.searchCallSets](https://github.com/ga4gh/schemas/blob/v0.5. + # 1/src/main/resources/avro/variantmethods.avdl#L178). + # @param [Google::Apis::GenomicsV1::SearchCallSetsRequest] search_call_sets_request_object + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::SearchCallSetsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::SearchCallSetsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def search_call_sets(search_call_sets_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/callsets/search', options) + command.request_representation = Google::Apis::GenomicsV1::SearchCallSetsRequest::Representation + command.request_object = search_call_sets_request_object + command.response_representation = Google::Apis::GenomicsV1::SearchCallSetsResponse::Representation + command.response_class = Google::Apis::GenomicsV1::SearchCallSetsResponse + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -1357,11 +318,11 @@ module Google # [GlobalAllianceApi.searchReads](https://github.com/ga4gh/schemas/blob/v0.5.1/ # src/main/resources/avro/readmethods.avdl#L85). # @param [Google::Apis::GenomicsV1::SearchReadsRequest] search_reads_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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -1374,91 +335,14 @@ 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 search_reads(search_reads_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def search_reads(search_reads_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/reads/search', options) command.request_representation = Google::Apis::GenomicsV1::SearchReadsRequest::Representation command.request_object = search_reads_request_object command.response_representation = Google::Apis::GenomicsV1::SearchReadsResponse::Representation command.response_class = Google::Apis::GenomicsV1::SearchReadsResponse - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Creates read group sets by asynchronously importing the provided - # information. - # For the definitions of read group sets and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # The caller must have WRITE permissions to the dataset. - # ## Notes on [BAM](https://samtools.github.io/hts-specs/SAMv1.pdf) import - # - Tags will be converted to strings - tag types are not preserved - # - Comments (`@CO`) in the input file header will not be preserved - # - Original header order of references (`@SQ`) will not be preserved - # - Any reverse stranded unmapped reads will be reverse complemented, and - # their qualities (also the "BQ" and "OQ" tags, if any) will be reversed - # - Unmapped reads will be stripped of positional information (reference name - # and position) - # @param [Google::Apis::GenomicsV1::ImportReadGroupSetsRequest] import_read_group_sets_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::GenomicsV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Operation] - # - # @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 import_read_group_sets(import_read_group_sets_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/readgroupsets:import', options) - command.request_representation = Google::Apis::GenomicsV1::ImportReadGroupSetsRequest::Representation - command.request_object = import_read_group_sets_request_object - command.response_representation = Google::Apis::GenomicsV1::Operation::Representation - command.response_class = Google::Apis::GenomicsV1::Operation command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Deletes a read group set. - # For the definitions of read group sets and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # @param [String] read_group_set_id - # The ID of the read group set to be deleted. The caller must have WRITE - # permissions to the dataset associated with this read group set. - # @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::GenomicsV1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_read_group_set(read_group_set_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1/readgroupsets/{readGroupSetId}', options) - command.response_representation = Google::Apis::GenomicsV1::Empty::Representation - command.response_class = Google::Apis::GenomicsV1::Empty - command.params['readGroupSetId'] = read_group_set_id unless read_group_set_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -1474,11 +358,11 @@ module Google # Required. The ID of the read group set to export. The caller must have # READ access to this read group set. # @param [Google::Apis::GenomicsV1::ExportReadGroupSetRequest] export_read_group_set_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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -1491,15 +375,15 @@ 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 export_read_group_sets(read_group_set_id, export_read_group_set_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def export_read_group_sets(read_group_set_id, export_read_group_set_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/readgroupsets/{readGroupSetId}:export', options) command.request_representation = Google::Apis::GenomicsV1::ExportReadGroupSetRequest::Representation command.request_object = export_read_group_set_request_object command.response_representation = Google::Apis::GenomicsV1::Operation::Representation command.response_class = Google::Apis::GenomicsV1::Operation command.params['readGroupSetId'] = read_group_set_id unless read_group_set_id.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -1511,11 +395,11 @@ module Google # [GlobalAllianceApi.searchReadGroupSets](https://github.com/ga4gh/schemas/blob/ # v0.5.1/src/main/resources/avro/readmethods.avdl#L135). # @param [Google::Apis::GenomicsV1::SearchReadGroupSetsRequest] search_read_group_sets_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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -1528,14 +412,14 @@ 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 search_read_group_sets(search_read_group_sets_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def search_read_group_sets(search_read_group_sets_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/readgroupsets/search', options) command.request_representation = Google::Apis::GenomicsV1::SearchReadGroupSetsRequest::Representation command.request_object = search_read_group_sets_request_object command.response_representation = Google::Apis::GenomicsV1::SearchReadGroupSetsResponse::Representation command.response_class = Google::Apis::GenomicsV1::SearchReadGroupSetsResponse - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -1545,11 +429,11 @@ module Google # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) # @param [String] read_group_set_id # The ID of the read group set. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -1562,13 +446,13 @@ 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 get_read_group_set(read_group_set_id, fields: nil, quota_user: nil, options: nil, &block) + def get_read_group_set(read_group_set_id, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/readgroupsets/{readGroupSetId}', options) command.response_representation = Google::Apis::GenomicsV1::ReadGroupSet::Representation command.response_class = Google::Apis::GenomicsV1::ReadGroupSet command.params['readGroupSetId'] = read_group_set_id unless read_group_set_id.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -1587,11 +471,11 @@ module Google # * referenceSetId. # Leaving `updateMask` unset is equivalent to specifying all mutable # fields. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -1604,7 +488,7 @@ 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 patch_read_group_set(read_group_set_id, read_group_set_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + def patch_read_group_set(read_group_set_id, read_group_set_object = nil, update_mask: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/readgroupsets/{readGroupSetId}', options) command.request_representation = Google::Apis::GenomicsV1::ReadGroupSet::Representation command.request_object = read_group_set_object @@ -1612,8 +496,85 @@ module Google command.response_class = Google::Apis::GenomicsV1::ReadGroupSet command.params['readGroupSetId'] = read_group_set_id unless read_group_set_id.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? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a read group set. + # For the definitions of read group sets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # @param [String] read_group_set_id + # The ID of the read group set to be deleted. The caller must have WRITE + # permissions to the dataset associated with this read group set. + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_read_group_set(read_group_set_id, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/readgroupsets/{readGroupSetId}', options) + command.response_representation = Google::Apis::GenomicsV1::Empty::Representation + command.response_class = Google::Apis::GenomicsV1::Empty + command.params['readGroupSetId'] = read_group_set_id unless read_group_set_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Creates read group sets by asynchronously importing the provided + # information. + # For the definitions of read group sets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # The caller must have WRITE permissions to the dataset. + # ## Notes on [BAM](https://samtools.github.io/hts-specs/SAMv1.pdf) import + # - Tags will be converted to strings - tag types are not preserved + # - Comments (`@CO`) in the input file header will not be preserved + # - Original header order of references (`@SQ`) will not be preserved + # - Any reverse stranded unmapped reads will be reverse complemented, and + # their qualities (also the "BQ" and "OQ" tags, if any) will be reversed + # - Unmapped reads will be stripped of positional information (reference name + # and position) + # @param [Google::Apis::GenomicsV1::ImportReadGroupSetsRequest] import_read_group_sets_request_object + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Operation] + # + # @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 import_read_group_sets(import_read_group_sets_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/readgroupsets:import', options) + command.request_representation = Google::Apis::GenomicsV1::ImportReadGroupSetsRequest::Representation + command.request_object = import_read_group_sets_request_object + command.response_representation = Google::Apis::GenomicsV1::Operation::Representation + command.response_class = Google::Apis::GenomicsV1::Operation + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -1630,10 +591,6 @@ module Google # set. # @param [String] read_group_set_id # Required. The ID of the read group set over which coverage is requested. - # @param [String] page_token - # The continuation token, which is used to page through large result sets. - # To get the next page of results, set this parameter to the value of - # `nextPageToken` from the previous response. # @param [Fixnum] page_size # The maximum number of results to return in a single page. If unspecified, # defaults to 1024. The maximum value is 2048. @@ -1655,11 +612,15 @@ module Google # The end position of the range on the reference, 0-based exclusive. If # specified, `referenceName` must also be specified. If unset or 0, defaults # to the length of the reference. - # @param [String] fields - # Selector specifying which fields to include in a partial response. + # @param [String] page_token + # The continuation token, which is used to page through large result sets. + # To get the next page of results, set this parameter to the value of + # `nextPageToken` from the previous 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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -1672,146 +633,109 @@ 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_coverage_buckets(read_group_set_id, page_token: nil, page_size: nil, start: nil, target_bucket_width: nil, reference_name: nil, end_: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_coverage_buckets(read_group_set_id, page_size: nil, start: nil, target_bucket_width: nil, reference_name: nil, end_: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/readgroupsets/{readGroupSetId}/coveragebuckets', options) command.response_representation = Google::Apis::GenomicsV1::ListCoverageBucketsResponse::Representation command.response_class = Google::Apis::GenomicsV1::ListCoverageBucketsResponse command.params['readGroupSetId'] = read_group_set_id unless read_group_set_id.nil? - command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['start'] = start unless start.nil? command.query['targetBucketWidth'] = target_bucket_width unless target_bucket_width.nil? command.query['referenceName'] = reference_name unless reference_name.nil? command.query['end'] = end_ unless end_.nil? - command.query['fields'] = fields unless fields.nil? + command.query['pageToken'] = page_token unless page_token.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end - # Gets a list of variants matching the criteria. - # For the definitions of variants and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # Implements - # [GlobalAllianceApi.searchVariants](https://github.com/ga4gh/schemas/blob/v0.5. - # 1/src/main/resources/avro/variantmethods.avdl#L126). - # @param [Google::Apis::GenomicsV1::SearchVariantsRequest] search_variants_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::GenomicsV1::SearchVariantsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::SearchVariantsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def search_variants(search_variants_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/variants/search', options) - command.request_representation = Google::Apis::GenomicsV1::SearchVariantsRequest::Representation - command.request_object = search_variants_request_object - command.response_representation = Google::Apis::GenomicsV1::SearchVariantsResponse::Representation - command.response_class = Google::Apis::GenomicsV1::SearchVariantsResponse - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets a variant by ID. - # For the definitions of variants and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # @param [String] variant_id - # The ID of the variant. - # @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::GenomicsV1::Variant] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Variant] - # - # @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_variant(variant_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/variants/{variantId}', options) - command.response_representation = Google::Apis::GenomicsV1::Variant::Representation - command.response_class = Google::Apis::GenomicsV1::Variant - command.params['variantId'] = variant_id unless variant_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Updates a variant. - # For the definitions of variants and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # This method supports patch semantics. Returns the modified variant without - # its calls. - # @param [String] variant_id - # The ID of the variant to be updated. - # @param [Google::Apis::GenomicsV1::Variant] variant_object + # Updates an annotation set. The update must respect all mutability + # restrictions and other invariants described on the annotation set resource. + # Caller must have WRITE permission for the associated dataset. + # @param [String] annotation_set_id + # The ID of the annotation set to be updated. + # @param [Google::Apis::GenomicsV1::AnnotationSet] annotation_set_object # @param [String] update_mask - # An optional mask specifying which fields to update. At this time, mutable - # fields are names and - # info. Acceptable values are "names" and - # "info". If unspecified, all mutable fields will be updated. - # @param [String] fields - # Selector specifying which fields to include in a partial response. + # An optional mask specifying which fields to update. Mutable fields are + # name, + # source_uri, and + # info. If unspecified, all + # mutable fields will be updated. # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::Variant] parsed result object + # @yieldparam result [Google::Apis::GenomicsV1::AnnotationSet] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::GenomicsV1::Variant] + # @return [Google::Apis::GenomicsV1::AnnotationSet] # # @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_variant(variant_id, variant_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:patch, 'v1/variants/{variantId}', options) - command.request_representation = Google::Apis::GenomicsV1::Variant::Representation - command.request_object = variant_object - command.response_representation = Google::Apis::GenomicsV1::Variant::Representation - command.response_class = Google::Apis::GenomicsV1::Variant - command.params['variantId'] = variant_id unless variant_id.nil? + def update_annotationset(annotation_set_id, annotation_set_object = nil, update_mask: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:put, 'v1/annotationsets/{annotationSetId}', options) + command.request_representation = Google::Apis::GenomicsV1::AnnotationSet::Representation + command.request_object = annotation_set_object + command.response_representation = Google::Apis::GenomicsV1::AnnotationSet::Representation + command.response_class = Google::Apis::GenomicsV1::AnnotationSet + command.params['annotationSetId'] = annotation_set_id unless annotation_set_id.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? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end - # Deletes a variant. - # For the definitions of variants and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # @param [String] variant_id - # The ID of the variant to be deleted. - # @param [String] fields - # Selector specifying which fields to include in a partial response. + # Creates a new annotation set. Caller must have WRITE permission for the + # associated dataset. + # The following fields are required: + # * datasetId + # * referenceSetId + # All other fields may be optionally specified, unless documented as being + # server-generated (for example, the `id` field). + # @param [Google::Apis::GenomicsV1::AnnotationSet] annotation_set_object # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::AnnotationSet] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::AnnotationSet] + # + # @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_annotation_set(annotation_set_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/annotationsets', options) + command.request_representation = Google::Apis::GenomicsV1::AnnotationSet::Representation + command.request_object = annotation_set_object + command.response_representation = Google::Apis::GenomicsV1::AnnotationSet::Representation + command.response_class = Google::Apis::GenomicsV1::AnnotationSet + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Deletes an annotation set. Caller must have WRITE permission + # for the associated annotation set. + # @param [String] annotation_set_id + # The ID of the annotation set to be deleted. + # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -1824,57 +748,78 @@ 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 delete_variant(variant_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1/variants/{variantId}', options) + def delete_annotationset(annotation_set_id, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/annotationsets/{annotationSetId}', options) command.response_representation = Google::Apis::GenomicsV1::Empty::Representation command.response_class = Google::Apis::GenomicsV1::Empty - command.params['variantId'] = variant_id unless variant_id.nil? - command.query['fields'] = fields unless fields.nil? + command.params['annotationSetId'] = annotation_set_id unless annotation_set_id.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end - # Creates variant data by asynchronously importing the provided information. - # For the definitions of variant sets and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # The variants for import will be merged with any existing variant that - # matches its reference sequence, start, end, reference bases, and - # alternative bases. If no such variant exists, a new one will be created. - # When variants are merged, the call information from the new variant - # is added to the existing variant, and Variant info fields are merged - # as specified in - # infoMergeConfig. - # As a special case, for single-sample VCF files, QUAL and FILTER fields will - # be moved to the call level; these are sometimes interpreted in a - # call-specific context. - # Imported VCF headers are appended to the metadata already in a variant set. - # @param [Google::Apis::GenomicsV1::ImportVariantsRequest] import_variants_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. + # Searches for annotation sets that match the given criteria. Annotation sets + # are returned in an unspecified order. This order is consistent, such that + # two queries for the same content (regardless of page size) yield annotation + # sets in the same order across their respective streams of paginated + # responses. Caller must have READ permission for the queried datasets. + # @param [Google::Apis::GenomicsV1::SearchAnnotationSetsRequest] search_annotation_sets_request_object # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::Operation] parsed result object + # @yieldparam result [Google::Apis::GenomicsV1::SearchAnnotationSetsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::GenomicsV1::Operation] + # @return [Google::Apis::GenomicsV1::SearchAnnotationSetsResponse] # # @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 import_variants(import_variants_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/variants:import', options) - command.request_representation = Google::Apis::GenomicsV1::ImportVariantsRequest::Representation - command.request_object = import_variants_request_object - command.response_representation = Google::Apis::GenomicsV1::Operation::Representation - command.response_class = Google::Apis::GenomicsV1::Operation - command.query['fields'] = fields unless fields.nil? + def search_annotationset_annotation_sets(search_annotation_sets_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/annotationsets/search', options) + command.request_representation = Google::Apis::GenomicsV1::SearchAnnotationSetsRequest::Representation + command.request_object = search_annotation_sets_request_object + command.response_representation = Google::Apis::GenomicsV1::SearchAnnotationSetsResponse::Representation + command.response_class = Google::Apis::GenomicsV1::SearchAnnotationSetsResponse command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Gets an annotation set. Caller must have READ permission for + # the associated dataset. + # @param [String] annotation_set_id + # The ID of the annotation set to be retrieved. + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::AnnotationSet] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::AnnotationSet] + # + # @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_annotation_set(annotation_set_id, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/annotationsets/{annotationSetId}', options) + command.response_representation = Google::Apis::GenomicsV1::AnnotationSet::Representation + command.response_class = Google::Apis::GenomicsV1::AnnotationSet + command.params['annotationSetId'] = annotation_set_id unless annotation_set_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -1961,11 +906,11 @@ module Google # This may be the desired outcome, but it is up to the user to determine if # if that is indeed the case. # @param [Google::Apis::GenomicsV1::MergeVariantsRequest] merge_variants_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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -1978,14 +923,91 @@ 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 merge_variants(merge_variants_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def merge_variants(merge_variants_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/variants:merge', options) command.request_representation = Google::Apis::GenomicsV1::MergeVariantsRequest::Representation command.request_object = merge_variants_request_object command.response_representation = Google::Apis::GenomicsV1::Empty::Representation command.response_class = Google::Apis::GenomicsV1::Empty - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Creates variant data by asynchronously importing the provided information. + # For the definitions of variant sets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # The variants for import will be merged with any existing variant that + # matches its reference sequence, start, end, reference bases, and + # alternative bases. If no such variant exists, a new one will be created. + # When variants are merged, the call information from the new variant + # is added to the existing variant, and Variant info fields are merged + # as specified in + # infoMergeConfig. + # As a special case, for single-sample VCF files, QUAL and FILTER fields will + # be moved to the call level; these are sometimes interpreted in a + # call-specific context. + # Imported VCF headers are appended to the metadata already in a variant set. + # @param [Google::Apis::GenomicsV1::ImportVariantsRequest] import_variants_request_object + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Operation] + # + # @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 import_variants(import_variants_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/variants:import', options) + command.request_representation = Google::Apis::GenomicsV1::ImportVariantsRequest::Representation + command.request_object = import_variants_request_object + command.response_representation = Google::Apis::GenomicsV1::Operation::Representation + command.response_class = Google::Apis::GenomicsV1::Operation + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a variant. + # For the definitions of variants and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # @param [String] variant_id + # The ID of the variant to be deleted. + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_variant(variant_id, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/variants/{variantId}', options) + command.response_representation = Google::Apis::GenomicsV1::Empty::Representation + command.response_class = Google::Apis::GenomicsV1::Empty + command.params['variantId'] = variant_id unless variant_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -1994,11 +1016,11 @@ module Google # [Fundamentals of Google # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) # @param [Google::Apis::GenomicsV1::Variant] variant_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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -2011,104 +1033,578 @@ 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 create_variant(variant_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def create_variant(variant_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/variants', options) command.request_representation = Google::Apis::GenomicsV1::Variant::Representation command.request_object = variant_object command.response_representation = Google::Apis::GenomicsV1::Variant::Representation command.response_class = Google::Apis::GenomicsV1::Variant - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end - # Updates an annotation set. The update must respect all mutability - # restrictions and other invariants described on the annotation set resource. - # Caller must have WRITE permission for the associated dataset. - # @param [String] annotation_set_id - # The ID of the annotation set to be updated. - # @param [Google::Apis::GenomicsV1::AnnotationSet] annotation_set_object + # Gets a list of variants matching the criteria. + # For the definitions of variants and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # Implements + # [GlobalAllianceApi.searchVariants](https://github.com/ga4gh/schemas/blob/v0.5. + # 1/src/main/resources/avro/variantmethods.avdl#L126). + # @param [Google::Apis::GenomicsV1::SearchVariantsRequest] search_variants_request_object + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::SearchVariantsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::SearchVariantsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def search_variants(search_variants_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/variants/search', options) + command.request_representation = Google::Apis::GenomicsV1::SearchVariantsRequest::Representation + command.request_object = search_variants_request_object + command.response_representation = Google::Apis::GenomicsV1::SearchVariantsResponse::Representation + command.response_class = Google::Apis::GenomicsV1::SearchVariantsResponse + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Gets a variant by ID. + # For the definitions of variants and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # @param [String] variant_id + # The ID of the variant. + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Variant] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Variant] + # + # @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_variant(variant_id, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/variants/{variantId}', options) + command.response_representation = Google::Apis::GenomicsV1::Variant::Representation + command.response_class = Google::Apis::GenomicsV1::Variant + command.params['variantId'] = variant_id unless variant_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Updates a variant. + # For the definitions of variants and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # This method supports patch semantics. Returns the modified variant without + # its calls. + # @param [String] variant_id + # The ID of the variant to be updated. + # @param [Google::Apis::GenomicsV1::Variant] variant_object # @param [String] update_mask - # An optional mask specifying which fields to update. Mutable fields are - # name, - # source_uri, and - # info. If unspecified, all - # mutable fields will be updated. - # @param [String] fields - # Selector specifying which fields to include in a partial response. + # An optional mask specifying which fields to update. At this time, mutable + # fields are names and + # info. Acceptable values are "names" and + # "info". If unspecified, all mutable fields will be updated. # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::AnnotationSet] parsed result object + # @yieldparam result [Google::Apis::GenomicsV1::Variant] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::GenomicsV1::AnnotationSet] + # @return [Google::Apis::GenomicsV1::Variant] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_annotationset(annotation_set_id, annotation_set_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:put, 'v1/annotationsets/{annotationSetId}', options) - command.request_representation = Google::Apis::GenomicsV1::AnnotationSet::Representation - command.request_object = annotation_set_object - command.response_representation = Google::Apis::GenomicsV1::AnnotationSet::Representation - command.response_class = Google::Apis::GenomicsV1::AnnotationSet - command.params['annotationSetId'] = annotation_set_id unless annotation_set_id.nil? + def patch_variant(variant_id, variant_object = nil, update_mask: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1/variants/{variantId}', options) + command.request_representation = Google::Apis::GenomicsV1::Variant::Representation + command.request_object = variant_object + command.response_representation = Google::Apis::GenomicsV1::Variant::Representation + command.response_class = Google::Apis::GenomicsV1::Variant + command.params['variantId'] = variant_id unless variant_id.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? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end - # Creates a new annotation set. Caller must have WRITE permission for the - # associated dataset. - # The following fields are required: - # * datasetId - # * referenceSetId - # All other fields may be optionally specified, unless documented as being - # server-generated (for example, the `id` field). - # @param [Google::Apis::GenomicsV1::AnnotationSet] annotation_set_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. + # Searches for references which match the given criteria. + # For the definitions of references and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # Implements + # [GlobalAllianceApi.searchReferences](https://github.com/ga4gh/schemas/blob/v0. + # 5.1/src/main/resources/avro/referencemethods.avdl#L146). + # @param [Google::Apis::GenomicsV1::SearchReferencesRequest] search_references_request_object # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::AnnotationSet] parsed result object + # @yieldparam result [Google::Apis::GenomicsV1::SearchReferencesResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::GenomicsV1::AnnotationSet] + # @return [Google::Apis::GenomicsV1::SearchReferencesResponse] # # @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_annotation_set(annotation_set_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/annotationsets', options) - command.request_representation = Google::Apis::GenomicsV1::AnnotationSet::Representation - command.request_object = annotation_set_object - command.response_representation = Google::Apis::GenomicsV1::AnnotationSet::Representation - command.response_class = Google::Apis::GenomicsV1::AnnotationSet - command.query['fields'] = fields unless fields.nil? + def search_references(search_references_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/references/search', options) + command.request_representation = Google::Apis::GenomicsV1::SearchReferencesRequest::Representation + command.request_object = search_references_request_object + command.response_representation = Google::Apis::GenomicsV1::SearchReferencesResponse::Representation + command.response_class = Google::Apis::GenomicsV1::SearchReferencesResponse command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end - # Deletes an annotation set. Caller must have WRITE permission - # for the associated annotation set. - # @param [String] annotation_set_id - # The ID of the annotation set to be deleted. - # @param [String] fields - # Selector specifying which fields to include in a partial response. + # Gets a reference. + # For the definitions of references and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # Implements + # [GlobalAllianceApi.getReference](https://github.com/ga4gh/schemas/blob/v0.5.1/ + # src/main/resources/avro/referencemethods.avdl#L158). + # @param [String] reference_id + # The ID of the reference. # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Reference] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Reference] + # + # @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_reference(reference_id, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/references/{referenceId}', options) + command.response_representation = Google::Apis::GenomicsV1::Reference::Representation + command.response_class = Google::Apis::GenomicsV1::Reference + command.params['referenceId'] = reference_id unless reference_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Lists the bases in a reference, optionally restricted to a range. + # For the definitions of references and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # Implements + # [GlobalAllianceApi.getReferenceBases](https://github.com/ga4gh/schemas/blob/v0. + # 5.1/src/main/resources/avro/referencemethods.avdl#L221). + # @param [String] reference_id + # The ID of the reference. + # @param [Fixnum] end_position + # The end position (0-based, exclusive) of this query. Defaults to the length + # of this reference. + # @param [String] page_token + # The continuation token, which is used to page through large result sets. + # To get the next page of results, set this parameter to the value of + # `nextPageToken` from the previous response. + # @param [Fixnum] page_size + # The maximum number of bases to return in a single page. If unspecified, + # defaults to 200Kbp (kilo base pairs). The maximum value is 10Mbp (mega base + # pairs). + # @param [Fixnum] start_position + # The start position (0-based) of this query. Defaults to 0. + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::ListBasesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::ListBasesResponse] + # + # @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_reference_bases(reference_id, end_position: nil, page_token: nil, page_size: nil, start_position: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/references/{referenceId}/bases', options) + command.response_representation = Google::Apis::GenomicsV1::ListBasesResponse::Representation + command.response_class = Google::Apis::GenomicsV1::ListBasesResponse + command.params['referenceId'] = reference_id unless reference_id.nil? + command.query['end'] = end_position unless end_position.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['start'] = start_position unless start_position.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Lists datasets within a project. + # For the definitions of datasets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # @param [String] page_token + # The continuation token, which is used to page through large result sets. + # To get the next page of results, set this parameter to the value of + # `nextPageToken` from the previous response. + # @param [Fixnum] page_size + # The maximum number of results to return in a single page. If unspecified, + # defaults to 50. The maximum value is 1024. + # @param [String] project_id + # Required. The Google Cloud project ID to list datasets for. + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::ListDatasetsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::ListDatasetsResponse] + # + # @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_datasets(page_token: nil, page_size: nil, project_id: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/datasets', options) + command.response_representation = Google::Apis::GenomicsV1::ListDatasetsResponse::Representation + command.response_class = Google::Apis::GenomicsV1::ListDatasetsResponse + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['projectId'] = project_id unless project_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Sets the access control policy on the specified dataset. Replaces any + # existing policy. + # For the definitions of datasets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # See Setting a + # Policy for more information. + # @param [String] resource + # REQUIRED: The resource for which policy is being specified. Format is + # `datasets/`. + # @param [Google::Apis::GenomicsV1::SetIamPolicyRequest] set_iam_policy_request_object + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::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_dataset_iam_policy(resource, set_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options) + command.request_representation = Google::Apis::GenomicsV1::SetIamPolicyRequest::Representation + command.request_object = set_iam_policy_request_object + command.response_representation = Google::Apis::GenomicsV1::Policy::Representation + command.response_class = Google::Apis::GenomicsV1::Policy + command.params['resource'] = resource unless resource.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Creates a new dataset. + # For the definitions of datasets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # @param [Google::Apis::GenomicsV1::Dataset] dataset_object + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Dataset] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Dataset] + # + # @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_dataset(dataset_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/datasets', options) + command.request_representation = Google::Apis::GenomicsV1::Dataset::Representation + command.request_object = dataset_object + command.response_representation = Google::Apis::GenomicsV1::Dataset::Representation + command.response_class = Google::Apis::GenomicsV1::Dataset + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Gets the access control policy for the dataset. This is empty if the + # policy or resource does not exist. + # See Getting a + # Policy for more information. + # For the definitions of datasets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # @param [String] resource + # REQUIRED: The resource for which policy is being specified. Format is + # `datasets/`. + # @param [Google::Apis::GenomicsV1::GetIamPolicyRequest] get_iam_policy_request_object + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::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_dataset_iam_policy(resource, get_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options) + command.request_representation = Google::Apis::GenomicsV1::GetIamPolicyRequest::Representation + command.request_object = get_iam_policy_request_object + command.response_representation = Google::Apis::GenomicsV1::Policy::Representation + command.response_class = Google::Apis::GenomicsV1::Policy + command.params['resource'] = resource unless resource.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Updates a dataset. + # For the definitions of datasets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # This method supports patch semantics. + # @param [String] dataset_id + # The ID of the dataset to be updated. + # @param [Google::Apis::GenomicsV1::Dataset] dataset_object + # @param [String] update_mask + # An optional mask specifying which fields to update. At this time, the only + # mutable field is name. The only + # acceptable value is "name". If unspecified, all mutable fields will be + # updated. + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Dataset] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Dataset] + # + # @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_dataset(dataset_id, dataset_object = nil, update_mask: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1/datasets/{datasetId}', options) + command.request_representation = Google::Apis::GenomicsV1::Dataset::Representation + command.request_object = dataset_object + command.response_representation = Google::Apis::GenomicsV1::Dataset::Representation + command.response_class = Google::Apis::GenomicsV1::Dataset + command.params['datasetId'] = dataset_id unless dataset_id.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Gets a dataset by ID. + # For the definitions of datasets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # @param [String] dataset_id + # The ID of the dataset. + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Dataset] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Dataset] + # + # @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_dataset(dataset_id, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/datasets/{datasetId}', options) + command.response_representation = Google::Apis::GenomicsV1::Dataset::Representation + command.response_class = Google::Apis::GenomicsV1::Dataset + command.params['datasetId'] = dataset_id unless dataset_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Undeletes a dataset by restoring a dataset which was deleted via this API. + # For the definitions of datasets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # This operation is only possible for a week after the deletion occurred. + # @param [String] dataset_id + # The ID of the dataset to be undeleted. + # @param [Google::Apis::GenomicsV1::UndeleteDatasetRequest] undelete_dataset_request_object + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Dataset] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Dataset] + # + # @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 undelete_dataset(dataset_id, undelete_dataset_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/datasets/{datasetId}:undelete', options) + command.request_representation = Google::Apis::GenomicsV1::UndeleteDatasetRequest::Representation + command.request_object = undelete_dataset_request_object + command.response_representation = Google::Apis::GenomicsV1::Dataset::Representation + command.response_class = Google::Apis::GenomicsV1::Dataset + command.params['datasetId'] = dataset_id unless dataset_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Returns permissions that a caller has on the specified resource. + # See Testing + # Permissions for more information. + # For the definitions of datasets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # @param [String] resource + # REQUIRED: The resource for which policy is being specified. Format is + # `datasets/`. + # @param [Google::Apis::GenomicsV1::TestIamPermissionsRequest] test_iam_permissions_request_object + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::TestIamPermissionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::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_dataset_iam_permissions(resource, test_iam_permissions_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options) + command.request_representation = Google::Apis::GenomicsV1::TestIamPermissionsRequest::Representation + command.request_object = test_iam_permissions_request_object + command.response_representation = Google::Apis::GenomicsV1::TestIamPermissionsResponse::Representation + command.response_class = Google::Apis::GenomicsV1::TestIamPermissionsResponse + command.params['resource'] = resource unless resource.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a dataset and all of its contents (all read group sets, + # reference sets, variant sets, call sets, annotation sets, etc.) + # This is reversible (up to one week after the deletion) via + # the + # datasets.undelete + # operation. + # For the definitions of datasets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # @param [String] dataset_id + # The ID of the dataset to be deleted. + # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -2121,78 +1617,582 @@ 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 delete_annotationset(annotation_set_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1/annotationsets/{annotationSetId}', options) + def delete_dataset(dataset_id, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/datasets/{datasetId}', options) command.response_representation = Google::Apis::GenomicsV1::Empty::Representation command.response_class = Google::Apis::GenomicsV1::Empty - command.params['annotationSetId'] = annotation_set_id unless annotation_set_id.nil? - command.query['fields'] = fields unless fields.nil? + command.params['datasetId'] = dataset_id unless dataset_id.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end - # Searches for annotation sets that match the given criteria. Annotation sets - # are returned in an unspecified order. This order is consistent, such that - # two queries for the same content (regardless of page size) yield annotation - # sets in the same order across their respective streams of paginated - # responses. Caller must have READ permission for the queried datasets. - # @param [Google::Apis::GenomicsV1::SearchAnnotationSetsRequest] search_annotation_sets_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. + # Gets an annotation. Caller must have READ permission + # for the associated annotation set. + # @param [String] annotation_id + # The ID of the annotation to be retrieved. # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::SearchAnnotationSetsResponse] parsed result object + # @yieldparam result [Google::Apis::GenomicsV1::Annotation] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::GenomicsV1::SearchAnnotationSetsResponse] + # @return [Google::Apis::GenomicsV1::Annotation] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def search_annotationset_annotation_sets(search_annotation_sets_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/annotationsets/search', options) - command.request_representation = Google::Apis::GenomicsV1::SearchAnnotationSetsRequest::Representation - command.request_object = search_annotation_sets_request_object - command.response_representation = Google::Apis::GenomicsV1::SearchAnnotationSetsResponse::Representation - command.response_class = Google::Apis::GenomicsV1::SearchAnnotationSetsResponse - command.query['fields'] = fields unless fields.nil? + def get_annotation(annotation_id, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/annotations/{annotationId}', options) + command.response_representation = Google::Apis::GenomicsV1::Annotation::Representation + command.response_class = Google::Apis::GenomicsV1::Annotation + command.params['annotationId'] = annotation_id unless annotation_id.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end - # Gets an annotation set. Caller must have READ permission for - # the associated dataset. - # @param [String] annotation_set_id - # The ID of the annotation set to be retrieved. - # @param [String] fields - # Selector specifying which fields to include in a partial response. + # Updates an annotation. Caller must have + # WRITE permission for the associated dataset. + # @param [String] annotation_id + # The ID of the annotation to be updated. + # @param [Google::Apis::GenomicsV1::Annotation] annotation_object + # @param [String] update_mask + # An optional mask specifying which fields to update. Mutable fields are + # name, + # variant, + # transcript, and + # info. If unspecified, all mutable + # fields will be updated. # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::AnnotationSet] parsed result object + # @yieldparam result [Google::Apis::GenomicsV1::Annotation] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::GenomicsV1::AnnotationSet] + # @return [Google::Apis::GenomicsV1::Annotation] # # @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_annotation_set(annotation_set_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/annotationsets/{annotationSetId}', options) - command.response_representation = Google::Apis::GenomicsV1::AnnotationSet::Representation - command.response_class = Google::Apis::GenomicsV1::AnnotationSet - command.params['annotationSetId'] = annotation_set_id unless annotation_set_id.nil? - command.query['fields'] = fields unless fields.nil? + def update_annotation(annotation_id, annotation_object = nil, update_mask: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:put, 'v1/annotations/{annotationId}', options) + command.request_representation = Google::Apis::GenomicsV1::Annotation::Representation + command.request_object = annotation_object + command.response_representation = Google::Apis::GenomicsV1::Annotation::Representation + command.response_class = Google::Apis::GenomicsV1::Annotation + command.params['annotationId'] = annotation_id unless annotation_id.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Deletes an annotation. Caller must have WRITE permission for + # the associated annotation set. + # @param [String] annotation_id + # The ID of the annotation to be deleted. + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_annotation(annotation_id, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/annotations/{annotationId}', options) + command.response_representation = Google::Apis::GenomicsV1::Empty::Representation + command.response_class = Google::Apis::GenomicsV1::Empty + command.params['annotationId'] = annotation_id unless annotation_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Creates a new annotation. Caller must have WRITE permission + # for the associated annotation set. + # The following fields are required: + # * annotationSetId + # * referenceName or + # referenceId + # ### Transcripts + # For annotations of type TRANSCRIPT, the following fields of + # transcript must be provided: + # * exons.start + # * exons.end + # All other fields may be optionally specified, unless documented as being + # server-generated (for example, the `id` field). The annotated + # range must be no longer than 100Mbp (mega base pairs). See the + # Annotation resource + # for additional restrictions on each field. + # @param [Google::Apis::GenomicsV1::Annotation] annotation_object + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Annotation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Annotation] + # + # @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_annotation(annotation_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/annotations', options) + command.request_representation = Google::Apis::GenomicsV1::Annotation::Representation + command.request_object = annotation_object + command.response_representation = Google::Apis::GenomicsV1::Annotation::Representation + command.response_class = Google::Apis::GenomicsV1::Annotation + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Creates one or more new annotations atomically. All annotations must + # belong to the same annotation set. Caller must have WRITE + # permission for this annotation set. For optimal performance, batch + # positionally adjacent annotations together. + # If the request has a systemic issue, such as an attempt to write to + # an inaccessible annotation set, the entire RPC will fail accordingly. For + # lesser data issues, when possible an error will be isolated to the + # corresponding batch entry in the response; the remaining well formed + # annotations will be created normally. + # For details on the requirements for each individual annotation resource, + # see + # CreateAnnotation. + # @param [Google::Apis::GenomicsV1::BatchCreateAnnotationsRequest] batch_create_annotations_request_object + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::BatchCreateAnnotationsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::BatchCreateAnnotationsResponse] + # + # @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 batch_create_annotations(batch_create_annotations_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/annotations:batchCreate', options) + command.request_representation = Google::Apis::GenomicsV1::BatchCreateAnnotationsRequest::Representation + command.request_object = batch_create_annotations_request_object + command.response_representation = Google::Apis::GenomicsV1::BatchCreateAnnotationsResponse::Representation + command.response_class = Google::Apis::GenomicsV1::BatchCreateAnnotationsResponse + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Searches for annotations that match the given criteria. Results are + # ordered by genomic coordinate (by reference sequence, then position). + # Annotations with equivalent genomic coordinates are returned in an + # unspecified order. This order is consistent, such that two queries for the + # same content (regardless of page size) yield annotations in the same order + # across their respective streams of paginated responses. Caller must have + # READ permission for the queried annotation sets. + # @param [Google::Apis::GenomicsV1::SearchAnnotationsRequest] search_annotations_request_object + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::SearchAnnotationsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::SearchAnnotationsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def search_annotations(search_annotations_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/annotations/search', options) + command.request_representation = Google::Apis::GenomicsV1::SearchAnnotationsRequest::Representation + command.request_object = search_annotations_request_object + command.response_representation = Google::Apis::GenomicsV1::SearchAnnotationsResponse::Representation + command.response_class = Google::Apis::GenomicsV1::SearchAnnotationsResponse + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a variant set including all variants, call sets, and calls within. + # This is not reversible. + # For the definitions of variant sets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # @param [String] variant_set_id + # The ID of the variant set to be deleted. + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_variantset(variant_set_id, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/variantsets/{variantSetId}', options) + command.response_representation = Google::Apis::GenomicsV1::Empty::Representation + command.response_class = Google::Apis::GenomicsV1::Empty + command.params['variantSetId'] = variant_set_id unless variant_set_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Creates a new variant set. + # For the definitions of variant sets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # The provided variant set must have a valid `datasetId` set - all other + # fields are optional. Note that the `id` field will be ignored, as this is + # assigned by the server. + # @param [Google::Apis::GenomicsV1::VariantSet] variant_set_object + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::VariantSet] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::VariantSet] + # + # @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_variantset(variant_set_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/variantsets', options) + command.request_representation = Google::Apis::GenomicsV1::VariantSet::Representation + command.request_object = variant_set_object + command.response_representation = Google::Apis::GenomicsV1::VariantSet::Representation + command.response_class = Google::Apis::GenomicsV1::VariantSet + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Exports variant set data to an external destination. + # For the definitions of variant sets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # @param [String] variant_set_id + # Required. The ID of the variant set that contains variant data which + # should be exported. The caller must have READ access to this variant set. + # @param [Google::Apis::GenomicsV1::ExportVariantSetRequest] export_variant_set_request_object + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Operation] + # + # @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 export_variant_set(variant_set_id, export_variant_set_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/variantsets/{variantSetId}:export', options) + command.request_representation = Google::Apis::GenomicsV1::ExportVariantSetRequest::Representation + command.request_object = export_variant_set_request_object + command.response_representation = Google::Apis::GenomicsV1::Operation::Representation + command.response_class = Google::Apis::GenomicsV1::Operation + command.params['variantSetId'] = variant_set_id unless variant_set_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Returns a list of all variant sets matching search criteria. + # For the definitions of variant sets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # Implements + # [GlobalAllianceApi.searchVariantSets](https://github.com/ga4gh/schemas/blob/v0. + # 5.1/src/main/resources/avro/variantmethods.avdl#L49). + # @param [Google::Apis::GenomicsV1::SearchVariantSetsRequest] search_variant_sets_request_object + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::SearchVariantSetsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::SearchVariantSetsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def search_variant_sets(search_variant_sets_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/variantsets/search', options) + command.request_representation = Google::Apis::GenomicsV1::SearchVariantSetsRequest::Representation + command.request_object = search_variant_sets_request_object + command.response_representation = Google::Apis::GenomicsV1::SearchVariantSetsResponse::Representation + command.response_class = Google::Apis::GenomicsV1::SearchVariantSetsResponse + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Updates a variant set using patch semantics. + # For the definitions of variant sets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # @param [String] variant_set_id + # The ID of the variant to be updated (must already exist). + # @param [Google::Apis::GenomicsV1::VariantSet] variant_set_object + # @param [String] update_mask + # An optional mask specifying which fields to update. Supported fields: + # * metadata. + # * name. + # * description. + # Leaving `updateMask` unset is equivalent to specifying all mutable + # fields. + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::VariantSet] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::VariantSet] + # + # @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_variantset(variant_set_id, variant_set_object = nil, update_mask: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1/variantsets/{variantSetId}', options) + command.request_representation = Google::Apis::GenomicsV1::VariantSet::Representation + command.request_object = variant_set_object + command.response_representation = Google::Apis::GenomicsV1::VariantSet::Representation + command.response_class = Google::Apis::GenomicsV1::VariantSet + command.params['variantSetId'] = variant_set_id unless variant_set_id.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Gets a variant set by ID. + # For the definitions of variant sets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # @param [String] variant_set_id + # Required. The ID of the variant set. + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::VariantSet] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::VariantSet] + # + # @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_variantset(variant_set_id, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/variantsets/{variantSetId}', options) + command.response_representation = Google::Apis::GenomicsV1::VariantSet::Representation + command.response_class = Google::Apis::GenomicsV1::VariantSet + command.params['variantSetId'] = variant_set_id unless variant_set_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Lists operations that match the specified filter in the request. + # @param [String] name + # The name of the operation's parent resource. + # @param [String] filter + # A string for filtering Operations. + # The following filter fields are supported: + # * projectId: Required. Corresponds to + # OperationMetadata.projectId. + # * createTime: The time this job was created, in seconds from the + # [epoch](http://en.wikipedia.org/wiki/Unix_time). Can use `>=` and/or `<=` + # operators. + # * status: Can be `RUNNING`, `SUCCESS`, `FAILURE`, or `CANCELED`. Only + # one status may be specified. + # * labels.key where key is a label key. + # Examples: + # * `projectId = my-project AND createTime >= 1432140000` + # * `projectId = my-project AND createTime >= 1432140000 AND createTime <= + # 1432150000 AND status = RUNNING` + # * `projectId = my-project AND labels.color = *` + # * `projectId = my-project AND labels.color = red` + # @param [String] page_token + # The standard list page token. + # @param [Fixnum] page_size + # The maximum number of results to return. If unspecified, defaults to + # 256. The maximum value is 2048. + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::ListOperationsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::ListOperationsResponse] + # + # @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_operations(name, filter: nil, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}', options) + command.response_representation = Google::Apis::GenomicsV1::ListOperationsResponse::Representation + command.response_class = Google::Apis::GenomicsV1::ListOperationsResponse + command.params['name'] = name unless name.nil? + command.query['filter'] = filter unless filter.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # @param [String] name + # The name of the operation resource. + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Operation] + # + # @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_operation(name, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}', options) + command.response_representation = Google::Apis::GenomicsV1::Operation::Representation + command.response_class = Google::Apis::GenomicsV1::Operation + command.params['name'] = name unless name.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Starts asynchronous cancellation on a long-running operation. The server makes + # a best effort to cancel the operation, but success is not guaranteed. Clients + # may use Operations.GetOperation or Operations.ListOperations to check whether + # the cancellation succeeded or the operation completed despite cancellation. + # @param [String] name + # The name of the operation resource to be cancelled. + # @param [Google::Apis::GenomicsV1::CancelOperationRequest] cancel_operation_request_object + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def cancel_operation(name, cancel_operation_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+name}:cancel', options) + command.request_representation = Google::Apis::GenomicsV1::CancelOperationRequest::Representation + command.request_object = cancel_operation_request_object + command.response_representation = Google::Apis::GenomicsV1::Empty::Representation + command.response_class = Google::Apis::GenomicsV1::Empty + command.params['name'] = name unless name.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end diff --git a/generated/google/apis/gmail_v1.rb b/generated/google/apis/gmail_v1.rb index 88b34541f..b2fa2e7cd 100644 --- a/generated/google/apis/gmail_v1.rb +++ b/generated/google/apis/gmail_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/gmail/api/ module GmailV1 VERSION = 'V1' - REVISION = '20170405' + REVISION = '20170510' # Read, send, delete, and manage your email AUTH_SCOPE = 'https://mail.google.com/' diff --git a/generated/google/apis/gmail_v1/service.rb b/generated/google/apis/gmail_v1/service.rb index 791b0284e..145e01579 100644 --- a/generated/google/apis/gmail_v1/service.rb +++ b/generated/google/apis/gmail_v1/service.rb @@ -1036,8 +1036,8 @@ module Google # @param [String] q # Only return messages matching the specified query. Supports the same query # format as the Gmail search box. For example, "from:someuser@example.com - # rfc822msgid: is:unread". Parameter cannot be used when accessing the api using - # the gmail.metadata scope. + # rfc822msgid: is:unread". Parameter cannot be used when + # accessing the api using the gmail.metadata scope. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user diff --git a/generated/google/apis/iam_v1.rb b/generated/google/apis/iam_v1.rb index e16321f00..a1e21babc 100644 --- a/generated/google/apis/iam_v1.rb +++ b/generated/google/apis/iam_v1.rb @@ -27,7 +27,7 @@ module Google # @see https://cloud.google.com/iam/ module IamV1 VERSION = 'V1' - REVISION = '20170501' + REVISION = '20170519' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/iam_v1/classes.rb b/generated/google/apis/iam_v1/classes.rb index a5ddffc70..cad3bcb60 100644 --- a/generated/google/apis/iam_v1/classes.rb +++ b/generated/google/apis/iam_v1/classes.rb @@ -22,6 +22,233 @@ module Google module Apis module IamV1 + # Audit log information specific to Cloud IAM. This message is serialized + # as an `Any` type in the `ServiceData` message of an + # `AuditLog` message. + class AuditData + include Google::Apis::Core::Hashable + + # The difference delta between two policies. + # Corresponds to the JSON property `policyDelta` + # @return [Google::Apis::IamV1::PolicyDelta] + attr_accessor :policy_delta + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @policy_delta = args[:policy_delta] if args.key?(:policy_delta) + end + end + + # One delta entry for Binding. Each individual change (only one member in each + # entry) to a binding will be a separate entry. + class BindingDelta + include Google::Apis::Core::Hashable + + # The action that was performed on a Binding. + # Required + # Corresponds to the JSON property `action` + # @return [String] + attr_accessor :action + + # A single identity requesting access for a Cloud Platform resource. + # Follows the same format of Binding.members. + # Required + # Corresponds to the JSON property `member` + # @return [String] + attr_accessor :member + + # 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) + @action = args[:action] if args.key?(:action) + @member = args[:member] if args.key?(:member) + @role = args[:role] if args.key?(:role) + end + end + + # The difference delta between two policies. + class PolicyDelta + include Google::Apis::Core::Hashable + + # The delta for Bindings between two policies. + # Corresponds to the JSON property `bindingDeltas` + # @return [Array] + attr_accessor :binding_deltas + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @binding_deltas = args[:binding_deltas] if args.key?(:binding_deltas) + end + end + + # The service account list response. + class ListServiceAccountsResponse + include Google::Apis::Core::Hashable + + # To retrieve the next page of results, set + # ListServiceAccountsRequest.page_token + # to this value. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The list of matching service accounts. + # Corresponds to the JSON property `accounts` + # @return [Array] + attr_accessor :accounts + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @accounts = args[:accounts] if args.key?(:accounts) + end + end + + # The service account create request. + class CreateServiceAccountRequest + include Google::Apis::Core::Hashable + + # Required. The account id that is used to generate the service account + # email address and a stable unique id. It is unique within a project, + # must be 6-30 characters long, and match the regular expression + # `[a-z]([-a-z0-9]*[a-z0-9])` to comply with RFC1035. + # Corresponds to the JSON property `accountId` + # @return [String] + attr_accessor :account_id + + # A service account in the Identity and Access Management API. + # To create a service account, specify the `project_id` and the `account_id` + # for the account. The `account_id` is unique within the project, and is used + # to generate the service account email address and a stable + # `unique_id`. + # If the account already exists, the account's resource name is returned + # in util::Status's ResourceInfo.resource_name in the format of + # projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL`. The caller can + # use the name in other methods to access the account. + # All other methods can identify the service account using the format + # `projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL``. + # Using `-` as a wildcard for the project will infer the project from + # the account. The `account` value can be the `email` address or the + # `unique_id` of the service account. + # Corresponds to the JSON property `serviceAccount` + # @return [Google::Apis::IamV1::ServiceAccount] + attr_accessor :service_account + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @account_id = args[:account_id] if args.key?(:account_id) + @service_account = args[:service_account] if args.key?(:service_account) + end + end + + # The grantable role query response. + class QueryGrantableRolesResponse + include Google::Apis::Core::Hashable + + # The list of matching roles. + # Corresponds to the JSON property `roles` + # @return [Array] + attr_accessor :roles + + # To retrieve the next page of results, set + # `QueryGrantableRolesRequest.page_token` to this value. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @roles = args[:roles] if args.key?(:roles) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # The service account sign blob request. + class SignBlobRequest + include Google::Apis::Core::Hashable + + # The bytes to sign. + # Corresponds to the JSON property `bytesToSign` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :bytes_to_sign + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @bytes_to_sign = args[:bytes_to_sign] if args.key?(:bytes_to_sign) + end + end + + # A role in the Identity and Access Management API. + class Role + include Google::Apis::Core::Hashable + + # Optional. A human-readable title for the role. Typically this + # is limited to 100 UTF-8 bytes. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + # The name of the role. + # When Role is used in CreateRole, the role name must not be set. + # When Role is used in output and other input such as UpdateRole, the role + # name is the complete path, e.g., roles/logging.viewer for curated roles + # and organizations/`ORGANIZATION_ID`/roles/logging.viewer for custom roles. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Optional. A human-readable description for the role. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @title = args[:title] if args.key?(:title) + @name = args[:name] if args.key?(:name) + @description = args[:description] if args.key?(:description) + end + end + # Request message for `SetIamPolicy` method. class SetIamPolicyRequest include Google::Apis::Core::Hashable @@ -123,23 +350,12 @@ module Google class ServiceAccount include Google::Apis::Core::Hashable - # Optional. A user-specified description of the service account. Must be - # fewer than 100 UTF-8 bytes. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - # Used to perform a consistent read-modify-write. # Corresponds to the JSON property `etag` # NOTE: Values are automatically base64 encoded/decoded in the client library. # @return [String] attr_accessor :etag - # @OutputOnly The email address of the service account. - # Corresponds to the JSON property `email` - # @return [String] - attr_accessor :email - # The resource name of the service account in the following format: # `projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL``. # Requests using `-` as a wildcard for the project will infer the project @@ -151,16 +367,16 @@ module Google # @return [String] attr_accessor :name + # @OutputOnly The email address of the service account. + # Corresponds to the JSON property `email` + # @return [String] + attr_accessor :email + # @OutputOnly The id of the project that owns the service account. # Corresponds to the JSON property `projectId` # @return [String] attr_accessor :project_id - # @OutputOnly The unique and stable id of the service account. - # Corresponds to the JSON property `uniqueId` - # @return [String] - attr_accessor :unique_id - # @OutputOnly. The OAuth2 client id for the service account. # This is used in conjunction with the OAuth2 clientconfig API to make # three legged OAuth2 (3LO) flows to access the data of Google users. @@ -168,19 +384,30 @@ module Google # @return [String] attr_accessor :oauth2_client_id + # @OutputOnly The unique and stable id of the service account. + # Corresponds to the JSON property `uniqueId` + # @return [String] + attr_accessor :unique_id + + # Optional. A user-specified description of the service account. Must be + # fewer than 100 UTF-8 bytes. + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @display_name = args[:display_name] if args.key?(:display_name) @etag = args[:etag] if args.key?(:etag) - @email = args[:email] if args.key?(:email) @name = args[:name] if args.key?(:name) + @email = args[:email] if args.key?(:email) @project_id = args[:project_id] if args.key?(:project_id) - @unique_id = args[:unique_id] if args.key?(:unique_id) @oauth2_client_id = args[:oauth2_client_id] if args.key?(:oauth2_client_id) + @unique_id = args[:unique_id] if args.key?(:unique_id) + @display_name = args[:display_name] if args.key?(:display_name) end end @@ -292,6 +519,33 @@ module Google class ServiceAccountKey include Google::Apis::Core::Hashable + # The key can be used after this timestamp. + # Corresponds to the JSON property `validAfterTime` + # @return [String] + attr_accessor :valid_after_time + + # The output format for the private key. + # Only provided in `CreateServiceAccountKey` responses, not + # in `GetServiceAccountKey` or `ListServiceAccountKey` responses. + # Google never exposes system-managed private keys, and never retains + # user-managed private keys. + # Corresponds to the JSON property `privateKeyType` + # @return [String] + attr_accessor :private_key_type + + # The private key data. Only provided in `CreateServiceAccountKey` + # responses. + # Corresponds to the JSON property `privateKeyData` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :private_key_data + + # The public key data. Only provided in `GetServiceAccountKey` responses. + # Corresponds to the JSON property `publicKeyData` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :public_key_data + # The resource name of the service account key in the following format # `projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL`/keys/`key``. # Corresponds to the JSON property `name` @@ -308,46 +562,19 @@ module Google # @return [String] attr_accessor :key_algorithm - # The output format for the private key. - # Only provided in `CreateServiceAccountKey` responses, not - # in `GetServiceAccountKey` or `ListServiceAccountKey` responses. - # Google never exposes system-managed private keys, and never retains - # user-managed private keys. - # Corresponds to the JSON property `privateKeyType` - # @return [String] - attr_accessor :private_key_type - - # The key can be used after this timestamp. - # Corresponds to the JSON property `validAfterTime` - # @return [String] - attr_accessor :valid_after_time - - # The private key data. Only provided in `CreateServiceAccountKey` - # responses. - # Corresponds to the JSON property `privateKeyData` - # NOTE: Values are automatically base64 encoded/decoded in the client library. - # @return [String] - attr_accessor :private_key_data - - # The public key data. Only provided in `GetServiceAccountKey` responses. - # Corresponds to the JSON property `publicKeyData` - # NOTE: Values are automatically base64 encoded/decoded in the client library. - # @return [String] - attr_accessor :public_key_data - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @valid_after_time = args[:valid_after_time] if args.key?(:valid_after_time) + @private_key_type = args[:private_key_type] if args.key?(:private_key_type) + @private_key_data = args[:private_key_data] if args.key?(:private_key_data) + @public_key_data = args[:public_key_data] if args.key?(:public_key_data) @name = args[:name] if args.key?(:name) @valid_before_time = args[:valid_before_time] if args.key?(:valid_before_time) @key_algorithm = args[:key_algorithm] if args.key?(:key_algorithm) - @private_key_type = args[:private_key_type] if args.key?(:private_key_type) - @valid_after_time = args[:valid_after_time] if args.key?(:valid_after_time) - @private_key_data = args[:private_key_data] if args.key?(:private_key_data) - @public_key_data = args[:public_key_data] if args.key?(:public_key_data) end end @@ -355,6 +582,12 @@ module Google class CreateServiceAccountKeyRequest include Google::Apis::Core::Hashable + # + # Corresponds to the JSON property `includePublicKeyData` + # @return [Boolean] + attr_accessor :include_public_key_data + alias_method :include_public_key_data?, :include_public_key_data + # Which type of key and algorithm to use for the key. # The default is currently a 2K RSA key. However this may change in the # future. @@ -374,6 +607,7 @@ module Google # Update properties of this object def update!(**args) + @include_public_key_data = args[:include_public_key_data] if args.key?(:include_public_key_data) @key_algorithm = args[:key_algorithm] if args.key?(:key_algorithm) @private_key_type = args[:private_key_type] if args.key?(:private_key_type) end @@ -405,25 +639,25 @@ module Google class SignBlobResponse include Google::Apis::Core::Hashable + # The id of the key used to sign the blob. + # Corresponds to the JSON property `keyId` + # @return [String] + attr_accessor :key_id + # The signed blob. # Corresponds to the JSON property `signature` # NOTE: Values are automatically base64 encoded/decoded in the client library. # @return [String] attr_accessor :signature - # The id of the key used to sign the blob. - # Corresponds to the JSON property `keyId` - # @return [String] - attr_accessor :key_id - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @signature = args[:signature] if args.key?(:signature) @key_id = args[:key_id] if args.key?(:key_id) + @signature = args[:signature] if args.key?(:signature) end end @@ -452,6 +686,25 @@ module Google end end + # The service account sign JWT request. + class SignJwtRequest + include Google::Apis::Core::Hashable + + # The JWT payload to sign, a JSON JWT Claim set. + # Corresponds to the JSON property `payload` + # @return [String] + attr_accessor :payload + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @payload = args[:payload] if args.key?(:payload) + 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 @@ -518,252 +771,6 @@ module Google @bindings = args[:bindings] if args.key?(:bindings) end end - - # The service account sign JWT request. - class SignJwtRequest - include Google::Apis::Core::Hashable - - # The JWT payload to sign, a JSON JWT Claim set. - # Corresponds to the JSON property `payload` - # @return [String] - attr_accessor :payload - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @payload = args[:payload] if args.key?(:payload) - end - end - - # Audit log information specific to Cloud IAM. This message is serialized - # as an `Any` type in the `ServiceData` message of an - # `AuditLog` message. - class AuditData - include Google::Apis::Core::Hashable - - # The difference delta between two policies. - # Corresponds to the JSON property `policyDelta` - # @return [Google::Apis::IamV1::PolicyDelta] - attr_accessor :policy_delta - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @policy_delta = args[:policy_delta] if args.key?(:policy_delta) - end - end - - # One delta entry for Binding. Each individual change (only one member in each - # entry) to a binding will be a separate entry. - class BindingDelta - include Google::Apis::Core::Hashable - - # The action that was performed on a Binding. - # Required - # Corresponds to the JSON property `action` - # @return [String] - attr_accessor :action - - # A single identity requesting access for a Cloud Platform resource. - # Follows the same format of Binding.members. - # Required - # Corresponds to the JSON property `member` - # @return [String] - attr_accessor :member - - # 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) - @action = args[:action] if args.key?(:action) - @member = args[:member] if args.key?(:member) - @role = args[:role] if args.key?(:role) - end - end - - # The difference delta between two policies. - class PolicyDelta - include Google::Apis::Core::Hashable - - # The delta for Bindings between two policies. - # Corresponds to the JSON property `bindingDeltas` - # @return [Array] - attr_accessor :binding_deltas - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @binding_deltas = args[:binding_deltas] if args.key?(:binding_deltas) - end - end - - # The service account list response. - class ListServiceAccountsResponse - include Google::Apis::Core::Hashable - - # To retrieve the next page of results, set - # ListServiceAccountsRequest.page_token - # to this value. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # The list of matching service accounts. - # Corresponds to the JSON property `accounts` - # @return [Array] - attr_accessor :accounts - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @accounts = args[:accounts] if args.key?(:accounts) - end - end - - # The service account create request. - class CreateServiceAccountRequest - include Google::Apis::Core::Hashable - - # A service account in the Identity and Access Management API. - # To create a service account, specify the `project_id` and the `account_id` - # for the account. The `account_id` is unique within the project, and is used - # to generate the service account email address and a stable - # `unique_id`. - # If the account already exists, the account's resource name is returned - # in util::Status's ResourceInfo.resource_name in the format of - # projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL`. The caller can - # use the name in other methods to access the account. - # All other methods can identify the service account using the format - # `projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL``. - # Using `-` as a wildcard for the project will infer the project from - # the account. The `account` value can be the `email` address or the - # `unique_id` of the service account. - # Corresponds to the JSON property `serviceAccount` - # @return [Google::Apis::IamV1::ServiceAccount] - attr_accessor :service_account - - # Required. The account id that is used to generate the service account - # email address and a stable unique id. It is unique within a project, - # must be 6-30 characters long, and match the regular expression - # `[a-z]([-a-z0-9]*[a-z0-9])` to comply with RFC1035. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @service_account = args[:service_account] if args.key?(:service_account) - @account_id = args[:account_id] if args.key?(:account_id) - end - end - - # The grantable role query response. - class QueryGrantableRolesResponse - include Google::Apis::Core::Hashable - - # The list of matching roles. - # Corresponds to the JSON property `roles` - # @return [Array] - attr_accessor :roles - - # To retrieve the next page of results, set - # `QueryGrantableRolesRequest.page_token` to this value. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @roles = args[:roles] if args.key?(:roles) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # A role in the Identity and Access Management API. - class Role - include Google::Apis::Core::Hashable - - # Optional. A human-readable title for the role. Typically this - # is limited to 100 UTF-8 bytes. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # The name of the role. - # When Role is used in CreateRole, the role name must not be set. - # When Role is used in output and other input such as UpdateRole, the role - # name is the complete path, e.g., roles/logging.viewer for curated roles - # and organizations/`ORGANIZATION_ID`/roles/logging.viewer for custom roles. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Optional. A human-readable description for the role. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @title = args[:title] if args.key?(:title) - @name = args[:name] if args.key?(:name) - @description = args[:description] if args.key?(:description) - end - end - - # The service account sign blob request. - class SignBlobRequest - include Google::Apis::Core::Hashable - - # The bytes to sign. - # Corresponds to the JSON property `bytesToSign` - # NOTE: Values are automatically base64 encoded/decoded in the client library. - # @return [String] - attr_accessor :bytes_to_sign - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @bytes_to_sign = args[:bytes_to_sign] if args.key?(:bytes_to_sign) - end - end end end end diff --git a/generated/google/apis/iam_v1/representations.rb b/generated/google/apis/iam_v1/representations.rb index 78bb135b5..3c553790c 100644 --- a/generated/google/apis/iam_v1/representations.rb +++ b/generated/google/apis/iam_v1/representations.rb @@ -22,90 +22,6 @@ module Google module Apis module IamV1 - class SetIamPolicyRequest - 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 ServiceAccount - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Empty - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class QueryGrantableRolesRequest - 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 ListServiceAccountKeysResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ServiceAccountKey - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CreateServiceAccountKeyRequest - 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 SignBlobResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SignJwtResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Policy - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SignJwtRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class AuditData class Representation < Google::Apis::Core::JsonRepresentation; end @@ -142,136 +58,100 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class Role - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class SignBlobRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class SetIamPolicyRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :policy, as: 'policy', class: Google::Apis::IamV1::Policy, decorator: Google::Apis::IamV1::Policy::Representation + class Role + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport + end + + class SetIamPolicyRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class Binding - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :members, as: 'members' - property :role, as: 'role' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ServiceAccount - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :display_name, as: 'displayName' - property :etag, :base64 => true, as: 'etag' - property :email, as: 'email' - property :name, as: 'name' - property :project_id, as: 'projectId' - property :unique_id, as: 'uniqueId' - property :oauth2_client_id, as: 'oauth2ClientId' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class Empty - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class QueryGrantableRolesRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :full_resource_name, as: 'fullResourceName' - property :page_token, as: 'pageToken' - property :page_size, as: 'pageSize' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class TestIamPermissionsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :permissions, as: 'permissions' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ListServiceAccountKeysResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :keys, as: 'keys', class: Google::Apis::IamV1::ServiceAccountKey, decorator: Google::Apis::IamV1::ServiceAccountKey::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class ServiceAccountKey - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - property :valid_before_time, as: 'validBeforeTime' - property :key_algorithm, as: 'keyAlgorithm' - property :private_key_type, as: 'privateKeyType' - property :valid_after_time, as: 'validAfterTime' - property :private_key_data, :base64 => true, as: 'privateKeyData' - property :public_key_data, :base64 => true, as: 'publicKeyData' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class CreateServiceAccountKeyRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :key_algorithm, as: 'keyAlgorithm' - property :private_key_type, as: 'privateKeyType' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class TestIamPermissionsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :permissions, as: 'permissions' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class SignBlobResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :signature, :base64 => true, as: 'signature' - property :key_id, as: 'keyId' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class SignJwtResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :key_id, as: 'keyId' - property :signed_jwt, as: 'signedJwt' - end - end + class Representation < Google::Apis::Core::JsonRepresentation; end - class Policy - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :etag, :base64 => true, as: 'etag' - property :version, as: 'version' - collection :bindings, as: 'bindings', class: Google::Apis::IamV1::Binding, decorator: Google::Apis::IamV1::Binding::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class SignJwtRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :payload, as: 'payload' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Policy + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class AuditData @@ -311,9 +191,9 @@ module Google class CreateServiceAccountRequest # @private class Representation < Google::Apis::Core::JsonRepresentation + property :account_id, as: 'accountId' property :service_account, as: 'serviceAccount', class: Google::Apis::IamV1::ServiceAccount, decorator: Google::Apis::IamV1::ServiceAccount::Representation - property :account_id, as: 'accountId' end end @@ -326,6 +206,13 @@ module Google end end + class SignBlobRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :bytes_to_sign, :base64 => true, as: 'bytesToSign' + end + end + class Role # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -335,10 +222,124 @@ module Google end end - class SignBlobRequest + class SetIamPolicyRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :bytes_to_sign, :base64 => true, as: 'bytesToSign' + property :policy, as: 'policy', class: Google::Apis::IamV1::Policy, decorator: Google::Apis::IamV1::Policy::Representation + + end + end + + class Binding + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :members, as: 'members' + property :role, as: 'role' + end + end + + class ServiceAccount + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :etag, :base64 => true, as: 'etag' + property :name, as: 'name' + property :email, as: 'email' + property :project_id, as: 'projectId' + property :oauth2_client_id, as: 'oauth2ClientId' + property :unique_id, as: 'uniqueId' + property :display_name, as: 'displayName' + end + end + + class Empty + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class QueryGrantableRolesRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :full_resource_name, as: 'fullResourceName' + property :page_token, as: 'pageToken' + property :page_size, as: 'pageSize' + end + end + + class TestIamPermissionsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :permissions, as: 'permissions' + end + end + + class ListServiceAccountKeysResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :keys, as: 'keys', class: Google::Apis::IamV1::ServiceAccountKey, decorator: Google::Apis::IamV1::ServiceAccountKey::Representation + + end + end + + class ServiceAccountKey + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :valid_after_time, as: 'validAfterTime' + property :private_key_type, as: 'privateKeyType' + property :private_key_data, :base64 => true, as: 'privateKeyData' + property :public_key_data, :base64 => true, as: 'publicKeyData' + property :name, as: 'name' + property :valid_before_time, as: 'validBeforeTime' + property :key_algorithm, as: 'keyAlgorithm' + end + end + + class CreateServiceAccountKeyRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :include_public_key_data, as: 'includePublicKeyData' + property :key_algorithm, as: 'keyAlgorithm' + property :private_key_type, as: 'privateKeyType' + end + end + + class TestIamPermissionsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :permissions, as: 'permissions' + end + end + + class SignBlobResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :key_id, as: 'keyId' + property :signature, :base64 => true, as: 'signature' + end + end + + class SignJwtResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :key_id, as: 'keyId' + property :signed_jwt, as: 'signedJwt' + end + end + + class SignJwtRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :payload, as: 'payload' + end + end + + class Policy + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :etag, :base64 => true, as: 'etag' + property :version, as: 'version' + collection :bindings, as: 'bindings', class: Google::Apis::IamV1::Binding, decorator: Google::Apis::IamV1::Binding::Representation + end end end diff --git a/generated/google/apis/iam_v1/service.rb b/generated/google/apis/iam_v1/service.rb index b2c2b40ee..1a90e3246 100644 --- a/generated/google/apis/iam_v1/service.rb +++ b/generated/google/apis/iam_v1/service.rb @@ -34,21 +34,53 @@ module Google # # @see https://cloud.google.com/iam/ class IamService < Google::Apis::Core::BaseService - # @return [String] - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - attr_accessor :quota_user - # @return [String] # API key. Your API key identifies your project and provides you with API access, # quota, and reports. Required unless you provide an OAuth 2.0 token. attr_accessor :key + # @return [String] + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + attr_accessor :quota_user + def initialize super('https://iam.googleapis.com/', '') @batch_path = 'batch' end + # Queries roles that can be granted on a particular resource. + # A role is grantable if it can be used as the role in a binding for a policy + # for that resource. + # @param [Google::Apis::IamV1::QueryGrantableRolesRequest] query_grantable_roles_request_object + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::IamV1::QueryGrantableRolesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::IamV1::QueryGrantableRolesResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def query_grantable_roles(query_grantable_roles_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/roles:queryGrantableRoles', options) + command.request_representation = Google::Apis::IamV1::QueryGrantableRolesRequest::Representation + command.request_object = query_grantable_roles_request_object + command.response_representation = Google::Apis::IamV1::QueryGrantableRolesResponse::Representation + command.response_class = Google::Apis::IamV1::QueryGrantableRolesResponse + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + # Deletes a ServiceAccount. # @param [String] name # The resource name of the service account in the following format: @@ -161,41 +193,6 @@ module Google execute_or_queue_command(command, &block) end - # Creates a ServiceAccount - # and returns it. - # @param [String] name - # Required. The resource name of the project associated with the service - # accounts, such as `projects/my-project-123`. - # @param [Google::Apis::IamV1::CreateServiceAccountRequest] create_service_account_request_object - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::IamV1::ServiceAccount] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::IamV1::ServiceAccount] - # - # @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_service_account(name, create_service_account_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+name}/serviceAccounts', options) - command.request_representation = Google::Apis::IamV1::CreateServiceAccountRequest::Representation - command.request_object = create_service_account_request_object - command.response_representation = Google::Apis::IamV1::ServiceAccount::Representation - command.response_class = Google::Apis::IamV1::ServiceAccount - command.params['name'] = name unless name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - # Sets the IAM access control policy for a # ServiceAccount. # @param [String] resource @@ -231,6 +228,41 @@ module Google execute_or_queue_command(command, &block) end + # Creates a ServiceAccount + # and returns it. + # @param [String] name + # Required. The resource name of the project associated with the service + # accounts, such as `projects/my-project-123`. + # @param [Google::Apis::IamV1::CreateServiceAccountRequest] create_service_account_request_object + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::IamV1::ServiceAccount] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::IamV1::ServiceAccount] + # + # @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_service_account(name, create_service_account_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+name}/serviceAccounts', options) + command.request_representation = Google::Apis::IamV1::CreateServiceAccountRequest::Representation + command.request_object = create_service_account_request_object + command.response_representation = Google::Apis::IamV1::ServiceAccount::Representation + command.response_class = Google::Apis::IamV1::ServiceAccount + command.params['name'] = name unless name.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + # Signs a JWT using a service account's system-managed private key. # If no expiry time (`exp`) is provided in the `SignJwtRequest`, IAM sets an # an expiry time of one hour by default. If you request an expiry time of @@ -414,44 +446,6 @@ module Google execute_or_queue_command(command, &block) end - # Creates a ServiceAccountKey - # and returns it. - # @param [String] name - # The resource name of the service account in the following format: - # `projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL``. - # Using `-` as a wildcard for the project will infer the project from - # the account. The `account` value can be the `email` address or the - # `unique_id` of the service account. - # @param [Google::Apis::IamV1::CreateServiceAccountKeyRequest] create_service_account_key_request_object - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::IamV1::ServiceAccountKey] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::IamV1::ServiceAccountKey] - # - # @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_service_account_key(name, create_service_account_key_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+name}/keys', options) - command.request_representation = Google::Apis::IamV1::CreateServiceAccountKeyRequest::Representation - command.request_object = create_service_account_key_request_object - command.response_representation = Google::Apis::IamV1::ServiceAccountKey::Representation - command.response_class = Google::Apis::IamV1::ServiceAccountKey - command.params['name'] = name unless name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - # Deletes a ServiceAccountKey. # @param [String] name # The resource name of the service account key in the following format: @@ -564,10 +558,15 @@ module Google execute_or_queue_command(command, &block) end - # Queries roles that can be granted on a particular resource. - # A role is grantable if it can be used as the role in a binding for a policy - # for that resource. - # @param [Google::Apis::IamV1::QueryGrantableRolesRequest] query_grantable_roles_request_object + # Creates a ServiceAccountKey + # and returns it. + # @param [String] name + # The resource name of the service account in the following format: + # `projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL``. + # Using `-` as a wildcard for the project will infer the project from + # the account. The `account` value can be the `email` address or the + # `unique_id` of the service account. + # @param [Google::Apis::IamV1::CreateServiceAccountKeyRequest] create_service_account_key_request_object # @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. @@ -577,20 +576,21 @@ module Google # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::IamV1::QueryGrantableRolesResponse] parsed result object + # @yieldparam result [Google::Apis::IamV1::ServiceAccountKey] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::IamV1::QueryGrantableRolesResponse] + # @return [Google::Apis::IamV1::ServiceAccountKey] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def query_grantable_roles(query_grantable_roles_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/roles:queryGrantableRoles', options) - command.request_representation = Google::Apis::IamV1::QueryGrantableRolesRequest::Representation - command.request_object = query_grantable_roles_request_object - command.response_representation = Google::Apis::IamV1::QueryGrantableRolesResponse::Representation - command.response_class = Google::Apis::IamV1::QueryGrantableRolesResponse + def create_service_account_key(name, create_service_account_key_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+name}/keys', options) + command.request_representation = Google::Apis::IamV1::CreateServiceAccountKeyRequest::Representation + command.request_object = create_service_account_key_request_object + command.response_representation = Google::Apis::IamV1::ServiceAccountKey::Representation + command.response_class = Google::Apis::IamV1::ServiceAccountKey + command.params['name'] = name unless name.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) @@ -599,8 +599,8 @@ module Google protected def apply_command_defaults(command) - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['key'] = key unless key.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? end end end diff --git a/generated/google/apis/kgsearch_v1/classes.rb b/generated/google/apis/kgsearch_v1/classes.rb index 9ca15782c..469cb978a 100644 --- a/generated/google/apis/kgsearch_v1/classes.rb +++ b/generated/google/apis/kgsearch_v1/classes.rb @@ -27,6 +27,11 @@ module Google class SearchResponse include Google::Apis::Core::Hashable + # The schema type of top-level JSON-LD object, e.g. ItemList. + # Corresponds to the JSON property `@type` + # @return [Object] + attr_accessor :_type + # The local context applicable for the response. See more details at # http://www.w3.org/TR/json-ld/#context-definitions. # Corresponds to the JSON property `@context` @@ -38,20 +43,15 @@ module Google # @return [Array] attr_accessor :item_list_element - # The schema type of top-level JSON-LD object, e.g. ItemList. - # Corresponds to the JSON property `@type` - # @return [Object] - attr_accessor :_type - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @_type = args[:_type] if args.key?(:_type) @_context = args[:_context] if args.key?(:_context) @item_list_element = args[:item_list_element] if args.key?(:item_list_element) - @_type = args[:_type] if args.key?(:_type) end end end diff --git a/generated/google/apis/kgsearch_v1/representations.rb b/generated/google/apis/kgsearch_v1/representations.rb index d433bdbf6..a84ac0bb8 100644 --- a/generated/google/apis/kgsearch_v1/representations.rb +++ b/generated/google/apis/kgsearch_v1/representations.rb @@ -31,9 +31,9 @@ module Google class SearchResponse # @private class Representation < Google::Apis::Core::JsonRepresentation + property :_type, as: '@type' property :_context, as: '@context' collection :item_list_element, as: 'itemListElement' - property :_type, as: '@type' end end end diff --git a/generated/google/apis/kgsearch_v1/service.rb b/generated/google/apis/kgsearch_v1/service.rb index 24f367f42..a97b99405 100644 --- a/generated/google/apis/kgsearch_v1/service.rb +++ b/generated/google/apis/kgsearch_v1/service.rb @@ -50,12 +50,6 @@ module Google # Searches Knowledge Graph for entities that match the constraints. # A list of matched entities will be returned in response, which will be in # JSON-LD format and compatible with http://schema.org - # @param [Fixnum] limit - # Limits the number of entities to be returned. - # @param [Boolean] prefix - # Enables prefix match against names and aliases of entities - # @param [String] query - # The literal query string for search. # @param [Array, String] types # Restricts returned entities with these types, e.g. Person # (as defined in http://schema.org/Person). If multiple types are specified, @@ -69,6 +63,12 @@ module Google # The list of entity id to be used for search instead of query string. # To specify multiple ids in the HTTP request, repeat the parameter in the # URL as in ...?ids=A&ids=B + # @param [Fixnum] limit + # Limits the number of entities to be returned. + # @param [Boolean] prefix + # Enables prefix match against names and aliases of entities + # @param [String] query + # The literal query string for search. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -86,17 +86,17 @@ 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 search_entities(limit: nil, prefix: nil, query: nil, types: nil, indent: nil, languages: nil, ids: nil, fields: nil, quota_user: nil, options: nil, &block) + def search_entities(types: nil, indent: nil, languages: nil, ids: nil, limit: nil, prefix: nil, query: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/entities:search', options) command.response_representation = Google::Apis::KgsearchV1::SearchResponse::Representation command.response_class = Google::Apis::KgsearchV1::SearchResponse - command.query['limit'] = limit unless limit.nil? - command.query['prefix'] = prefix unless prefix.nil? - command.query['query'] = query unless query.nil? command.query['types'] = types unless types.nil? command.query['indent'] = indent unless indent.nil? command.query['languages'] = languages unless languages.nil? command.query['ids'] = ids unless ids.nil? + command.query['limit'] = limit unless limit.nil? + command.query['prefix'] = prefix unless prefix.nil? + command.query['query'] = query unless query.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) diff --git a/generated/google/apis/language_v1.rb b/generated/google/apis/language_v1.rb index f8e1324e5..9f1a600bf 100644 --- a/generated/google/apis/language_v1.rb +++ b/generated/google/apis/language_v1.rb @@ -20,14 +20,14 @@ module Google module Apis # Google Cloud Natural Language API # - # Google Cloud Natural Language API provides natural language understanding - # technologies to developers. Examples include sentiment analysis, entity - # recognition, and text annotations. + # Provides natural language understanding technologies to developers. Examples + # include sentiment analysis, entity recognition, entity sentiment analysis, and + # text annotations. # # @see https://cloud.google.com/natural-language/ module LanguageV1 VERSION = 'V1' - REVISION = '20170502' + REVISION = '20170525' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/language_v1/classes.rb b/generated/google/apis/language_v1/classes.rb index b38390a9f..5b9358ecb 100644 --- a/generated/google/apis/language_v1/classes.rb +++ b/generated/google/apis/language_v1/classes.rb @@ -22,290 +22,12 @@ module Google module Apis module LanguageV1 - # The `Status` type defines a logical error model that is suitable for different - # programming environments, including REST APIs and RPC APIs. It is used by - # [gRPC](https://github.com/grpc). The error model is designed to be: - # - Simple to use and understand for most users - # - Flexible enough to meet unexpected needs - # # Overview - # The `Status` message contains three pieces of data: error code, error message, - # and error details. The error code should be an enum value of - # google.rpc.Code, but it may accept additional error codes if needed. The - # error message should be a developer-facing English message that helps - # developers *understand* and *resolve* the error. If a localized user-facing - # error message is needed, put the localized message in the error details or - # localize it in the client. The optional error details may contain arbitrary - # information about the error. There is a predefined set of error detail types - # in the package `google.rpc` which can be used for common error conditions. - # # Language mapping - # The `Status` message is the logical representation of the error model, but it - # is not necessarily the actual wire format. When the `Status` message is - # exposed in different client libraries and different wire protocols, it can be - # mapped differently. For example, it will likely be mapped to some exceptions - # in Java, but more likely mapped to some error codes in C. - # # Other uses - # The error model and the `Status` message can be used in a variety of - # environments, either with or without APIs, to provide a - # consistent developer experience across different environments. - # Example uses of this error model include: - # - Partial errors. If a service needs to return partial errors to the client, - # it may embed the `Status` in the normal response to indicate the partial - # errors. - # - Workflow errors. A typical workflow has multiple steps. Each step may - # have a `Status` message for error reporting purpose. - # - Batch operations. If a client uses batch request and batch response, the - # `Status` message should be used directly inside batch response, one for - # each error sub-response. - # - Asynchronous operations. If an API call embeds asynchronous operation - # results in its response, the status of those operations should be - # represented directly using the `Status` message. - # - Logging. If some API errors are stored in logs, the message `Status` could - # be used directly after any stripping needed for security/privacy reasons. - class Status - include Google::Apis::Core::Hashable - - # A list of messages that carry the error details. There will be a - # common set of message types for APIs to use. - # Corresponds to the JSON property `details` - # @return [Array>] - attr_accessor :details - - # The status code, which should be an enum value of google.rpc.Code. - # Corresponds to the JSON property `code` - # @return [Fixnum] - attr_accessor :code - - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # google.rpc.Status.details field, or localized by the client. - # Corresponds to the JSON property `message` - # @return [String] - attr_accessor :message - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @details = args[:details] if args.key?(:details) - @code = args[:code] if args.key?(:code) - @message = args[:message] if args.key?(:message) - end - end - - # All available features for sentiment, syntax, and semantic analysis. - # Setting each one to true will enable that specific analysis for the input. - class Features - include Google::Apis::Core::Hashable - - # Extract syntax information. - # Corresponds to the JSON property `extractSyntax` - # @return [Boolean] - attr_accessor :extract_syntax - alias_method :extract_syntax?, :extract_syntax - - # Extract document-level sentiment. - # Corresponds to the JSON property `extractDocumentSentiment` - # @return [Boolean] - attr_accessor :extract_document_sentiment - alias_method :extract_document_sentiment?, :extract_document_sentiment - - # Extract entities. - # Corresponds to the JSON property `extractEntities` - # @return [Boolean] - attr_accessor :extract_entities - alias_method :extract_entities?, :extract_entities - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @extract_syntax = args[:extract_syntax] if args.key?(:extract_syntax) - @extract_document_sentiment = args[:extract_document_sentiment] if args.key?(:extract_document_sentiment) - @extract_entities = args[:extract_entities] if args.key?(:extract_entities) - end - end - - # Represents a mention for an entity in the text. Currently, proper noun - # mentions are supported. - class EntityMention - include Google::Apis::Core::Hashable - - # Represents an output piece of text. - # Corresponds to the JSON property `text` - # @return [Google::Apis::LanguageV1::TextSpan] - attr_accessor :text - - # The type of the entity mention. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @text = args[:text] if args.key?(:text) - @type = args[:type] if args.key?(:type) - end - end - - # ################################################################ # - # Represents the input to API methods. - class Document - include Google::Apis::Core::Hashable - - # The Google Cloud Storage URI where the file content is located. - # This URI must be of the form: gs://bucket_name/object_name. For more - # details, see https://cloud.google.com/storage/docs/reference-uris. - # NOTE: Cloud Storage object versioning is not supported. - # Corresponds to the JSON property `gcsContentUri` - # @return [String] - attr_accessor :gcs_content_uri - - # The language of the document (if not specified, the language is - # automatically detected). Both ISO and BCP-47 language codes are - # accepted.
- # [Language Support](https://cloud.google.com/natural-language/docs/languages) - # lists currently supported languages for each API method. - # If the language (either specified by the caller or automatically detected) - # is not supported by the called API method, an `INVALID_ARGUMENT` error - # is returned. - # Corresponds to the JSON property `language` - # @return [String] - attr_accessor :language - - # Required. If the type is not set or is `TYPE_UNSPECIFIED`, - # returns an `INVALID_ARGUMENT` error. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # The content of the input in string format. - # Corresponds to the JSON property `content` - # @return [String] - attr_accessor :content - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @gcs_content_uri = args[:gcs_content_uri] if args.key?(:gcs_content_uri) - @language = args[:language] if args.key?(:language) - @type = args[:type] if args.key?(:type) - @content = args[:content] if args.key?(:content) - end - end - - # Represents a sentence in the input document. - class Sentence - include Google::Apis::Core::Hashable - - # Represents the feeling associated with the entire text or entities in - # the text. - # Corresponds to the JSON property `sentiment` - # @return [Google::Apis::LanguageV1::Sentiment] - attr_accessor :sentiment - - # Represents an output piece of text. - # Corresponds to the JSON property `text` - # @return [Google::Apis::LanguageV1::TextSpan] - attr_accessor :text - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @sentiment = args[:sentiment] if args.key?(:sentiment) - @text = args[:text] if args.key?(:text) - end - end - - # Represents the feeling associated with the entire text or entities in - # the text. - class Sentiment - include Google::Apis::Core::Hashable - - # Sentiment score between -1.0 (negative sentiment) and 1.0 - # (positive sentiment). - # Corresponds to the JSON property `score` - # @return [Float] - attr_accessor :score - - # A non-negative number in the [0, +inf) range, which represents - # the absolute magnitude of sentiment regardless of score (positive or - # negative). - # Corresponds to the JSON property `magnitude` - # @return [Float] - attr_accessor :magnitude - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @score = args[:score] if args.key?(:score) - @magnitude = args[:magnitude] if args.key?(:magnitude) - end - end - - # The entity analysis request message. - class AnalyzeEntitiesRequest - include Google::Apis::Core::Hashable - - # The encoding type used by the API to calculate offsets. - # Corresponds to the JSON property `encodingType` - # @return [String] - attr_accessor :encoding_type - - # ################################################################ # - # Represents the input to API methods. - # Corresponds to the JSON property `document` - # @return [Google::Apis::LanguageV1::Document] - attr_accessor :document - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @encoding_type = args[:encoding_type] if args.key?(:encoding_type) - @document = args[:document] if args.key?(:document) - end - end - # Represents part of speech information for a token. Parts of speech # are as defined in # http://www.lrec-conf.org/proceedings/lrec2012/pdf/274_Paper.pdf class PartOfSpeech include Google::Apis::Core::Hashable - # The grammatical case. - # Corresponds to the JSON property `case` - # @return [String] - attr_accessor :case - - # The grammatical tense. - # Corresponds to the JSON property `tense` - # @return [String] - attr_accessor :tense - - # The grammatical reciprocity. - # Corresponds to the JSON property `reciprocity` - # @return [String] - attr_accessor :reciprocity - # The grammatical form. # Corresponds to the JSON property `form` # @return [String] @@ -351,15 +73,27 @@ module Google # @return [String] attr_accessor :proper + # The grammatical case. + # Corresponds to the JSON property `case` + # @return [String] + attr_accessor :case + + # The grammatical tense. + # Corresponds to the JSON property `tense` + # @return [String] + attr_accessor :tense + + # The grammatical reciprocity. + # Corresponds to the JSON property `reciprocity` + # @return [String] + attr_accessor :reciprocity + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @case = args[:case] if args.key?(:case) - @tense = args[:tense] if args.key?(:tense) - @reciprocity = args[:reciprocity] if args.key?(:reciprocity) @form = args[:form] if args.key?(:form) @number = args[:number] if args.key?(:number) @voice = args[:voice] if args.key?(:voice) @@ -369,6 +103,9 @@ module Google @gender = args[:gender] if args.key?(:gender) @person = args[:person] if args.key?(:person) @proper = args[:proper] if args.key?(:proper) + @case = args[:case] if args.key?(:case) + @tense = args[:tense] if args.key?(:tense) + @reciprocity = args[:reciprocity] if args.key?(:reciprocity) end end @@ -582,13 +319,6 @@ module Google class AnnotateTextResponse include Google::Apis::Core::Hashable - # Entities, along with their semantic information, in the input document. - # Populated if the user enables - # AnnotateTextRequest.Features.extract_entities. - # Corresponds to the JSON property `entities` - # @return [Array] - attr_accessor :entities - # Represents the feeling associated with the entire text or entities in # the text. # Corresponds to the JSON property `documentSentiment` @@ -615,17 +345,24 @@ module Google # @return [Array] attr_accessor :tokens + # Entities, along with their semantic information, in the input document. + # Populated if the user enables + # AnnotateTextRequest.Features.extract_entities. + # Corresponds to the JSON property `entities` + # @return [Array] + attr_accessor :entities + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @entities = args[:entities] if args.key?(:entities) @document_sentiment = args[:document_sentiment] if args.key?(:document_sentiment) @language = args[:language] if args.key?(:language) @sentences = args[:sentences] if args.key?(:sentences) @tokens = args[:tokens] if args.key?(:tokens) + @entities = args[:entities] if args.key?(:entities) end end @@ -661,11 +398,6 @@ module Google class DependencyEdge include Google::Apis::Core::Hashable - # The parse label for the token. - # Corresponds to the JSON property `label` - # @return [String] - attr_accessor :label - # Represents the head of this token in the dependency tree. # This is the index of the token which has an arc going to this token. # The index is the position of the token in the array of tokens returned @@ -675,14 +407,60 @@ module Google # @return [Fixnum] attr_accessor :head_token_index + # The parse label for the token. + # Corresponds to the JSON property `label` + # @return [String] + attr_accessor :label + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @label = args[:label] if args.key?(:label) @head_token_index = args[:head_token_index] if args.key?(:head_token_index) + @label = args[:label] if args.key?(:label) + end + end + + # Represents the smallest syntactic building block of the text. + class Token + include Google::Apis::Core::Hashable + + # Represents an output piece of text. + # Corresponds to the JSON property `text` + # @return [Google::Apis::LanguageV1::TextSpan] + attr_accessor :text + + # Represents dependency parse tree information for a token. (For more + # information on dependency labels, see + # http://www.aclweb.org/anthology/P13-2017 + # Corresponds to the JSON property `dependencyEdge` + # @return [Google::Apis::LanguageV1::DependencyEdge] + attr_accessor :dependency_edge + + # [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token. + # Corresponds to the JSON property `lemma` + # @return [String] + attr_accessor :lemma + + # Represents part of speech information for a token. Parts of speech + # are as defined in + # http://www.lrec-conf.org/proceedings/lrec2012/pdf/274_Paper.pdf + # Corresponds to the JSON property `partOfSpeech` + # @return [Google::Apis::LanguageV1::PartOfSpeech] + attr_accessor :part_of_speech + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @text = args[:text] if args.key?(:text) + @dependency_edge = args[:dependency_edge] if args.key?(:dependency_edge) + @lemma = args[:lemma] if args.key?(:lemma) + @part_of_speech = args[:part_of_speech] if args.key?(:part_of_speech) end end @@ -712,33 +490,92 @@ module Google end end - # Represents the smallest syntactic building block of the text. - class Token + # The `Status` type defines a logical error model that is suitable for different + # programming environments, including REST APIs and RPC APIs. It is used by + # [gRPC](https://github.com/grpc). The error model is designed to be: + # - Simple to use and understand for most users + # - Flexible enough to meet unexpected needs + # # Overview + # The `Status` message contains three pieces of data: error code, error message, + # and error details. The error code should be an enum value of + # google.rpc.Code, but it may accept additional error codes if needed. The + # error message should be a developer-facing English message that helps + # developers *understand* and *resolve* the error. If a localized user-facing + # error message is needed, put the localized message in the error details or + # localize it in the client. The optional error details may contain arbitrary + # information about the error. There is a predefined set of error detail types + # in the package `google.rpc` that can be used for common error conditions. + # # Language mapping + # The `Status` message is the logical representation of the error model, but it + # is not necessarily the actual wire format. When the `Status` message is + # exposed in different client libraries and different wire protocols, it can be + # mapped differently. For example, it will likely be mapped to some exceptions + # in Java, but more likely mapped to some error codes in C. + # # Other uses + # The error model and the `Status` message can be used in a variety of + # environments, either with or without APIs, to provide a + # consistent developer experience across different environments. + # Example uses of this error model include: + # - Partial errors. If a service needs to return partial errors to the client, + # it may embed the `Status` in the normal response to indicate the partial + # errors. + # - Workflow errors. A typical workflow has multiple steps. Each step may + # have a `Status` message for error reporting. + # - Batch operations. If a client uses batch request and batch response, the + # `Status` message should be used directly inside batch response, one for + # each error sub-response. + # - Asynchronous operations. If an API call embeds asynchronous operation + # results in its response, the status of those operations should be + # represented directly using the `Status` message. + # - Logging. If some API errors are stored in logs, the message `Status` could + # be used directly after any stripping needed for security/privacy reasons. + class Status include Google::Apis::Core::Hashable - # [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token. - # Corresponds to the JSON property `lemma` + # The status code, which should be an enum value of google.rpc.Code. + # Corresponds to the JSON property `code` + # @return [Fixnum] + attr_accessor :code + + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # google.rpc.Status.details field, or localized by the client. + # Corresponds to the JSON property `message` # @return [String] - attr_accessor :lemma + attr_accessor :message - # Represents part of speech information for a token. Parts of speech - # are as defined in - # http://www.lrec-conf.org/proceedings/lrec2012/pdf/274_Paper.pdf - # Corresponds to the JSON property `partOfSpeech` - # @return [Google::Apis::LanguageV1::PartOfSpeech] - attr_accessor :part_of_speech - - # Represents an output piece of text. - # Corresponds to the JSON property `text` - # @return [Google::Apis::LanguageV1::TextSpan] - attr_accessor :text - - # Represents dependency parse tree information for a token. (For more - # information on dependency labels, see - # http://www.aclweb.org/anthology/P13-2017 - # Corresponds to the JSON property `dependencyEdge` - # @return [Google::Apis::LanguageV1::DependencyEdge] - attr_accessor :dependency_edge + # A list of messages that carry the error details. There will be a + # common set of message types for APIs to use. + # Corresponds to the JSON property `details` + # @return [Array>] + attr_accessor :details + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @code = args[:code] if args.key?(:code) + @message = args[:message] if args.key?(:message) + @details = args[:details] if args.key?(:details) + end + end + + # Represents a mention for an entity in the text. Currently, proper noun + # mentions are supported. + class EntityMention + include Google::Apis::Core::Hashable + + # Represents an output piece of text. + # Corresponds to the JSON property `text` + # @return [Google::Apis::LanguageV1::TextSpan] + attr_accessor :text + + # The type of the entity mention. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type def initialize(**args) update!(**args) @@ -746,10 +583,173 @@ module Google # Update properties of this object def update!(**args) - @lemma = args[:lemma] if args.key?(:lemma) - @part_of_speech = args[:part_of_speech] if args.key?(:part_of_speech) @text = args[:text] if args.key?(:text) - @dependency_edge = args[:dependency_edge] if args.key?(:dependency_edge) + @type = args[:type] if args.key?(:type) + end + end + + # All available features for sentiment, syntax, and semantic analysis. + # Setting each one to true will enable that specific analysis for the input. + class Features + include Google::Apis::Core::Hashable + + # Extract syntax information. + # Corresponds to the JSON property `extractSyntax` + # @return [Boolean] + attr_accessor :extract_syntax + alias_method :extract_syntax?, :extract_syntax + + # Extract document-level sentiment. + # Corresponds to the JSON property `extractDocumentSentiment` + # @return [Boolean] + attr_accessor :extract_document_sentiment + alias_method :extract_document_sentiment?, :extract_document_sentiment + + # Extract entities. + # Corresponds to the JSON property `extractEntities` + # @return [Boolean] + attr_accessor :extract_entities + alias_method :extract_entities?, :extract_entities + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @extract_syntax = args[:extract_syntax] if args.key?(:extract_syntax) + @extract_document_sentiment = args[:extract_document_sentiment] if args.key?(:extract_document_sentiment) + @extract_entities = args[:extract_entities] if args.key?(:extract_entities) + end + end + + # ################################################################ # + # Represents the input to API methods. + class Document + include Google::Apis::Core::Hashable + + # Required. If the type is not set or is `TYPE_UNSPECIFIED`, + # returns an `INVALID_ARGUMENT` error. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # The content of the input in string format. + # Corresponds to the JSON property `content` + # @return [String] + attr_accessor :content + + # The Google Cloud Storage URI where the file content is located. + # This URI must be of the form: gs://bucket_name/object_name. For more + # details, see https://cloud.google.com/storage/docs/reference-uris. + # NOTE: Cloud Storage object versioning is not supported. + # Corresponds to the JSON property `gcsContentUri` + # @return [String] + attr_accessor :gcs_content_uri + + # The language of the document (if not specified, the language is + # automatically detected). Both ISO and BCP-47 language codes are + # accepted.
+ # [Language Support](/natural-language/docs/languages) + # lists currently supported languages for each API method. + # If the language (either specified by the caller or automatically detected) + # is not supported by the called API method, an `INVALID_ARGUMENT` error + # is returned. + # Corresponds to the JSON property `language` + # @return [String] + attr_accessor :language + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @type = args[:type] if args.key?(:type) + @content = args[:content] if args.key?(:content) + @gcs_content_uri = args[:gcs_content_uri] if args.key?(:gcs_content_uri) + @language = args[:language] if args.key?(:language) + end + end + + # Represents a sentence in the input document. + class Sentence + include Google::Apis::Core::Hashable + + # Represents an output piece of text. + # Corresponds to the JSON property `text` + # @return [Google::Apis::LanguageV1::TextSpan] + attr_accessor :text + + # Represents the feeling associated with the entire text or entities in + # the text. + # Corresponds to the JSON property `sentiment` + # @return [Google::Apis::LanguageV1::Sentiment] + attr_accessor :sentiment + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @text = args[:text] if args.key?(:text) + @sentiment = args[:sentiment] if args.key?(:sentiment) + end + end + + # The entity analysis request message. + class AnalyzeEntitiesRequest + include Google::Apis::Core::Hashable + + # ################################################################ # + # Represents the input to API methods. + # Corresponds to the JSON property `document` + # @return [Google::Apis::LanguageV1::Document] + attr_accessor :document + + # The encoding type used by the API to calculate offsets. + # Corresponds to the JSON property `encodingType` + # @return [String] + attr_accessor :encoding_type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @document = args[:document] if args.key?(:document) + @encoding_type = args[:encoding_type] if args.key?(:encoding_type) + end + end + + # Represents the feeling associated with the entire text or entities in + # the text. + class Sentiment + include Google::Apis::Core::Hashable + + # A non-negative number in the [0, +inf) range, which represents + # the absolute magnitude of sentiment regardless of score (positive or + # negative). + # Corresponds to the JSON property `magnitude` + # @return [Float] + attr_accessor :magnitude + + # Sentiment score between -1.0 (negative sentiment) and 1.0 + # (positive sentiment). + # Corresponds to the JSON property `score` + # @return [Float] + attr_accessor :score + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @magnitude = args[:magnitude] if args.key?(:magnitude) + @score = args[:score] if args.key?(:score) end end end diff --git a/generated/google/apis/language_v1/representations.rb b/generated/google/apis/language_v1/representations.rb index 3be1e2486..8d2badae6 100644 --- a/generated/google/apis/language_v1/representations.rb +++ b/generated/google/apis/language_v1/representations.rb @@ -22,48 +22,6 @@ module Google module Apis module LanguageV1 - class Status - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Features - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class EntityMention - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Document - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Sentence - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Sentiment - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AnalyzeEntitiesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class PartOfSpeech class Representation < Google::Apis::Core::JsonRepresentation; end @@ -124,88 +82,63 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class TextSpan - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class Token class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class Status - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :details, as: 'details' - property :code, as: 'code' - property :message, as: 'message' - end + class TextSpan + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end - class Features - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :extract_syntax, as: 'extractSyntax' - property :extract_document_sentiment, as: 'extractDocumentSentiment' - property :extract_entities, as: 'extractEntities' - end + class Status + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class EntityMention - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :text, as: 'text', class: Google::Apis::LanguageV1::TextSpan, decorator: Google::Apis::LanguageV1::TextSpan::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :type, as: 'type' - end + include Google::Apis::Core::JsonObjectSupport + end + + class Features + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class Document - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :gcs_content_uri, as: 'gcsContentUri' - property :language, as: 'language' - property :type, as: 'type' - property :content, as: 'content' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class Sentence - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :sentiment, as: 'sentiment', class: Google::Apis::LanguageV1::Sentiment, decorator: Google::Apis::LanguageV1::Sentiment::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :text, as: 'text', class: Google::Apis::LanguageV1::TextSpan, decorator: Google::Apis::LanguageV1::TextSpan::Representation - - end - end - - class Sentiment - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :score, as: 'score' - property :magnitude, as: 'magnitude' - end + include Google::Apis::Core::JsonObjectSupport end class AnalyzeEntitiesRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :encoding_type, as: 'encodingType' - property :document, as: 'document', class: Google::Apis::LanguageV1::Document, decorator: Google::Apis::LanguageV1::Document::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport + end + + class Sentiment + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class PartOfSpeech # @private class Representation < Google::Apis::Core::JsonRepresentation - property :case, as: 'case' - property :tense, as: 'tense' - property :reciprocity, as: 'reciprocity' property :form, as: 'form' property :number, as: 'number' property :voice, as: 'voice' @@ -215,6 +148,9 @@ module Google property :gender, as: 'gender' property :person, as: 'person' property :proper, as: 'proper' + property :case, as: 'case' + property :tense, as: 'tense' + property :reciprocity, as: 'reciprocity' end end @@ -284,8 +220,6 @@ module Google class AnnotateTextResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :entities, as: 'entities', class: Google::Apis::LanguageV1::Entity, decorator: Google::Apis::LanguageV1::Entity::Representation - property :document_sentiment, as: 'documentSentiment', class: Google::Apis::LanguageV1::Sentiment, decorator: Google::Apis::LanguageV1::Sentiment::Representation property :language, as: 'language' @@ -293,6 +227,8 @@ module Google collection :tokens, as: 'tokens', class: Google::Apis::LanguageV1::Token, decorator: Google::Apis::LanguageV1::Token::Representation + collection :entities, as: 'entities', class: Google::Apis::LanguageV1::Entity, decorator: Google::Apis::LanguageV1::Entity::Representation + end end @@ -308,8 +244,21 @@ module Google class DependencyEdge # @private class Representation < Google::Apis::Core::JsonRepresentation - property :label, as: 'label' property :head_token_index, as: 'headTokenIndex' + property :label, as: 'label' + end + end + + class Token + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :text, as: 'text', class: Google::Apis::LanguageV1::TextSpan, decorator: Google::Apis::LanguageV1::TextSpan::Representation + + property :dependency_edge, as: 'dependencyEdge', class: Google::Apis::LanguageV1::DependencyEdge, decorator: Google::Apis::LanguageV1::DependencyEdge::Representation + + property :lemma, as: 'lemma' + property :part_of_speech, as: 'partOfSpeech', class: Google::Apis::LanguageV1::PartOfSpeech, decorator: Google::Apis::LanguageV1::PartOfSpeech::Representation + end end @@ -321,16 +270,67 @@ module Google end end - class Token + class Status # @private class Representation < Google::Apis::Core::JsonRepresentation - property :lemma, as: 'lemma' - property :part_of_speech, as: 'partOfSpeech', class: Google::Apis::LanguageV1::PartOfSpeech, decorator: Google::Apis::LanguageV1::PartOfSpeech::Representation + property :code, as: 'code' + property :message, as: 'message' + collection :details, as: 'details' + end + end + class EntityMention + # @private + class Representation < Google::Apis::Core::JsonRepresentation property :text, as: 'text', class: Google::Apis::LanguageV1::TextSpan, decorator: Google::Apis::LanguageV1::TextSpan::Representation - property :dependency_edge, as: 'dependencyEdge', class: Google::Apis::LanguageV1::DependencyEdge, decorator: Google::Apis::LanguageV1::DependencyEdge::Representation + property :type, as: 'type' + end + end + class Features + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :extract_syntax, as: 'extractSyntax' + property :extract_document_sentiment, as: 'extractDocumentSentiment' + property :extract_entities, as: 'extractEntities' + end + end + + class Document + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :type, as: 'type' + property :content, as: 'content' + property :gcs_content_uri, as: 'gcsContentUri' + property :language, as: 'language' + end + end + + class Sentence + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :text, as: 'text', class: Google::Apis::LanguageV1::TextSpan, decorator: Google::Apis::LanguageV1::TextSpan::Representation + + property :sentiment, as: 'sentiment', class: Google::Apis::LanguageV1::Sentiment, decorator: Google::Apis::LanguageV1::Sentiment::Representation + + end + end + + class AnalyzeEntitiesRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :document, as: 'document', class: Google::Apis::LanguageV1::Document, decorator: Google::Apis::LanguageV1::Document::Representation + + property :encoding_type, as: 'encodingType' + end + end + + class Sentiment + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :magnitude, as: 'magnitude' + property :score, as: 'score' end end end diff --git a/generated/google/apis/language_v1/service.rb b/generated/google/apis/language_v1/service.rb index 0f87d27de..4ab2a291d 100644 --- a/generated/google/apis/language_v1/service.rb +++ b/generated/google/apis/language_v1/service.rb @@ -22,9 +22,9 @@ module Google module LanguageV1 # Google Cloud Natural Language API # - # Google Cloud Natural Language API provides natural language understanding - # technologies to developers. Examples include sentiment analysis, entity - # recognition, and text annotations. + # Provides natural language understanding technologies to developers. Examples + # include sentiment analysis, entity recognition, entity sentiment analysis, and + # text annotations. # # @example # require 'google/apis/language_v1' @@ -49,6 +49,67 @@ module Google @batch_path = 'batch' end + # Analyzes the sentiment of the provided text. + # @param [Google::Apis::LanguageV1::AnalyzeSentimentRequest] analyze_sentiment_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::LanguageV1::AnalyzeSentimentResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::LanguageV1::AnalyzeSentimentResponse] + # + # @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 analyze_document_sentiment(analyze_sentiment_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/documents:analyzeSentiment', options) + command.request_representation = Google::Apis::LanguageV1::AnalyzeSentimentRequest::Representation + command.request_object = analyze_sentiment_request_object + command.response_representation = Google::Apis::LanguageV1::AnalyzeSentimentResponse::Representation + command.response_class = Google::Apis::LanguageV1::AnalyzeSentimentResponse + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # A convenience method that provides all the features that analyzeSentiment, + # analyzeEntities, and analyzeSyntax provide in one call. + # @param [Google::Apis::LanguageV1::AnnotateTextRequest] annotate_text_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::LanguageV1::AnnotateTextResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::LanguageV1::AnnotateTextResponse] + # + # @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 annotate_document_text(annotate_text_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/documents:annotateText', options) + command.request_representation = Google::Apis::LanguageV1::AnnotateTextRequest::Representation + command.request_object = annotate_text_request_object + command.response_representation = Google::Apis::LanguageV1::AnnotateTextResponse::Representation + command.response_class = Google::Apis::LanguageV1::AnnotateTextResponse + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Finds named entities (currently proper names and common nouns) in the text # along with entity types, salience, mentions for each entity, and # other properties. @@ -112,67 +173,6 @@ module Google command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end - - # Analyzes the sentiment of the provided text. - # @param [Google::Apis::LanguageV1::AnalyzeSentimentRequest] analyze_sentiment_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::LanguageV1::AnalyzeSentimentResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LanguageV1::AnalyzeSentimentResponse] - # - # @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 analyze_document_sentiment(analyze_sentiment_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/documents:analyzeSentiment', options) - command.request_representation = Google::Apis::LanguageV1::AnalyzeSentimentRequest::Representation - command.request_object = analyze_sentiment_request_object - command.response_representation = Google::Apis::LanguageV1::AnalyzeSentimentResponse::Representation - command.response_class = Google::Apis::LanguageV1::AnalyzeSentimentResponse - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # A convenience method that provides all the features that analyzeSentiment, - # analyzeEntities, and analyzeSyntax provide in one call. - # @param [Google::Apis::LanguageV1::AnnotateTextRequest] annotate_text_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::LanguageV1::AnnotateTextResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LanguageV1::AnnotateTextResponse] - # - # @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 annotate_document_text(annotate_text_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/documents:annotateText', options) - command.request_representation = Google::Apis::LanguageV1::AnnotateTextRequest::Representation - command.request_object = annotate_text_request_object - command.response_representation = Google::Apis::LanguageV1::AnnotateTextResponse::Representation - command.response_class = Google::Apis::LanguageV1::AnnotateTextResponse - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end protected diff --git a/generated/google/apis/language_v1beta1.rb b/generated/google/apis/language_v1beta1.rb index c48f0468f..dbaa30880 100644 --- a/generated/google/apis/language_v1beta1.rb +++ b/generated/google/apis/language_v1beta1.rb @@ -20,14 +20,14 @@ module Google module Apis # Google Cloud Natural Language API # - # Google Cloud Natural Language API provides natural language understanding - # technologies to developers. Examples include sentiment analysis, entity - # recognition, and text annotations. + # Provides natural language understanding technologies to developers. Examples + # include sentiment analysis, entity recognition, entity sentiment analysis, and + # text annotations. # # @see https://cloud.google.com/natural-language/ module LanguageV1beta1 VERSION = 'V1beta1' - REVISION = '20170502' + REVISION = '20170525' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/language_v1beta1/classes.rb b/generated/google/apis/language_v1beta1/classes.rb index 86e75e519..03e08d579 100644 --- a/generated/google/apis/language_v1beta1/classes.rb +++ b/generated/google/apis/language_v1beta1/classes.rb @@ -111,25 +111,25 @@ module Google class AnalyzeSyntaxRequest include Google::Apis::Core::Hashable - # The encoding type used by the API to calculate offsets. - # Corresponds to the JSON property `encodingType` - # @return [String] - attr_accessor :encoding_type - # ################################################################ # # Represents the input to API methods. # Corresponds to the JSON property `document` # @return [Google::Apis::LanguageV1beta1::Document] attr_accessor :document + # The encoding type used by the API to calculate offsets. + # Corresponds to the JSON property `encodingType` + # @return [String] + attr_accessor :encoding_type + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @encoding_type = args[:encoding_type] if args.key?(:encoding_type) @document = args[:document] if args.key?(:document) + @encoding_type = args[:encoding_type] if args.key?(:encoding_type) end end @@ -171,33 +171,11 @@ module Google class AnalyzeEntitiesResponse include Google::Apis::Core::Hashable - # The language of the text, which will be the same as the language specified - # in the request or, if not specified, the automatically-detected language. - # See Document.language field for more details. - # Corresponds to the JSON property `language` - # @return [String] - attr_accessor :language - # The recognized entities in the input document. # Corresponds to the JSON property `entities` # @return [Array] attr_accessor :entities - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @language = args[:language] if args.key?(:language) - @entities = args[:entities] if args.key?(:entities) - end - end - - # The syntax analysis response message. - class AnalyzeSyntaxResponse - include Google::Apis::Core::Hashable - # The language of the text, which will be the same as the language specified # in the request or, if not specified, the automatically-detected language. # See Document.language field for more details. @@ -205,25 +183,14 @@ module Google # @return [String] attr_accessor :language - # Sentences in the input document. - # Corresponds to the JSON property `sentences` - # @return [Array] - attr_accessor :sentences - - # Tokens, along with their syntactic information, in the input document. - # Corresponds to the JSON property `tokens` - # @return [Array] - attr_accessor :tokens - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @entities = args[:entities] if args.key?(:entities) @language = args[:language] if args.key?(:language) - @sentences = args[:sentences] if args.key?(:sentences) - @tokens = args[:tokens] if args.key?(:tokens) end end @@ -279,6 +246,39 @@ module Google end end + # The syntax analysis response message. + class AnalyzeSyntaxResponse + include Google::Apis::Core::Hashable + + # The language of the text, which will be the same as the language specified + # in the request or, if not specified, the automatically-detected language. + # See Document.language field for more details. + # Corresponds to the JSON property `language` + # @return [String] + attr_accessor :language + + # Sentences in the input document. + # Corresponds to the JSON property `sentences` + # @return [Array] + attr_accessor :sentences + + # Tokens, along with their syntactic information, in the input document. + # Corresponds to the JSON property `tokens` + # @return [Array] + attr_accessor :tokens + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @language = args[:language] if args.key?(:language) + @sentences = args[:sentences] if args.key?(:sentences) + @tokens = args[:tokens] if args.key?(:tokens) + end + end + # The request message for the text annotation API, which can perform multiple # analysis types (sentiment, entities, and syntax) in one call. class AnnotateTextRequest @@ -317,6 +317,19 @@ module Google class AnnotateTextResponse include Google::Apis::Core::Hashable + # Sentences in the input document. Populated if the user enables + # AnnotateTextRequest.Features.extract_syntax. + # Corresponds to the JSON property `sentences` + # @return [Array] + attr_accessor :sentences + + # Tokens, along with their syntactic information, in the input document. + # Populated if the user enables + # AnnotateTextRequest.Features.extract_syntax. + # Corresponds to the JSON property `tokens` + # @return [Array] + attr_accessor :tokens + # Entities, along with their semantic information, in the input document. # Populated if the user enables # AnnotateTextRequest.Features.extract_entities. @@ -337,30 +350,17 @@ module Google # @return [String] attr_accessor :language - # Sentences in the input document. Populated if the user enables - # AnnotateTextRequest.Features.extract_syntax. - # Corresponds to the JSON property `sentences` - # @return [Array] - attr_accessor :sentences - - # Tokens, along with their syntactic information, in the input document. - # Populated if the user enables - # AnnotateTextRequest.Features.extract_syntax. - # Corresponds to the JSON property `tokens` - # @return [Array] - attr_accessor :tokens - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @sentences = args[:sentences] if args.key?(:sentences) + @tokens = args[:tokens] if args.key?(:tokens) @entities = args[:entities] if args.key?(:entities) @document_sentiment = args[:document_sentiment] if args.key?(:document_sentiment) @language = args[:language] if args.key?(:language) - @sentences = args[:sentences] if args.key?(:sentences) - @tokens = args[:tokens] if args.key?(:tokens) end end @@ -450,11 +450,6 @@ module Google class Token include Google::Apis::Core::Hashable - # Represents part of speech information for a token. - # Corresponds to the JSON property `partOfSpeech` - # @return [Google::Apis::LanguageV1beta1::PartOfSpeech] - attr_accessor :part_of_speech - # Represents an output piece of text. # Corresponds to the JSON property `text` # @return [Google::Apis::LanguageV1beta1::TextSpan] @@ -470,16 +465,21 @@ module Google # @return [String] attr_accessor :lemma + # Represents part of speech information for a token. + # Corresponds to the JSON property `partOfSpeech` + # @return [Google::Apis::LanguageV1beta1::PartOfSpeech] + attr_accessor :part_of_speech + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @part_of_speech = args[:part_of_speech] if args.key?(:part_of_speech) @text = args[:text] if args.key?(:text) @dependency_edge = args[:dependency_edge] if args.key?(:dependency_edge) @lemma = args[:lemma] if args.key?(:lemma) + @part_of_speech = args[:part_of_speech] if args.key?(:part_of_speech) end end @@ -497,7 +497,7 @@ module Google # error message is needed, put the localized message in the error details or # localize it in the client. The optional error details may contain arbitrary # information about the error. There is a predefined set of error detail types - # in the package `google.rpc` which can be used for common error conditions. + # in the package `google.rpc` that can be used for common error conditions. # # Language mapping # The `Status` message is the logical representation of the error model, but it # is not necessarily the actual wire format. When the `Status` message is @@ -513,7 +513,7 @@ module Google # it may embed the `Status` in the normal response to indicate the partial # errors. # - Workflow errors. A typical workflow has multiple steps. Each step may - # have a `Status` message for error reporting purpose. + # have a `Status` message for error reporting. # - Batch operations. If a client uses batch request and batch response, the # `Status` message should be used directly inside batch response, one for # each error sub-response. @@ -525,13 +525,6 @@ module Google class Status include Google::Apis::Core::Hashable - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # google.rpc.Status.details field, or localized by the client. - # Corresponds to the JSON property `message` - # @return [String] - attr_accessor :message - # A list of messages that carry the error details. There will be a # common set of message types for APIs to use. # Corresponds to the JSON property `details` @@ -543,15 +536,22 @@ module Google # @return [Fixnum] attr_accessor :code + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # google.rpc.Status.details field, or localized by the client. + # Corresponds to the JSON property `message` + # @return [String] + attr_accessor :message + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @message = args[:message] if args.key?(:message) @details = args[:details] if args.key?(:details) @code = args[:code] if args.key?(:code) + @message = args[:message] if args.key?(:message) end end @@ -647,18 +647,6 @@ module Google class Document include Google::Apis::Core::Hashable - # The language of the document (if not specified, the language is - # automatically detected). Both ISO and BCP-47 language codes are - # accepted.
- # [Language Support](https://cloud.google.com/natural-language/docs/languages) - # lists currently supported languages for each API method. - # If the language (either specified by the caller or automatically detected) - # is not supported by the called API method, an `INVALID_ARGUMENT` error - # is returned. - # Corresponds to the JSON property `language` - # @return [String] - attr_accessor :language - # Required. If the type is not set or is `TYPE_UNSPECIFIED`, # returns an `INVALID_ARGUMENT` error. # Corresponds to the JSON property `type` @@ -678,16 +666,28 @@ module Google # @return [String] attr_accessor :gcs_content_uri + # The language of the document (if not specified, the language is + # automatically detected). Both ISO and BCP-47 language codes are + # accepted.
+ # [Language Support](/natural-language/docs/languages) + # lists currently supported languages for each API method. + # If the language (either specified by the caller or automatically detected) + # is not supported by the called API method, an `INVALID_ARGUMENT` error + # is returned. + # Corresponds to the JSON property `language` + # @return [String] + attr_accessor :language + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @language = args[:language] if args.key?(:language) @type = args[:type] if args.key?(:type) @content = args[:content] if args.key?(:content) @gcs_content_uri = args[:gcs_content_uri] if args.key?(:gcs_content_uri) + @language = args[:language] if args.key?(:language) end end diff --git a/generated/google/apis/language_v1beta1/representations.rb b/generated/google/apis/language_v1beta1/representations.rb index 94d965ff5..439f61d68 100644 --- a/generated/google/apis/language_v1beta1/representations.rb +++ b/generated/google/apis/language_v1beta1/representations.rb @@ -46,13 +46,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class AnalyzeSyntaxResponse + class Entity class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class Entity + class AnalyzeSyntaxResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -157,9 +157,9 @@ module Google class AnalyzeSyntaxRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :encoding_type, as: 'encodingType' property :document, as: 'document', class: Google::Apis::LanguageV1beta1::Document, decorator: Google::Apis::LanguageV1beta1::Document::Representation + property :encoding_type, as: 'encodingType' end end @@ -177,20 +177,9 @@ module Google class AnalyzeEntitiesResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - property :language, as: 'language' collection :entities, as: 'entities', class: Google::Apis::LanguageV1beta1::Entity, decorator: Google::Apis::LanguageV1beta1::Entity::Representation - end - end - - class AnalyzeSyntaxResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation property :language, as: 'language' - collection :sentences, as: 'sentences', class: Google::Apis::LanguageV1beta1::Sentence, decorator: Google::Apis::LanguageV1beta1::Sentence::Representation - - collection :tokens, as: 'tokens', class: Google::Apis::LanguageV1beta1::Token, decorator: Google::Apis::LanguageV1beta1::Token::Representation - end end @@ -206,6 +195,17 @@ module Google end end + class AnalyzeSyntaxResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :language, as: 'language' + collection :sentences, as: 'sentences', class: Google::Apis::LanguageV1beta1::Sentence, decorator: Google::Apis::LanguageV1beta1::Sentence::Representation + + collection :tokens, as: 'tokens', class: Google::Apis::LanguageV1beta1::Token, decorator: Google::Apis::LanguageV1beta1::Token::Representation + + end + end + class AnnotateTextRequest # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -220,15 +220,15 @@ module Google class AnnotateTextResponse # @private class Representation < Google::Apis::Core::JsonRepresentation + collection :sentences, as: 'sentences', class: Google::Apis::LanguageV1beta1::Sentence, decorator: Google::Apis::LanguageV1beta1::Sentence::Representation + + collection :tokens, as: 'tokens', class: Google::Apis::LanguageV1beta1::Token, decorator: Google::Apis::LanguageV1beta1::Token::Representation + collection :entities, as: 'entities', class: Google::Apis::LanguageV1beta1::Entity, decorator: Google::Apis::LanguageV1beta1::Entity::Representation property :document_sentiment, as: 'documentSentiment', class: Google::Apis::LanguageV1beta1::Sentiment, decorator: Google::Apis::LanguageV1beta1::Sentiment::Representation property :language, as: 'language' - collection :sentences, as: 'sentences', class: Google::Apis::LanguageV1beta1::Sentence, decorator: Google::Apis::LanguageV1beta1::Sentence::Representation - - collection :tokens, as: 'tokens', class: Google::Apis::LanguageV1beta1::Token, decorator: Google::Apis::LanguageV1beta1::Token::Representation - end end @@ -260,22 +260,22 @@ module Google class Token # @private class Representation < Google::Apis::Core::JsonRepresentation - property :part_of_speech, as: 'partOfSpeech', class: Google::Apis::LanguageV1beta1::PartOfSpeech, decorator: Google::Apis::LanguageV1beta1::PartOfSpeech::Representation - property :text, as: 'text', class: Google::Apis::LanguageV1beta1::TextSpan, decorator: Google::Apis::LanguageV1beta1::TextSpan::Representation property :dependency_edge, as: 'dependencyEdge', class: Google::Apis::LanguageV1beta1::DependencyEdge, decorator: Google::Apis::LanguageV1beta1::DependencyEdge::Representation property :lemma, as: 'lemma' + property :part_of_speech, as: 'partOfSpeech', class: Google::Apis::LanguageV1beta1::PartOfSpeech, decorator: Google::Apis::LanguageV1beta1::PartOfSpeech::Representation + end end class Status # @private class Representation < Google::Apis::Core::JsonRepresentation - property :message, as: 'message' collection :details, as: 'details' property :code, as: 'code' + property :message, as: 'message' end end @@ -310,10 +310,10 @@ module Google class Document # @private class Representation < Google::Apis::Core::JsonRepresentation - property :language, as: 'language' property :type, as: 'type' property :content, as: 'content' property :gcs_content_uri, as: 'gcsContentUri' + property :language, as: 'language' end end diff --git a/generated/google/apis/language_v1beta1/service.rb b/generated/google/apis/language_v1beta1/service.rb index 9ecaa3764..da3727de8 100644 --- a/generated/google/apis/language_v1beta1/service.rb +++ b/generated/google/apis/language_v1beta1/service.rb @@ -22,9 +22,9 @@ module Google module LanguageV1beta1 # Google Cloud Natural Language API # - # Google Cloud Natural Language API provides natural language understanding - # technologies to developers. Examples include sentiment analysis, entity - # recognition, and text annotations. + # Provides natural language understanding technologies to developers. Examples + # include sentiment analysis, entity recognition, entity sentiment analysis, and + # text annotations. # # @example # require 'google/apis/language_v1beta1' diff --git a/generated/google/apis/logging_v2.rb b/generated/google/apis/logging_v2.rb index 96484ea49..0e7779c04 100644 --- a/generated/google/apis/logging_v2.rb +++ b/generated/google/apis/logging_v2.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/logging/docs/ module LoggingV2 VERSION = 'V2' - REVISION = '20170410' + REVISION = '20170523' # View your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM_READ_ONLY = 'https://www.googleapis.com/auth/cloud-platform.read-only' diff --git a/generated/google/apis/logging_v2/classes.rb b/generated/google/apis/logging_v2/classes.rb index 8a6f5cadb..33a11ef60 100644 --- a/generated/google/apis/logging_v2/classes.rb +++ b/generated/google/apis/logging_v2/classes.rb @@ -22,695 +22,12 @@ module Google module Apis module LoggingV2 - # Complete log information about a single HTTP request to an App Engine - # application. - class RequestLog - include Google::Apis::Core::Hashable - - # Time when the request started. - # Corresponds to the JSON property `startTime` - # @return [String] - attr_accessor :start_time - - # Latency of the request. - # Corresponds to the JSON property `latency` - # @return [String] - attr_accessor :latency - - # Origin IP address. - # Corresponds to the JSON property `ip` - # @return [String] - attr_accessor :ip - - # Application that handled this request. - # Corresponds to the JSON property `appId` - # @return [String] - attr_accessor :app_id - - # App Engine release version. - # Corresponds to the JSON property `appEngineRelease` - # @return [String] - attr_accessor :app_engine_release - - # Request method. Example: "GET", "HEAD", "PUT", "POST", "DELETE". - # Corresponds to the JSON property `method` - # @return [String] - attr_accessor :method_prop - - # An indication of the relative cost of serving this request. - # Corresponds to the JSON property `cost` - # @return [Float] - attr_accessor :cost - - # An identifier for the instance that handled the request. - # Corresponds to the JSON property `instanceId` - # @return [String] - attr_accessor :instance_id - - # Number of CPU megacycles used to process request. - # Corresponds to the JSON property `megaCycles` - # @return [Fixnum] - attr_accessor :mega_cycles - - # Whether this is the first RequestLog entry for this request. If an active - # request has several RequestLog entries written to Stackdriver Logging, then - # this field will be set for one of them. - # Corresponds to the JSON property `first` - # @return [Boolean] - attr_accessor :first - alias_method :first?, :first - - # Version of the application that handled this request. - # Corresponds to the JSON property `versionId` - # @return [String] - attr_accessor :version_id - - # Module of the application that handled this request. - # Corresponds to the JSON property `moduleId` - # @return [String] - attr_accessor :module_id - - # Time when the request finished. - # Corresponds to the JSON property `endTime` - # @return [String] - attr_accessor :end_time - - # User agent that made the request. - # Corresponds to the JSON property `userAgent` - # @return [String] - attr_accessor :user_agent - - # Whether this was a loading request for the instance. - # Corresponds to the JSON property `wasLoadingRequest` - # @return [Boolean] - attr_accessor :was_loading_request - alias_method :was_loading_request?, :was_loading_request - - # Source code for the application that handled this request. There can be more - # than one source reference per deployed application if source code is - # distributed among multiple repositories. - # Corresponds to the JSON property `sourceReference` - # @return [Array] - attr_accessor :source_reference - - # Size in bytes sent back to client by request. - # Corresponds to the JSON property `responseSize` - # @return [Fixnum] - attr_accessor :response_size - - # Stackdriver Trace identifier for this request. - # Corresponds to the JSON property `traceId` - # @return [String] - attr_accessor :trace_id - - # A list of log lines emitted by the application while serving this request. - # Corresponds to the JSON property `line` - # @return [Array] - attr_accessor :line - - # Referrer URL of request. - # Corresponds to the JSON property `referrer` - # @return [String] - attr_accessor :referrer - - # Queue name of the request, in the case of an offline request. - # Corresponds to the JSON property `taskQueueName` - # @return [String] - attr_accessor :task_queue_name - - # Globally unique identifier for a request, which is based on the request start - # time. Request IDs for requests which started later will compare greater as - # strings than those for requests which started earlier. - # Corresponds to the JSON property `requestId` - # @return [String] - attr_accessor :request_id - - # The logged-in user who made the request.Most likely, this is the part of the - # user's email before the @ sign. The field value is the same for different - # requests from the same user, but different users can have similar names. This - # information is also available to the application via the App Engine Users API. - # This field will be populated starting with App Engine 1.9.21. - # Corresponds to the JSON property `nickname` - # @return [String] - attr_accessor :nickname - - # Time this request spent in the pending request queue. - # Corresponds to the JSON property `pendingTime` - # @return [String] - attr_accessor :pending_time - - # Contains the path and query portion of the URL that was requested. For example, - # if the URL was "http://example.com/app?name=val", the resource would be "/app? - # name=val". The fragment identifier, which is identified by the # character, is - # not included. - # Corresponds to the JSON property `resource` - # @return [String] - attr_accessor :resource - - # HTTP response status code. Example: 200, 404. - # Corresponds to the JSON property `status` - # @return [Fixnum] - attr_accessor :status - - # Task name of the request, in the case of an offline request. - # Corresponds to the JSON property `taskName` - # @return [String] - attr_accessor :task_name - - # File or class that handled the request. - # Corresponds to the JSON property `urlMapEntry` - # @return [String] - attr_accessor :url_map_entry - - # If the instance processing this request belongs to a manually scaled module, - # then this is the 0-based index of the instance. Otherwise, this value is -1. - # Corresponds to the JSON property `instanceIndex` - # @return [Fixnum] - attr_accessor :instance_index - - # Whether this request is finished or active. - # Corresponds to the JSON property `finished` - # @return [Boolean] - attr_accessor :finished - alias_method :finished?, :finished - - # Internet host and port number of the resource being requested. - # Corresponds to the JSON property `host` - # @return [String] - attr_accessor :host - - # HTTP version of request. Example: "HTTP/1.1". - # Corresponds to the JSON property `httpVersion` - # @return [String] - attr_accessor :http_version - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @start_time = args[:start_time] if args.key?(:start_time) - @latency = args[:latency] if args.key?(:latency) - @ip = args[:ip] if args.key?(:ip) - @app_id = args[:app_id] if args.key?(:app_id) - @app_engine_release = args[:app_engine_release] if args.key?(:app_engine_release) - @method_prop = args[:method_prop] if args.key?(:method_prop) - @cost = args[:cost] if args.key?(:cost) - @instance_id = args[:instance_id] if args.key?(:instance_id) - @mega_cycles = args[:mega_cycles] if args.key?(:mega_cycles) - @first = args[:first] if args.key?(:first) - @version_id = args[:version_id] if args.key?(:version_id) - @module_id = args[:module_id] if args.key?(:module_id) - @end_time = args[:end_time] if args.key?(:end_time) - @user_agent = args[:user_agent] if args.key?(:user_agent) - @was_loading_request = args[:was_loading_request] if args.key?(:was_loading_request) - @source_reference = args[:source_reference] if args.key?(:source_reference) - @response_size = args[:response_size] if args.key?(:response_size) - @trace_id = args[:trace_id] if args.key?(:trace_id) - @line = args[:line] if args.key?(:line) - @referrer = args[:referrer] if args.key?(:referrer) - @task_queue_name = args[:task_queue_name] if args.key?(:task_queue_name) - @request_id = args[:request_id] if args.key?(:request_id) - @nickname = args[:nickname] if args.key?(:nickname) - @pending_time = args[:pending_time] if args.key?(:pending_time) - @resource = args[:resource] if args.key?(:resource) - @status = args[:status] if args.key?(:status) - @task_name = args[:task_name] if args.key?(:task_name) - @url_map_entry = args[:url_map_entry] if args.key?(:url_map_entry) - @instance_index = args[:instance_index] if args.key?(:instance_index) - @finished = args[:finished] if args.key?(:finished) - @host = args[:host] if args.key?(:host) - @http_version = args[:http_version] if args.key?(:http_version) - end - end - - # Result returned from ListMonitoredResourceDescriptors. - class ListMonitoredResourceDescriptorsResponse - include Google::Apis::Core::Hashable - - # If there might be more results than those appearing in this response, then - # nextPageToken is included. To get the next set of results, call this method - # again using the value of nextPageToken as pageToken. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # A list of resource descriptors. - # Corresponds to the JSON property `resourceDescriptors` - # @return [Array] - attr_accessor :resource_descriptors - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @resource_descriptors = args[:resource_descriptors] if args.key?(:resource_descriptors) - end - end - - # A reference to a particular snapshot of the source tree used to build and - # deploy an application. - class SourceReference - include Google::Apis::Core::Hashable - - # The canonical and persistent identifier of the deployed revision. Example (git) - # : "0035781c50ec7aa23385dc841529ce8a4b70db1b" - # Corresponds to the JSON property `revisionId` - # @return [String] - attr_accessor :revision_id - - # Optional. A URI string identifying the repository. Example: "https://github. - # com/GoogleCloudPlatform/kubernetes.git" - # Corresponds to the JSON property `repository` - # @return [String] - attr_accessor :repository - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @revision_id = args[:revision_id] if args.key?(:revision_id) - @repository = args[:repository] if args.key?(:repository) - end - end - - # Describes a logs-based metric. The value of the metric is the number of log - # entries that match a logs filter in a given time interval. - class LogMetric - include Google::Apis::Core::Hashable - - # Output only. The API version that created or updated this metric. The version - # also dictates the syntax of the filter expression. When a value for this field - # is missing, the default value of V2 should be assumed. - # Corresponds to the JSON property `version` - # @return [String] - attr_accessor :version - - # Required. An advanced logs filter which is used to match log entries. Example: - # "resource.type=gae_app AND severity>=ERROR" - # The maximum length of the filter is 20000 characters. - # Corresponds to the JSON property `filter` - # @return [String] - attr_accessor :filter - - # Required. The client-assigned metric identifier. Examples: "error_count", " - # nginx/requests".Metric identifiers are limited to 100 characters and can - # include only the following characters: A-Z, a-z, 0-9, and the special - # characters _-.,+!*',()%/. The forward-slash character (/) denotes a hierarchy - # of name pieces, and it cannot be the first character of the name.The metric - # identifier in this field must not be URL-encoded (https://en.wikipedia.org/ - # wiki/Percent-encoding). However, when the metric identifier appears as the [ - # METRIC_ID] part of a metric_name API parameter, then the metric identifier - # must be URL-encoded. Example: "projects/my-project/metrics/nginx%2Frequests". - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Optional. A description of this metric, which is used in documentation. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @version = args[:version] if args.key?(:version) - @filter = args[:filter] if args.key?(:filter) - @name = args[:name] if args.key?(:name) - @description = args[:description] if args.key?(:description) - end - end - - # Additional information about a potentially long-running operation with which a - # log entry is associated. - class LogEntryOperation - include Google::Apis::Core::Hashable - - # Optional. Set this to True if this is the last log entry in the operation. - # Corresponds to the JSON property `last` - # @return [Boolean] - attr_accessor :last - alias_method :last?, :last - - # Optional. An arbitrary operation identifier. Log entries with the same - # identifier are assumed to be part of the same operation. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Optional. An arbitrary producer identifier. The combination of id and producer - # must be globally unique. Examples for producer: "MyDivision.MyBigCompany.com", - # "github.com/MyProject/MyApplication". - # Corresponds to the JSON property `producer` - # @return [String] - attr_accessor :producer - - # Optional. Set this to True if this is the first log entry in the operation. - # Corresponds to the JSON property `first` - # @return [Boolean] - attr_accessor :first - alias_method :first?, :first - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @last = args[:last] if args.key?(:last) - @id = args[:id] if args.key?(:id) - @producer = args[:producer] if args.key?(:producer) - @first = args[:first] if args.key?(:first) - end - end - - # Result returned from WriteLogEntries. empty - class WriteLogEntriesResponse - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # An object representing a resource that can be used for monitoring, logging, - # billing, or other purposes. Examples include virtual machine instances, - # databases, and storage devices such as disks. The type field identifies a - # MonitoredResourceDescriptor object that describes the resource's schema. - # Information in the labels field identifies the actual resource and its - # attributes according to the schema. For example, a particular Compute Engine - # VM instance could be represented by the following object, because the - # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and " - # zone": - # ` "type": "gce_instance", - # "labels": ` "instance_id": "12345678901234", - # "zone": "us-central1-a" `` - class MonitoredResource - include Google::Apis::Core::Hashable - - # Required. The monitored resource type. This field must match the type field of - # a MonitoredResourceDescriptor object. For example, the type of a Cloud SQL - # database is "cloudsql_database". - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Required. Values for all of the labels listed in the associated monitored - # resource descriptor. For example, Cloud SQL databases use the labels " - # database_id" and "zone". - # Corresponds to the JSON property `labels` - # @return [Hash] - attr_accessor :labels - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @type = args[:type] if args.key?(:type) - @labels = args[:labels] if args.key?(:labels) - end - end - - # The parameters to WriteLogEntries. - class WriteLogEntriesRequest - include Google::Apis::Core::Hashable - - # Optional. Whether valid entries should be written even if some other entries - # fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any entry is not - # written, then the response status is the error associated with one of the - # failed entries and the response includes error details keyed by the entries' - # zero-based index in the entries.write method. - # Corresponds to the JSON property `partialSuccess` - # @return [Boolean] - attr_accessor :partial_success - alias_method :partial_success?, :partial_success - - # Optional. Default labels that are added to the labels field of all log entries - # in entries. If a log entry already has a label with the same key as a label in - # this parameter, then the log entry's label is not changed. See LogEntry. - # Corresponds to the JSON property `labels` - # @return [Hash] - attr_accessor :labels - - # An object representing a resource that can be used for monitoring, logging, - # billing, or other purposes. Examples include virtual machine instances, - # databases, and storage devices such as disks. The type field identifies a - # MonitoredResourceDescriptor object that describes the resource's schema. - # Information in the labels field identifies the actual resource and its - # attributes according to the schema. For example, a particular Compute Engine - # VM instance could be represented by the following object, because the - # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and " - # zone": - # ` "type": "gce_instance", - # "labels": ` "instance_id": "12345678901234", - # "zone": "us-central1-a" `` - # Corresponds to the JSON property `resource` - # @return [Google::Apis::LoggingV2::MonitoredResource] - attr_accessor :resource - - # Optional. A default log resource name that is assigned to all log entries in - # entries that do not specify a value for log_name: - # "projects/[PROJECT_ID]/logs/[LOG_ID]" - # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - # "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" - # "folders/[FOLDER_ID]/logs/[LOG_ID]" - # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog" - # or "organizations/1234567890/logs/cloudresourcemanager.googleapis.com% - # 2Factivity". For more information about log names, see LogEntry. - # Corresponds to the JSON property `logName` - # @return [String] - attr_accessor :log_name - - # Required. The log entries to write. Values supplied for the fields log_name, - # resource, and labels in this entries.write request are inserted into those log - # entries in this list that do not provide their own values.Stackdriver Logging - # also creates and inserts values for timestamp and insert_id if the entries do - # not provide them. The created insert_id for the N'th entry in this list will - # be greater than earlier entries and less than later entries. Otherwise, the - # order of log entries in this list does not matter.To improve throughput and to - # avoid exceeding the quota limit for calls to entries.write, you should write - # multiple log entries at once rather than calling this method for each - # individual log entry. - # Corresponds to the JSON property `entries` - # @return [Array] - attr_accessor :entries - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @partial_success = args[:partial_success] if args.key?(:partial_success) - @labels = args[:labels] if args.key?(:labels) - @resource = args[:resource] if args.key?(:resource) - @log_name = args[:log_name] if args.key?(:log_name) - @entries = args[:entries] if args.key?(:entries) - end - end - - # Describes a sink used to export log entries to one of the following - # destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a - # Cloud Pub/Sub topic. A logs filter controls which log entries are exported. - # The sink must be created within a project, organization, billing account, or - # folder. - class LogSink - include Google::Apis::Core::Hashable - - # Optional. The time at which this sink will stop exporting log entries. Log - # entries are exported only if their timestamp is earlier than the end time. If - # this field is not supplied, there is no end time. If both a start time and an - # end time are provided, then the end time must be later than the start time. - # Corresponds to the JSON property `endTime` - # @return [String] - attr_accessor :end_time - - # Output only. An IAM identity—a service account or group—under - # which Stackdriver Logging writes the exported log entries to the sink's - # destination. This field is set by sinks.create and sinks.update, based on the - # setting of unique_writer_identity in those methods.Until you grant this - # identity write-access to the destination, log entry exports from this sink - # will fail. For more information, see Granting access for a resource. Consult - # the destination service's documentation to determine the appropriate IAM roles - # to assign to the identity. - # Corresponds to the JSON property `writerIdentity` - # @return [String] - attr_accessor :writer_identity - - # Optional. The time at which this sink will begin exporting log entries. Log - # entries are exported only if their timestamp is not earlier than the start - # time. The default value of this field is the time the sink is created or - # updated. - # Corresponds to the JSON property `startTime` - # @return [String] - attr_accessor :start_time - - # Optional. The log entry format to use for this sink's exported log entries. - # The v2 format is used by default. The v1 format is deprecated and should be - # used only as part of a migration effort to v2. See Migration to the v2 API. - # Corresponds to the JSON property `outputVersionFormat` - # @return [String] - attr_accessor :output_version_format - - # Required. The client-assigned sink identifier, unique within the project. - # Example: "my-syslog-errors-to-pubsub". Sink identifiers are limited to 100 - # characters and can include only the following characters: upper and lower-case - # alphanumeric characters, underscores, hyphens, and periods. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Optional. This field presently applies only to sinks in organizations and - # folders. If true, then logs from children of this entity will also be - # available to this sink for export. Whether particular log entries from the - # children are exported depends on the sink's filter expression. For example, if - # this sink is associated with an organization, then logs from all projects in - # the organization as well as from the organization itself will be available for - # export. - # Corresponds to the JSON property `includeChildren` - # @return [Boolean] - attr_accessor :include_children - alias_method :include_children?, :include_children - - # Required. The export destination: - # "storage.googleapis.com/[GCS_BUCKET]" - # "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]" - # "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" - # The sink's writer_identity, set when the sink is created, must have permission - # to write to the destination or else the log entries are not exported. For more - # information, see Exporting Logs With Sinks. - # Corresponds to the JSON property `destination` - # @return [String] - attr_accessor :destination - - # Optional. An advanced logs filter. The only exported log entries are those - # that are in the resource owning the sink and that match the filter. The filter - # must use the log entry format specified by the output_version_format parameter. - # For example, in the v2 format: - # logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR - # Corresponds to the JSON property `filter` - # @return [String] - attr_accessor :filter - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @end_time = args[:end_time] if args.key?(:end_time) - @writer_identity = args[:writer_identity] if args.key?(:writer_identity) - @start_time = args[:start_time] if args.key?(:start_time) - @output_version_format = args[:output_version_format] if args.key?(:output_version_format) - @name = args[:name] if args.key?(:name) - @include_children = args[:include_children] if args.key?(:include_children) - @destination = args[:destination] if args.key?(:destination) - @filter = args[:filter] if args.key?(:filter) - end - end - - # Result returned from ListLogs. - class ListLogsResponse - include Google::Apis::Core::Hashable - - # A list of log names. For example, "projects/my-project/syslog" or " - # organizations/123/cloudresourcemanager.googleapis.com%2Factivity". - # Corresponds to the JSON property `logNames` - # @return [Array] - attr_accessor :log_names - - # If there might be more results than those appearing in this response, then - # nextPageToken is included. To get the next set of results, call this method - # again using the value of nextPageToken as pageToken. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @log_names = args[:log_names] if args.key?(:log_names) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - # A common proto for logging HTTP requests. Only contains semantics defined by # the HTTP specification. Product-specific logging information MUST be defined # in a separate message. class HttpRequest include Google::Apis::Core::Hashable - # The user agent sent by the client. Example: "Mozilla/4.0 (compatible; MSIE 6.0; - # Windows 98; Q312461; .NET CLR 1.0.3705)". - # Corresponds to the JSON property `userAgent` - # @return [String] - attr_accessor :user_agent - - # The request processing latency on the server, from the time the request was - # received until the response was sent. - # Corresponds to the JSON property `latency` - # @return [String] - attr_accessor :latency - - # The number of HTTP response bytes inserted into cache. Set only when a cache - # fill was attempted. - # Corresponds to the JSON property `cacheFillBytes` - # @return [Fixnum] - attr_accessor :cache_fill_bytes - - # The request method. Examples: "GET", "HEAD", "PUT", "POST". - # Corresponds to the JSON property `requestMethod` - # @return [String] - attr_accessor :request_method - - # The size of the HTTP response message sent back to the client, in bytes, - # including the response headers and the response body. - # Corresponds to the JSON property `responseSize` - # @return [Fixnum] - attr_accessor :response_size - - # The size of the HTTP request message in bytes, including the request headers - # and the request body. - # Corresponds to the JSON property `requestSize` - # @return [Fixnum] - attr_accessor :request_size - - # The scheme (http, https), the host name, the path and the query portion of the - # URL that was requested. Example: "http://example.com/some/info?color=red". - # Corresponds to the JSON property `requestUrl` - # @return [String] - attr_accessor :request_url - - # The IP address (IPv4 or IPv6) of the origin server that the request was sent - # to. - # Corresponds to the JSON property `serverIp` - # @return [String] - attr_accessor :server_ip - - # The IP address (IPv4 or IPv6) of the client that issued the HTTP request. - # Examples: "192.168.1.1", "FE80::0202:B3FF:FE1E:8329". - # Corresponds to the JSON property `remoteIp` - # @return [String] - attr_accessor :remote_ip - # Whether or not a cache lookup was attempted. # Corresponds to the JSON property `cacheLookup` # @return [Boolean] @@ -741,26 +58,79 @@ module Google # @return [String] attr_accessor :referer + # The user agent sent by the client. Example: "Mozilla/4.0 (compatible; MSIE 6.0; + # Windows 98; Q312461; .NET CLR 1.0.3705)". + # Corresponds to the JSON property `userAgent` + # @return [String] + attr_accessor :user_agent + + # The request processing latency on the server, from the time the request was + # received until the response was sent. + # Corresponds to the JSON property `latency` + # @return [String] + attr_accessor :latency + + # The number of HTTP response bytes inserted into cache. Set only when a cache + # fill was attempted. + # Corresponds to the JSON property `cacheFillBytes` + # @return [Fixnum] + attr_accessor :cache_fill_bytes + + # The request method. Examples: "GET", "HEAD", "PUT", "POST". + # Corresponds to the JSON property `requestMethod` + # @return [String] + attr_accessor :request_method + + # The size of the HTTP request message in bytes, including the request headers + # and the request body. + # Corresponds to the JSON property `requestSize` + # @return [Fixnum] + attr_accessor :request_size + + # The size of the HTTP response message sent back to the client, in bytes, + # including the response headers and the response body. + # Corresponds to the JSON property `responseSize` + # @return [Fixnum] + attr_accessor :response_size + + # The scheme (http, https), the host name, the path and the query portion of the + # URL that was requested. Example: "http://example.com/some/info?color=red". + # Corresponds to the JSON property `requestUrl` + # @return [String] + attr_accessor :request_url + + # The IP address (IPv4 or IPv6) of the origin server that the request was sent + # to. + # Corresponds to the JSON property `serverIp` + # @return [String] + attr_accessor :server_ip + + # The IP address (IPv4 or IPv6) of the client that issued the HTTP request. + # Examples: "192.168.1.1", "FE80::0202:B3FF:FE1E:8329". + # Corresponds to the JSON property `remoteIp` + # @return [String] + attr_accessor :remote_ip + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @user_agent = args[:user_agent] if args.key?(:user_agent) - @latency = args[:latency] if args.key?(:latency) - @cache_fill_bytes = args[:cache_fill_bytes] if args.key?(:cache_fill_bytes) - @request_method = args[:request_method] if args.key?(:request_method) - @response_size = args[:response_size] if args.key?(:response_size) - @request_size = args[:request_size] if args.key?(:request_size) - @request_url = args[:request_url] if args.key?(:request_url) - @server_ip = args[:server_ip] if args.key?(:server_ip) - @remote_ip = args[:remote_ip] if args.key?(:remote_ip) @cache_lookup = args[:cache_lookup] if args.key?(:cache_lookup) @cache_hit = args[:cache_hit] if args.key?(:cache_hit) @cache_validated_with_origin_server = args[:cache_validated_with_origin_server] if args.key?(:cache_validated_with_origin_server) @status = args[:status] if args.key?(:status) @referer = args[:referer] if args.key?(:referer) + @user_agent = args[:user_agent] if args.key?(:user_agent) + @latency = args[:latency] if args.key?(:latency) + @cache_fill_bytes = args[:cache_fill_bytes] if args.key?(:cache_fill_bytes) + @request_method = args[:request_method] if args.key?(:request_method) + @request_size = args[:request_size] if args.key?(:request_size) + @response_size = args[:response_size] if args.key?(:response_size) + @request_url = args[:request_url] if args.key?(:request_url) + @server_ip = args[:server_ip] if args.key?(:server_ip) + @remote_ip = args[:remote_ip] if args.key?(:remote_ip) end end @@ -768,6 +138,11 @@ module Google class ListSinksResponse include Google::Apis::Core::Hashable + # A list of sinks. + # Corresponds to the JSON property `sinks` + # @return [Array] + attr_accessor :sinks + # If there might be more results than appear in this response, then # nextPageToken is included. To get the next set of results, call the same # method again using the value of nextPageToken as pageToken. @@ -775,19 +150,14 @@ module Google # @return [String] attr_accessor :next_page_token - # A list of sinks. - # Corresponds to the JSON property `sinks` - # @return [Array] - attr_accessor :sinks - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) @sinks = args[:sinks] if args.key?(:sinks) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) end end @@ -795,11 +165,6 @@ module Google class LabelDescriptor include Google::Apis::Core::Hashable - # The type of data that can be assigned to the label. - # Corresponds to the JSON property `valueType` - # @return [String] - attr_accessor :value_type - # The label key. # Corresponds to the JSON property `key` # @return [String] @@ -810,15 +175,20 @@ module Google # @return [String] attr_accessor :description + # The type of data that can be assigned to the label. + # Corresponds to the JSON property `valueType` + # @return [String] + attr_accessor :value_type + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @value_type = args[:value_type] if args.key?(:value_type) @key = args[:key] if args.key?(:key) @description = args[:description] if args.key?(:description) + @value_type = args[:value_type] if args.key?(:value_type) end end @@ -832,6 +202,16 @@ module Google class MonitoredResourceDescriptor include Google::Apis::Core::Hashable + # Optional. The resource name of the monitored resource descriptor: "projects/` + # project_id`/monitoredResourceDescriptors/`type`" where `type` is the value of + # the type field in this object and `project_id` is a project ID that provides + # API-specific context for accessing the type. APIs that do not use project + # information can use the resource name format "monitoredResourceDescriptors/` + # type`". + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + # Optional. A concise name for the monitored resource type that might be # displayed in user interfaces. It should be a Title Cased Noun Phrase, without # any article or other determiners. For example, "Google Cloud SQL Database". @@ -859,27 +239,17 @@ module Google # @return [Array] attr_accessor :labels - # Optional. The resource name of the monitored resource descriptor: "projects/` - # project_id`/monitoredResourceDescriptors/`type`" where `type` is the value of - # the type field in this object and `project_id` is a project ID that provides - # API-specific context for accessing the type. APIs that do not use project - # information can use the resource name format "monitoredResourceDescriptors/` - # type`". - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @name = args[:name] if args.key?(:name) @display_name = args[:display_name] if args.key?(:display_name) @description = args[:description] if args.key?(:description) @type = args[:type] if args.key?(:type) @labels = args[:labels] if args.key?(:labels) - @name = args[:name] if args.key?(:name) end end @@ -1018,34 +388,14 @@ module Google end end - # A generic empty message that you can re-use to avoid defining duplicated empty - # messages in your APIs. A typical example is to use it as the request or the - # response type of an API method. For instance: - # service Foo ` - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # ` - # The JSON representation for Empty is empty JSON object ``. - class Empty - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - # An individual entry in a log. class LogEntry include Google::Apis::Core::Hashable - # Additional information about the source code location that produced the log - # entry. - # Corresponds to the JSON property `sourceLocation` - # @return [Google::Apis::LoggingV2::LogEntrySourceLocation] - attr_accessor :source_location + # Output only. The time the log entry was received by Stackdriver Logging. + # Corresponds to the JSON property `receiveTimestamp` + # @return [String] + attr_accessor :receive_timestamp # Optional. The time the event described by the log entry occurred. If omitted # in a new log entry, Stackdriver Logging will insert the time the log entry is @@ -1150,13 +500,19 @@ module Google # @return [String] attr_accessor :severity + # Additional information about the source code location that produced the log + # entry. + # Corresponds to the JSON property `sourceLocation` + # @return [Google::Apis::LoggingV2::LogEntrySourceLocation] + attr_accessor :source_location + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @source_location = args[:source_location] if args.key?(:source_location) + @receive_timestamp = args[:receive_timestamp] if args.key?(:receive_timestamp) @timestamp = args[:timestamp] if args.key?(:timestamp) @log_name = args[:log_name] if args.key?(:log_name) @resource = args[:resource] if args.key?(:resource) @@ -1169,6 +525,26 @@ module Google @labels = args[:labels] if args.key?(:labels) @trace = args[:trace] if args.key?(:trace) @severity = args[:severity] if args.key?(:severity) + @source_location = args[:source_location] if args.key?(:source_location) + end + end + + # A generic empty message that you can re-use to avoid defining duplicated empty + # messages in your APIs. A typical example is to use it as the request or the + # response type of an API method. For instance: + # service Foo ` + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # ` + # The JSON representation for Empty is empty JSON object ``. + class Empty + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) end end @@ -1176,6 +552,15 @@ module Google class SourceLocation include Google::Apis::Core::Hashable + # Human-readable name of the function or method being invoked, with optional + # context such as the class or package name. This information is used in + # contexts such as the logs viewer, where a file and line number are less + # meaningful. The format can vary by language. For example: qual.if.ied.Class. + # method (Java), dir/package.func (Go), function (Python). + # Corresponds to the JSON property `functionName` + # @return [String] + attr_accessor :function_name + # Line within the source file. # Corresponds to the JSON property `line` # @return [Fixnum] @@ -1187,24 +572,15 @@ module Google # @return [String] attr_accessor :file - # Human-readable name of the function or method being invoked, with optional - # context such as the class or package name. This information is used in - # contexts such as the logs viewer, where a file and line number are less - # meaningful. The format can vary by language. For example: qual.if.ied.Class. - # method (Java), dir/package.func (Go), function (Python). - # Corresponds to the JSON property `functionName` - # @return [String] - attr_accessor :function_name - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @function_name = args[:function_name] if args.key?(:function_name) @line = args[:line] if args.key?(:line) @file = args[:file] if args.key?(:file) - @function_name = args[:function_name] if args.key?(:function_name) end end @@ -1212,6 +588,23 @@ module Google class ListLogEntriesRequest include Google::Apis::Core::Hashable + # Deprecated. Use resource_names instead. One or more project identifiers or + # project numbers from which to retrieve log entries. Example: "my-project-1A". + # If present, these project identifiers are converted to resource name format + # and added to the list of resources in resource_names. + # Corresponds to the JSON property `projectIds` + # @return [Array] + attr_accessor :project_ids + + # Optional. A filter that chooses which log entries to return. See Advanced Logs + # Filters. Only log entries that match the filter are returned. An empty filter + # matches all log entries in the resources listed in resource_names. Referencing + # a parent resource that is not listed in resource_names will cause the filter + # to return no results. The maximum length of the filter is 20000 characters. + # Corresponds to the JSON property `filter` + # @return [String] + attr_accessor :filter + # Optional. If present, then retrieve the next batch of results from the # preceding call to this method. page_token must be the value of next_page_token # from the previous response. The values of other method parameters should be @@ -1248,22 +641,202 @@ module Google # @return [Array] attr_accessor :resource_names - # Optional. A filter that chooses which log entries to return. See Advanced Logs - # Filters. Only log entries that match the filter are returned. An empty filter - # matches all log entries in the resources listed in resource_names. Referencing - # a parent resource that is not listed in resource_names will cause the filter - # to return no results. The maximum length of the filter is 20000 characters. - # Corresponds to the JSON property `filter` - # @return [String] - attr_accessor :filter + def initialize(**args) + update!(**args) + end - # Deprecated. Use resource_names instead. One or more project identifiers or - # project numbers from which to retrieve log entries. Example: "my-project-1A". - # If present, these project identifiers are converted to resource name format - # and added to the list of resources in resource_names. - # Corresponds to the JSON property `projectIds` - # @return [Array] - attr_accessor :project_ids + # Update properties of this object + def update!(**args) + @project_ids = args[:project_ids] if args.key?(:project_ids) + @filter = args[:filter] if args.key?(:filter) + @page_token = args[:page_token] if args.key?(:page_token) + @page_size = args[:page_size] if args.key?(:page_size) + @order_by = args[:order_by] if args.key?(:order_by) + @resource_names = args[:resource_names] if args.key?(:resource_names) + end + end + + # Complete log information about a single HTTP request to an App Engine + # application. + class RequestLog + include Google::Apis::Core::Hashable + + # Module of the application that handled this request. + # Corresponds to the JSON property `moduleId` + # @return [String] + attr_accessor :module_id + + # Time when the request finished. + # Corresponds to the JSON property `endTime` + # @return [String] + attr_accessor :end_time + + # User agent that made the request. + # Corresponds to the JSON property `userAgent` + # @return [String] + attr_accessor :user_agent + + # Whether this was a loading request for the instance. + # Corresponds to the JSON property `wasLoadingRequest` + # @return [Boolean] + attr_accessor :was_loading_request + alias_method :was_loading_request?, :was_loading_request + + # Source code for the application that handled this request. There can be more + # than one source reference per deployed application if source code is + # distributed among multiple repositories. + # Corresponds to the JSON property `sourceReference` + # @return [Array] + attr_accessor :source_reference + + # Size in bytes sent back to client by request. + # Corresponds to the JSON property `responseSize` + # @return [Fixnum] + attr_accessor :response_size + + # Stackdriver Trace identifier for this request. + # Corresponds to the JSON property `traceId` + # @return [String] + attr_accessor :trace_id + + # A list of log lines emitted by the application while serving this request. + # Corresponds to the JSON property `line` + # @return [Array] + attr_accessor :line + + # Queue name of the request, in the case of an offline request. + # Corresponds to the JSON property `taskQueueName` + # @return [String] + attr_accessor :task_queue_name + + # Referrer URL of request. + # Corresponds to the JSON property `referrer` + # @return [String] + attr_accessor :referrer + + # Globally unique identifier for a request, which is based on the request start + # time. Request IDs for requests which started later will compare greater as + # strings than those for requests which started earlier. + # Corresponds to the JSON property `requestId` + # @return [String] + attr_accessor :request_id + + # The logged-in user who made the request.Most likely, this is the part of the + # user's email before the @ sign. The field value is the same for different + # requests from the same user, but different users can have similar names. This + # information is also available to the application via the App Engine Users API. + # This field will be populated starting with App Engine 1.9.21. + # Corresponds to the JSON property `nickname` + # @return [String] + attr_accessor :nickname + + # Time this request spent in the pending request queue. + # Corresponds to the JSON property `pendingTime` + # @return [String] + attr_accessor :pending_time + + # Contains the path and query portion of the URL that was requested. For example, + # if the URL was "http://example.com/app?name=val", the resource would be "/app? + # name=val". The fragment identifier, which is identified by the # character, is + # not included. + # Corresponds to the JSON property `resource` + # @return [String] + attr_accessor :resource + + # HTTP response status code. Example: 200, 404. + # Corresponds to the JSON property `status` + # @return [Fixnum] + attr_accessor :status + + # Task name of the request, in the case of an offline request. + # Corresponds to the JSON property `taskName` + # @return [String] + attr_accessor :task_name + + # File or class that handled the request. + # Corresponds to the JSON property `urlMapEntry` + # @return [String] + attr_accessor :url_map_entry + + # If the instance processing this request belongs to a manually scaled module, + # then this is the 0-based index of the instance. Otherwise, this value is -1. + # Corresponds to the JSON property `instanceIndex` + # @return [Fixnum] + attr_accessor :instance_index + + # Internet host and port number of the resource being requested. + # Corresponds to the JSON property `host` + # @return [String] + attr_accessor :host + + # Whether this request is finished or active. + # Corresponds to the JSON property `finished` + # @return [Boolean] + attr_accessor :finished + alias_method :finished?, :finished + + # HTTP version of request. Example: "HTTP/1.1". + # Corresponds to the JSON property `httpVersion` + # @return [String] + attr_accessor :http_version + + # Time when the request started. + # Corresponds to the JSON property `startTime` + # @return [String] + attr_accessor :start_time + + # Latency of the request. + # Corresponds to the JSON property `latency` + # @return [String] + attr_accessor :latency + + # Origin IP address. + # Corresponds to the JSON property `ip` + # @return [String] + attr_accessor :ip + + # Application that handled this request. + # Corresponds to the JSON property `appId` + # @return [String] + attr_accessor :app_id + + # App Engine release version. + # Corresponds to the JSON property `appEngineRelease` + # @return [String] + attr_accessor :app_engine_release + + # Request method. Example: "GET", "HEAD", "PUT", "POST", "DELETE". + # Corresponds to the JSON property `method` + # @return [String] + attr_accessor :method_prop + + # An indication of the relative cost of serving this request. + # Corresponds to the JSON property `cost` + # @return [Float] + attr_accessor :cost + + # An identifier for the instance that handled the request. + # Corresponds to the JSON property `instanceId` + # @return [String] + attr_accessor :instance_id + + # Number of CPU megacycles used to process request. + # Corresponds to the JSON property `megaCycles` + # @return [Fixnum] + attr_accessor :mega_cycles + + # Whether this is the first RequestLog entry for this request. If an active + # request has several RequestLog entries written to Stackdriver Logging, then + # this field will be set for one of them. + # Corresponds to the JSON property `first` + # @return [Boolean] + attr_accessor :first + alias_method :first?, :first + + # Version of the application that handled this request. + # Corresponds to the JSON property `versionId` + # @return [String] + attr_accessor :version_id def initialize(**args) update!(**args) @@ -1271,12 +844,450 @@ module Google # Update properties of this object def update!(**args) - @page_token = args[:page_token] if args.key?(:page_token) - @page_size = args[:page_size] if args.key?(:page_size) - @order_by = args[:order_by] if args.key?(:order_by) - @resource_names = args[:resource_names] if args.key?(:resource_names) + @module_id = args[:module_id] if args.key?(:module_id) + @end_time = args[:end_time] if args.key?(:end_time) + @user_agent = args[:user_agent] if args.key?(:user_agent) + @was_loading_request = args[:was_loading_request] if args.key?(:was_loading_request) + @source_reference = args[:source_reference] if args.key?(:source_reference) + @response_size = args[:response_size] if args.key?(:response_size) + @trace_id = args[:trace_id] if args.key?(:trace_id) + @line = args[:line] if args.key?(:line) + @task_queue_name = args[:task_queue_name] if args.key?(:task_queue_name) + @referrer = args[:referrer] if args.key?(:referrer) + @request_id = args[:request_id] if args.key?(:request_id) + @nickname = args[:nickname] if args.key?(:nickname) + @pending_time = args[:pending_time] if args.key?(:pending_time) + @resource = args[:resource] if args.key?(:resource) + @status = args[:status] if args.key?(:status) + @task_name = args[:task_name] if args.key?(:task_name) + @url_map_entry = args[:url_map_entry] if args.key?(:url_map_entry) + @instance_index = args[:instance_index] if args.key?(:instance_index) + @host = args[:host] if args.key?(:host) + @finished = args[:finished] if args.key?(:finished) + @http_version = args[:http_version] if args.key?(:http_version) + @start_time = args[:start_time] if args.key?(:start_time) + @latency = args[:latency] if args.key?(:latency) + @ip = args[:ip] if args.key?(:ip) + @app_id = args[:app_id] if args.key?(:app_id) + @app_engine_release = args[:app_engine_release] if args.key?(:app_engine_release) + @method_prop = args[:method_prop] if args.key?(:method_prop) + @cost = args[:cost] if args.key?(:cost) + @instance_id = args[:instance_id] if args.key?(:instance_id) + @mega_cycles = args[:mega_cycles] if args.key?(:mega_cycles) + @first = args[:first] if args.key?(:first) + @version_id = args[:version_id] if args.key?(:version_id) + end + end + + # Result returned from ListMonitoredResourceDescriptors. + class ListMonitoredResourceDescriptorsResponse + include Google::Apis::Core::Hashable + + # If there might be more results than those appearing in this response, then + # nextPageToken is included. To get the next set of results, call this method + # again using the value of nextPageToken as pageToken. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # A list of resource descriptors. + # Corresponds to the JSON property `resourceDescriptors` + # @return [Array] + attr_accessor :resource_descriptors + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @resource_descriptors = args[:resource_descriptors] if args.key?(:resource_descriptors) + end + end + + # A reference to a particular snapshot of the source tree used to build and + # deploy an application. + class SourceReference + include Google::Apis::Core::Hashable + + # The canonical and persistent identifier of the deployed revision. Example (git) + # : "0035781c50ec7aa23385dc841529ce8a4b70db1b" + # Corresponds to the JSON property `revisionId` + # @return [String] + attr_accessor :revision_id + + # Optional. A URI string identifying the repository. Example: "https://github. + # com/GoogleCloudPlatform/kubernetes.git" + # Corresponds to the JSON property `repository` + # @return [String] + attr_accessor :repository + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @revision_id = args[:revision_id] if args.key?(:revision_id) + @repository = args[:repository] if args.key?(:repository) + end + end + + # Result returned from WriteLogEntries. empty + class WriteLogEntriesResponse + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Describes a logs-based metric. The value of the metric is the number of log + # entries that match a logs filter in a given time interval. + class LogMetric + include Google::Apis::Core::Hashable + + # Required. The client-assigned metric identifier. Examples: "error_count", " + # nginx/requests".Metric identifiers are limited to 100 characters and can + # include only the following characters: A-Z, a-z, 0-9, and the special + # characters _-.,+!*',()%/. The forward-slash character (/) denotes a hierarchy + # of name pieces, and it cannot be the first character of the name.The metric + # identifier in this field must not be URL-encoded (https://en.wikipedia.org/ + # wiki/Percent-encoding). However, when the metric identifier appears as the [ + # METRIC_ID] part of a metric_name API parameter, then the metric identifier + # must be URL-encoded. Example: "projects/my-project/metrics/nginx%2Frequests". + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Optional. A description of this metric, which is used in documentation. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # Output only. The API version that created or updated this metric. The version + # also dictates the syntax of the filter expression. When a value for this field + # is missing, the default value of V2 should be assumed. + # Corresponds to the JSON property `version` + # @return [String] + attr_accessor :version + + # Required. An advanced logs filter which is used to match log entries. Example: + # "resource.type=gae_app AND severity>=ERROR" + # The maximum length of the filter is 20000 characters. + # Corresponds to the JSON property `filter` + # @return [String] + attr_accessor :filter + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @name = args[:name] if args.key?(:name) + @description = args[:description] if args.key?(:description) + @version = args[:version] if args.key?(:version) @filter = args[:filter] if args.key?(:filter) - @project_ids = args[:project_ids] if args.key?(:project_ids) + end + end + + # Additional information about a potentially long-running operation with which a + # log entry is associated. + class LogEntryOperation + include Google::Apis::Core::Hashable + + # Optional. An arbitrary operation identifier. Log entries with the same + # identifier are assumed to be part of the same operation. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # Optional. An arbitrary producer identifier. The combination of id and producer + # must be globally unique. Examples for producer: "MyDivision.MyBigCompany.com", + # "github.com/MyProject/MyApplication". + # Corresponds to the JSON property `producer` + # @return [String] + attr_accessor :producer + + # Optional. Set this to True if this is the first log entry in the operation. + # Corresponds to the JSON property `first` + # @return [Boolean] + attr_accessor :first + alias_method :first?, :first + + # Optional. Set this to True if this is the last log entry in the operation. + # Corresponds to the JSON property `last` + # @return [Boolean] + attr_accessor :last + alias_method :last?, :last + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @id = args[:id] if args.key?(:id) + @producer = args[:producer] if args.key?(:producer) + @first = args[:first] if args.key?(:first) + @last = args[:last] if args.key?(:last) + end + end + + # An object representing a resource that can be used for monitoring, logging, + # billing, or other purposes. Examples include virtual machine instances, + # databases, and storage devices such as disks. The type field identifies a + # MonitoredResourceDescriptor object that describes the resource's schema. + # Information in the labels field identifies the actual resource and its + # attributes according to the schema. For example, a particular Compute Engine + # VM instance could be represented by the following object, because the + # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and " + # zone": + # ` "type": "gce_instance", + # "labels": ` "instance_id": "12345678901234", + # "zone": "us-central1-a" `` + class MonitoredResource + include Google::Apis::Core::Hashable + + # Required. The monitored resource type. This field must match the type field of + # a MonitoredResourceDescriptor object. For example, the type of a Compute + # Engine VM instance is gce_instance. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # Required. Values for all of the labels listed in the associated monitored + # resource descriptor. For example, Compute Engine VM instances use the labels " + # project_id", "instance_id", and "zone". + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @type = args[:type] if args.key?(:type) + @labels = args[:labels] if args.key?(:labels) + end + end + + # The parameters to WriteLogEntries. + class WriteLogEntriesRequest + include Google::Apis::Core::Hashable + + # Optional. A default log resource name that is assigned to all log entries in + # entries that do not specify a value for log_name: + # "projects/[PROJECT_ID]/logs/[LOG_ID]" + # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + # "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + # "folders/[FOLDER_ID]/logs/[LOG_ID]" + # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog" + # or "organizations/1234567890/logs/cloudresourcemanager.googleapis.com% + # 2Factivity". For more information about log names, see LogEntry. + # Corresponds to the JSON property `logName` + # @return [String] + attr_accessor :log_name + + # Required. The log entries to write. Values supplied for the fields log_name, + # resource, and labels in this entries.write request are inserted into those log + # entries in this list that do not provide their own values.Stackdriver Logging + # also creates and inserts values for timestamp and insert_id if the entries do + # not provide them. The created insert_id for the N'th entry in this list will + # be greater than earlier entries and less than later entries. Otherwise, the + # order of log entries in this list does not matter.To improve throughput and to + # avoid exceeding the quota limit for calls to entries.write, you should write + # multiple log entries at once rather than calling this method for each + # individual log entry. + # Corresponds to the JSON property `entries` + # @return [Array] + attr_accessor :entries + + # Optional. Whether valid entries should be written even if some other entries + # fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any entry is not + # written, then the response status is the error associated with one of the + # failed entries and the response includes error details keyed by the entries' + # zero-based index in the entries.write method. + # Corresponds to the JSON property `partialSuccess` + # @return [Boolean] + attr_accessor :partial_success + alias_method :partial_success?, :partial_success + + # Optional. Default labels that are added to the labels field of all log entries + # in entries. If a log entry already has a label with the same key as a label in + # this parameter, then the log entry's label is not changed. See LogEntry. + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # An object representing a resource that can be used for monitoring, logging, + # billing, or other purposes. Examples include virtual machine instances, + # databases, and storage devices such as disks. The type field identifies a + # MonitoredResourceDescriptor object that describes the resource's schema. + # Information in the labels field identifies the actual resource and its + # attributes according to the schema. For example, a particular Compute Engine + # VM instance could be represented by the following object, because the + # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and " + # zone": + # ` "type": "gce_instance", + # "labels": ` "instance_id": "12345678901234", + # "zone": "us-central1-a" `` + # Corresponds to the JSON property `resource` + # @return [Google::Apis::LoggingV2::MonitoredResource] + attr_accessor :resource + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @log_name = args[:log_name] if args.key?(:log_name) + @entries = args[:entries] if args.key?(:entries) + @partial_success = args[:partial_success] if args.key?(:partial_success) + @labels = args[:labels] if args.key?(:labels) + @resource = args[:resource] if args.key?(:resource) + end + end + + # Describes a sink used to export log entries to one of the following + # destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a + # Cloud Pub/Sub topic. A logs filter controls which log entries are exported. + # The sink must be created within a project, organization, billing account, or + # folder. + class LogSink + include Google::Apis::Core::Hashable + + # Optional. The time at which this sink will stop exporting log entries. Log + # entries are exported only if their timestamp is earlier than the end time. If + # this field is not supplied, there is no end time. If both a start time and an + # end time are provided, then the end time must be later than the start time. + # Corresponds to the JSON property `endTime` + # @return [String] + attr_accessor :end_time + + # Output only. An IAM identity—a service account or group—under + # which Stackdriver Logging writes the exported log entries to the sink's + # destination. This field is set by sinks.create and sinks.update, based on the + # setting of unique_writer_identity in those methods.Until you grant this + # identity write-access to the destination, log entry exports from this sink + # will fail. For more information, see Granting access for a resource. Consult + # the destination service's documentation to determine the appropriate IAM roles + # to assign to the identity. + # Corresponds to the JSON property `writerIdentity` + # @return [String] + attr_accessor :writer_identity + + # Optional. The time at which this sink will begin exporting log entries. Log + # entries are exported only if their timestamp is not earlier than the start + # time. The default value of this field is the time the sink is created or + # updated. + # Corresponds to the JSON property `startTime` + # @return [String] + attr_accessor :start_time + + # Optional. The log entry format to use for this sink's exported log entries. + # The v2 format is used by default. The v1 format is deprecated and should be + # used only as part of a migration effort to v2. See Migration to the v2 API. + # Corresponds to the JSON property `outputVersionFormat` + # @return [String] + attr_accessor :output_version_format + + # Required. The client-assigned sink identifier, unique within the project. + # Example: "my-syslog-errors-to-pubsub". Sink identifiers are limited to 100 + # characters and can include only the following characters: upper and lower-case + # alphanumeric characters, underscores, hyphens, and periods. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Optional. This field applies only to sinks owned by organizations and folders. + # If the field is false, the default, only the logs owned by the sink's parent + # resource are available for export. If the field is true, then logs from all + # the projects, folders, and billing accounts contained in the sink's parent + # resource are also available for export. Whether a particular log entry from + # the children is exported depends on the sink's filter expression. For example, + # if this field is true, then the filter resource.type=gce_instance would export + # all Compute Engine VM instance log entries from all projects in the sink's + # parent. To only export entries from certain child projects, filter on the + # project part of the log name: + # logName:("projects/test-project1/" OR "projects/test-project2/") AND + # resource.type=gce_instance + # Corresponds to the JSON property `includeChildren` + # @return [Boolean] + attr_accessor :include_children + alias_method :include_children?, :include_children + + # Required. The export destination: + # "storage.googleapis.com/[GCS_BUCKET]" + # "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]" + # "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" + # The sink's writer_identity, set when the sink is created, must have permission + # to write to the destination or else the log entries are not exported. For more + # information, see Exporting Logs With Sinks. + # Corresponds to the JSON property `destination` + # @return [String] + attr_accessor :destination + + # Optional. An advanced logs filter. The only exported log entries are those + # that are in the resource owning the sink and that match the filter. The filter + # must use the log entry format specified by the output_version_format parameter. + # For example, in the v2 format: + # logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR + # Corresponds to the JSON property `filter` + # @return [String] + attr_accessor :filter + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @end_time = args[:end_time] if args.key?(:end_time) + @writer_identity = args[:writer_identity] if args.key?(:writer_identity) + @start_time = args[:start_time] if args.key?(:start_time) + @output_version_format = args[:output_version_format] if args.key?(:output_version_format) + @name = args[:name] if args.key?(:name) + @include_children = args[:include_children] if args.key?(:include_children) + @destination = args[:destination] if args.key?(:destination) + @filter = args[:filter] if args.key?(:filter) + end + end + + # Result returned from ListLogs. + class ListLogsResponse + include Google::Apis::Core::Hashable + + # A list of log names. For example, "projects/my-project/syslog" or " + # organizations/123/cloudresourcemanager.googleapis.com%2Factivity". + # Corresponds to the JSON property `logNames` + # @return [Array] + attr_accessor :log_names + + # If there might be more results than those appearing in this response, then + # nextPageToken is included. To get the next set of results, call this method + # again using the value of nextPageToken as pageToken. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @log_names = args[:log_names] if args.key?(:log_names) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) end end end diff --git a/generated/google/apis/logging_v2/representations.rb b/generated/google/apis/logging_v2/representations.rb index 680c708f1..f340032d8 100644 --- a/generated/google/apis/logging_v2/representations.rb +++ b/generated/google/apis/logging_v2/representations.rb @@ -22,66 +22,6 @@ module Google module Apis module LoggingV2 - class RequestLog - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListMonitoredResourceDescriptorsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SourceReference - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class LogMetric - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class LogEntryOperation - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class WriteLogEntriesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class MonitoredResource - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class WriteLogEntriesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class LogSink - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListLogsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class HttpRequest class Representation < Google::Apis::Core::JsonRepresentation; end @@ -130,13 +70,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class Empty + class LogEntry class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class LogEntry + class Empty class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -155,178 +95,112 @@ module Google end class RequestLog - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :start_time, as: 'startTime' - property :latency, as: 'latency' - property :ip, as: 'ip' - property :app_id, as: 'appId' - property :app_engine_release, as: 'appEngineRelease' - property :method_prop, as: 'method' - property :cost, as: 'cost' - property :instance_id, as: 'instanceId' - property :mega_cycles, :numeric_string => true, as: 'megaCycles' - property :first, as: 'first' - property :version_id, as: 'versionId' - property :module_id, as: 'moduleId' - property :end_time, as: 'endTime' - property :user_agent, as: 'userAgent' - property :was_loading_request, as: 'wasLoadingRequest' - collection :source_reference, as: 'sourceReference', class: Google::Apis::LoggingV2::SourceReference, decorator: Google::Apis::LoggingV2::SourceReference::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :response_size, :numeric_string => true, as: 'responseSize' - property :trace_id, as: 'traceId' - collection :line, as: 'line', class: Google::Apis::LoggingV2::LogLine, decorator: Google::Apis::LoggingV2::LogLine::Representation - - property :referrer, as: 'referrer' - property :task_queue_name, as: 'taskQueueName' - property :request_id, as: 'requestId' - property :nickname, as: 'nickname' - property :pending_time, as: 'pendingTime' - property :resource, as: 'resource' - property :status, as: 'status' - property :task_name, as: 'taskName' - property :url_map_entry, as: 'urlMapEntry' - property :instance_index, as: 'instanceIndex' - property :finished, as: 'finished' - property :host, as: 'host' - property :http_version, as: 'httpVersion' - end + include Google::Apis::Core::JsonObjectSupport end class ListMonitoredResourceDescriptorsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - collection :resource_descriptors, as: 'resourceDescriptors', class: Google::Apis::LoggingV2::MonitoredResourceDescriptor, decorator: Google::Apis::LoggingV2::MonitoredResourceDescriptor::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class SourceReference - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :revision_id, as: 'revisionId' - property :repository, as: 'repository' - end - end + class Representation < Google::Apis::Core::JsonRepresentation; end - class LogMetric - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :version, as: 'version' - property :filter, as: 'filter' - property :name, as: 'name' - property :description, as: 'description' - end - end - - class LogEntryOperation - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :last, as: 'last' - property :id, as: 'id' - property :producer, as: 'producer' - property :first, as: 'first' - end + include Google::Apis::Core::JsonObjectSupport end class WriteLogEntriesResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class LogMetric + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class LogEntryOperation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class MonitoredResource - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :type, as: 'type' - hash :labels, as: 'labels' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class WriteLogEntriesRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :partial_success, as: 'partialSuccess' - hash :labels, as: 'labels' - property :resource, as: 'resource', class: Google::Apis::LoggingV2::MonitoredResource, decorator: Google::Apis::LoggingV2::MonitoredResource::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :log_name, as: 'logName' - collection :entries, as: 'entries', class: Google::Apis::LoggingV2::LogEntry, decorator: Google::Apis::LoggingV2::LogEntry::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class LogSink - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :end_time, as: 'endTime' - property :writer_identity, as: 'writerIdentity' - property :start_time, as: 'startTime' - property :output_version_format, as: 'outputVersionFormat' - property :name, as: 'name' - property :include_children, as: 'includeChildren' - property :destination, as: 'destination' - property :filter, as: 'filter' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ListLogsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :log_names, as: 'logNames' - property :next_page_token, as: 'nextPageToken' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class HttpRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :user_agent, as: 'userAgent' - property :latency, as: 'latency' - property :cache_fill_bytes, :numeric_string => true, as: 'cacheFillBytes' - property :request_method, as: 'requestMethod' - property :response_size, :numeric_string => true, as: 'responseSize' - property :request_size, :numeric_string => true, as: 'requestSize' - property :request_url, as: 'requestUrl' - property :server_ip, as: 'serverIp' - property :remote_ip, as: 'remoteIp' property :cache_lookup, as: 'cacheLookup' property :cache_hit, as: 'cacheHit' property :cache_validated_with_origin_server, as: 'cacheValidatedWithOriginServer' property :status, as: 'status' property :referer, as: 'referer' + property :user_agent, as: 'userAgent' + property :latency, as: 'latency' + property :cache_fill_bytes, :numeric_string => true, as: 'cacheFillBytes' + property :request_method, as: 'requestMethod' + property :request_size, :numeric_string => true, as: 'requestSize' + property :response_size, :numeric_string => true, as: 'responseSize' + property :request_url, as: 'requestUrl' + property :server_ip, as: 'serverIp' + property :remote_ip, as: 'remoteIp' end end class ListSinksResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' collection :sinks, as: 'sinks', class: Google::Apis::LoggingV2::LogSink, decorator: Google::Apis::LoggingV2::LogSink::Representation + property :next_page_token, as: 'nextPageToken' end end class LabelDescriptor # @private class Representation < Google::Apis::Core::JsonRepresentation - property :value_type, as: 'valueType' property :key, as: 'key' property :description, as: 'description' + property :value_type, as: 'valueType' end end class MonitoredResourceDescriptor # @private class Representation < Google::Apis::Core::JsonRepresentation + property :name, as: 'name' property :display_name, as: 'displayName' property :description, as: 'description' property :type, as: 'type' collection :labels, as: 'labels', class: Google::Apis::LoggingV2::LabelDescriptor, decorator: Google::Apis::LoggingV2::LabelDescriptor::Representation - property :name, as: 'name' end end @@ -368,17 +242,10 @@ module Google end end - class Empty - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end - end - class LogEntry # @private class Representation < Google::Apis::Core::JsonRepresentation - property :source_location, as: 'sourceLocation', class: Google::Apis::LoggingV2::LogEntrySourceLocation, decorator: Google::Apis::LoggingV2::LogEntrySourceLocation::Representation - + property :receive_timestamp, as: 'receiveTimestamp' property :timestamp, as: 'timestamp' property :log_name, as: 'logName' property :resource, as: 'resource', class: Google::Apis::LoggingV2::MonitoredResource, decorator: Google::Apis::LoggingV2::MonitoredResource::Representation @@ -394,27 +261,161 @@ module Google hash :labels, as: 'labels' property :trace, as: 'trace' property :severity, as: 'severity' + property :source_location, as: 'sourceLocation', class: Google::Apis::LoggingV2::LogEntrySourceLocation, decorator: Google::Apis::LoggingV2::LogEntrySourceLocation::Representation + + end + end + + class Empty + # @private + class Representation < Google::Apis::Core::JsonRepresentation end end class SourceLocation # @private class Representation < Google::Apis::Core::JsonRepresentation + property :function_name, as: 'functionName' property :line, :numeric_string => true, as: 'line' property :file, as: 'file' - property :function_name, as: 'functionName' end end class ListLogEntriesRequest # @private class Representation < Google::Apis::Core::JsonRepresentation + collection :project_ids, as: 'projectIds' + property :filter, as: 'filter' property :page_token, as: 'pageToken' property :page_size, as: 'pageSize' property :order_by, as: 'orderBy' collection :resource_names, as: 'resourceNames' + end + end + + class RequestLog + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :module_id, as: 'moduleId' + property :end_time, as: 'endTime' + property :user_agent, as: 'userAgent' + property :was_loading_request, as: 'wasLoadingRequest' + collection :source_reference, as: 'sourceReference', class: Google::Apis::LoggingV2::SourceReference, decorator: Google::Apis::LoggingV2::SourceReference::Representation + + property :response_size, :numeric_string => true, as: 'responseSize' + property :trace_id, as: 'traceId' + collection :line, as: 'line', class: Google::Apis::LoggingV2::LogLine, decorator: Google::Apis::LoggingV2::LogLine::Representation + + property :task_queue_name, as: 'taskQueueName' + property :referrer, as: 'referrer' + property :request_id, as: 'requestId' + property :nickname, as: 'nickname' + property :pending_time, as: 'pendingTime' + property :resource, as: 'resource' + property :status, as: 'status' + property :task_name, as: 'taskName' + property :url_map_entry, as: 'urlMapEntry' + property :instance_index, as: 'instanceIndex' + property :host, as: 'host' + property :finished, as: 'finished' + property :http_version, as: 'httpVersion' + property :start_time, as: 'startTime' + property :latency, as: 'latency' + property :ip, as: 'ip' + property :app_id, as: 'appId' + property :app_engine_release, as: 'appEngineRelease' + property :method_prop, as: 'method' + property :cost, as: 'cost' + property :instance_id, as: 'instanceId' + property :mega_cycles, :numeric_string => true, as: 'megaCycles' + property :first, as: 'first' + property :version_id, as: 'versionId' + end + end + + class ListMonitoredResourceDescriptorsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :resource_descriptors, as: 'resourceDescriptors', class: Google::Apis::LoggingV2::MonitoredResourceDescriptor, decorator: Google::Apis::LoggingV2::MonitoredResourceDescriptor::Representation + + end + end + + class SourceReference + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :revision_id, as: 'revisionId' + property :repository, as: 'repository' + end + end + + class WriteLogEntriesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class LogMetric + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :name, as: 'name' + property :description, as: 'description' + property :version, as: 'version' property :filter, as: 'filter' - collection :project_ids, as: 'projectIds' + end + end + + class LogEntryOperation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :id, as: 'id' + property :producer, as: 'producer' + property :first, as: 'first' + property :last, as: 'last' + end + end + + class MonitoredResource + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :type, as: 'type' + hash :labels, as: 'labels' + end + end + + class WriteLogEntriesRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :log_name, as: 'logName' + collection :entries, as: 'entries', class: Google::Apis::LoggingV2::LogEntry, decorator: Google::Apis::LoggingV2::LogEntry::Representation + + property :partial_success, as: 'partialSuccess' + hash :labels, as: 'labels' + property :resource, as: 'resource', class: Google::Apis::LoggingV2::MonitoredResource, decorator: Google::Apis::LoggingV2::MonitoredResource::Representation + + end + end + + class LogSink + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :end_time, as: 'endTime' + property :writer_identity, as: 'writerIdentity' + property :start_time, as: 'startTime' + property :output_version_format, as: 'outputVersionFormat' + property :name, as: 'name' + property :include_children, as: 'includeChildren' + property :destination, as: 'destination' + property :filter, as: 'filter' + end + end + + class ListLogsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :log_names, as: 'logNames' + property :next_page_token, as: 'nextPageToken' end end end diff --git a/generated/google/apis/logging_v2/service.rb b/generated/google/apis/logging_v2/service.rb index 5fb9bcdb0..209dfe081 100644 --- a/generated/google/apis/logging_v2/service.rb +++ b/generated/google/apis/logging_v2/service.rb @@ -47,491 +47,6 @@ module Google @batch_path = 'batch' end - # Lists logs-based metrics. - # @param [String] parent - # Required. The name of the project containing the metrics: - # "projects/[PROJECT_ID]" - # @param [Fixnum] page_size - # Optional. The maximum number of results to return from this request. Non- - # positive values are ignored. The presence of nextPageToken in the response - # indicates that more results might be available. - # @param [String] page_token - # Optional. If present, then retrieve the next batch of results from the - # preceding call to this method. pageToken must be the value of nextPageToken - # from the previous response. The values of other method parameters should be - # identical to those in the previous call. - # @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::LoggingV2::ListLogMetricsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV2::ListLogMetricsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_project_metrics(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v2/{+parent}/metrics', options) - command.response_representation = Google::Apis::LoggingV2::ListLogMetricsResponse::Representation - command.response_class = Google::Apis::LoggingV2::ListLogMetricsResponse - command.params['parent'] = parent unless parent.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets a logs-based metric. - # @param [String] metric_name - # The resource name of the desired metric: - # "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::LoggingV2::LogMetric] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV2::LogMetric] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_project_metric(metric_name, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v2/{+metricName}', options) - command.response_representation = Google::Apis::LoggingV2::LogMetric::Representation - command.response_class = Google::Apis::LoggingV2::LogMetric - command.params['metricName'] = metric_name unless metric_name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Creates or updates a logs-based metric. - # @param [String] metric_name - # The resource name of the metric to update: - # "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - # The updated metric must be provided in the request and it's name field must be - # the same as [METRIC_ID] If the metric does not exist in [PROJECT_ID], then a - # new metric is created. - # @param [Google::Apis::LoggingV2::LogMetric] log_metric_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::LoggingV2::LogMetric] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV2::LogMetric] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_project_metric(metric_name, log_metric_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:put, 'v2/{+metricName}', options) - command.request_representation = Google::Apis::LoggingV2::LogMetric::Representation - command.request_object = log_metric_object - command.response_representation = Google::Apis::LoggingV2::LogMetric::Representation - command.response_class = Google::Apis::LoggingV2::LogMetric - command.params['metricName'] = metric_name unless metric_name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Creates a logs-based metric. - # @param [String] parent - # The resource name of the project in which to create the metric: - # "projects/[PROJECT_ID]" - # The new metric must be provided in the request. - # @param [Google::Apis::LoggingV2::LogMetric] log_metric_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::LoggingV2::LogMetric] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV2::LogMetric] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_project_metric(parent, log_metric_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v2/{+parent}/metrics', options) - command.request_representation = Google::Apis::LoggingV2::LogMetric::Representation - command.request_object = log_metric_object - command.response_representation = Google::Apis::LoggingV2::LogMetric::Representation - command.response_class = Google::Apis::LoggingV2::LogMetric - command.params['parent'] = parent unless parent.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Deletes a logs-based metric. - # @param [String] metric_name - # The resource name of the metric to delete: - # "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::LoggingV2::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV2::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_project_metric(metric_name, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v2/{+metricName}', options) - command.response_representation = Google::Apis::LoggingV2::Empty::Representation - command.response_class = Google::Apis::LoggingV2::Empty - command.params['metricName'] = metric_name unless metric_name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Lists the logs in projects, organizations, folders, or billing accounts. Only - # logs that have entries are listed. - # @param [String] parent - # Required. The resource name that owns the logs: - # "projects/[PROJECT_ID]" - # "organizations/[ORGANIZATION_ID]" - # "billingAccounts/[BILLING_ACCOUNT_ID]" - # "folders/[FOLDER_ID]" - # @param [String] page_token - # Optional. If present, then retrieve the next batch of results from the - # preceding call to this method. pageToken must be the value of nextPageToken - # from the previous response. The values of other method parameters should be - # identical to those in the previous call. - # @param [Fixnum] page_size - # Optional. The maximum number of results to return from this request. Non- - # positive values are ignored. The presence of nextPageToken in the response - # indicates that more results might be available. - # @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::LoggingV2::ListLogsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV2::ListLogsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_project_logs(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v2/{+parent}/logs', options) - command.response_representation = Google::Apis::LoggingV2::ListLogsResponse::Representation - command.response_class = Google::Apis::LoggingV2::ListLogsResponse - command.params['parent'] = parent unless parent.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Deletes all the log entries in a log. The log reappears if it receives new - # entries. Log entries written shortly before the delete operation might not be - # deleted. - # @param [String] log_name - # Required. The resource name of the log to delete: - # "projects/[PROJECT_ID]/logs/[LOG_ID]" - # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - # "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" - # "folders/[FOLDER_ID]/logs/[LOG_ID]" - # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog" - # , "organizations/1234567890/logs/cloudresourcemanager.googleapis.com% - # 2Factivity". For more information about log names, see LogEntry. - # @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::LoggingV2::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV2::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_project_log(log_name, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v2/{+logName}', options) - command.response_representation = Google::Apis::LoggingV2::Empty::Representation - command.response_class = Google::Apis::LoggingV2::Empty - command.params['logName'] = log_name unless log_name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Updates a sink. If the named sink doesn't exist, then this method is identical - # to sinks.create. If the named sink does exist, then this method replaces the - # following fields in the existing sink with values from the new sink: - # destination, filter, output_version_format, start_time, and end_time. The - # updated filter might also have a new writer_identity; see the - # unique_writer_identity field. - # @param [String] sink_name - # Required. The full resource name of the sink to update, including the parent - # resource and the sink identifier: - # "projects/[PROJECT_ID]/sinks/[SINK_ID]" - # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - # "folders/[FOLDER_ID]/sinks/[SINK_ID]" - # Example: "projects/my-project-id/sinks/my-sink-id". - # @param [Google::Apis::LoggingV2::LogSink] log_sink_object - # @param [Boolean] unique_writer_identity - # Optional. See sinks.create for a description of this field. When updating a - # sink, the effect of this field on the value of writer_identity in the updated - # sink depends on both the old and new values of this field: - # If the old and new values of this field are both false or both true, then - # there is no change to the sink's writer_identity. - # If the old value is false and the new value is true, then writer_identity is - # changed to a unique service account. - # It is an error if the old value is true and the new value is false. - # @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::LoggingV2::LogSink] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV2::LogSink] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_project_sink(sink_name, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:put, 'v2/{+sinkName}', options) - command.request_representation = Google::Apis::LoggingV2::LogSink::Representation - command.request_object = log_sink_object - command.response_representation = Google::Apis::LoggingV2::LogSink::Representation - command.response_class = Google::Apis::LoggingV2::LogSink - command.params['sinkName'] = sink_name unless sink_name.nil? - command.query['uniqueWriterIdentity'] = unique_writer_identity unless unique_writer_identity.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Creates a sink that exports specified log entries to a destination. The export - # of newly-ingested log entries begins immediately, unless the current time is - # outside the sink's start and end times or the sink's writer_identity is not - # permitted to write to the destination. A sink can export log entries only from - # the resource owning the sink. - # @param [String] parent - # Required. The resource in which to create the sink: - # "projects/[PROJECT_ID]" - # "organizations/[ORGANIZATION_ID]" - # "billingAccounts/[BILLING_ACCOUNT_ID]" - # "folders/[FOLDER_ID]" - # Examples: "projects/my-logging-project", "organizations/123456789". - # @param [Google::Apis::LoggingV2::LogSink] log_sink_object - # @param [Boolean] unique_writer_identity - # Optional. Determines the kind of IAM identity returned as writer_identity in - # the new sink. If this value is omitted or set to false, and if the sink's - # parent is a project, then the value returned as writer_identity is the same - # group or service account used by Stackdriver Logging before the addition of - # writer identities to this API. The sink's destination must be in the same - # project as the sink itself.If this field is set to true, or if the sink is - # owned by a non-project resource such as an organization, then the value of - # writer_identity will be a unique service account used only for exports from - # the new sink. For more information, see writer_identity in LogSink. - # @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::LoggingV2::LogSink] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV2::LogSink] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_project_sink(parent, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v2/{+parent}/sinks', options) - command.request_representation = Google::Apis::LoggingV2::LogSink::Representation - command.request_object = log_sink_object - command.response_representation = Google::Apis::LoggingV2::LogSink::Representation - command.response_class = Google::Apis::LoggingV2::LogSink - command.params['parent'] = parent unless parent.nil? - command.query['uniqueWriterIdentity'] = unique_writer_identity unless unique_writer_identity.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Deletes a sink. If the sink has a unique writer_identity, then that service - # account is also deleted. - # @param [String] sink_name - # Required. The full resource name of the sink to delete, including the parent - # resource and the sink identifier: - # "projects/[PROJECT_ID]/sinks/[SINK_ID]" - # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - # "folders/[FOLDER_ID]/sinks/[SINK_ID]" - # Example: "projects/my-project-id/sinks/my-sink-id". - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::LoggingV2::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV2::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_project_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v2/{+sinkName}', options) - command.response_representation = Google::Apis::LoggingV2::Empty::Representation - command.response_class = Google::Apis::LoggingV2::Empty - command.params['sinkName'] = sink_name unless sink_name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Lists sinks. - # @param [String] parent - # Required. The parent resource whose sinks are to be listed: - # "projects/[PROJECT_ID]" - # "organizations/[ORGANIZATION_ID]" - # "billingAccounts/[BILLING_ACCOUNT_ID]" - # "folders/[FOLDER_ID]" - # @param [String] page_token - # Optional. If present, then retrieve the next batch of results from the - # preceding call to this method. pageToken must be the value of nextPageToken - # from the previous response. The values of other method parameters should be - # identical to those in the previous call. - # @param [Fixnum] page_size - # Optional. The maximum number of results to return from this request. Non- - # positive values are ignored. The presence of nextPageToken in the response - # indicates that more results might be available. - # @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::LoggingV2::ListSinksResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV2::ListSinksResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_project_sinks(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v2/{+parent}/sinks', options) - command.response_representation = Google::Apis::LoggingV2::ListSinksResponse::Representation - command.response_class = Google::Apis::LoggingV2::ListSinksResponse - command.params['parent'] = parent unless parent.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets a sink. - # @param [String] sink_name - # Required. The resource name of the sink: - # "projects/[PROJECT_ID]/sinks/[SINK_ID]" - # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - # "folders/[FOLDER_ID]/sinks/[SINK_ID]" - # Example: "projects/my-project-id/sinks/my-sink-id". - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::LoggingV2::LogSink] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV2::LogSink] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_project_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v2/{+sinkName}', options) - command.response_representation = Google::Apis::LoggingV2::LogSink::Representation - command.response_class = Google::Apis::LoggingV2::LogSink - command.params['sinkName'] = sink_name unless sink_name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - # Deletes all the log entries in a log. The log reappears if it receives new # entries. Log entries written shortly before the delete operation might not be # deleted. @@ -579,15 +94,15 @@ module Google # "organizations/[ORGANIZATION_ID]" # "billingAccounts/[BILLING_ACCOUNT_ID]" # "folders/[FOLDER_ID]" + # @param [Fixnum] page_size + # Optional. The maximum number of results to return from this request. Non- + # positive values are ignored. The presence of nextPageToken in the response + # indicates that more results might be available. # @param [String] page_token # Optional. If present, then retrieve the next batch of results from the # preceding call to this method. pageToken must be the value of nextPageToken # from the previous response. The values of other method parameters should be # identical to those in the previous call. - # @param [Fixnum] page_size - # Optional. The maximum number of results to return from this request. Non- - # positive values are ignored. The presence of nextPageToken in the response - # indicates that more results might be available. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -605,13 +120,50 @@ 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_account_logs(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_billing_account_logs(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+parent}/logs', options) command.response_representation = Google::Apis::LoggingV2::ListLogsResponse::Representation command.response_class = Google::Apis::LoggingV2::ListLogsResponse command.params['parent'] = parent unless parent.nil? - command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a sink. If the sink has a unique writer_identity, then that service + # account is also deleted. + # @param [String] sink_name + # Required. The full resource name of the sink to delete, including the parent + # resource and the sink identifier: + # "projects/[PROJECT_ID]/sinks/[SINK_ID]" + # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + # "folders/[FOLDER_ID]/sinks/[SINK_ID]" + # Example: "projects/my-project-id/sinks/my-sink-id". + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::LoggingV2::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::LoggingV2::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_billing_account_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v2/{+sinkName}', options) + command.response_representation = Google::Apis::LoggingV2::Empty::Representation + command.response_class = Google::Apis::LoggingV2::Empty + command.params['sinkName'] = sink_name unless sink_name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) @@ -624,15 +176,15 @@ module Google # "organizations/[ORGANIZATION_ID]" # "billingAccounts/[BILLING_ACCOUNT_ID]" # "folders/[FOLDER_ID]" + # @param [Fixnum] page_size + # Optional. The maximum number of results to return from this request. Non- + # positive values are ignored. The presence of nextPageToken in the response + # indicates that more results might be available. # @param [String] page_token # Optional. If present, then retrieve the next batch of results from the # preceding call to this method. pageToken must be the value of nextPageToken # from the previous response. The values of other method parameters should be # identical to those in the previous call. - # @param [Fixnum] page_size - # Optional. The maximum number of results to return from this request. Non- - # positive values are ignored. The presence of nextPageToken in the response - # indicates that more results might be available. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -650,13 +202,13 @@ 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_account_sinks(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_billing_account_sinks(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+parent}/sinks', options) command.response_representation = Google::Apis::LoggingV2::ListSinksResponse::Representation command.response_class = Google::Apis::LoggingV2::ListSinksResponse command.params['parent'] = parent unless parent.nil? - command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) @@ -804,16 +356,23 @@ module Google execute_or_queue_command(command, &block) end - # Deletes a sink. If the sink has a unique writer_identity, then that service - # account is also deleted. - # @param [String] sink_name - # Required. The full resource name of the sink to delete, including the parent - # resource and the sink identifier: - # "projects/[PROJECT_ID]/sinks/[SINK_ID]" - # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - # "folders/[FOLDER_ID]/sinks/[SINK_ID]" - # Example: "projects/my-project-id/sinks/my-sink-id". + # Lists the logs in projects, organizations, folders, or billing accounts. Only + # logs that have entries are listed. + # @param [String] parent + # Required. The resource name that owns the logs: + # "projects/[PROJECT_ID]" + # "organizations/[ORGANIZATION_ID]" + # "billingAccounts/[BILLING_ACCOUNT_ID]" + # "folders/[FOLDER_ID]" + # @param [String] page_token + # Optional. If present, then retrieve the next batch of results from the + # preceding call to this method. pageToken must be the value of nextPageToken + # from the previous response. The values of other method parameters should be + # identical to those in the previous call. + # @param [Fixnum] page_size + # Optional. The maximum number of results to return from this request. Non- + # positive values are ignored. The presence of nextPageToken in the response + # indicates that more results might be available. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -823,19 +382,21 @@ module Google # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::LoggingV2::Empty] parsed result object + # @yieldparam result [Google::Apis::LoggingV2::ListLogsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::LoggingV2::Empty] + # @return [Google::Apis::LoggingV2::ListLogsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_billing_account_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v2/{+sinkName}', options) - command.response_representation = Google::Apis::LoggingV2::Empty::Representation - command.response_class = Google::Apis::LoggingV2::Empty - command.params['sinkName'] = sink_name unless sink_name.nil? + def list_folder_logs(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/{+parent}/logs', options) + command.response_representation = Google::Apis::LoggingV2::ListLogsResponse::Representation + command.response_class = Google::Apis::LoggingV2::ListLogsResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) @@ -880,23 +441,16 @@ module Google execute_or_queue_command(command, &block) end - # Lists the logs in projects, organizations, folders, or billing accounts. Only - # logs that have entries are listed. - # @param [String] parent - # Required. The resource name that owns the logs: - # "projects/[PROJECT_ID]" - # "organizations/[ORGANIZATION_ID]" - # "billingAccounts/[BILLING_ACCOUNT_ID]" - # "folders/[FOLDER_ID]" - # @param [String] page_token - # Optional. If present, then retrieve the next batch of results from the - # preceding call to this method. pageToken must be the value of nextPageToken - # from the previous response. The values of other method parameters should be - # identical to those in the previous call. - # @param [Fixnum] page_size - # Optional. The maximum number of results to return from this request. Non- - # positive values are ignored. The presence of nextPageToken in the response - # indicates that more results might be available. + # Deletes a sink. If the sink has a unique writer_identity, then that service + # account is also deleted. + # @param [String] sink_name + # Required. The full resource name of the sink to delete, including the parent + # resource and the sink identifier: + # "projects/[PROJECT_ID]/sinks/[SINK_ID]" + # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + # "folders/[FOLDER_ID]/sinks/[SINK_ID]" + # Example: "projects/my-project-id/sinks/my-sink-id". # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -906,21 +460,99 @@ module Google # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::LoggingV2::ListLogsResponse] parsed result object + # @yieldparam result [Google::Apis::LoggingV2::Empty] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::LoggingV2::ListLogsResponse] + # @return [Google::Apis::LoggingV2::Empty] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_folder_logs(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v2/{+parent}/logs', options) - command.response_representation = Google::Apis::LoggingV2::ListLogsResponse::Representation - command.response_class = Google::Apis::LoggingV2::ListLogsResponse + def delete_folder_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v2/{+sinkName}', options) + command.response_representation = Google::Apis::LoggingV2::Empty::Representation + command.response_class = Google::Apis::LoggingV2::Empty + command.params['sinkName'] = sink_name unless sink_name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists sinks. + # @param [String] parent + # Required. The parent resource whose sinks are to be listed: + # "projects/[PROJECT_ID]" + # "organizations/[ORGANIZATION_ID]" + # "billingAccounts/[BILLING_ACCOUNT_ID]" + # "folders/[FOLDER_ID]" + # @param [Fixnum] page_size + # Optional. The maximum number of results to return from this request. Non- + # positive values are ignored. The presence of nextPageToken in the response + # indicates that more results might be available. + # @param [String] page_token + # Optional. If present, then retrieve the next batch of results from the + # preceding call to this method. pageToken must be the value of nextPageToken + # from the previous response. The values of other method parameters should be + # identical to those in the previous call. + # @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::LoggingV2::ListSinksResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::LoggingV2::ListSinksResponse] + # + # @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_folder_sinks(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/{+parent}/sinks', options) + command.response_representation = Google::Apis::LoggingV2::ListSinksResponse::Representation + command.response_class = Google::Apis::LoggingV2::ListSinksResponse command.params['parent'] = parent unless parent.nil? - command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a sink. + # @param [String] sink_name + # Required. The resource name of the sink: + # "projects/[PROJECT_ID]/sinks/[SINK_ID]" + # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + # "folders/[FOLDER_ID]/sinks/[SINK_ID]" + # Example: "projects/my-project-id/sinks/my-sink-id". + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::LoggingV2::LogSink] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::LoggingV2::LogSink] + # + # @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_folder_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/{+sinkName}', options) + command.response_representation = Google::Apis::LoggingV2::LogSink::Representation + command.response_class = Google::Apis::LoggingV2::LogSink + command.params['sinkName'] = sink_name unless sink_name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) @@ -1033,123 +665,6 @@ module Google execute_or_queue_command(command, &block) end - # Deletes a sink. If the sink has a unique writer_identity, then that service - # account is also deleted. - # @param [String] sink_name - # Required. The full resource name of the sink to delete, including the parent - # resource and the sink identifier: - # "projects/[PROJECT_ID]/sinks/[SINK_ID]" - # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - # "folders/[FOLDER_ID]/sinks/[SINK_ID]" - # Example: "projects/my-project-id/sinks/my-sink-id". - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::LoggingV2::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV2::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_folder_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v2/{+sinkName}', options) - command.response_representation = Google::Apis::LoggingV2::Empty::Representation - command.response_class = Google::Apis::LoggingV2::Empty - command.params['sinkName'] = sink_name unless sink_name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Lists sinks. - # @param [String] parent - # Required. The parent resource whose sinks are to be listed: - # "projects/[PROJECT_ID]" - # "organizations/[ORGANIZATION_ID]" - # "billingAccounts/[BILLING_ACCOUNT_ID]" - # "folders/[FOLDER_ID]" - # @param [String] page_token - # Optional. If present, then retrieve the next batch of results from the - # preceding call to this method. pageToken must be the value of nextPageToken - # from the previous response. The values of other method parameters should be - # identical to those in the previous call. - # @param [Fixnum] page_size - # Optional. The maximum number of results to return from this request. Non- - # positive values are ignored. The presence of nextPageToken in the response - # indicates that more results might be available. - # @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::LoggingV2::ListSinksResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV2::ListSinksResponse] - # - # @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_folder_sinks(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v2/{+parent}/sinks', options) - command.response_representation = Google::Apis::LoggingV2::ListSinksResponse::Representation - command.response_class = Google::Apis::LoggingV2::ListSinksResponse - command.params['parent'] = parent unless parent.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets a sink. - # @param [String] sink_name - # Required. The resource name of the sink: - # "projects/[PROJECT_ID]/sinks/[SINK_ID]" - # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - # "folders/[FOLDER_ID]/sinks/[SINK_ID]" - # Example: "projects/my-project-id/sinks/my-sink-id". - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::LoggingV2::LogSink] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV2::LogSink] - # - # @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_folder_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v2/{+sinkName}', options) - command.response_representation = Google::Apis::LoggingV2::LogSink::Representation - command.response_class = Google::Apis::LoggingV2::LogSink - command.params['sinkName'] = sink_name unless sink_name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - # Lists the descriptors for monitored resource types used by Stackdriver Logging. # @param [String] page_token # Optional. If present, then retrieve the next batch of results from the @@ -1557,6 +1072,491 @@ module Google command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end + + # Lists the logs in projects, organizations, folders, or billing accounts. Only + # logs that have entries are listed. + # @param [String] parent + # Required. The resource name that owns the logs: + # "projects/[PROJECT_ID]" + # "organizations/[ORGANIZATION_ID]" + # "billingAccounts/[BILLING_ACCOUNT_ID]" + # "folders/[FOLDER_ID]" + # @param [String] page_token + # Optional. If present, then retrieve the next batch of results from the + # preceding call to this method. pageToken must be the value of nextPageToken + # from the previous response. The values of other method parameters should be + # identical to those in the previous call. + # @param [Fixnum] page_size + # Optional. The maximum number of results to return from this request. Non- + # positive values are ignored. The presence of nextPageToken in the response + # indicates that more results might be available. + # @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::LoggingV2::ListLogsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::LoggingV2::ListLogsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_logs(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/{+parent}/logs', options) + command.response_representation = Google::Apis::LoggingV2::ListLogsResponse::Representation + command.response_class = Google::Apis::LoggingV2::ListLogsResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes all the log entries in a log. The log reappears if it receives new + # entries. Log entries written shortly before the delete operation might not be + # deleted. + # @param [String] log_name + # Required. The resource name of the log to delete: + # "projects/[PROJECT_ID]/logs/[LOG_ID]" + # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + # "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + # "folders/[FOLDER_ID]/logs/[LOG_ID]" + # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog" + # , "organizations/1234567890/logs/cloudresourcemanager.googleapis.com% + # 2Factivity". For more information about log names, see LogEntry. + # @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::LoggingV2::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::LoggingV2::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_project_log(log_name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v2/{+logName}', options) + command.response_representation = Google::Apis::LoggingV2::Empty::Representation + command.response_class = Google::Apis::LoggingV2::Empty + command.params['logName'] = log_name unless log_name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates a sink. If the named sink doesn't exist, then this method is identical + # to sinks.create. If the named sink does exist, then this method replaces the + # following fields in the existing sink with values from the new sink: + # destination, filter, output_version_format, start_time, and end_time. The + # updated filter might also have a new writer_identity; see the + # unique_writer_identity field. + # @param [String] sink_name + # Required. The full resource name of the sink to update, including the parent + # resource and the sink identifier: + # "projects/[PROJECT_ID]/sinks/[SINK_ID]" + # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + # "folders/[FOLDER_ID]/sinks/[SINK_ID]" + # Example: "projects/my-project-id/sinks/my-sink-id". + # @param [Google::Apis::LoggingV2::LogSink] log_sink_object + # @param [Boolean] unique_writer_identity + # Optional. See sinks.create for a description of this field. When updating a + # sink, the effect of this field on the value of writer_identity in the updated + # sink depends on both the old and new values of this field: + # If the old and new values of this field are both false or both true, then + # there is no change to the sink's writer_identity. + # If the old value is false and the new value is true, then writer_identity is + # changed to a unique service account. + # It is an error if the old value is true and the new value is false. + # @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::LoggingV2::LogSink] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::LoggingV2::LogSink] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_project_sink(sink_name, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:put, 'v2/{+sinkName}', options) + command.request_representation = Google::Apis::LoggingV2::LogSink::Representation + command.request_object = log_sink_object + command.response_representation = Google::Apis::LoggingV2::LogSink::Representation + command.response_class = Google::Apis::LoggingV2::LogSink + command.params['sinkName'] = sink_name unless sink_name.nil? + command.query['uniqueWriterIdentity'] = unique_writer_identity unless unique_writer_identity.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a sink that exports specified log entries to a destination. The export + # of newly-ingested log entries begins immediately, unless the current time is + # outside the sink's start and end times or the sink's writer_identity is not + # permitted to write to the destination. A sink can export log entries only from + # the resource owning the sink. + # @param [String] parent + # Required. The resource in which to create the sink: + # "projects/[PROJECT_ID]" + # "organizations/[ORGANIZATION_ID]" + # "billingAccounts/[BILLING_ACCOUNT_ID]" + # "folders/[FOLDER_ID]" + # Examples: "projects/my-logging-project", "organizations/123456789". + # @param [Google::Apis::LoggingV2::LogSink] log_sink_object + # @param [Boolean] unique_writer_identity + # Optional. Determines the kind of IAM identity returned as writer_identity in + # the new sink. If this value is omitted or set to false, and if the sink's + # parent is a project, then the value returned as writer_identity is the same + # group or service account used by Stackdriver Logging before the addition of + # writer identities to this API. The sink's destination must be in the same + # project as the sink itself.If this field is set to true, or if the sink is + # owned by a non-project resource such as an organization, then the value of + # writer_identity will be a unique service account used only for exports from + # the new sink. For more information, see writer_identity in LogSink. + # @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::LoggingV2::LogSink] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::LoggingV2::LogSink] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_project_sink(parent, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2/{+parent}/sinks', options) + command.request_representation = Google::Apis::LoggingV2::LogSink::Representation + command.request_object = log_sink_object + command.response_representation = Google::Apis::LoggingV2::LogSink::Representation + command.response_class = Google::Apis::LoggingV2::LogSink + command.params['parent'] = parent unless parent.nil? + command.query['uniqueWriterIdentity'] = unique_writer_identity unless unique_writer_identity.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a sink. If the sink has a unique writer_identity, then that service + # account is also deleted. + # @param [String] sink_name + # Required. The full resource name of the sink to delete, including the parent + # resource and the sink identifier: + # "projects/[PROJECT_ID]/sinks/[SINK_ID]" + # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + # "folders/[FOLDER_ID]/sinks/[SINK_ID]" + # Example: "projects/my-project-id/sinks/my-sink-id". + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::LoggingV2::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::LoggingV2::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_project_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v2/{+sinkName}', options) + command.response_representation = Google::Apis::LoggingV2::Empty::Representation + command.response_class = Google::Apis::LoggingV2::Empty + command.params['sinkName'] = sink_name unless sink_name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists sinks. + # @param [String] parent + # Required. The parent resource whose sinks are to be listed: + # "projects/[PROJECT_ID]" + # "organizations/[ORGANIZATION_ID]" + # "billingAccounts/[BILLING_ACCOUNT_ID]" + # "folders/[FOLDER_ID]" + # @param [String] page_token + # Optional. If present, then retrieve the next batch of results from the + # preceding call to this method. pageToken must be the value of nextPageToken + # from the previous response. The values of other method parameters should be + # identical to those in the previous call. + # @param [Fixnum] page_size + # Optional. The maximum number of results to return from this request. Non- + # positive values are ignored. The presence of nextPageToken in the response + # indicates that more results might be available. + # @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::LoggingV2::ListSinksResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::LoggingV2::ListSinksResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_sinks(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/{+parent}/sinks', options) + command.response_representation = Google::Apis::LoggingV2::ListSinksResponse::Representation + command.response_class = Google::Apis::LoggingV2::ListSinksResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a sink. + # @param [String] sink_name + # Required. The resource name of the sink: + # "projects/[PROJECT_ID]/sinks/[SINK_ID]" + # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + # "folders/[FOLDER_ID]/sinks/[SINK_ID]" + # Example: "projects/my-project-id/sinks/my-sink-id". + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::LoggingV2::LogSink] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::LoggingV2::LogSink] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/{+sinkName}', options) + command.response_representation = Google::Apis::LoggingV2::LogSink::Representation + command.response_class = Google::Apis::LoggingV2::LogSink + command.params['sinkName'] = sink_name unless sink_name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a logs-based metric. + # @param [String] parent + # The resource name of the project in which to create the metric: + # "projects/[PROJECT_ID]" + # The new metric must be provided in the request. + # @param [Google::Apis::LoggingV2::LogMetric] log_metric_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::LoggingV2::LogMetric] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::LoggingV2::LogMetric] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_project_metric(parent, log_metric_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2/{+parent}/metrics', options) + command.request_representation = Google::Apis::LoggingV2::LogMetric::Representation + command.request_object = log_metric_object + command.response_representation = Google::Apis::LoggingV2::LogMetric::Representation + command.response_class = Google::Apis::LoggingV2::LogMetric + command.params['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a logs-based metric. + # @param [String] metric_name + # The resource name of the metric to delete: + # "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::LoggingV2::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::LoggingV2::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_project_metric(metric_name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v2/{+metricName}', options) + command.response_representation = Google::Apis::LoggingV2::Empty::Representation + command.response_class = Google::Apis::LoggingV2::Empty + command.params['metricName'] = metric_name unless metric_name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists logs-based metrics. + # @param [String] parent + # Required. The name of the project containing the metrics: + # "projects/[PROJECT_ID]" + # @param [String] page_token + # Optional. If present, then retrieve the next batch of results from the + # preceding call to this method. pageToken must be the value of nextPageToken + # from the previous response. The values of other method parameters should be + # identical to those in the previous call. + # @param [Fixnum] page_size + # Optional. The maximum number of results to return from this request. Non- + # positive values are ignored. The presence of nextPageToken in the response + # indicates that more results might be available. + # @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::LoggingV2::ListLogMetricsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::LoggingV2::ListLogMetricsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_metrics(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/{+parent}/metrics', options) + command.response_representation = Google::Apis::LoggingV2::ListLogMetricsResponse::Representation + command.response_class = Google::Apis::LoggingV2::ListLogMetricsResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a logs-based metric. + # @param [String] metric_name + # The resource name of the desired metric: + # "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::LoggingV2::LogMetric] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::LoggingV2::LogMetric] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_metric(metric_name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/{+metricName}', options) + command.response_representation = Google::Apis::LoggingV2::LogMetric::Representation + command.response_class = Google::Apis::LoggingV2::LogMetric + command.params['metricName'] = metric_name unless metric_name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates or updates a logs-based metric. + # @param [String] metric_name + # The resource name of the metric to update: + # "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + # The updated metric must be provided in the request and it's name field must be + # the same as [METRIC_ID] If the metric does not exist in [PROJECT_ID], then a + # new metric is created. + # @param [Google::Apis::LoggingV2::LogMetric] log_metric_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::LoggingV2::LogMetric] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::LoggingV2::LogMetric] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_project_metric(metric_name, log_metric_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:put, 'v2/{+metricName}', options) + command.request_representation = Google::Apis::LoggingV2::LogMetric::Representation + command.request_object = log_metric_object + command.response_representation = Google::Apis::LoggingV2::LogMetric::Representation + command.response_class = Google::Apis::LoggingV2::LogMetric + command.params['metricName'] = metric_name unless metric_name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end protected diff --git a/generated/google/apis/logging_v2beta1.rb b/generated/google/apis/logging_v2beta1.rb index 547d6dfd6..3eb343cd8 100644 --- a/generated/google/apis/logging_v2beta1.rb +++ b/generated/google/apis/logging_v2beta1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/logging/docs/ module LoggingV2beta1 VERSION = 'V2beta1' - REVISION = '20170410' + REVISION = '20170523' # View your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM_READ_ONLY = 'https://www.googleapis.com/auth/cloud-platform.read-only' diff --git a/generated/google/apis/logging_v2beta1/classes.rb b/generated/google/apis/logging_v2beta1/classes.rb index 5170e01c3..33bcc015a 100644 --- a/generated/google/apis/logging_v2beta1/classes.rb +++ b/generated/google/apis/logging_v2beta1/classes.rb @@ -22,1073 +22,10 @@ module Google module Apis module LoggingV2beta1 - # Result returned from ListLogMetrics. - class ListLogMetricsResponse - include Google::Apis::Core::Hashable - - # A list of logs-based metrics. - # Corresponds to the JSON property `metrics` - # @return [Array] - attr_accessor :metrics - - # If there might be more results than appear in this response, then - # nextPageToken is included. To get the next set of results, call this method - # again using the value of nextPageToken as pageToken. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @metrics = args[:metrics] if args.key?(:metrics) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # A generic empty message that you can re-use to avoid defining duplicated empty - # messages in your APIs. A typical example is to use it as the request or the - # response type of an API method. For instance: - # service Foo ` - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # ` - # The JSON representation for Empty is empty JSON object ``. - class Empty - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # An individual entry in a log. - class LogEntry - include Google::Apis::Core::Hashable - - # Optional. The time the event described by the log entry occurred. If omitted - # in a new log entry, Stackdriver Logging will insert the time the log entry is - # received. Stackdriver Logging might reject log entries whose time stamps are - # more than a couple of hours in the future. Log entries with time stamps in the - # past are accepted. - # Corresponds to the JSON property `timestamp` - # @return [String] - attr_accessor :timestamp - - # Required. The resource name of the log to which this log entry belongs: - # "projects/[PROJECT_ID]/logs/[LOG_ID]" - # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - # "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" - # "folders/[FOLDER_ID]/logs/[LOG_ID]" - # [LOG_ID] must be URL-encoded within log_name. Example: "organizations/ - # 1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". [LOG_ID] must - # be less than 512 characters long and can only include the following characters: - # upper and lower case alphanumeric characters, forward-slash, underscore, - # hyphen, and period.For backward compatibility, if log_name begins with a - # forward-slash, such as /projects/..., then the log entry is ingested as usual - # but the forward-slash is removed. Listing the log entry will not show the - # leading slash and filtering for a log name with a leading slash will never - # return any results. - # Corresponds to the JSON property `logName` - # @return [String] - attr_accessor :log_name - - # An object representing a resource that can be used for monitoring, logging, - # billing, or other purposes. Examples include virtual machine instances, - # databases, and storage devices such as disks. The type field identifies a - # MonitoredResourceDescriptor object that describes the resource's schema. - # Information in the labels field identifies the actual resource and its - # attributes according to the schema. For example, a particular Compute Engine - # VM instance could be represented by the following object, because the - # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and " - # zone": - # ` "type": "gce_instance", - # "labels": ` "instance_id": "12345678901234", - # "zone": "us-central1-a" `` - # Corresponds to the JSON property `resource` - # @return [Google::Apis::LoggingV2beta1::MonitoredResource] - attr_accessor :resource - - # A common proto for logging HTTP requests. Only contains semantics defined by - # the HTTP specification. Product-specific logging information MUST be defined - # in a separate message. - # Corresponds to the JSON property `httpRequest` - # @return [Google::Apis::LoggingV2beta1::HttpRequest] - attr_accessor :http_request - - # The log entry payload, represented as a structure that is expressed as a JSON - # object. - # Corresponds to the JSON property `jsonPayload` - # @return [Hash] - attr_accessor :json_payload - - # Optional. A unique identifier for the log entry. If you provide a value, then - # Stackdriver Logging considers other log entries in the same project, with the - # same timestamp, and with the same insert_id to be duplicates which can be - # removed. If omitted in new log entries, then Stackdriver Logging will insert - # its own unique identifier. The insert_id is used to order log entries that - # have the same timestamp value. - # Corresponds to the JSON property `insertId` - # @return [String] - attr_accessor :insert_id - - # Additional information about a potentially long-running operation with which a - # log entry is associated. - # Corresponds to the JSON property `operation` - # @return [Google::Apis::LoggingV2beta1::LogEntryOperation] - attr_accessor :operation - - # The log entry payload, represented as a Unicode string (UTF-8). - # Corresponds to the JSON property `textPayload` - # @return [String] - attr_accessor :text_payload - - # The log entry payload, represented as a protocol buffer. Some Google Cloud - # Platform services use this field for their log entry payloads. - # Corresponds to the JSON property `protoPayload` - # @return [Hash] - attr_accessor :proto_payload - - # Optional. A set of user-defined (key, value) data that provides additional - # information about the log entry. - # Corresponds to the JSON property `labels` - # @return [Hash] - attr_accessor :labels - - # Optional. Resource name of the trace associated with the log entry, if any. If - # it contains a relative resource name, the name is assumed to be relative to // - # tracing.googleapis.com. Example: projects/my-projectid/traces/ - # 06796866738c859f2f19b7cfb3214824 - # Corresponds to the JSON property `trace` - # @return [String] - attr_accessor :trace - - # Optional. The severity of the log entry. The default value is LogSeverity. - # DEFAULT. - # Corresponds to the JSON property `severity` - # @return [String] - attr_accessor :severity - - # Additional information about the source code location that produced the log - # entry. - # Corresponds to the JSON property `sourceLocation` - # @return [Google::Apis::LoggingV2beta1::LogEntrySourceLocation] - attr_accessor :source_location - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @timestamp = args[:timestamp] if args.key?(:timestamp) - @log_name = args[:log_name] if args.key?(:log_name) - @resource = args[:resource] if args.key?(:resource) - @http_request = args[:http_request] if args.key?(:http_request) - @json_payload = args[:json_payload] if args.key?(:json_payload) - @insert_id = args[:insert_id] if args.key?(:insert_id) - @operation = args[:operation] if args.key?(:operation) - @text_payload = args[:text_payload] if args.key?(:text_payload) - @proto_payload = args[:proto_payload] if args.key?(:proto_payload) - @labels = args[:labels] if args.key?(:labels) - @trace = args[:trace] if args.key?(:trace) - @severity = args[:severity] if args.key?(:severity) - @source_location = args[:source_location] if args.key?(:source_location) - end - end - - # Specifies a location in a source code file. - class SourceLocation - include Google::Apis::Core::Hashable - - # Source file name. Depending on the runtime environment, this might be a simple - # name or a fully-qualified name. - # Corresponds to the JSON property `file` - # @return [String] - attr_accessor :file - - # Human-readable name of the function or method being invoked, with optional - # context such as the class or package name. This information is used in - # contexts such as the logs viewer, where a file and line number are less - # meaningful. The format can vary by language. For example: qual.if.ied.Class. - # method (Java), dir/package.func (Go), function (Python). - # Corresponds to the JSON property `functionName` - # @return [String] - attr_accessor :function_name - - # Line within the source file. - # Corresponds to the JSON property `line` - # @return [Fixnum] - attr_accessor :line - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @file = args[:file] if args.key?(:file) - @function_name = args[:function_name] if args.key?(:function_name) - @line = args[:line] if args.key?(:line) - end - end - - # The parameters to ListLogEntries. - class ListLogEntriesRequest - include Google::Apis::Core::Hashable - - # Optional. How the results should be sorted. Presently, the only permitted - # values are "timestamp asc" (default) and "timestamp desc". The first option - # returns entries in order of increasing values of LogEntry.timestamp (oldest - # first), and the second option returns entries in order of decreasing - # timestamps (newest first). Entries with equal timestamps are returned in order - # of their insert_id values. - # Corresponds to the JSON property `orderBy` - # @return [String] - attr_accessor :order_by - - # Required. Names of one or more parent resources from which to retrieve log - # entries: - # "projects/[PROJECT_ID]" - # "organizations/[ORGANIZATION_ID]" - # "billingAccounts/[BILLING_ACCOUNT_ID]" - # "folders/[FOLDER_ID]" - # Projects listed in the project_ids field are added to this list. - # Corresponds to the JSON property `resourceNames` - # @return [Array] - attr_accessor :resource_names - - # Deprecated. Use resource_names instead. One or more project identifiers or - # project numbers from which to retrieve log entries. Example: "my-project-1A". - # If present, these project identifiers are converted to resource name format - # and added to the list of resources in resource_names. - # Corresponds to the JSON property `projectIds` - # @return [Array] - attr_accessor :project_ids - - # Optional. A filter that chooses which log entries to return. See Advanced Logs - # Filters. Only log entries that match the filter are returned. An empty filter - # matches all log entries in the resources listed in resource_names. Referencing - # a parent resource that is not listed in resource_names will cause the filter - # to return no results. The maximum length of the filter is 20000 characters. - # Corresponds to the JSON property `filter` - # @return [String] - attr_accessor :filter - - # Optional. If present, then retrieve the next batch of results from the - # preceding call to this method. page_token must be the value of next_page_token - # from the previous response. The values of other method parameters should be - # identical to those in the previous call. - # Corresponds to the JSON property `pageToken` - # @return [String] - attr_accessor :page_token - - # Optional. The maximum number of results to return from this request. Non- - # positive values are ignored. The presence of next_page_token in the response - # indicates that more results might be available. - # Corresponds to the JSON property `pageSize` - # @return [Fixnum] - attr_accessor :page_size - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @order_by = args[:order_by] if args.key?(:order_by) - @resource_names = args[:resource_names] if args.key?(:resource_names) - @project_ids = args[:project_ids] if args.key?(:project_ids) - @filter = args[:filter] if args.key?(:filter) - @page_token = args[:page_token] if args.key?(:page_token) - @page_size = args[:page_size] if args.key?(:page_size) - end - end - - # Complete log information about a single HTTP request to an App Engine - # application. - class RequestLog - include Google::Apis::Core::Hashable - - # HTTP version of request. Example: "HTTP/1.1". - # Corresponds to the JSON property `httpVersion` - # @return [String] - attr_accessor :http_version - - # Time when the request started. - # Corresponds to the JSON property `startTime` - # @return [String] - attr_accessor :start_time - - # Latency of the request. - # Corresponds to the JSON property `latency` - # @return [String] - attr_accessor :latency - - # Origin IP address. - # Corresponds to the JSON property `ip` - # @return [String] - attr_accessor :ip - - # Application that handled this request. - # Corresponds to the JSON property `appId` - # @return [String] - attr_accessor :app_id - - # App Engine release version. - # Corresponds to the JSON property `appEngineRelease` - # @return [String] - attr_accessor :app_engine_release - - # Request method. Example: "GET", "HEAD", "PUT", "POST", "DELETE". - # Corresponds to the JSON property `method` - # @return [String] - attr_accessor :method_prop - - # An indication of the relative cost of serving this request. - # Corresponds to the JSON property `cost` - # @return [Float] - attr_accessor :cost - - # An identifier for the instance that handled the request. - # Corresponds to the JSON property `instanceId` - # @return [String] - attr_accessor :instance_id - - # Number of CPU megacycles used to process request. - # Corresponds to the JSON property `megaCycles` - # @return [Fixnum] - attr_accessor :mega_cycles - - # Whether this is the first RequestLog entry for this request. If an active - # request has several RequestLog entries written to Stackdriver Logging, then - # this field will be set for one of them. - # Corresponds to the JSON property `first` - # @return [Boolean] - attr_accessor :first - alias_method :first?, :first - - # Version of the application that handled this request. - # Corresponds to the JSON property `versionId` - # @return [String] - attr_accessor :version_id - - # Module of the application that handled this request. - # Corresponds to the JSON property `moduleId` - # @return [String] - attr_accessor :module_id - - # Time when the request finished. - # Corresponds to the JSON property `endTime` - # @return [String] - attr_accessor :end_time - - # User agent that made the request. - # Corresponds to the JSON property `userAgent` - # @return [String] - attr_accessor :user_agent - - # Whether this was a loading request for the instance. - # Corresponds to the JSON property `wasLoadingRequest` - # @return [Boolean] - attr_accessor :was_loading_request - alias_method :was_loading_request?, :was_loading_request - - # Source code for the application that handled this request. There can be more - # than one source reference per deployed application if source code is - # distributed among multiple repositories. - # Corresponds to the JSON property `sourceReference` - # @return [Array] - attr_accessor :source_reference - - # Size in bytes sent back to client by request. - # Corresponds to the JSON property `responseSize` - # @return [Fixnum] - attr_accessor :response_size - - # Stackdriver Trace identifier for this request. - # Corresponds to the JSON property `traceId` - # @return [String] - attr_accessor :trace_id - - # A list of log lines emitted by the application while serving this request. - # Corresponds to the JSON property `line` - # @return [Array] - attr_accessor :line - - # Referrer URL of request. - # Corresponds to the JSON property `referrer` - # @return [String] - attr_accessor :referrer - - # Queue name of the request, in the case of an offline request. - # Corresponds to the JSON property `taskQueueName` - # @return [String] - attr_accessor :task_queue_name - - # Globally unique identifier for a request, which is based on the request start - # time. Request IDs for requests which started later will compare greater as - # strings than those for requests which started earlier. - # Corresponds to the JSON property `requestId` - # @return [String] - attr_accessor :request_id - - # The logged-in user who made the request.Most likely, this is the part of the - # user's email before the @ sign. The field value is the same for different - # requests from the same user, but different users can have similar names. This - # information is also available to the application via the App Engine Users API. - # This field will be populated starting with App Engine 1.9.21. - # Corresponds to the JSON property `nickname` - # @return [String] - attr_accessor :nickname - - # Time this request spent in the pending request queue. - # Corresponds to the JSON property `pendingTime` - # @return [String] - attr_accessor :pending_time - - # Contains the path and query portion of the URL that was requested. For example, - # if the URL was "http://example.com/app?name=val", the resource would be "/app? - # name=val". The fragment identifier, which is identified by the # character, is - # not included. - # Corresponds to the JSON property `resource` - # @return [String] - attr_accessor :resource - - # HTTP response status code. Example: 200, 404. - # Corresponds to the JSON property `status` - # @return [Fixnum] - attr_accessor :status - - # Task name of the request, in the case of an offline request. - # Corresponds to the JSON property `taskName` - # @return [String] - attr_accessor :task_name - - # File or class that handled the request. - # Corresponds to the JSON property `urlMapEntry` - # @return [String] - attr_accessor :url_map_entry - - # If the instance processing this request belongs to a manually scaled module, - # then this is the 0-based index of the instance. Otherwise, this value is -1. - # Corresponds to the JSON property `instanceIndex` - # @return [Fixnum] - attr_accessor :instance_index - - # Whether this request is finished or active. - # Corresponds to the JSON property `finished` - # @return [Boolean] - attr_accessor :finished - alias_method :finished?, :finished - - # Internet host and port number of the resource being requested. - # Corresponds to the JSON property `host` - # @return [String] - attr_accessor :host - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @http_version = args[:http_version] if args.key?(:http_version) - @start_time = args[:start_time] if args.key?(:start_time) - @latency = args[:latency] if args.key?(:latency) - @ip = args[:ip] if args.key?(:ip) - @app_id = args[:app_id] if args.key?(:app_id) - @app_engine_release = args[:app_engine_release] if args.key?(:app_engine_release) - @method_prop = args[:method_prop] if args.key?(:method_prop) - @cost = args[:cost] if args.key?(:cost) - @instance_id = args[:instance_id] if args.key?(:instance_id) - @mega_cycles = args[:mega_cycles] if args.key?(:mega_cycles) - @first = args[:first] if args.key?(:first) - @version_id = args[:version_id] if args.key?(:version_id) - @module_id = args[:module_id] if args.key?(:module_id) - @end_time = args[:end_time] if args.key?(:end_time) - @user_agent = args[:user_agent] if args.key?(:user_agent) - @was_loading_request = args[:was_loading_request] if args.key?(:was_loading_request) - @source_reference = args[:source_reference] if args.key?(:source_reference) - @response_size = args[:response_size] if args.key?(:response_size) - @trace_id = args[:trace_id] if args.key?(:trace_id) - @line = args[:line] if args.key?(:line) - @referrer = args[:referrer] if args.key?(:referrer) - @task_queue_name = args[:task_queue_name] if args.key?(:task_queue_name) - @request_id = args[:request_id] if args.key?(:request_id) - @nickname = args[:nickname] if args.key?(:nickname) - @pending_time = args[:pending_time] if args.key?(:pending_time) - @resource = args[:resource] if args.key?(:resource) - @status = args[:status] if args.key?(:status) - @task_name = args[:task_name] if args.key?(:task_name) - @url_map_entry = args[:url_map_entry] if args.key?(:url_map_entry) - @instance_index = args[:instance_index] if args.key?(:instance_index) - @finished = args[:finished] if args.key?(:finished) - @host = args[:host] if args.key?(:host) - end - end - - # Result returned from ListMonitoredResourceDescriptors. - class ListMonitoredResourceDescriptorsResponse - include Google::Apis::Core::Hashable - - # If there might be more results than those appearing in this response, then - # nextPageToken is included. To get the next set of results, call this method - # again using the value of nextPageToken as pageToken. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # A list of resource descriptors. - # Corresponds to the JSON property `resourceDescriptors` - # @return [Array] - attr_accessor :resource_descriptors - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @resource_descriptors = args[:resource_descriptors] if args.key?(:resource_descriptors) - end - end - - # A reference to a particular snapshot of the source tree used to build and - # deploy an application. - class SourceReference - include Google::Apis::Core::Hashable - - # Optional. A URI string identifying the repository. Example: "https://github. - # com/GoogleCloudPlatform/kubernetes.git" - # Corresponds to the JSON property `repository` - # @return [String] - attr_accessor :repository - - # The canonical and persistent identifier of the deployed revision. Example (git) - # : "0035781c50ec7aa23385dc841529ce8a4b70db1b" - # Corresponds to the JSON property `revisionId` - # @return [String] - attr_accessor :revision_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @repository = args[:repository] if args.key?(:repository) - @revision_id = args[:revision_id] if args.key?(:revision_id) - end - end - - # Additional information about a potentially long-running operation with which a - # log entry is associated. - class LogEntryOperation - include Google::Apis::Core::Hashable - - # Optional. Set this to True if this is the last log entry in the operation. - # Corresponds to the JSON property `last` - # @return [Boolean] - attr_accessor :last - alias_method :last?, :last - - # Optional. An arbitrary operation identifier. Log entries with the same - # identifier are assumed to be part of the same operation. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Optional. An arbitrary producer identifier. The combination of id and producer - # must be globally unique. Examples for producer: "MyDivision.MyBigCompany.com", - # "github.com/MyProject/MyApplication". - # Corresponds to the JSON property `producer` - # @return [String] - attr_accessor :producer - - # Optional. Set this to True if this is the first log entry in the operation. - # Corresponds to the JSON property `first` - # @return [Boolean] - attr_accessor :first - alias_method :first?, :first - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @last = args[:last] if args.key?(:last) - @id = args[:id] if args.key?(:id) - @producer = args[:producer] if args.key?(:producer) - @first = args[:first] if args.key?(:first) - end - end - - # Describes a logs-based metric. The value of the metric is the number of log - # entries that match a logs filter in a given time interval. - class LogMetric - include Google::Apis::Core::Hashable - - # Required. The client-assigned metric identifier. Examples: "error_count", " - # nginx/requests".Metric identifiers are limited to 100 characters and can - # include only the following characters: A-Z, a-z, 0-9, and the special - # characters _-.,+!*',()%/. The forward-slash character (/) denotes a hierarchy - # of name pieces, and it cannot be the first character of the name.The metric - # identifier in this field must not be URL-encoded (https://en.wikipedia.org/ - # wiki/Percent-encoding). However, when the metric identifier appears as the [ - # METRIC_ID] part of a metric_name API parameter, then the metric identifier - # must be URL-encoded. Example: "projects/my-project/metrics/nginx%2Frequests". - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Optional. A description of this metric, which is used in documentation. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Output only. The API version that created or updated this metric. The version - # also dictates the syntax of the filter expression. When a value for this field - # is missing, the default value of V2 should be assumed. - # Corresponds to the JSON property `version` - # @return [String] - attr_accessor :version - - # Required. An advanced logs filter which is used to match log entries. Example: - # "resource.type=gae_app AND severity>=ERROR" - # The maximum length of the filter is 20000 characters. - # Corresponds to the JSON property `filter` - # @return [String] - attr_accessor :filter - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @name = args[:name] if args.key?(:name) - @description = args[:description] if args.key?(:description) - @version = args[:version] if args.key?(:version) - @filter = args[:filter] if args.key?(:filter) - end - end - - # Result returned from WriteLogEntries. empty - class WriteLogEntriesResponse - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # An object representing a resource that can be used for monitoring, logging, - # billing, or other purposes. Examples include virtual machine instances, - # databases, and storage devices such as disks. The type field identifies a - # MonitoredResourceDescriptor object that describes the resource's schema. - # Information in the labels field identifies the actual resource and its - # attributes according to the schema. For example, a particular Compute Engine - # VM instance could be represented by the following object, because the - # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and " - # zone": - # ` "type": "gce_instance", - # "labels": ` "instance_id": "12345678901234", - # "zone": "us-central1-a" `` - class MonitoredResource - include Google::Apis::Core::Hashable - - # Required. The monitored resource type. This field must match the type field of - # a MonitoredResourceDescriptor object. For example, the type of a Cloud SQL - # database is "cloudsql_database". - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Required. Values for all of the labels listed in the associated monitored - # resource descriptor. For example, Cloud SQL databases use the labels " - # database_id" and "zone". - # Corresponds to the JSON property `labels` - # @return [Hash] - attr_accessor :labels - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @type = args[:type] if args.key?(:type) - @labels = args[:labels] if args.key?(:labels) - end - end - - # The parameters to WriteLogEntries. - class WriteLogEntriesRequest - include Google::Apis::Core::Hashable - - # Optional. A default log resource name that is assigned to all log entries in - # entries that do not specify a value for log_name: - # "projects/[PROJECT_ID]/logs/[LOG_ID]" - # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - # "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" - # "folders/[FOLDER_ID]/logs/[LOG_ID]" - # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog" - # or "organizations/1234567890/logs/cloudresourcemanager.googleapis.com% - # 2Factivity". For more information about log names, see LogEntry. - # Corresponds to the JSON property `logName` - # @return [String] - attr_accessor :log_name - - # Required. The log entries to write. Values supplied for the fields log_name, - # resource, and labels in this entries.write request are inserted into those log - # entries in this list that do not provide their own values.Stackdriver Logging - # also creates and inserts values for timestamp and insert_id if the entries do - # not provide them. The created insert_id for the N'th entry in this list will - # be greater than earlier entries and less than later entries. Otherwise, the - # order of log entries in this list does not matter.To improve throughput and to - # avoid exceeding the quota limit for calls to entries.write, you should write - # multiple log entries at once rather than calling this method for each - # individual log entry. - # Corresponds to the JSON property `entries` - # @return [Array] - attr_accessor :entries - - # Optional. Whether valid entries should be written even if some other entries - # fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any entry is not - # written, then the response status is the error associated with one of the - # failed entries and the response includes error details keyed by the entries' - # zero-based index in the entries.write method. - # Corresponds to the JSON property `partialSuccess` - # @return [Boolean] - attr_accessor :partial_success - alias_method :partial_success?, :partial_success - - # Optional. Default labels that are added to the labels field of all log entries - # in entries. If a log entry already has a label with the same key as a label in - # this parameter, then the log entry's label is not changed. See LogEntry. - # Corresponds to the JSON property `labels` - # @return [Hash] - attr_accessor :labels - - # An object representing a resource that can be used for monitoring, logging, - # billing, or other purposes. Examples include virtual machine instances, - # databases, and storage devices such as disks. The type field identifies a - # MonitoredResourceDescriptor object that describes the resource's schema. - # Information in the labels field identifies the actual resource and its - # attributes according to the schema. For example, a particular Compute Engine - # VM instance could be represented by the following object, because the - # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and " - # zone": - # ` "type": "gce_instance", - # "labels": ` "instance_id": "12345678901234", - # "zone": "us-central1-a" `` - # Corresponds to the JSON property `resource` - # @return [Google::Apis::LoggingV2beta1::MonitoredResource] - attr_accessor :resource - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @log_name = args[:log_name] if args.key?(:log_name) - @entries = args[:entries] if args.key?(:entries) - @partial_success = args[:partial_success] if args.key?(:partial_success) - @labels = args[:labels] if args.key?(:labels) - @resource = args[:resource] if args.key?(:resource) - end - end - - # Describes a sink used to export log entries to one of the following - # destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a - # Cloud Pub/Sub topic. A logs filter controls which log entries are exported. - # The sink must be created within a project, organization, billing account, or - # folder. - class LogSink - include Google::Apis::Core::Hashable - - # Required. The export destination: - # "storage.googleapis.com/[GCS_BUCKET]" - # "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]" - # "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" - # The sink's writer_identity, set when the sink is created, must have permission - # to write to the destination or else the log entries are not exported. For more - # information, see Exporting Logs With Sinks. - # Corresponds to the JSON property `destination` - # @return [String] - attr_accessor :destination - - # Optional. An advanced logs filter. The only exported log entries are those - # that are in the resource owning the sink and that match the filter. The filter - # must use the log entry format specified by the output_version_format parameter. - # For example, in the v2 format: - # logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR - # Corresponds to the JSON property `filter` - # @return [String] - attr_accessor :filter - - # Optional. The time at which this sink will stop exporting log entries. Log - # entries are exported only if their timestamp is earlier than the end time. If - # this field is not supplied, there is no end time. If both a start time and an - # end time are provided, then the end time must be later than the start time. - # Corresponds to the JSON property `endTime` - # @return [String] - attr_accessor :end_time - - # Optional. The time at which this sink will begin exporting log entries. Log - # entries are exported only if their timestamp is not earlier than the start - # time. The default value of this field is the time the sink is created or - # updated. - # Corresponds to the JSON property `startTime` - # @return [String] - attr_accessor :start_time - - # Output only. An IAM identity—a service account or group—under - # which Stackdriver Logging writes the exported log entries to the sink's - # destination. This field is set by sinks.create and sinks.update, based on the - # setting of unique_writer_identity in those methods.Until you grant this - # identity write-access to the destination, log entry exports from this sink - # will fail. For more information, see Granting access for a resource. Consult - # the destination service's documentation to determine the appropriate IAM roles - # to assign to the identity. - # Corresponds to the JSON property `writerIdentity` - # @return [String] - attr_accessor :writer_identity - - # Optional. The log entry format to use for this sink's exported log entries. - # The v2 format is used by default. The v1 format is deprecated and should be - # used only as part of a migration effort to v2. See Migration to the v2 API. - # Corresponds to the JSON property `outputVersionFormat` - # @return [String] - attr_accessor :output_version_format - - # Required. The client-assigned sink identifier, unique within the project. - # Example: "my-syslog-errors-to-pubsub". Sink identifiers are limited to 100 - # characters and can include only the following characters: upper and lower-case - # alphanumeric characters, underscores, hyphens, and periods. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Optional. This field presently applies only to sinks in organizations and - # folders. If true, then logs from children of this entity will also be - # available to this sink for export. Whether particular log entries from the - # children are exported depends on the sink's filter expression. For example, if - # this sink is associated with an organization, then logs from all projects in - # the organization as well as from the organization itself will be available for - # export. - # Corresponds to the JSON property `includeChildren` - # @return [Boolean] - attr_accessor :include_children - alias_method :include_children?, :include_children - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @destination = args[:destination] if args.key?(:destination) - @filter = args[:filter] if args.key?(:filter) - @end_time = args[:end_time] if args.key?(:end_time) - @start_time = args[:start_time] if args.key?(:start_time) - @writer_identity = args[:writer_identity] if args.key?(:writer_identity) - @output_version_format = args[:output_version_format] if args.key?(:output_version_format) - @name = args[:name] if args.key?(:name) - @include_children = args[:include_children] if args.key?(:include_children) - end - end - - # Result returned from ListLogs. - class ListLogsResponse - include Google::Apis::Core::Hashable - - # A list of log names. For example, "projects/my-project/syslog" or " - # organizations/123/cloudresourcemanager.googleapis.com%2Factivity". - # Corresponds to the JSON property `logNames` - # @return [Array] - attr_accessor :log_names - - # If there might be more results than those appearing in this response, then - # nextPageToken is included. To get the next set of results, call this method - # again using the value of nextPageToken as pageToken. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @log_names = args[:log_names] if args.key?(:log_names) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # Result returned from ListSinks. - class ListSinksResponse - include Google::Apis::Core::Hashable - - # If there might be more results than appear in this response, then - # nextPageToken is included. To get the next set of results, call the same - # method again using the value of nextPageToken as pageToken. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # A list of sinks. - # Corresponds to the JSON property `sinks` - # @return [Array] - attr_accessor :sinks - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @sinks = args[:sinks] if args.key?(:sinks) - end - end - - # A common proto for logging HTTP requests. Only contains semantics defined by - # the HTTP specification. Product-specific logging information MUST be defined - # in a separate message. - class HttpRequest - include Google::Apis::Core::Hashable - - # The scheme (http, https), the host name, the path and the query portion of the - # URL that was requested. Example: "http://example.com/some/info?color=red". - # Corresponds to the JSON property `requestUrl` - # @return [String] - attr_accessor :request_url - - # The IP address (IPv4 or IPv6) of the origin server that the request was sent - # to. - # Corresponds to the JSON property `serverIp` - # @return [String] - attr_accessor :server_ip - - # The IP address (IPv4 or IPv6) of the client that issued the HTTP request. - # Examples: "192.168.1.1", "FE80::0202:B3FF:FE1E:8329". - # Corresponds to the JSON property `remoteIp` - # @return [String] - attr_accessor :remote_ip - - # Whether or not a cache lookup was attempted. - # Corresponds to the JSON property `cacheLookup` - # @return [Boolean] - attr_accessor :cache_lookup - alias_method :cache_lookup?, :cache_lookup - - # Whether or not an entity was served from cache (with or without validation). - # Corresponds to the JSON property `cacheHit` - # @return [Boolean] - attr_accessor :cache_hit - alias_method :cache_hit?, :cache_hit - - # Whether or not the response was validated with the origin server before being - # served from cache. This field is only meaningful if cache_hit is True. - # Corresponds to the JSON property `cacheValidatedWithOriginServer` - # @return [Boolean] - attr_accessor :cache_validated_with_origin_server - alias_method :cache_validated_with_origin_server?, :cache_validated_with_origin_server - - # The response code indicating the status of response. Examples: 200, 404. - # Corresponds to the JSON property `status` - # @return [Fixnum] - attr_accessor :status - - # The referer URL of the request, as defined in HTTP/1.1 Header Field - # Definitions (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). - # Corresponds to the JSON property `referer` - # @return [String] - attr_accessor :referer - - # The user agent sent by the client. Example: "Mozilla/4.0 (compatible; MSIE 6.0; - # Windows 98; Q312461; .NET CLR 1.0.3705)". - # Corresponds to the JSON property `userAgent` - # @return [String] - attr_accessor :user_agent - - # The request processing latency on the server, from the time the request was - # received until the response was sent. - # Corresponds to the JSON property `latency` - # @return [String] - attr_accessor :latency - - # The number of HTTP response bytes inserted into cache. Set only when a cache - # fill was attempted. - # Corresponds to the JSON property `cacheFillBytes` - # @return [Fixnum] - attr_accessor :cache_fill_bytes - - # The request method. Examples: "GET", "HEAD", "PUT", "POST". - # Corresponds to the JSON property `requestMethod` - # @return [String] - attr_accessor :request_method - - # The size of the HTTP request message in bytes, including the request headers - # and the request body. - # Corresponds to the JSON property `requestSize` - # @return [Fixnum] - attr_accessor :request_size - - # The size of the HTTP response message sent back to the client, in bytes, - # including the response headers and the response body. - # Corresponds to the JSON property `responseSize` - # @return [Fixnum] - attr_accessor :response_size - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @request_url = args[:request_url] if args.key?(:request_url) - @server_ip = args[:server_ip] if args.key?(:server_ip) - @remote_ip = args[:remote_ip] if args.key?(:remote_ip) - @cache_lookup = args[:cache_lookup] if args.key?(:cache_lookup) - @cache_hit = args[:cache_hit] if args.key?(:cache_hit) - @cache_validated_with_origin_server = args[:cache_validated_with_origin_server] if args.key?(:cache_validated_with_origin_server) - @status = args[:status] if args.key?(:status) - @referer = args[:referer] if args.key?(:referer) - @user_agent = args[:user_agent] if args.key?(:user_agent) - @latency = args[:latency] if args.key?(:latency) - @cache_fill_bytes = args[:cache_fill_bytes] if args.key?(:cache_fill_bytes) - @request_method = args[:request_method] if args.key?(:request_method) - @request_size = args[:request_size] if args.key?(:request_size) - @response_size = args[:response_size] if args.key?(:response_size) - end - end - # A description of a label. class LabelDescriptor include Google::Apis::Core::Hashable - # A human-readable description for the label. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - # The type of data that can be assigned to the label. # Corresponds to the JSON property `valueType` # @return [String] @@ -1099,15 +36,20 @@ module Google # @return [String] attr_accessor :key + # A human-readable description for the label. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @description = args[:description] if args.key?(:description) @value_type = args[:value_type] if args.key?(:value_type) @key = args[:key] if args.key?(:key) + @description = args[:description] if args.key?(:description) end end @@ -1121,20 +63,6 @@ module Google class MonitoredResourceDescriptor include Google::Apis::Core::Hashable - # Required. The monitored resource type. For example, the type " - # cloudsql_database" represents databases in Google Cloud SQL. The maximum - # length of this value is 256 characters. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Required. A set of labels used to describe instances of this monitored - # resource type. For example, an individual Google Cloud SQL database is - # identified by values for the labels "database_id" and "zone". - # Corresponds to the JSON property `labels` - # @return [Array] - attr_accessor :labels - # Optional. The resource name of the monitored resource descriptor: "projects/` # project_id`/monitoredResourceDescriptors/`type`" where `type` is the value of # the type field in this object and `project_id` is a project ID that provides @@ -1158,17 +86,31 @@ module Google # @return [String] attr_accessor :description + # Required. The monitored resource type. For example, the type " + # cloudsql_database" represents databases in Google Cloud SQL. The maximum + # length of this value is 256 characters. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # Required. A set of labels used to describe instances of this monitored + # resource type. For example, an individual Google Cloud SQL database is + # identified by values for the labels "database_id" and "zone". + # Corresponds to the JSON property `labels` + # @return [Array] + attr_accessor :labels + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @type = args[:type] if args.key?(:type) - @labels = args[:labels] if args.key?(:labels) @name = args[:name] if args.key?(:name) @display_name = args[:display_name] if args.key?(:display_name) @description = args[:description] if args.key?(:description) + @type = args[:type] if args.key?(:type) + @labels = args[:labels] if args.key?(:labels) end end @@ -1247,16 +189,6 @@ module Google class LogLine include Google::Apis::Core::Hashable - # Specifies a location in a source code file. - # Corresponds to the JSON property `sourceLocation` - # @return [Google::Apis::LoggingV2beta1::SourceLocation] - attr_accessor :source_location - - # Approximate time when this log entry was made. - # Corresponds to the JSON property `time` - # @return [String] - attr_accessor :time - # Severity of this log entry. # Corresponds to the JSON property `severity` # @return [String] @@ -1267,16 +199,1095 @@ module Google # @return [String] attr_accessor :log_message + # Specifies a location in a source code file. + # Corresponds to the JSON property `sourceLocation` + # @return [Google::Apis::LoggingV2beta1::SourceLocation] + attr_accessor :source_location + + # Approximate time when this log entry was made. + # Corresponds to the JSON property `time` + # @return [String] + attr_accessor :time + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @source_location = args[:source_location] if args.key?(:source_location) - @time = args[:time] if args.key?(:time) @severity = args[:severity] if args.key?(:severity) @log_message = args[:log_message] if args.key?(:log_message) + @source_location = args[:source_location] if args.key?(:source_location) + @time = args[:time] if args.key?(:time) + end + end + + # Result returned from ListLogMetrics. + class ListLogMetricsResponse + include Google::Apis::Core::Hashable + + # A list of logs-based metrics. + # Corresponds to the JSON property `metrics` + # @return [Array] + attr_accessor :metrics + + # If there might be more results than appear in this response, then + # nextPageToken is included. To get the next set of results, call this method + # again using the value of nextPageToken as pageToken. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @metrics = args[:metrics] if args.key?(:metrics) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # An individual entry in a log. + class LogEntry + include Google::Apis::Core::Hashable + + # Optional. A set of user-defined (key, value) data that provides additional + # information about the log entry. + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # Optional. Resource name of the trace associated with the log entry, if any. If + # it contains a relative resource name, the name is assumed to be relative to // + # tracing.googleapis.com. Example: projects/my-projectid/traces/ + # 06796866738c859f2f19b7cfb3214824 + # Corresponds to the JSON property `trace` + # @return [String] + attr_accessor :trace + + # Optional. The severity of the log entry. The default value is LogSeverity. + # DEFAULT. + # Corresponds to the JSON property `severity` + # @return [String] + attr_accessor :severity + + # Additional information about the source code location that produced the log + # entry. + # Corresponds to the JSON property `sourceLocation` + # @return [Google::Apis::LoggingV2beta1::LogEntrySourceLocation] + attr_accessor :source_location + + # Optional. The time the event described by the log entry occurred. If omitted + # in a new log entry, Stackdriver Logging will insert the time the log entry is + # received. Stackdriver Logging might reject log entries whose time stamps are + # more than a couple of hours in the future. Log entries with time stamps in the + # past are accepted. + # Corresponds to the JSON property `timestamp` + # @return [String] + attr_accessor :timestamp + + # Output only. The time the log entry was received by Stackdriver Logging. + # Corresponds to the JSON property `receiveTimestamp` + # @return [String] + attr_accessor :receive_timestamp + + # Required. The resource name of the log to which this log entry belongs: + # "projects/[PROJECT_ID]/logs/[LOG_ID]" + # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + # "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + # "folders/[FOLDER_ID]/logs/[LOG_ID]" + # [LOG_ID] must be URL-encoded within log_name. Example: "organizations/ + # 1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". [LOG_ID] must + # be less than 512 characters long and can only include the following characters: + # upper and lower case alphanumeric characters, forward-slash, underscore, + # hyphen, and period.For backward compatibility, if log_name begins with a + # forward-slash, such as /projects/..., then the log entry is ingested as usual + # but the forward-slash is removed. Listing the log entry will not show the + # leading slash and filtering for a log name with a leading slash will never + # return any results. + # Corresponds to the JSON property `logName` + # @return [String] + attr_accessor :log_name + + # An object representing a resource that can be used for monitoring, logging, + # billing, or other purposes. Examples include virtual machine instances, + # databases, and storage devices such as disks. The type field identifies a + # MonitoredResourceDescriptor object that describes the resource's schema. + # Information in the labels field identifies the actual resource and its + # attributes according to the schema. For example, a particular Compute Engine + # VM instance could be represented by the following object, because the + # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and " + # zone": + # ` "type": "gce_instance", + # "labels": ` "instance_id": "12345678901234", + # "zone": "us-central1-a" `` + # Corresponds to the JSON property `resource` + # @return [Google::Apis::LoggingV2beta1::MonitoredResource] + attr_accessor :resource + + # A common proto for logging HTTP requests. Only contains semantics defined by + # the HTTP specification. Product-specific logging information MUST be defined + # in a separate message. + # Corresponds to the JSON property `httpRequest` + # @return [Google::Apis::LoggingV2beta1::HttpRequest] + attr_accessor :http_request + + # The log entry payload, represented as a structure that is expressed as a JSON + # object. + # Corresponds to the JSON property `jsonPayload` + # @return [Hash] + attr_accessor :json_payload + + # Optional. A unique identifier for the log entry. If you provide a value, then + # Stackdriver Logging considers other log entries in the same project, with the + # same timestamp, and with the same insert_id to be duplicates which can be + # removed. If omitted in new log entries, then Stackdriver Logging will insert + # its own unique identifier. The insert_id is used to order log entries that + # have the same timestamp value. + # Corresponds to the JSON property `insertId` + # @return [String] + attr_accessor :insert_id + + # Additional information about a potentially long-running operation with which a + # log entry is associated. + # Corresponds to the JSON property `operation` + # @return [Google::Apis::LoggingV2beta1::LogEntryOperation] + attr_accessor :operation + + # The log entry payload, represented as a Unicode string (UTF-8). + # Corresponds to the JSON property `textPayload` + # @return [String] + attr_accessor :text_payload + + # The log entry payload, represented as a protocol buffer. Some Google Cloud + # Platform services use this field for their log entry payloads. + # Corresponds to the JSON property `protoPayload` + # @return [Hash] + attr_accessor :proto_payload + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @labels = args[:labels] if args.key?(:labels) + @trace = args[:trace] if args.key?(:trace) + @severity = args[:severity] if args.key?(:severity) + @source_location = args[:source_location] if args.key?(:source_location) + @timestamp = args[:timestamp] if args.key?(:timestamp) + @receive_timestamp = args[:receive_timestamp] if args.key?(:receive_timestamp) + @log_name = args[:log_name] if args.key?(:log_name) + @resource = args[:resource] if args.key?(:resource) + @http_request = args[:http_request] if args.key?(:http_request) + @json_payload = args[:json_payload] if args.key?(:json_payload) + @insert_id = args[:insert_id] if args.key?(:insert_id) + @operation = args[:operation] if args.key?(:operation) + @text_payload = args[:text_payload] if args.key?(:text_payload) + @proto_payload = args[:proto_payload] if args.key?(:proto_payload) + end + end + + # A generic empty message that you can re-use to avoid defining duplicated empty + # messages in your APIs. A typical example is to use it as the request or the + # response type of an API method. For instance: + # service Foo ` + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # ` + # The JSON representation for Empty is empty JSON object ``. + class Empty + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Specifies a location in a source code file. + class SourceLocation + include Google::Apis::Core::Hashable + + # Line within the source file. + # Corresponds to the JSON property `line` + # @return [Fixnum] + attr_accessor :line + + # Source file name. Depending on the runtime environment, this might be a simple + # name or a fully-qualified name. + # Corresponds to the JSON property `file` + # @return [String] + attr_accessor :file + + # Human-readable name of the function or method being invoked, with optional + # context such as the class or package name. This information is used in + # contexts such as the logs viewer, where a file and line number are less + # meaningful. The format can vary by language. For example: qual.if.ied.Class. + # method (Java), dir/package.func (Go), function (Python). + # Corresponds to the JSON property `functionName` + # @return [String] + attr_accessor :function_name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @line = args[:line] if args.key?(:line) + @file = args[:file] if args.key?(:file) + @function_name = args[:function_name] if args.key?(:function_name) + end + end + + # The parameters to ListLogEntries. + class ListLogEntriesRequest + include Google::Apis::Core::Hashable + + # Optional. How the results should be sorted. Presently, the only permitted + # values are "timestamp asc" (default) and "timestamp desc". The first option + # returns entries in order of increasing values of LogEntry.timestamp (oldest + # first), and the second option returns entries in order of decreasing + # timestamps (newest first). Entries with equal timestamps are returned in order + # of their insert_id values. + # Corresponds to the JSON property `orderBy` + # @return [String] + attr_accessor :order_by + + # Required. Names of one or more parent resources from which to retrieve log + # entries: + # "projects/[PROJECT_ID]" + # "organizations/[ORGANIZATION_ID]" + # "billingAccounts/[BILLING_ACCOUNT_ID]" + # "folders/[FOLDER_ID]" + # Projects listed in the project_ids field are added to this list. + # Corresponds to the JSON property `resourceNames` + # @return [Array] + attr_accessor :resource_names + + # Optional. A filter that chooses which log entries to return. See Advanced Logs + # Filters. Only log entries that match the filter are returned. An empty filter + # matches all log entries in the resources listed in resource_names. Referencing + # a parent resource that is not listed in resource_names will cause the filter + # to return no results. The maximum length of the filter is 20000 characters. + # Corresponds to the JSON property `filter` + # @return [String] + attr_accessor :filter + + # Deprecated. Use resource_names instead. One or more project identifiers or + # project numbers from which to retrieve log entries. Example: "my-project-1A". + # If present, these project identifiers are converted to resource name format + # and added to the list of resources in resource_names. + # Corresponds to the JSON property `projectIds` + # @return [Array] + attr_accessor :project_ids + + # Optional. If present, then retrieve the next batch of results from the + # preceding call to this method. page_token must be the value of next_page_token + # from the previous response. The values of other method parameters should be + # identical to those in the previous call. + # Corresponds to the JSON property `pageToken` + # @return [String] + attr_accessor :page_token + + # Optional. The maximum number of results to return from this request. Non- + # positive values are ignored. The presence of next_page_token in the response + # indicates that more results might be available. + # Corresponds to the JSON property `pageSize` + # @return [Fixnum] + attr_accessor :page_size + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @order_by = args[:order_by] if args.key?(:order_by) + @resource_names = args[:resource_names] if args.key?(:resource_names) + @filter = args[:filter] if args.key?(:filter) + @project_ids = args[:project_ids] if args.key?(:project_ids) + @page_token = args[:page_token] if args.key?(:page_token) + @page_size = args[:page_size] if args.key?(:page_size) + end + end + + # Complete log information about a single HTTP request to an App Engine + # application. + class RequestLog + include Google::Apis::Core::Hashable + + # User agent that made the request. + # Corresponds to the JSON property `userAgent` + # @return [String] + attr_accessor :user_agent + + # Whether this was a loading request for the instance. + # Corresponds to the JSON property `wasLoadingRequest` + # @return [Boolean] + attr_accessor :was_loading_request + alias_method :was_loading_request?, :was_loading_request + + # Source code for the application that handled this request. There can be more + # than one source reference per deployed application if source code is + # distributed among multiple repositories. + # Corresponds to the JSON property `sourceReference` + # @return [Array] + attr_accessor :source_reference + + # Size in bytes sent back to client by request. + # Corresponds to the JSON property `responseSize` + # @return [Fixnum] + attr_accessor :response_size + + # Stackdriver Trace identifier for this request. + # Corresponds to the JSON property `traceId` + # @return [String] + attr_accessor :trace_id + + # A list of log lines emitted by the application while serving this request. + # Corresponds to the JSON property `line` + # @return [Array] + attr_accessor :line + + # Referrer URL of request. + # Corresponds to the JSON property `referrer` + # @return [String] + attr_accessor :referrer + + # Queue name of the request, in the case of an offline request. + # Corresponds to the JSON property `taskQueueName` + # @return [String] + attr_accessor :task_queue_name + + # Globally unique identifier for a request, which is based on the request start + # time. Request IDs for requests which started later will compare greater as + # strings than those for requests which started earlier. + # Corresponds to the JSON property `requestId` + # @return [String] + attr_accessor :request_id + + # The logged-in user who made the request.Most likely, this is the part of the + # user's email before the @ sign. The field value is the same for different + # requests from the same user, but different users can have similar names. This + # information is also available to the application via the App Engine Users API. + # This field will be populated starting with App Engine 1.9.21. + # Corresponds to the JSON property `nickname` + # @return [String] + attr_accessor :nickname + + # HTTP response status code. Example: 200, 404. + # Corresponds to the JSON property `status` + # @return [Fixnum] + attr_accessor :status + + # Time this request spent in the pending request queue. + # Corresponds to the JSON property `pendingTime` + # @return [String] + attr_accessor :pending_time + + # Contains the path and query portion of the URL that was requested. For example, + # if the URL was "http://example.com/app?name=val", the resource would be "/app? + # name=val". The fragment identifier, which is identified by the # character, is + # not included. + # Corresponds to the JSON property `resource` + # @return [String] + attr_accessor :resource + + # Task name of the request, in the case of an offline request. + # Corresponds to the JSON property `taskName` + # @return [String] + attr_accessor :task_name + + # File or class that handled the request. + # Corresponds to the JSON property `urlMapEntry` + # @return [String] + attr_accessor :url_map_entry + + # If the instance processing this request belongs to a manually scaled module, + # then this is the 0-based index of the instance. Otherwise, this value is -1. + # Corresponds to the JSON property `instanceIndex` + # @return [Fixnum] + attr_accessor :instance_index + + # Internet host and port number of the resource being requested. + # Corresponds to the JSON property `host` + # @return [String] + attr_accessor :host + + # Whether this request is finished or active. + # Corresponds to the JSON property `finished` + # @return [Boolean] + attr_accessor :finished + alias_method :finished?, :finished + + # HTTP version of request. Example: "HTTP/1.1". + # Corresponds to the JSON property `httpVersion` + # @return [String] + attr_accessor :http_version + + # Time when the request started. + # Corresponds to the JSON property `startTime` + # @return [String] + attr_accessor :start_time + + # Latency of the request. + # Corresponds to the JSON property `latency` + # @return [String] + attr_accessor :latency + + # Origin IP address. + # Corresponds to the JSON property `ip` + # @return [String] + attr_accessor :ip + + # Application that handled this request. + # Corresponds to the JSON property `appId` + # @return [String] + attr_accessor :app_id + + # App Engine release version. + # Corresponds to the JSON property `appEngineRelease` + # @return [String] + attr_accessor :app_engine_release + + # Request method. Example: "GET", "HEAD", "PUT", "POST", "DELETE". + # Corresponds to the JSON property `method` + # @return [String] + attr_accessor :method_prop + + # An indication of the relative cost of serving this request. + # Corresponds to the JSON property `cost` + # @return [Float] + attr_accessor :cost + + # An identifier for the instance that handled the request. + # Corresponds to the JSON property `instanceId` + # @return [String] + attr_accessor :instance_id + + # Number of CPU megacycles used to process request. + # Corresponds to the JSON property `megaCycles` + # @return [Fixnum] + attr_accessor :mega_cycles + + # Whether this is the first RequestLog entry for this request. If an active + # request has several RequestLog entries written to Stackdriver Logging, then + # this field will be set for one of them. + # Corresponds to the JSON property `first` + # @return [Boolean] + attr_accessor :first + alias_method :first?, :first + + # Version of the application that handled this request. + # Corresponds to the JSON property `versionId` + # @return [String] + attr_accessor :version_id + + # Module of the application that handled this request. + # Corresponds to the JSON property `moduleId` + # @return [String] + attr_accessor :module_id + + # Time when the request finished. + # Corresponds to the JSON property `endTime` + # @return [String] + attr_accessor :end_time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @user_agent = args[:user_agent] if args.key?(:user_agent) + @was_loading_request = args[:was_loading_request] if args.key?(:was_loading_request) + @source_reference = args[:source_reference] if args.key?(:source_reference) + @response_size = args[:response_size] if args.key?(:response_size) + @trace_id = args[:trace_id] if args.key?(:trace_id) + @line = args[:line] if args.key?(:line) + @referrer = args[:referrer] if args.key?(:referrer) + @task_queue_name = args[:task_queue_name] if args.key?(:task_queue_name) + @request_id = args[:request_id] if args.key?(:request_id) + @nickname = args[:nickname] if args.key?(:nickname) + @status = args[:status] if args.key?(:status) + @pending_time = args[:pending_time] if args.key?(:pending_time) + @resource = args[:resource] if args.key?(:resource) + @task_name = args[:task_name] if args.key?(:task_name) + @url_map_entry = args[:url_map_entry] if args.key?(:url_map_entry) + @instance_index = args[:instance_index] if args.key?(:instance_index) + @host = args[:host] if args.key?(:host) + @finished = args[:finished] if args.key?(:finished) + @http_version = args[:http_version] if args.key?(:http_version) + @start_time = args[:start_time] if args.key?(:start_time) + @latency = args[:latency] if args.key?(:latency) + @ip = args[:ip] if args.key?(:ip) + @app_id = args[:app_id] if args.key?(:app_id) + @app_engine_release = args[:app_engine_release] if args.key?(:app_engine_release) + @method_prop = args[:method_prop] if args.key?(:method_prop) + @cost = args[:cost] if args.key?(:cost) + @instance_id = args[:instance_id] if args.key?(:instance_id) + @mega_cycles = args[:mega_cycles] if args.key?(:mega_cycles) + @first = args[:first] if args.key?(:first) + @version_id = args[:version_id] if args.key?(:version_id) + @module_id = args[:module_id] if args.key?(:module_id) + @end_time = args[:end_time] if args.key?(:end_time) + end + end + + # Result returned from ListMonitoredResourceDescriptors. + class ListMonitoredResourceDescriptorsResponse + include Google::Apis::Core::Hashable + + # A list of resource descriptors. + # Corresponds to the JSON property `resourceDescriptors` + # @return [Array] + attr_accessor :resource_descriptors + + # If there might be more results than those appearing in this response, then + # nextPageToken is included. To get the next set of results, call this method + # again using the value of nextPageToken as pageToken. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @resource_descriptors = args[:resource_descriptors] if args.key?(:resource_descriptors) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # A reference to a particular snapshot of the source tree used to build and + # deploy an application. + class SourceReference + include Google::Apis::Core::Hashable + + # Optional. A URI string identifying the repository. Example: "https://github. + # com/GoogleCloudPlatform/kubernetes.git" + # Corresponds to the JSON property `repository` + # @return [String] + attr_accessor :repository + + # The canonical and persistent identifier of the deployed revision. Example (git) + # : "0035781c50ec7aa23385dc841529ce8a4b70db1b" + # Corresponds to the JSON property `revisionId` + # @return [String] + attr_accessor :revision_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @repository = args[:repository] if args.key?(:repository) + @revision_id = args[:revision_id] if args.key?(:revision_id) + end + end + + # Result returned from WriteLogEntries. empty + class WriteLogEntriesResponse + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Additional information about a potentially long-running operation with which a + # log entry is associated. + class LogEntryOperation + include Google::Apis::Core::Hashable + + # Optional. Set this to True if this is the last log entry in the operation. + # Corresponds to the JSON property `last` + # @return [Boolean] + attr_accessor :last + alias_method :last?, :last + + # Optional. An arbitrary operation identifier. Log entries with the same + # identifier are assumed to be part of the same operation. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # Optional. An arbitrary producer identifier. The combination of id and producer + # must be globally unique. Examples for producer: "MyDivision.MyBigCompany.com", + # "github.com/MyProject/MyApplication". + # Corresponds to the JSON property `producer` + # @return [String] + attr_accessor :producer + + # Optional. Set this to True if this is the first log entry in the operation. + # Corresponds to the JSON property `first` + # @return [Boolean] + attr_accessor :first + alias_method :first?, :first + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @last = args[:last] if args.key?(:last) + @id = args[:id] if args.key?(:id) + @producer = args[:producer] if args.key?(:producer) + @first = args[:first] if args.key?(:first) + end + end + + # Describes a logs-based metric. The value of the metric is the number of log + # entries that match a logs filter in a given time interval. + class LogMetric + include Google::Apis::Core::Hashable + + # Output only. The API version that created or updated this metric. The version + # also dictates the syntax of the filter expression. When a value for this field + # is missing, the default value of V2 should be assumed. + # Corresponds to the JSON property `version` + # @return [String] + attr_accessor :version + + # Required. An advanced logs filter which is used to match log entries. Example: + # "resource.type=gae_app AND severity>=ERROR" + # The maximum length of the filter is 20000 characters. + # Corresponds to the JSON property `filter` + # @return [String] + attr_accessor :filter + + # Required. The client-assigned metric identifier. Examples: "error_count", " + # nginx/requests".Metric identifiers are limited to 100 characters and can + # include only the following characters: A-Z, a-z, 0-9, and the special + # characters _-.,+!*',()%/. The forward-slash character (/) denotes a hierarchy + # of name pieces, and it cannot be the first character of the name.The metric + # identifier in this field must not be URL-encoded (https://en.wikipedia.org/ + # wiki/Percent-encoding). However, when the metric identifier appears as the [ + # METRIC_ID] part of a metric_name API parameter, then the metric identifier + # must be URL-encoded. Example: "projects/my-project/metrics/nginx%2Frequests". + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Optional. A description of this metric, which is used in documentation. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @version = args[:version] if args.key?(:version) + @filter = args[:filter] if args.key?(:filter) + @name = args[:name] if args.key?(:name) + @description = args[:description] if args.key?(:description) + end + end + + # An object representing a resource that can be used for monitoring, logging, + # billing, or other purposes. Examples include virtual machine instances, + # databases, and storage devices such as disks. The type field identifies a + # MonitoredResourceDescriptor object that describes the resource's schema. + # Information in the labels field identifies the actual resource and its + # attributes according to the schema. For example, a particular Compute Engine + # VM instance could be represented by the following object, because the + # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and " + # zone": + # ` "type": "gce_instance", + # "labels": ` "instance_id": "12345678901234", + # "zone": "us-central1-a" `` + class MonitoredResource + include Google::Apis::Core::Hashable + + # Required. Values for all of the labels listed in the associated monitored + # resource descriptor. For example, Compute Engine VM instances use the labels " + # project_id", "instance_id", and "zone". + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # Required. The monitored resource type. This field must match the type field of + # a MonitoredResourceDescriptor object. For example, the type of a Compute + # Engine VM instance is gce_instance. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @labels = args[:labels] if args.key?(:labels) + @type = args[:type] if args.key?(:type) + end + end + + # The parameters to WriteLogEntries. + class WriteLogEntriesRequest + include Google::Apis::Core::Hashable + + # Optional. Default labels that are added to the labels field of all log entries + # in entries. If a log entry already has a label with the same key as a label in + # this parameter, then the log entry's label is not changed. See LogEntry. + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # An object representing a resource that can be used for monitoring, logging, + # billing, or other purposes. Examples include virtual machine instances, + # databases, and storage devices such as disks. The type field identifies a + # MonitoredResourceDescriptor object that describes the resource's schema. + # Information in the labels field identifies the actual resource and its + # attributes according to the schema. For example, a particular Compute Engine + # VM instance could be represented by the following object, because the + # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and " + # zone": + # ` "type": "gce_instance", + # "labels": ` "instance_id": "12345678901234", + # "zone": "us-central1-a" `` + # Corresponds to the JSON property `resource` + # @return [Google::Apis::LoggingV2beta1::MonitoredResource] + attr_accessor :resource + + # Optional. A default log resource name that is assigned to all log entries in + # entries that do not specify a value for log_name: + # "projects/[PROJECT_ID]/logs/[LOG_ID]" + # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + # "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + # "folders/[FOLDER_ID]/logs/[LOG_ID]" + # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog" + # or "organizations/1234567890/logs/cloudresourcemanager.googleapis.com% + # 2Factivity". For more information about log names, see LogEntry. + # Corresponds to the JSON property `logName` + # @return [String] + attr_accessor :log_name + + # Required. The log entries to write. Values supplied for the fields log_name, + # resource, and labels in this entries.write request are inserted into those log + # entries in this list that do not provide their own values.Stackdriver Logging + # also creates and inserts values for timestamp and insert_id if the entries do + # not provide them. The created insert_id for the N'th entry in this list will + # be greater than earlier entries and less than later entries. Otherwise, the + # order of log entries in this list does not matter.To improve throughput and to + # avoid exceeding the quota limit for calls to entries.write, you should write + # multiple log entries at once rather than calling this method for each + # individual log entry. + # Corresponds to the JSON property `entries` + # @return [Array] + attr_accessor :entries + + # Optional. Whether valid entries should be written even if some other entries + # fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any entry is not + # written, then the response status is the error associated with one of the + # failed entries and the response includes error details keyed by the entries' + # zero-based index in the entries.write method. + # Corresponds to the JSON property `partialSuccess` + # @return [Boolean] + attr_accessor :partial_success + alias_method :partial_success?, :partial_success + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @labels = args[:labels] if args.key?(:labels) + @resource = args[:resource] if args.key?(:resource) + @log_name = args[:log_name] if args.key?(:log_name) + @entries = args[:entries] if args.key?(:entries) + @partial_success = args[:partial_success] if args.key?(:partial_success) + end + end + + # Describes a sink used to export log entries to one of the following + # destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a + # Cloud Pub/Sub topic. A logs filter controls which log entries are exported. + # The sink must be created within a project, organization, billing account, or + # folder. + class LogSink + include Google::Apis::Core::Hashable + + # Output only. An IAM identity—a service account or group—under + # which Stackdriver Logging writes the exported log entries to the sink's + # destination. This field is set by sinks.create and sinks.update, based on the + # setting of unique_writer_identity in those methods.Until you grant this + # identity write-access to the destination, log entry exports from this sink + # will fail. For more information, see Granting access for a resource. Consult + # the destination service's documentation to determine the appropriate IAM roles + # to assign to the identity. + # Corresponds to the JSON property `writerIdentity` + # @return [String] + attr_accessor :writer_identity + + # Optional. The time at which this sink will begin exporting log entries. Log + # entries are exported only if their timestamp is not earlier than the start + # time. The default value of this field is the time the sink is created or + # updated. + # Corresponds to the JSON property `startTime` + # @return [String] + attr_accessor :start_time + + # Optional. The log entry format to use for this sink's exported log entries. + # The v2 format is used by default. The v1 format is deprecated and should be + # used only as part of a migration effort to v2. See Migration to the v2 API. + # Corresponds to the JSON property `outputVersionFormat` + # @return [String] + attr_accessor :output_version_format + + # Required. The client-assigned sink identifier, unique within the project. + # Example: "my-syslog-errors-to-pubsub". Sink identifiers are limited to 100 + # characters and can include only the following characters: upper and lower-case + # alphanumeric characters, underscores, hyphens, and periods. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Optional. This field applies only to sinks owned by organizations and folders. + # If the field is false, the default, only the logs owned by the sink's parent + # resource are available for export. If the field is true, then logs from all + # the projects, folders, and billing accounts contained in the sink's parent + # resource are also available for export. Whether a particular log entry from + # the children is exported depends on the sink's filter expression. For example, + # if this field is true, then the filter resource.type=gce_instance would export + # all Compute Engine VM instance log entries from all projects in the sink's + # parent. To only export entries from certain child projects, filter on the + # project part of the log name: + # logName:("projects/test-project1/" OR "projects/test-project2/") AND + # resource.type=gce_instance + # Corresponds to the JSON property `includeChildren` + # @return [Boolean] + attr_accessor :include_children + alias_method :include_children?, :include_children + + # Required. The export destination: + # "storage.googleapis.com/[GCS_BUCKET]" + # "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]" + # "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" + # The sink's writer_identity, set when the sink is created, must have permission + # to write to the destination or else the log entries are not exported. For more + # information, see Exporting Logs With Sinks. + # Corresponds to the JSON property `destination` + # @return [String] + attr_accessor :destination + + # Optional. An advanced logs filter. The only exported log entries are those + # that are in the resource owning the sink and that match the filter. The filter + # must use the log entry format specified by the output_version_format parameter. + # For example, in the v2 format: + # logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR + # Corresponds to the JSON property `filter` + # @return [String] + attr_accessor :filter + + # Optional. The time at which this sink will stop exporting log entries. Log + # entries are exported only if their timestamp is earlier than the end time. If + # this field is not supplied, there is no end time. If both a start time and an + # end time are provided, then the end time must be later than the start time. + # Corresponds to the JSON property `endTime` + # @return [String] + attr_accessor :end_time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @writer_identity = args[:writer_identity] if args.key?(:writer_identity) + @start_time = args[:start_time] if args.key?(:start_time) + @output_version_format = args[:output_version_format] if args.key?(:output_version_format) + @name = args[:name] if args.key?(:name) + @include_children = args[:include_children] if args.key?(:include_children) + @destination = args[:destination] if args.key?(:destination) + @filter = args[:filter] if args.key?(:filter) + @end_time = args[:end_time] if args.key?(:end_time) + end + end + + # Result returned from ListLogs. + class ListLogsResponse + include Google::Apis::Core::Hashable + + # A list of log names. For example, "projects/my-project/syslog" or " + # organizations/123/cloudresourcemanager.googleapis.com%2Factivity". + # Corresponds to the JSON property `logNames` + # @return [Array] + attr_accessor :log_names + + # If there might be more results than those appearing in this response, then + # nextPageToken is included. To get the next set of results, call this method + # again using the value of nextPageToken as pageToken. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @log_names = args[:log_names] if args.key?(:log_names) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # A common proto for logging HTTP requests. Only contains semantics defined by + # the HTTP specification. Product-specific logging information MUST be defined + # in a separate message. + class HttpRequest + include Google::Apis::Core::Hashable + + # The request processing latency on the server, from the time the request was + # received until the response was sent. + # Corresponds to the JSON property `latency` + # @return [String] + attr_accessor :latency + + # The user agent sent by the client. Example: "Mozilla/4.0 (compatible; MSIE 6.0; + # Windows 98; Q312461; .NET CLR 1.0.3705)". + # Corresponds to the JSON property `userAgent` + # @return [String] + attr_accessor :user_agent + + # The number of HTTP response bytes inserted into cache. Set only when a cache + # fill was attempted. + # Corresponds to the JSON property `cacheFillBytes` + # @return [Fixnum] + attr_accessor :cache_fill_bytes + + # The request method. Examples: "GET", "HEAD", "PUT", "POST". + # Corresponds to the JSON property `requestMethod` + # @return [String] + attr_accessor :request_method + + # The size of the HTTP response message sent back to the client, in bytes, + # including the response headers and the response body. + # Corresponds to the JSON property `responseSize` + # @return [Fixnum] + attr_accessor :response_size + + # The size of the HTTP request message in bytes, including the request headers + # and the request body. + # Corresponds to the JSON property `requestSize` + # @return [Fixnum] + attr_accessor :request_size + + # The scheme (http, https), the host name, the path and the query portion of the + # URL that was requested. Example: "http://example.com/some/info?color=red". + # Corresponds to the JSON property `requestUrl` + # @return [String] + attr_accessor :request_url + + # The IP address (IPv4 or IPv6) of the client that issued the HTTP request. + # Examples: "192.168.1.1", "FE80::0202:B3FF:FE1E:8329". + # Corresponds to the JSON property `remoteIp` + # @return [String] + attr_accessor :remote_ip + + # The IP address (IPv4 or IPv6) of the origin server that the request was sent + # to. + # Corresponds to the JSON property `serverIp` + # @return [String] + attr_accessor :server_ip + + # Whether or not a cache lookup was attempted. + # Corresponds to the JSON property `cacheLookup` + # @return [Boolean] + attr_accessor :cache_lookup + alias_method :cache_lookup?, :cache_lookup + + # Whether or not an entity was served from cache (with or without validation). + # Corresponds to the JSON property `cacheHit` + # @return [Boolean] + attr_accessor :cache_hit + alias_method :cache_hit?, :cache_hit + + # Whether or not the response was validated with the origin server before being + # served from cache. This field is only meaningful if cache_hit is True. + # Corresponds to the JSON property `cacheValidatedWithOriginServer` + # @return [Boolean] + attr_accessor :cache_validated_with_origin_server + alias_method :cache_validated_with_origin_server?, :cache_validated_with_origin_server + + # The response code indicating the status of response. Examples: 200, 404. + # Corresponds to the JSON property `status` + # @return [Fixnum] + attr_accessor :status + + # The referer URL of the request, as defined in HTTP/1.1 Header Field + # Definitions (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). + # Corresponds to the JSON property `referer` + # @return [String] + attr_accessor :referer + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @latency = args[:latency] if args.key?(:latency) + @user_agent = args[:user_agent] if args.key?(:user_agent) + @cache_fill_bytes = args[:cache_fill_bytes] if args.key?(:cache_fill_bytes) + @request_method = args[:request_method] if args.key?(:request_method) + @response_size = args[:response_size] if args.key?(:response_size) + @request_size = args[:request_size] if args.key?(:request_size) + @request_url = args[:request_url] if args.key?(:request_url) + @remote_ip = args[:remote_ip] if args.key?(:remote_ip) + @server_ip = args[:server_ip] if args.key?(:server_ip) + @cache_lookup = args[:cache_lookup] if args.key?(:cache_lookup) + @cache_hit = args[:cache_hit] if args.key?(:cache_hit) + @cache_validated_with_origin_server = args[:cache_validated_with_origin_server] if args.key?(:cache_validated_with_origin_server) + @status = args[:status] if args.key?(:status) + @referer = args[:referer] if args.key?(:referer) + end + end + + # Result returned from ListSinks. + class ListSinksResponse + include Google::Apis::Core::Hashable + + # If there might be more results than appear in this response, then + # nextPageToken is included. To get the next set of results, call the same + # method again using the value of nextPageToken as pageToken. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # A list of sinks. + # Corresponds to the JSON property `sinks` + # @return [Array] + attr_accessor :sinks + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @sinks = args[:sinks] if args.key?(:sinks) end end end diff --git a/generated/google/apis/logging_v2beta1/representations.rb b/generated/google/apis/logging_v2beta1/representations.rb index c278cf6df..58f4dbb96 100644 --- a/generated/google/apis/logging_v2beta1/representations.rb +++ b/generated/google/apis/logging_v2beta1/representations.rb @@ -22,108 +22,6 @@ module Google module Apis module LoggingV2beta1 - class ListLogMetricsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Empty - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class LogEntry - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SourceLocation - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListLogEntriesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class RequestLog - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListMonitoredResourceDescriptorsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SourceReference - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class LogEntryOperation - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class LogMetric - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class WriteLogEntriesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class MonitoredResource - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class WriteLogEntriesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class LogSink - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListLogsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListSinksResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class HttpRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class LabelDescriptor class Representation < Google::Apis::Core::JsonRepresentation; end @@ -155,237 +53,125 @@ module Google end class ListLogMetricsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :metrics, as: 'metrics', class: Google::Apis::LoggingV2beta1::LogMetric, decorator: Google::Apis::LoggingV2beta1::LogMetric::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :next_page_token, as: 'nextPageToken' - end - end - - class Empty - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end + include Google::Apis::Core::JsonObjectSupport end class LogEntry - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :timestamp, as: 'timestamp' - property :log_name, as: 'logName' - property :resource, as: 'resource', class: Google::Apis::LoggingV2beta1::MonitoredResource, decorator: Google::Apis::LoggingV2beta1::MonitoredResource::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :http_request, as: 'httpRequest', class: Google::Apis::LoggingV2beta1::HttpRequest, decorator: Google::Apis::LoggingV2beta1::HttpRequest::Representation + include Google::Apis::Core::JsonObjectSupport + end - hash :json_payload, as: 'jsonPayload' - property :insert_id, as: 'insertId' - property :operation, as: 'operation', class: Google::Apis::LoggingV2beta1::LogEntryOperation, decorator: Google::Apis::LoggingV2beta1::LogEntryOperation::Representation + class Empty + class Representation < Google::Apis::Core::JsonRepresentation; end - property :text_payload, as: 'textPayload' - hash :proto_payload, as: 'protoPayload' - hash :labels, as: 'labels' - property :trace, as: 'trace' - property :severity, as: 'severity' - property :source_location, as: 'sourceLocation', class: Google::Apis::LoggingV2beta1::LogEntrySourceLocation, decorator: Google::Apis::LoggingV2beta1::LogEntrySourceLocation::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class SourceLocation - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :file, as: 'file' - property :function_name, as: 'functionName' - property :line, :numeric_string => true, as: 'line' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ListLogEntriesRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :order_by, as: 'orderBy' - collection :resource_names, as: 'resourceNames' - collection :project_ids, as: 'projectIds' - property :filter, as: 'filter' - property :page_token, as: 'pageToken' - property :page_size, as: 'pageSize' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class RequestLog - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :http_version, as: 'httpVersion' - property :start_time, as: 'startTime' - property :latency, as: 'latency' - property :ip, as: 'ip' - property :app_id, as: 'appId' - property :app_engine_release, as: 'appEngineRelease' - property :method_prop, as: 'method' - property :cost, as: 'cost' - property :instance_id, as: 'instanceId' - property :mega_cycles, :numeric_string => true, as: 'megaCycles' - property :first, as: 'first' - property :version_id, as: 'versionId' - property :module_id, as: 'moduleId' - property :end_time, as: 'endTime' - property :user_agent, as: 'userAgent' - property :was_loading_request, as: 'wasLoadingRequest' - collection :source_reference, as: 'sourceReference', class: Google::Apis::LoggingV2beta1::SourceReference, decorator: Google::Apis::LoggingV2beta1::SourceReference::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :response_size, :numeric_string => true, as: 'responseSize' - property :trace_id, as: 'traceId' - collection :line, as: 'line', class: Google::Apis::LoggingV2beta1::LogLine, decorator: Google::Apis::LoggingV2beta1::LogLine::Representation - - property :referrer, as: 'referrer' - property :task_queue_name, as: 'taskQueueName' - property :request_id, as: 'requestId' - property :nickname, as: 'nickname' - property :pending_time, as: 'pendingTime' - property :resource, as: 'resource' - property :status, as: 'status' - property :task_name, as: 'taskName' - property :url_map_entry, as: 'urlMapEntry' - property :instance_index, as: 'instanceIndex' - property :finished, as: 'finished' - property :host, as: 'host' - end + include Google::Apis::Core::JsonObjectSupport end class ListMonitoredResourceDescriptorsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - collection :resource_descriptors, as: 'resourceDescriptors', class: Google::Apis::LoggingV2beta1::MonitoredResourceDescriptor, decorator: Google::Apis::LoggingV2beta1::MonitoredResourceDescriptor::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class SourceReference - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :repository, as: 'repository' - property :revision_id, as: 'revisionId' - end - end + class Representation < Google::Apis::Core::JsonRepresentation; end - class LogEntryOperation - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :last, as: 'last' - property :id, as: 'id' - property :producer, as: 'producer' - property :first, as: 'first' - end - end - - class LogMetric - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - property :description, as: 'description' - property :version, as: 'version' - property :filter, as: 'filter' - end + include Google::Apis::Core::JsonObjectSupport end class WriteLogEntriesResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class LogEntryOperation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class LogMetric + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class MonitoredResource - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :type, as: 'type' - hash :labels, as: 'labels' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class WriteLogEntriesRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :log_name, as: 'logName' - collection :entries, as: 'entries', class: Google::Apis::LoggingV2beta1::LogEntry, decorator: Google::Apis::LoggingV2beta1::LogEntry::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :partial_success, as: 'partialSuccess' - hash :labels, as: 'labels' - property :resource, as: 'resource', class: Google::Apis::LoggingV2beta1::MonitoredResource, decorator: Google::Apis::LoggingV2beta1::MonitoredResource::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class LogSink - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :destination, as: 'destination' - property :filter, as: 'filter' - property :end_time, as: 'endTime' - property :start_time, as: 'startTime' - property :writer_identity, as: 'writerIdentity' - property :output_version_format, as: 'outputVersionFormat' - property :name, as: 'name' - property :include_children, as: 'includeChildren' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ListLogsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :log_names, as: 'logNames' - property :next_page_token, as: 'nextPageToken' - end - end + class Representation < Google::Apis::Core::JsonRepresentation; end - class ListSinksResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - collection :sinks, as: 'sinks', class: Google::Apis::LoggingV2beta1::LogSink, decorator: Google::Apis::LoggingV2beta1::LogSink::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class HttpRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :request_url, as: 'requestUrl' - property :server_ip, as: 'serverIp' - property :remote_ip, as: 'remoteIp' - property :cache_lookup, as: 'cacheLookup' - property :cache_hit, as: 'cacheHit' - property :cache_validated_with_origin_server, as: 'cacheValidatedWithOriginServer' - property :status, as: 'status' - property :referer, as: 'referer' - property :user_agent, as: 'userAgent' - property :latency, as: 'latency' - property :cache_fill_bytes, :numeric_string => true, as: 'cacheFillBytes' - property :request_method, as: 'requestMethod' - property :request_size, :numeric_string => true, as: 'requestSize' - property :response_size, :numeric_string => true, as: 'responseSize' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListSinksResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class LabelDescriptor # @private class Representation < Google::Apis::Core::JsonRepresentation - property :description, as: 'description' property :value_type, as: 'valueType' property :key, as: 'key' + property :description, as: 'description' end end class MonitoredResourceDescriptor # @private class Representation < Google::Apis::Core::JsonRepresentation - property :type, as: 'type' - collection :labels, as: 'labels', class: Google::Apis::LoggingV2beta1::LabelDescriptor, decorator: Google::Apis::LoggingV2beta1::LabelDescriptor::Representation - property :name, as: 'name' property :display_name, as: 'displayName' property :description, as: 'description' + property :type, as: 'type' + collection :labels, as: 'labels', class: Google::Apis::LoggingV2beta1::LabelDescriptor, decorator: Google::Apis::LoggingV2beta1::LabelDescriptor::Representation + end end @@ -410,11 +196,226 @@ module Google class LogLine # @private class Representation < Google::Apis::Core::JsonRepresentation + property :severity, as: 'severity' + property :log_message, as: 'logMessage' property :source_location, as: 'sourceLocation', class: Google::Apis::LoggingV2beta1::SourceLocation, decorator: Google::Apis::LoggingV2beta1::SourceLocation::Representation property :time, as: 'time' + end + end + + class ListLogMetricsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :metrics, as: 'metrics', class: Google::Apis::LoggingV2beta1::LogMetric, decorator: Google::Apis::LoggingV2beta1::LogMetric::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class LogEntry + # @private + class Representation < Google::Apis::Core::JsonRepresentation + hash :labels, as: 'labels' + property :trace, as: 'trace' property :severity, as: 'severity' - property :log_message, as: 'logMessage' + property :source_location, as: 'sourceLocation', class: Google::Apis::LoggingV2beta1::LogEntrySourceLocation, decorator: Google::Apis::LoggingV2beta1::LogEntrySourceLocation::Representation + + property :timestamp, as: 'timestamp' + property :receive_timestamp, as: 'receiveTimestamp' + property :log_name, as: 'logName' + property :resource, as: 'resource', class: Google::Apis::LoggingV2beta1::MonitoredResource, decorator: Google::Apis::LoggingV2beta1::MonitoredResource::Representation + + property :http_request, as: 'httpRequest', class: Google::Apis::LoggingV2beta1::HttpRequest, decorator: Google::Apis::LoggingV2beta1::HttpRequest::Representation + + hash :json_payload, as: 'jsonPayload' + property :insert_id, as: 'insertId' + property :operation, as: 'operation', class: Google::Apis::LoggingV2beta1::LogEntryOperation, decorator: Google::Apis::LoggingV2beta1::LogEntryOperation::Representation + + property :text_payload, as: 'textPayload' + hash :proto_payload, as: 'protoPayload' + end + end + + class Empty + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class SourceLocation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :line, :numeric_string => true, as: 'line' + property :file, as: 'file' + property :function_name, as: 'functionName' + end + end + + class ListLogEntriesRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :order_by, as: 'orderBy' + collection :resource_names, as: 'resourceNames' + property :filter, as: 'filter' + collection :project_ids, as: 'projectIds' + property :page_token, as: 'pageToken' + property :page_size, as: 'pageSize' + end + end + + class RequestLog + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :user_agent, as: 'userAgent' + property :was_loading_request, as: 'wasLoadingRequest' + collection :source_reference, as: 'sourceReference', class: Google::Apis::LoggingV2beta1::SourceReference, decorator: Google::Apis::LoggingV2beta1::SourceReference::Representation + + property :response_size, :numeric_string => true, as: 'responseSize' + property :trace_id, as: 'traceId' + collection :line, as: 'line', class: Google::Apis::LoggingV2beta1::LogLine, decorator: Google::Apis::LoggingV2beta1::LogLine::Representation + + property :referrer, as: 'referrer' + property :task_queue_name, as: 'taskQueueName' + property :request_id, as: 'requestId' + property :nickname, as: 'nickname' + property :status, as: 'status' + property :pending_time, as: 'pendingTime' + property :resource, as: 'resource' + property :task_name, as: 'taskName' + property :url_map_entry, as: 'urlMapEntry' + property :instance_index, as: 'instanceIndex' + property :host, as: 'host' + property :finished, as: 'finished' + property :http_version, as: 'httpVersion' + property :start_time, as: 'startTime' + property :latency, as: 'latency' + property :ip, as: 'ip' + property :app_id, as: 'appId' + property :app_engine_release, as: 'appEngineRelease' + property :method_prop, as: 'method' + property :cost, as: 'cost' + property :instance_id, as: 'instanceId' + property :mega_cycles, :numeric_string => true, as: 'megaCycles' + property :first, as: 'first' + property :version_id, as: 'versionId' + property :module_id, as: 'moduleId' + property :end_time, as: 'endTime' + end + end + + class ListMonitoredResourceDescriptorsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :resource_descriptors, as: 'resourceDescriptors', class: Google::Apis::LoggingV2beta1::MonitoredResourceDescriptor, decorator: Google::Apis::LoggingV2beta1::MonitoredResourceDescriptor::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class SourceReference + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :repository, as: 'repository' + property :revision_id, as: 'revisionId' + end + end + + class WriteLogEntriesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class LogEntryOperation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :last, as: 'last' + property :id, as: 'id' + property :producer, as: 'producer' + property :first, as: 'first' + end + end + + class LogMetric + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :version, as: 'version' + property :filter, as: 'filter' + property :name, as: 'name' + property :description, as: 'description' + end + end + + class MonitoredResource + # @private + class Representation < Google::Apis::Core::JsonRepresentation + hash :labels, as: 'labels' + property :type, as: 'type' + end + end + + class WriteLogEntriesRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + hash :labels, as: 'labels' + property :resource, as: 'resource', class: Google::Apis::LoggingV2beta1::MonitoredResource, decorator: Google::Apis::LoggingV2beta1::MonitoredResource::Representation + + property :log_name, as: 'logName' + collection :entries, as: 'entries', class: Google::Apis::LoggingV2beta1::LogEntry, decorator: Google::Apis::LoggingV2beta1::LogEntry::Representation + + property :partial_success, as: 'partialSuccess' + end + end + + class LogSink + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :writer_identity, as: 'writerIdentity' + property :start_time, as: 'startTime' + property :output_version_format, as: 'outputVersionFormat' + property :name, as: 'name' + property :include_children, as: 'includeChildren' + property :destination, as: 'destination' + property :filter, as: 'filter' + property :end_time, as: 'endTime' + end + end + + class ListLogsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :log_names, as: 'logNames' + property :next_page_token, as: 'nextPageToken' + end + end + + class HttpRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :latency, as: 'latency' + property :user_agent, as: 'userAgent' + property :cache_fill_bytes, :numeric_string => true, as: 'cacheFillBytes' + property :request_method, as: 'requestMethod' + property :response_size, :numeric_string => true, as: 'responseSize' + property :request_size, :numeric_string => true, as: 'requestSize' + property :request_url, as: 'requestUrl' + property :remote_ip, as: 'remoteIp' + property :server_ip, as: 'serverIp' + property :cache_lookup, as: 'cacheLookup' + property :cache_hit, as: 'cacheHit' + property :cache_validated_with_origin_server, as: 'cacheValidatedWithOriginServer' + property :status, as: 'status' + property :referer, as: 'referer' + end + end + + class ListSinksResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :sinks, as: 'sinks', class: Google::Apis::LoggingV2beta1::LogSink, decorator: Google::Apis::LoggingV2beta1::LogSink::Representation + end end end diff --git a/generated/google/apis/logging_v2beta1/service.rb b/generated/google/apis/logging_v2beta1/service.rb index e1b56b296..f701e9c5b 100644 --- a/generated/google/apis/logging_v2beta1/service.rb +++ b/generated/google/apis/logging_v2beta1/service.rb @@ -47,243 +47,6 @@ module Google @batch_path = 'batch' end - # Lists log entries. Use this method to retrieve log entries from Stackdriver - # Logging. For ways to export log entries, see Exporting Logs. - # @param [Google::Apis::LoggingV2beta1::ListLogEntriesRequest] list_log_entries_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::LoggingV2beta1::ListLogEntriesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV2beta1::ListLogEntriesResponse] - # - # @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_entry_log_entries(list_log_entries_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v2beta1/entries:list', options) - command.request_representation = Google::Apis::LoggingV2beta1::ListLogEntriesRequest::Representation - command.request_object = list_log_entries_request_object - command.response_representation = Google::Apis::LoggingV2beta1::ListLogEntriesResponse::Representation - command.response_class = Google::Apis::LoggingV2beta1::ListLogEntriesResponse - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Writes log entries to Stackdriver Logging. - # @param [Google::Apis::LoggingV2beta1::WriteLogEntriesRequest] write_log_entries_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::LoggingV2beta1::WriteLogEntriesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV2beta1::WriteLogEntriesResponse] - # - # @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 write_entry_log_entries(write_log_entries_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v2beta1/entries:write', options) - command.request_representation = Google::Apis::LoggingV2beta1::WriteLogEntriesRequest::Representation - command.request_object = write_log_entries_request_object - command.response_representation = Google::Apis::LoggingV2beta1::WriteLogEntriesResponse::Representation - command.response_class = Google::Apis::LoggingV2beta1::WriteLogEntriesResponse - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Lists logs-based metrics. - # @param [String] parent - # Required. The name of the project containing the metrics: - # "projects/[PROJECT_ID]" - # @param [Fixnum] page_size - # Optional. The maximum number of results to return from this request. Non- - # positive values are ignored. The presence of nextPageToken in the response - # indicates that more results might be available. - # @param [String] page_token - # Optional. If present, then retrieve the next batch of results from the - # preceding call to this method. pageToken must be the value of nextPageToken - # from the previous response. The values of other method parameters should be - # identical to those in the previous call. - # @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::LoggingV2beta1::ListLogMetricsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV2beta1::ListLogMetricsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_project_metrics(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v2beta1/{+parent}/metrics', options) - command.response_representation = Google::Apis::LoggingV2beta1::ListLogMetricsResponse::Representation - command.response_class = Google::Apis::LoggingV2beta1::ListLogMetricsResponse - command.params['parent'] = parent unless parent.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets a logs-based metric. - # @param [String] metric_name - # The resource name of the desired metric: - # "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::LoggingV2beta1::LogMetric] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV2beta1::LogMetric] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_project_metric(metric_name, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v2beta1/{+metricName}', options) - command.response_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation - command.response_class = Google::Apis::LoggingV2beta1::LogMetric - command.params['metricName'] = metric_name unless metric_name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Creates or updates a logs-based metric. - # @param [String] metric_name - # The resource name of the metric to update: - # "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - # The updated metric must be provided in the request and it's name field must be - # the same as [METRIC_ID] If the metric does not exist in [PROJECT_ID], then a - # new metric is created. - # @param [Google::Apis::LoggingV2beta1::LogMetric] log_metric_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::LoggingV2beta1::LogMetric] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV2beta1::LogMetric] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_project_metric(metric_name, log_metric_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:put, 'v2beta1/{+metricName}', options) - command.request_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation - command.request_object = log_metric_object - command.response_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation - command.response_class = Google::Apis::LoggingV2beta1::LogMetric - command.params['metricName'] = metric_name unless metric_name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Creates a logs-based metric. - # @param [String] parent - # The resource name of the project in which to create the metric: - # "projects/[PROJECT_ID]" - # The new metric must be provided in the request. - # @param [Google::Apis::LoggingV2beta1::LogMetric] log_metric_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::LoggingV2beta1::LogMetric] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV2beta1::LogMetric] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_project_metric(parent, log_metric_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v2beta1/{+parent}/metrics', options) - command.request_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation - command.request_object = log_metric_object - command.response_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation - command.response_class = Google::Apis::LoggingV2beta1::LogMetric - command.params['parent'] = parent unless parent.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Deletes a logs-based metric. - # @param [String] metric_name - # The resource name of the metric to delete: - # "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::LoggingV2beta1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV2beta1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_project_metric(metric_name, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v2beta1/{+metricName}', options) - command.response_representation = Google::Apis::LoggingV2beta1::Empty::Representation - command.response_class = Google::Apis::LoggingV2beta1::Empty - command.params['metricName'] = metric_name unless metric_name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - # Deletes all the log entries in a log. The log reappears if it receives new # entries. Log entries written shortly before the delete operation might not be # deleted. @@ -296,11 +59,11 @@ module Google # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog" # , "organizations/1234567890/logs/cloudresourcemanager.googleapis.com% # 2Factivity". For more information about log names, see LogEntry. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -313,13 +76,13 @@ 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 delete_log(log_name, fields: nil, quota_user: nil, options: nil, &block) + def delete_log(log_name, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:delete, 'v2beta1/{+logName}', options) command.response_representation = Google::Apis::LoggingV2beta1::Empty::Representation command.response_class = Google::Apis::LoggingV2beta1::Empty command.params['logName'] = log_name unless log_name.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -340,11 +103,11 @@ module Google # Optional. The maximum number of results to return from this request. Non- # positive values are ignored. The presence of nextPageToken in the response # indicates that more results might be available. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -357,15 +120,52 @@ 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_logs(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_logs(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta1/{+parent}/logs', options) command.response_representation = Google::Apis::LoggingV2beta1::ListLogsResponse::Representation command.response_class = Google::Apis::LoggingV2beta1::ListLogsResponse command.params['parent'] = parent unless parent.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a sink. If the sink has a unique writer_identity, then that service + # account is also deleted. + # @param [String] sink_name + # Required. The full resource name of the sink to delete, including the parent + # resource and the sink identifier: + # "projects/[PROJECT_ID]/sinks/[SINK_ID]" + # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + # "folders/[FOLDER_ID]/sinks/[SINK_ID]" + # Example: "projects/my-project-id/sinks/my-sink-id". + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::LoggingV2beta1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::LoggingV2beta1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_project_sink(sink_name, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:delete, 'v2beta1/{+sinkName}', options) + command.response_representation = Google::Apis::LoggingV2beta1::Empty::Representation + command.response_class = Google::Apis::LoggingV2beta1::Empty + command.params['sinkName'] = sink_name unless sink_name.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -385,11 +185,11 @@ module Google # Optional. The maximum number of results to return from this request. Non- # positive values are ignored. The presence of nextPageToken in the response # indicates that more results might be available. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -402,15 +202,15 @@ 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_project_sinks(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_project_sinks(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta1/{+parent}/sinks', options) command.response_representation = Google::Apis::LoggingV2beta1::ListSinksResponse::Representation command.response_class = Google::Apis::LoggingV2beta1::ListSinksResponse command.params['parent'] = parent unless parent.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -422,11 +222,11 @@ module Google # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" # "folders/[FOLDER_ID]/sinks/[SINK_ID]" # Example: "projects/my-project-id/sinks/my-sink-id". - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -439,13 +239,13 @@ 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 get_project_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block) + def get_project_sink(sink_name, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta1/{+sinkName}', options) command.response_representation = Google::Apis::LoggingV2beta1::LogSink::Representation command.response_class = Google::Apis::LoggingV2beta1::LogSink command.params['sinkName'] = sink_name unless sink_name.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -473,11 +273,11 @@ module Google # If the old value is false and the new value is true, then writer_identity is # changed to a unique service account. # It is an error if the old value is true and the new value is false. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -490,7 +290,7 @@ 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 update_project_sink(sink_name, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block) + def update_project_sink(sink_name, log_sink_object = nil, unique_writer_identity: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:put, 'v2beta1/{+sinkName}', options) command.request_representation = Google::Apis::LoggingV2beta1::LogSink::Representation command.request_object = log_sink_object @@ -498,8 +298,8 @@ module Google command.response_class = Google::Apis::LoggingV2beta1::LogSink command.params['sinkName'] = sink_name unless sink_name.nil? command.query['uniqueWriterIdentity'] = unique_writer_identity unless unique_writer_identity.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -526,11 +326,11 @@ module Google # owned by a non-project resource such as an organization, then the value of # writer_identity will be a unique service account used only for exports from # the new sink. For more information, see writer_identity in LogSink. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -543,7 +343,7 @@ 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 create_project_sink(parent, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block) + def create_project_sink(parent, log_sink_object = nil, unique_writer_identity: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v2beta1/{+parent}/sinks', options) command.request_representation = Google::Apis::LoggingV2beta1::LogSink::Representation command.request_object = log_sink_object @@ -551,26 +351,55 @@ module Google command.response_class = Google::Apis::LoggingV2beta1::LogSink command.params['parent'] = parent unless parent.nil? command.query['uniqueWriterIdentity'] = unique_writer_identity unless unique_writer_identity.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end - # Deletes a sink. If the sink has a unique writer_identity, then that service - # account is also deleted. - # @param [String] sink_name - # Required. The full resource name of the sink to delete, including the parent - # resource and the sink identifier: - # "projects/[PROJECT_ID]/sinks/[SINK_ID]" - # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - # "folders/[FOLDER_ID]/sinks/[SINK_ID]" - # Example: "projects/my-project-id/sinks/my-sink-id". - # @param [String] fields - # Selector specifying which fields to include in a partial response. + # Creates a logs-based metric. + # @param [String] parent + # The resource name of the project in which to create the metric: + # "projects/[PROJECT_ID]" + # The new metric must be provided in the request. + # @param [Google::Apis::LoggingV2beta1::LogMetric] log_metric_object # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::LoggingV2beta1::LogMetric] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::LoggingV2beta1::LogMetric] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_project_metric(parent, log_metric_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v2beta1/{+parent}/metrics', options) + command.request_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation + command.request_object = log_metric_object + command.response_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation + command.response_class = Google::Apis::LoggingV2beta1::LogMetric + command.params['parent'] = parent unless parent.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a logs-based metric. + # @param [String] metric_name + # The resource name of the metric to delete: + # "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -583,13 +412,123 @@ 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 delete_project_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v2beta1/{+sinkName}', options) + def delete_project_metric(metric_name, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:delete, 'v2beta1/{+metricName}', options) command.response_representation = Google::Apis::LoggingV2beta1::Empty::Representation command.response_class = Google::Apis::LoggingV2beta1::Empty - command.params['sinkName'] = sink_name unless sink_name.nil? - command.query['fields'] = fields unless fields.nil? + command.params['metricName'] = metric_name unless metric_name.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Lists logs-based metrics. + # @param [String] parent + # Required. The name of the project containing the metrics: + # "projects/[PROJECT_ID]" + # @param [String] page_token + # Optional. If present, then retrieve the next batch of results from the + # preceding call to this method. pageToken must be the value of nextPageToken + # from the previous response. The values of other method parameters should be + # identical to those in the previous call. + # @param [Fixnum] page_size + # Optional. The maximum number of results to return from this request. Non- + # positive values are ignored. The presence of nextPageToken in the response + # indicates that more results might be available. + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::LoggingV2beta1::ListLogMetricsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::LoggingV2beta1::ListLogMetricsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_metrics(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v2beta1/{+parent}/metrics', options) + command.response_representation = Google::Apis::LoggingV2beta1::ListLogMetricsResponse::Representation + command.response_class = Google::Apis::LoggingV2beta1::ListLogMetricsResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Gets a logs-based metric. + # @param [String] metric_name + # The resource name of the desired metric: + # "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::LoggingV2beta1::LogMetric] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::LoggingV2beta1::LogMetric] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_metric(metric_name, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v2beta1/{+metricName}', options) + command.response_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation + command.response_class = Google::Apis::LoggingV2beta1::LogMetric + command.params['metricName'] = metric_name unless metric_name.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Creates or updates a logs-based metric. + # @param [String] metric_name + # The resource name of the metric to update: + # "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + # The updated metric must be provided in the request and it's name field must be + # the same as [METRIC_ID] If the metric does not exist in [PROJECT_ID], then a + # new metric is created. + # @param [Google::Apis::LoggingV2beta1::LogMetric] log_metric_object + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::LoggingV2beta1::LogMetric] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::LoggingV2beta1::LogMetric] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_project_metric(metric_name, log_metric_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:put, 'v2beta1/{+metricName}', options) + command.request_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation + command.request_object = log_metric_object + command.response_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation + command.response_class = Google::Apis::LoggingV2beta1::LogMetric + command.params['metricName'] = metric_name unless metric_name.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -610,11 +549,11 @@ module Google # Optional. The maximum number of results to return from this request. Non- # positive values are ignored. The presence of nextPageToken in the response # indicates that more results might be available. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -627,15 +566,15 @@ 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_account_logs(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_billing_account_logs(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta1/{+parent}/logs', options) command.response_representation = Google::Apis::LoggingV2beta1::ListLogsResponse::Representation command.response_class = Google::Apis::LoggingV2beta1::ListLogsResponse command.params['parent'] = parent unless parent.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -651,11 +590,11 @@ module Google # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog" # , "organizations/1234567890/logs/cloudresourcemanager.googleapis.com% # 2Factivity". For more information about log names, see LogEntry. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -668,13 +607,13 @@ 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 delete_billing_account_log(log_name, fields: nil, quota_user: nil, options: nil, &block) + def delete_billing_account_log(log_name, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:delete, 'v2beta1/{+logName}', options) command.response_representation = Google::Apis::LoggingV2beta1::Empty::Representation command.response_class = Google::Apis::LoggingV2beta1::Empty command.params['logName'] = log_name unless log_name.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -688,11 +627,11 @@ module Google # Optional. The maximum number of results to return from this request. Non- # positive values are ignored. The presence of nextPageToken in the response # indicates that more results might be available. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -705,14 +644,14 @@ 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_monitored_resource_descriptors(page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_monitored_resource_descriptors(page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta1/monitoredResourceDescriptors', options) command.response_representation = Google::Apis::LoggingV2beta1::ListMonitoredResourceDescriptorsResponse::Representation command.response_class = Google::Apis::LoggingV2beta1::ListMonitoredResourceDescriptorsResponse command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -728,11 +667,11 @@ module Google # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog" # , "organizations/1234567890/logs/cloudresourcemanager.googleapis.com% # 2Factivity". For more information about log names, see LogEntry. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -745,13 +684,13 @@ 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 delete_organization_log(log_name, fields: nil, quota_user: nil, options: nil, &block) + def delete_organization_log(log_name, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:delete, 'v2beta1/{+logName}', options) command.response_representation = Google::Apis::LoggingV2beta1::Empty::Representation command.response_class = Google::Apis::LoggingV2beta1::Empty command.params['logName'] = log_name unless log_name.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -772,11 +711,11 @@ module Google # Optional. The maximum number of results to return from this request. Non- # positive values are ignored. The presence of nextPageToken in the response # indicates that more results might be available. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -789,15 +728,76 @@ 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_organization_logs(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_organization_logs(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta1/{+parent}/logs', options) command.response_representation = Google::Apis::LoggingV2beta1::ListLogsResponse::Representation command.response_class = Google::Apis::LoggingV2beta1::ListLogsResponse command.params['parent'] = parent unless parent.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Lists log entries. Use this method to retrieve log entries from Stackdriver + # Logging. For ways to export log entries, see Exporting Logs. + # @param [Google::Apis::LoggingV2beta1::ListLogEntriesRequest] list_log_entries_request_object + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::LoggingV2beta1::ListLogEntriesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::LoggingV2beta1::ListLogEntriesResponse] + # + # @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_entry_log_entries(list_log_entries_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v2beta1/entries:list', options) + command.request_representation = Google::Apis::LoggingV2beta1::ListLogEntriesRequest::Representation + command.request_object = list_log_entries_request_object + command.response_representation = Google::Apis::LoggingV2beta1::ListLogEntriesResponse::Representation + command.response_class = Google::Apis::LoggingV2beta1::ListLogEntriesResponse + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Writes log entries to Stackdriver Logging. + # @param [Google::Apis::LoggingV2beta1::WriteLogEntriesRequest] write_log_entries_request_object + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::LoggingV2beta1::WriteLogEntriesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::LoggingV2beta1::WriteLogEntriesResponse] + # + # @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 write_entry_log_entries(write_log_entries_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v2beta1/entries:write', options) + command.request_representation = Google::Apis::LoggingV2beta1::WriteLogEntriesRequest::Representation + command.request_object = write_log_entries_request_object + command.response_representation = Google::Apis::LoggingV2beta1::WriteLogEntriesResponse::Representation + command.response_class = Google::Apis::LoggingV2beta1::WriteLogEntriesResponse + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end diff --git a/generated/google/apis/manufacturers_v1/classes.rb b/generated/google/apis/manufacturers_v1/classes.rb index c2fee855a..255904abe 100644 --- a/generated/google/apis/manufacturers_v1/classes.rb +++ b/generated/google/apis/manufacturers_v1/classes.rb @@ -22,243 +22,6 @@ module Google module Apis module ManufacturersV1 - # Attributes of the product. For more information, see - # https://support.google.com/manufacturers/answer/6124116. - class Attributes - include Google::Apis::Core::Hashable - - # The size type of the product. For more information, see - # https://support.google.com/manufacturers/answer/6124116#sizetype. - # Corresponds to the JSON property `sizeType` - # @return [String] - attr_accessor :size_type - - # A price. - # Corresponds to the JSON property `suggestedRetailPrice` - # @return [Google::Apis::ManufacturersV1::Price] - attr_accessor :suggested_retail_price - - # The rich format description of the product. For more information, see - # https://support.google.com/manufacturers/answer/6124116#featuredesc. - # Corresponds to the JSON property `featureDescription` - # @return [Array] - attr_accessor :feature_description - - # The size of the product. For more information, see - # https://support.google.com/manufacturers/answer/6124116#size. - # Corresponds to the JSON property `size` - # @return [String] - attr_accessor :size - - # The title of the product. For more information, see - # https://support.google.com/manufacturers/answer/6124116#title. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # The number of products in a single package. For more information, see - # https://support.google.com/manufacturers/answer/6124116#count. - # Corresponds to the JSON property `count` - # @return [Google::Apis::ManufacturersV1::Count] - attr_accessor :count - - # The brand name of the product. For more information, see - # https://support.google.com/manufacturers/answer/6124116#brand. - # Corresponds to the JSON property `brand` - # @return [String] - attr_accessor :brand - - # The disclosure date of the product. For more information, see - # https://support.google.com/manufacturers/answer/6124116#disclosure. - # Corresponds to the JSON property `disclosureDate` - # @return [String] - attr_accessor :disclosure_date - - # The material of the product. For more information, see - # https://support.google.com/manufacturers/answer/6124116#material. - # Corresponds to the JSON property `material` - # @return [String] - attr_accessor :material - - # The scent of the product. For more information, see - # https://support.google.com/manufacturers/answer/6124116#scent. - # Corresponds to the JSON property `scent` - # @return [String] - attr_accessor :scent - - # The flavor of the product. For more information, see - # https://support.google.com/manufacturers/answer/6124116#flavor. - # Corresponds to the JSON property `flavor` - # @return [String] - attr_accessor :flavor - - # The details of the product. For more information, see - # https://support.google.com/manufacturers/answer/6124116#productdetail. - # Corresponds to the JSON property `productDetail` - # @return [Array] - attr_accessor :product_detail - - # The target age group of the product. For more information, see - # https://support.google.com/manufacturers/answer/6124116#agegroup. - # Corresponds to the JSON property `ageGroup` - # @return [String] - attr_accessor :age_group - - # The Manufacturer Part Number (MPN) of the product. For more information, - # see https://support.google.com/manufacturers/answer/6124116#mpn. - # Corresponds to the JSON property `mpn` - # @return [String] - attr_accessor :mpn - - # The URL of the detail page of the product. For more information, see - # https://support.google.com/manufacturers/answer/6124116#productpage. - # Corresponds to the JSON property `productPageUrl` - # @return [String] - attr_accessor :product_page_url - - # The release date of the product. For more information, see - # https://support.google.com/manufacturers/answer/6124116#release. - # Corresponds to the JSON property `releaseDate` - # @return [String] - attr_accessor :release_date - - # The Global Trade Item Number (GTIN) of the product. For more information, - # see https://support.google.com/manufacturers/answer/6124116#gtin. - # Corresponds to the JSON property `gtin` - # @return [Array] - attr_accessor :gtin - - # The item group id of the product. For more information, see - # https://support.google.com/manufacturers/answer/6124116#itemgroupid. - # Corresponds to the JSON property `itemGroupId` - # @return [String] - attr_accessor :item_group_id - - # The name of the group of products related to the product. For more - # information, see - # https://support.google.com/manufacturers/answer/6124116#productline. - # Corresponds to the JSON property `productLine` - # @return [String] - attr_accessor :product_line - - # The capacity of a product. For more information, see - # https://support.google.com/manufacturers/answer/6124116#capacity. - # Corresponds to the JSON property `capacity` - # @return [Google::Apis::ManufacturersV1::Capacity] - attr_accessor :capacity - - # The description of the product. For more information, see - # https://support.google.com/manufacturers/answer/6124116#description. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # The target gender of the product. For more information, see - # https://support.google.com/manufacturers/answer/6124116#gender. - # Corresponds to the JSON property `gender` - # @return [String] - attr_accessor :gender - - # The size system of the product. For more information, see - # https://support.google.com/manufacturers/answer/6124116#sizesystem. - # Corresponds to the JSON property `sizeSystem` - # @return [String] - attr_accessor :size_system - - # The theme of the product. For more information, see - # https://support.google.com/manufacturers/answer/6124116#theme. - # Corresponds to the JSON property `theme` - # @return [String] - attr_accessor :theme - - # The pattern of the product. For more information, see - # https://support.google.com/manufacturers/answer/6124116#pattern. - # Corresponds to the JSON property `pattern` - # @return [String] - attr_accessor :pattern - - # An image. - # Corresponds to the JSON property `imageLink` - # @return [Google::Apis::ManufacturersV1::Image] - attr_accessor :image_link - - # The category of the product. For more information, see - # https://support.google.com/manufacturers/answer/6124116#producttype. - # Corresponds to the JSON property `productType` - # @return [Array] - attr_accessor :product_type - - # The format of the product. For more information, see - # https://support.google.com/manufacturers/answer/6124116#format. - # Corresponds to the JSON property `format` - # @return [String] - attr_accessor :format - - # The additional images of the product. For more information, see - # https://support.google.com/manufacturers/answer/6124116#addlimage. - # Corresponds to the JSON property `additionalImageLink` - # @return [Array] - attr_accessor :additional_image_link - - # The videos of the product. For more information, see - # https://support.google.com/manufacturers/answer/6124116#video. - # Corresponds to the JSON property `videoLink` - # @return [Array] - attr_accessor :video_link - - # The color of the product. For more information, see - # https://support.google.com/manufacturers/answer/6124116#color. - # Corresponds to the JSON property `color` - # @return [String] - attr_accessor :color - - # The canonical name of the product. For more information, see - # https://support.google.com/manufacturers/answer/6124116#productname. - # Corresponds to the JSON property `productName` - # @return [String] - attr_accessor :product_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @size_type = args[:size_type] if args.key?(:size_type) - @suggested_retail_price = args[:suggested_retail_price] if args.key?(:suggested_retail_price) - @feature_description = args[:feature_description] if args.key?(:feature_description) - @size = args[:size] if args.key?(:size) - @title = args[:title] if args.key?(:title) - @count = args[:count] if args.key?(:count) - @brand = args[:brand] if args.key?(:brand) - @disclosure_date = args[:disclosure_date] if args.key?(:disclosure_date) - @material = args[:material] if args.key?(:material) - @scent = args[:scent] if args.key?(:scent) - @flavor = args[:flavor] if args.key?(:flavor) - @product_detail = args[:product_detail] if args.key?(:product_detail) - @age_group = args[:age_group] if args.key?(:age_group) - @mpn = args[:mpn] if args.key?(:mpn) - @product_page_url = args[:product_page_url] if args.key?(:product_page_url) - @release_date = args[:release_date] if args.key?(:release_date) - @gtin = args[:gtin] if args.key?(:gtin) - @item_group_id = args[:item_group_id] if args.key?(:item_group_id) - @product_line = args[:product_line] if args.key?(:product_line) - @capacity = args[:capacity] if args.key?(:capacity) - @description = args[:description] if args.key?(:description) - @gender = args[:gender] if args.key?(:gender) - @size_system = args[:size_system] if args.key?(:size_system) - @theme = args[:theme] if args.key?(:theme) - @pattern = args[:pattern] if args.key?(:pattern) - @image_link = args[:image_link] if args.key?(:image_link) - @product_type = args[:product_type] if args.key?(:product_type) - @format = args[:format] if args.key?(:format) - @additional_image_link = args[:additional_image_link] if args.key?(:additional_image_link) - @video_link = args[:video_link] if args.key?(:video_link) - @color = args[:color] if args.key?(:color) - @product_name = args[:product_name] if args.key?(:product_name) - end - end - # The number of products in a single package. For more information, see # https://support.google.com/manufacturers/answer/6124116#count. class Count @@ -289,19 +52,6 @@ module Google class Product include Google::Apis::Core::Hashable - # Attributes of the product. For more information, see - # https://support.google.com/manufacturers/answer/6124116. - # Corresponds to the JSON property `uploadedAttributes` - # @return [Google::Apis::ManufacturersV1::Attributes] - attr_accessor :uploaded_attributes - - # Parent ID in the format `accounts/`account_id``. - # `account_id` - The ID of the Manufacturer Center account. - # @OutputOnly - # Corresponds to the JSON property `parent` - # @return [String] - attr_accessor :parent - # Attributes of the product. For more information, see # https://support.google.com/manufacturers/answer/6124116. # Corresponds to the JSON property `manuallyProvidedAttributes` @@ -361,14 +111,25 @@ module Google # @return [String] attr_accessor :product_id + # Attributes of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116. + # Corresponds to the JSON property `uploadedAttributes` + # @return [Google::Apis::ManufacturersV1::Attributes] + attr_accessor :uploaded_attributes + + # Parent ID in the format `accounts/`account_id``. + # `account_id` - The ID of the Manufacturer Center account. + # @OutputOnly + # Corresponds to the JSON property `parent` + # @return [String] + attr_accessor :parent + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @uploaded_attributes = args[:uploaded_attributes] if args.key?(:uploaded_attributes) - @parent = args[:parent] if args.key?(:parent) @manually_provided_attributes = args[:manually_provided_attributes] if args.key?(:manually_provided_attributes) @content_language = args[:content_language] if args.key?(:content_language) @target_country = args[:target_country] if args.key?(:target_country) @@ -377,6 +138,8 @@ module Google @manually_deleted_attributes = args[:manually_deleted_attributes] if args.key?(:manually_deleted_attributes) @final_attributes = args[:final_attributes] if args.key?(:final_attributes) @product_id = args[:product_id] if args.key?(:product_id) + @uploaded_attributes = args[:uploaded_attributes] if args.key?(:uploaded_attributes) + @parent = args[:parent] if args.key?(:parent) end end @@ -410,24 +173,24 @@ module Google class ListProductsResponse include Google::Apis::Core::Hashable - # The token for the retrieval of the next page of product statuses. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - # List of the products. # Corresponds to the JSON property `products` # @return [Array] attr_accessor :products + # The token for the retrieval of the next page of product statuses. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) @products = args[:products] if args.key?(:products) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) end end @@ -463,10 +226,53 @@ module Google end end + # A feature description of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#featuredesc. + class FeatureDescription + include Google::Apis::Core::Hashable + + # A detailed description of the feature. + # Corresponds to the JSON property `text` + # @return [String] + attr_accessor :text + + # An image. + # Corresponds to the JSON property `image` + # @return [Google::Apis::ManufacturersV1::Image] + attr_accessor :image + + # A short description of the feature. + # Corresponds to the JSON property `headline` + # @return [String] + attr_accessor :headline + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @text = args[:text] if args.key?(:text) + @image = args[:image] if args.key?(:image) + @headline = args[:headline] if args.key?(:headline) + end + end + # Product issue. class Issue include Google::Apis::Core::Hashable + # Description of the issue. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # The server-generated type of the issue, for example, + # “INCORRECT_TEXT_FORMATTING”, “IMAGE_NOT_SERVEABLE”, etc. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + # If present, the attribute that triggered the issue. For more information # about attributes, see # https://support.google.com/manufacturers/answer/6124116. @@ -484,60 +290,17 @@ module Google # @return [String] attr_accessor :severity - # Description of the issue. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # The server-generated type of the issue, for example, - # “INCORRECT_TEXT_FORMATTING”, “IMAGE_NOT_SERVEABLE”, etc. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @description = args[:description] if args.key?(:description) + @type = args[:type] if args.key?(:type) @attribute = args[:attribute] if args.key?(:attribute) @timestamp = args[:timestamp] if args.key?(:timestamp) @severity = args[:severity] if args.key?(:severity) - @description = args[:description] if args.key?(:description) - @type = args[:type] if args.key?(:type) - end - end - - # A feature description of the product. For more information, see - # https://support.google.com/manufacturers/answer/6124116#featuredesc. - class FeatureDescription - include Google::Apis::Core::Hashable - - # A short description of the feature. - # Corresponds to the JSON property `headline` - # @return [String] - attr_accessor :headline - - # A detailed description of the feature. - # Corresponds to the JSON property `text` - # @return [String] - attr_accessor :text - - # An image. - # Corresponds to the JSON property `image` - # @return [Google::Apis::ManufacturersV1::Image] - attr_accessor :image - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @headline = args[:headline] if args.key?(:headline) - @text = args[:text] if args.key?(:text) - @image = args[:image] if args.key?(:image) end end @@ -545,24 +308,24 @@ module Google class Price include Google::Apis::Core::Hashable - # The currency in which the price is denoted. - # Corresponds to the JSON property `currency` - # @return [String] - attr_accessor :currency - # The numeric value of the price. # Corresponds to the JSON property `amount` # @return [String] attr_accessor :amount + # The currency in which the price is denoted. + # Corresponds to the JSON property `currency` + # @return [String] + attr_accessor :currency + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @currency = args[:currency] if args.key?(:currency) @amount = args[:amount] if args.key?(:amount) + @currency = args[:currency] if args.key?(:currency) end end @@ -570,13 +333,6 @@ module Google class Image include Google::Apis::Core::Hashable - # The URL of the image. For crawled images, this is the provided URL. For - # uploaded images, this is a serving URL from Google if the image has been - # processed successfully. - # Corresponds to the JSON property `imageUrl` - # @return [String] - attr_accessor :image_url - # The status of the image. # @OutputOnly # Corresponds to the JSON property `status` @@ -589,15 +345,259 @@ module Google # @return [String] attr_accessor :type + # The URL of the image. For crawled images, this is the provided URL. For + # uploaded images, this is a serving URL from Google if the image has been + # processed successfully. + # Corresponds to the JSON property `imageUrl` + # @return [String] + attr_accessor :image_url + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @image_url = args[:image_url] if args.key?(:image_url) @status = args[:status] if args.key?(:status) @type = args[:type] if args.key?(:type) + @image_url = args[:image_url] if args.key?(:image_url) + end + end + + # Attributes of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116. + class Attributes + include Google::Apis::Core::Hashable + + # An image. + # Corresponds to the JSON property `imageLink` + # @return [Google::Apis::ManufacturersV1::Image] + attr_accessor :image_link + + # The category of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#producttype. + # Corresponds to the JSON property `productType` + # @return [Array] + attr_accessor :product_type + + # The format of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#format. + # Corresponds to the JSON property `format` + # @return [String] + attr_accessor :format + + # The additional images of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#addlimage. + # Corresponds to the JSON property `additionalImageLink` + # @return [Array] + attr_accessor :additional_image_link + + # The videos of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#video. + # Corresponds to the JSON property `videoLink` + # @return [Array] + attr_accessor :video_link + + # The color of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#color. + # Corresponds to the JSON property `color` + # @return [String] + attr_accessor :color + + # The canonical name of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#productname. + # Corresponds to the JSON property `productName` + # @return [String] + attr_accessor :product_name + + # The size type of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#sizetype. + # Corresponds to the JSON property `sizeType` + # @return [String] + attr_accessor :size_type + + # A price. + # Corresponds to the JSON property `suggestedRetailPrice` + # @return [Google::Apis::ManufacturersV1::Price] + attr_accessor :suggested_retail_price + + # The rich format description of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#featuredesc. + # Corresponds to the JSON property `featureDescription` + # @return [Array] + attr_accessor :feature_description + + # The size of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#size. + # Corresponds to the JSON property `size` + # @return [String] + attr_accessor :size + + # The title of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#title. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + # The number of products in a single package. For more information, see + # https://support.google.com/manufacturers/answer/6124116#count. + # Corresponds to the JSON property `count` + # @return [Google::Apis::ManufacturersV1::Count] + attr_accessor :count + + # The brand name of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#brand. + # Corresponds to the JSON property `brand` + # @return [String] + attr_accessor :brand + + # The disclosure date of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#disclosure. + # Corresponds to the JSON property `disclosureDate` + # @return [String] + attr_accessor :disclosure_date + + # The material of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#material. + # Corresponds to the JSON property `material` + # @return [String] + attr_accessor :material + + # The scent of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#scent. + # Corresponds to the JSON property `scent` + # @return [String] + attr_accessor :scent + + # The target age group of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#agegroup. + # Corresponds to the JSON property `ageGroup` + # @return [String] + attr_accessor :age_group + + # The details of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#productdetail. + # Corresponds to the JSON property `productDetail` + # @return [Array] + attr_accessor :product_detail + + # The flavor of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#flavor. + # Corresponds to the JSON property `flavor` + # @return [String] + attr_accessor :flavor + + # The Manufacturer Part Number (MPN) of the product. For more information, + # see https://support.google.com/manufacturers/answer/6124116#mpn. + # Corresponds to the JSON property `mpn` + # @return [String] + attr_accessor :mpn + + # The URL of the detail page of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#productpage. + # Corresponds to the JSON property `productPageUrl` + # @return [String] + attr_accessor :product_page_url + + # The release date of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#release. + # Corresponds to the JSON property `releaseDate` + # @return [String] + attr_accessor :release_date + + # The item group id of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#itemgroupid. + # Corresponds to the JSON property `itemGroupId` + # @return [String] + attr_accessor :item_group_id + + # The Global Trade Item Number (GTIN) of the product. For more information, + # see https://support.google.com/manufacturers/answer/6124116#gtin. + # Corresponds to the JSON property `gtin` + # @return [Array] + attr_accessor :gtin + + # The name of the group of products related to the product. For more + # information, see + # https://support.google.com/manufacturers/answer/6124116#productline. + # Corresponds to the JSON property `productLine` + # @return [String] + attr_accessor :product_line + + # The capacity of a product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#capacity. + # Corresponds to the JSON property `capacity` + # @return [Google::Apis::ManufacturersV1::Capacity] + attr_accessor :capacity + + # The description of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#description. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # The target gender of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#gender. + # Corresponds to the JSON property `gender` + # @return [String] + attr_accessor :gender + + # The size system of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#sizesystem. + # Corresponds to the JSON property `sizeSystem` + # @return [String] + attr_accessor :size_system + + # The theme of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#theme. + # Corresponds to the JSON property `theme` + # @return [String] + attr_accessor :theme + + # The pattern of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#pattern. + # Corresponds to the JSON property `pattern` + # @return [String] + attr_accessor :pattern + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @image_link = args[:image_link] if args.key?(:image_link) + @product_type = args[:product_type] if args.key?(:product_type) + @format = args[:format] if args.key?(:format) + @additional_image_link = args[:additional_image_link] if args.key?(:additional_image_link) + @video_link = args[:video_link] if args.key?(:video_link) + @color = args[:color] if args.key?(:color) + @product_name = args[:product_name] if args.key?(:product_name) + @size_type = args[:size_type] if args.key?(:size_type) + @suggested_retail_price = args[:suggested_retail_price] if args.key?(:suggested_retail_price) + @feature_description = args[:feature_description] if args.key?(:feature_description) + @size = args[:size] if args.key?(:size) + @title = args[:title] if args.key?(:title) + @count = args[:count] if args.key?(:count) + @brand = args[:brand] if args.key?(:brand) + @disclosure_date = args[:disclosure_date] if args.key?(:disclosure_date) + @material = args[:material] if args.key?(:material) + @scent = args[:scent] if args.key?(:scent) + @age_group = args[:age_group] if args.key?(:age_group) + @product_detail = args[:product_detail] if args.key?(:product_detail) + @flavor = args[:flavor] if args.key?(:flavor) + @mpn = args[:mpn] if args.key?(:mpn) + @product_page_url = args[:product_page_url] if args.key?(:product_page_url) + @release_date = args[:release_date] if args.key?(:release_date) + @item_group_id = args[:item_group_id] if args.key?(:item_group_id) + @gtin = args[:gtin] if args.key?(:gtin) + @product_line = args[:product_line] if args.key?(:product_line) + @capacity = args[:capacity] if args.key?(:capacity) + @description = args[:description] if args.key?(:description) + @gender = args[:gender] if args.key?(:gender) + @size_system = args[:size_system] if args.key?(:size_system) + @theme = args[:theme] if args.key?(:theme) + @pattern = args[:pattern] if args.key?(:pattern) end end end diff --git a/generated/google/apis/manufacturers_v1/representations.rb b/generated/google/apis/manufacturers_v1/representations.rb index 91bdfae7c..a8e29912b 100644 --- a/generated/google/apis/manufacturers_v1/representations.rb +++ b/generated/google/apis/manufacturers_v1/representations.rb @@ -22,12 +22,6 @@ module Google module Apis module ManufacturersV1 - class Attributes - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class Count class Representation < Google::Apis::Core::JsonRepresentation; end @@ -58,13 +52,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class Issue + class FeatureDescription class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class FeatureDescription + class Issue class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -83,8 +77,115 @@ module Google end class Attributes + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Count # @private class Representation < Google::Apis::Core::JsonRepresentation + property :value, :numeric_string => true, as: 'value' + property :unit, as: 'unit' + end + end + + class Product + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :manually_provided_attributes, as: 'manuallyProvidedAttributes', class: Google::Apis::ManufacturersV1::Attributes, decorator: Google::Apis::ManufacturersV1::Attributes::Representation + + property :content_language, as: 'contentLanguage' + property :target_country, as: 'targetCountry' + property :name, as: 'name' + collection :issues, as: 'issues', class: Google::Apis::ManufacturersV1::Issue, decorator: Google::Apis::ManufacturersV1::Issue::Representation + + collection :manually_deleted_attributes, as: 'manuallyDeletedAttributes' + property :final_attributes, as: 'finalAttributes', class: Google::Apis::ManufacturersV1::Attributes, decorator: Google::Apis::ManufacturersV1::Attributes::Representation + + property :product_id, as: 'productId' + property :uploaded_attributes, as: 'uploadedAttributes', class: Google::Apis::ManufacturersV1::Attributes, decorator: Google::Apis::ManufacturersV1::Attributes::Representation + + property :parent, as: 'parent' + end + end + + class Capacity + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :value, :numeric_string => true, as: 'value' + property :unit, as: 'unit' + end + end + + class ListProductsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :products, as: 'products', class: Google::Apis::ManufacturersV1::Product, decorator: Google::Apis::ManufacturersV1::Product::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class ProductDetail + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :attribute_value, as: 'attributeValue' + property :section_name, as: 'sectionName' + property :attribute_name, as: 'attributeName' + end + end + + class FeatureDescription + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :text, as: 'text' + property :image, as: 'image', class: Google::Apis::ManufacturersV1::Image, decorator: Google::Apis::ManufacturersV1::Image::Representation + + property :headline, as: 'headline' + end + end + + class Issue + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :description, as: 'description' + property :type, as: 'type' + property :attribute, as: 'attribute' + property :timestamp, as: 'timestamp' + property :severity, as: 'severity' + end + end + + class Price + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :amount, as: 'amount' + property :currency, as: 'currency' + end + end + + class Image + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :status, as: 'status' + property :type, as: 'type' + property :image_url, as: 'imageUrl' + end + end + + class Attributes + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :image_link, as: 'imageLink', class: Google::Apis::ManufacturersV1::Image, decorator: Google::Apis::ManufacturersV1::Image::Representation + + collection :product_type, as: 'productType' + property :format, as: 'format' + collection :additional_image_link, as: 'additionalImageLink', class: Google::Apis::ManufacturersV1::Image, decorator: Google::Apis::ManufacturersV1::Image::Representation + + collection :video_link, as: 'videoLink' + property :color, as: 'color' + property :product_name, as: 'productName' property :size_type, as: 'sizeType' property :suggested_retail_price, as: 'suggestedRetailPrice', class: Google::Apis::ManufacturersV1::Price, decorator: Google::Apis::ManufacturersV1::Price::Representation @@ -98,15 +199,15 @@ module Google property :disclosure_date, as: 'disclosureDate' property :material, as: 'material' property :scent, as: 'scent' - property :flavor, as: 'flavor' + property :age_group, as: 'ageGroup' collection :product_detail, as: 'productDetail', class: Google::Apis::ManufacturersV1::ProductDetail, decorator: Google::Apis::ManufacturersV1::ProductDetail::Representation - property :age_group, as: 'ageGroup' + property :flavor, as: 'flavor' property :mpn, as: 'mpn' property :product_page_url, as: 'productPageUrl' property :release_date, as: 'releaseDate' - collection :gtin, as: 'gtin' property :item_group_id, as: 'itemGroupId' + collection :gtin, as: 'gtin' property :product_line, as: 'productLine' property :capacity, as: 'capacity', class: Google::Apis::ManufacturersV1::Capacity, decorator: Google::Apis::ManufacturersV1::Capacity::Representation @@ -115,107 +216,6 @@ module Google property :size_system, as: 'sizeSystem' property :theme, as: 'theme' property :pattern, as: 'pattern' - property :image_link, as: 'imageLink', class: Google::Apis::ManufacturersV1::Image, decorator: Google::Apis::ManufacturersV1::Image::Representation - - collection :product_type, as: 'productType' - property :format, as: 'format' - collection :additional_image_link, as: 'additionalImageLink', class: Google::Apis::ManufacturersV1::Image, decorator: Google::Apis::ManufacturersV1::Image::Representation - - collection :video_link, as: 'videoLink' - property :color, as: 'color' - property :product_name, as: 'productName' - end - end - - class Count - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :value, :numeric_string => true, as: 'value' - property :unit, as: 'unit' - end - end - - class Product - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :uploaded_attributes, as: 'uploadedAttributes', class: Google::Apis::ManufacturersV1::Attributes, decorator: Google::Apis::ManufacturersV1::Attributes::Representation - - property :parent, as: 'parent' - property :manually_provided_attributes, as: 'manuallyProvidedAttributes', class: Google::Apis::ManufacturersV1::Attributes, decorator: Google::Apis::ManufacturersV1::Attributes::Representation - - property :content_language, as: 'contentLanguage' - property :target_country, as: 'targetCountry' - property :name, as: 'name' - collection :issues, as: 'issues', class: Google::Apis::ManufacturersV1::Issue, decorator: Google::Apis::ManufacturersV1::Issue::Representation - - collection :manually_deleted_attributes, as: 'manuallyDeletedAttributes' - property :final_attributes, as: 'finalAttributes', class: Google::Apis::ManufacturersV1::Attributes, decorator: Google::Apis::ManufacturersV1::Attributes::Representation - - property :product_id, as: 'productId' - end - end - - class Capacity - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :value, :numeric_string => true, as: 'value' - property :unit, as: 'unit' - end - end - - class ListProductsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - collection :products, as: 'products', class: Google::Apis::ManufacturersV1::Product, decorator: Google::Apis::ManufacturersV1::Product::Representation - - end - end - - class ProductDetail - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :attribute_value, as: 'attributeValue' - property :section_name, as: 'sectionName' - property :attribute_name, as: 'attributeName' - end - end - - class Issue - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :attribute, as: 'attribute' - property :timestamp, as: 'timestamp' - property :severity, as: 'severity' - property :description, as: 'description' - property :type, as: 'type' - end - end - - class FeatureDescription - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :headline, as: 'headline' - property :text, as: 'text' - property :image, as: 'image', class: Google::Apis::ManufacturersV1::Image, decorator: Google::Apis::ManufacturersV1::Image::Representation - - end - end - - class Price - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :currency, as: 'currency' - property :amount, as: 'amount' - end - end - - class Image - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :image_url, as: 'imageUrl' - property :status, as: 'status' - property :type, as: 'type' end end end diff --git a/generated/google/apis/ml_v1.rb b/generated/google/apis/ml_v1.rb index f102e0190..350ccd79d 100644 --- a/generated/google/apis/ml_v1.rb +++ b/generated/google/apis/ml_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/ml/ module MlV1 VERSION = 'V1' - REVISION = '20170424' + REVISION = '20170520' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/ml_v1/classes.rb b/generated/google/apis/ml_v1/classes.rb index 5d8e5943a..40826af49 100644 --- a/generated/google/apis/ml_v1/classes.rb +++ b/generated/google/apis/ml_v1/classes.rb @@ -22,265 +22,6 @@ module Google module Apis module MlV1 - # Response message for the ListModels method. - class GoogleCloudMlV1ListModelsResponse - include Google::Apis::Core::Hashable - - # The list of models. - # Corresponds to the JSON property `models` - # @return [Array] - attr_accessor :models - - # Optional. Pass this token as the `page_token` field of the request for a - # subsequent call. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @models = args[:models] if args.key?(:models) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # Represents input parameters for a training job. - class GoogleCloudMlV1TrainingInput - include Google::Apis::Core::Hashable - - # Optional. The number of parameter server replicas to use for the training - # job. Each replica in the cluster will be of the type specified in - # `parameter_server_type`. - # This value can only be used when `scale_tier` is set to `CUSTOM`.If you - # set this value, you must also set `parameter_server_type`. - # Corresponds to the JSON property `parameterServerCount` - # @return [Fixnum] - attr_accessor :parameter_server_count - - # Required. The Google Cloud Storage location of the packages with - # the training program and any additional dependencies. - # The maximum number of package URIs is 100. - # Corresponds to the JSON property `packageUris` - # @return [Array] - attr_accessor :package_uris - - # Optional. The number of worker replicas to use for the training job. Each - # replica in the cluster will be of the type specified in `worker_type`. - # This value can only be used when `scale_tier` is set to `CUSTOM`. If you - # set this value, you must also set `worker_type`. - # Corresponds to the JSON property `workerCount` - # @return [Fixnum] - attr_accessor :worker_count - - # Optional. Specifies the type of virtual machine to use for your training - # job's master worker. - # The following types are supported: - #
- #
standard
- #
- # A basic machine configuration suitable for training simple models with - # small to moderate datasets. - #
- #
large_model
- #
- # A machine with a lot of memory, specially suited for parameter servers - # when your model is large (having many hidden layers or layers with very - # large numbers of nodes). - #
- #
complex_model_s
- #
- # A machine suitable for the master and workers of the cluster when your - # model requires more computation than the standard machine can handle - # satisfactorily. - #
- #
complex_model_m
- #
- # A machine with roughly twice the number of cores and roughly double the - # memory of complex_model_s. - #
- #
complex_model_l
- #
- # A machine with roughly twice the number of cores and roughly double the - # memory of complex_model_m. - #
- #
standard_gpu
- #
- # A machine equivalent to standard that - # also includes a - # - # GPU that you can use in your trainer. - #
- #
complex_model_m_gpu
- #
- # A machine equivalent to - # coplex_model_m that also includes - # four GPUs. - #
- #
- # You must set this value when `scaleTier` is set to `CUSTOM`. - # Corresponds to the JSON property `masterType` - # @return [String] - attr_accessor :master_type - - # Optional. The Google Cloud ML runtime version to use for training. If not - # set, Google Cloud ML will choose the latest stable version. - # Corresponds to the JSON property `runtimeVersion` - # @return [String] - attr_accessor :runtime_version - - # Required. The Python module name to run after installing the packages. - # Corresponds to the JSON property `pythonModule` - # @return [String] - attr_accessor :python_module - - # Optional. Specifies the type of virtual machine to use for your training - # job's worker nodes. - # The supported values are the same as those described in the entry for - # `masterType`. - # This value must be present when `scaleTier` is set to `CUSTOM` and - # `workerCount` is greater than zero. - # Corresponds to the JSON property `workerType` - # @return [String] - attr_accessor :worker_type - - # Optional. Command line arguments to pass to the program. - # Corresponds to the JSON property `args` - # @return [Array] - attr_accessor :args - - # Required. The Google Compute Engine region to run the training job in. - # Corresponds to the JSON property `region` - # @return [String] - attr_accessor :region - - # Optional. Specifies the type of virtual machine to use for your training - # job's parameter server. - # The supported values are the same as those described in the entry for - # `master_type`. - # This value must be present when `scaleTier` is set to `CUSTOM` and - # `parameter_server_count` is greater than zero. - # Corresponds to the JSON property `parameterServerType` - # @return [String] - attr_accessor :parameter_server_type - - # Required. Specifies the machine types, the number of replicas for workers - # and parameter servers. - # Corresponds to the JSON property `scaleTier` - # @return [String] - attr_accessor :scale_tier - - # 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 - # this field is that Cloud ML validates the path for use in training. - # Corresponds to the JSON property `jobDir` - # @return [String] - attr_accessor :job_dir - - # Represents a set of hyperparameters to optimize. - # Corresponds to the JSON property `hyperparameters` - # @return [Google::Apis::MlV1::GoogleCloudMlV1HyperparameterSpec] - attr_accessor :hyperparameters - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @parameter_server_count = args[:parameter_server_count] if args.key?(:parameter_server_count) - @package_uris = args[:package_uris] if args.key?(:package_uris) - @worker_count = args[:worker_count] if args.key?(:worker_count) - @master_type = args[:master_type] if args.key?(:master_type) - @runtime_version = args[:runtime_version] if args.key?(:runtime_version) - @python_module = args[:python_module] if args.key?(:python_module) - @worker_type = args[:worker_type] if args.key?(:worker_type) - @args = args[:args] if args.key?(:args) - @region = args[:region] if args.key?(:region) - @parameter_server_type = args[:parameter_server_type] if args.key?(:parameter_server_type) - @scale_tier = args[:scale_tier] if args.key?(:scale_tier) - @job_dir = args[:job_dir] if args.key?(:job_dir) - @hyperparameters = args[:hyperparameters] if args.key?(:hyperparameters) - end - end - - # Represents a training or prediction job. - class GoogleCloudMlV1Job - include Google::Apis::Core::Hashable - - # Represents results of a training job. Output only. - # Corresponds to the JSON property `trainingOutput` - # @return [Google::Apis::MlV1::GoogleCloudMlV1TrainingOutput] - attr_accessor :training_output - - # Output only. When the job was created. - # Corresponds to the JSON property `createTime` - # @return [String] - attr_accessor :create_time - - # Represents input parameters for a training job. - # Corresponds to the JSON property `trainingInput` - # @return [Google::Apis::MlV1::GoogleCloudMlV1TrainingInput] - attr_accessor :training_input - - # Output only. The detailed state of a job. - # Corresponds to the JSON property `state` - # @return [String] - attr_accessor :state - - # Represents input parameters for a prediction job. - # Corresponds to the JSON property `predictionInput` - # @return [Google::Apis::MlV1::GoogleCloudMlV1PredictionInput] - attr_accessor :prediction_input - - # Output only. The details of a failure or a cancellation. - # Corresponds to the JSON property `errorMessage` - # @return [String] - attr_accessor :error_message - - # Required. The user-specified id of the job. - # Corresponds to the JSON property `jobId` - # @return [String] - attr_accessor :job_id - - # Output only. When the job processing was completed. - # Corresponds to the JSON property `endTime` - # @return [String] - attr_accessor :end_time - - # Output only. When the job processing was started. - # Corresponds to the JSON property `startTime` - # @return [String] - attr_accessor :start_time - - # Represents results of a prediction job. - # Corresponds to the JSON property `predictionOutput` - # @return [Google::Apis::MlV1::GoogleCloudMlV1PredictionOutput] - attr_accessor :prediction_output - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @training_output = args[:training_output] if args.key?(:training_output) - @create_time = args[:create_time] if args.key?(:create_time) - @training_input = args[:training_input] if args.key?(:training_input) - @state = args[:state] if args.key?(:state) - @prediction_input = args[:prediction_input] if args.key?(:prediction_input) - @error_message = args[:error_message] if args.key?(:error_message) - @job_id = args[:job_id] if args.key?(:job_id) - @end_time = args[:end_time] if args.key?(:end_time) - @start_time = args[:start_time] if args.key?(:start_time) - @prediction_output = args[:prediction_output] if args.key?(:prediction_output) - end - end - # Message that represents an arbitrary HTTP body. It should only be used for # payload formats that can't be represented as JSON, such as raw binary or # an HTML page. @@ -312,25 +53,57 @@ module Google class GoogleApiHttpBody include Google::Apis::Core::Hashable + # The HTTP Content-Type string representing the content type of the body. + # Corresponds to the JSON property `contentType` + # @return [String] + attr_accessor :content_type + + # Application specific response metadata. Must be set in the first response + # for streaming APIs. + # Corresponds to the JSON property `extensions` + # @return [Array>] + attr_accessor :extensions + # HTTP body binary data. # Corresponds to the JSON property `data` # NOTE: Values are automatically base64 encoded/decoded in the client library. # @return [String] attr_accessor :data - # The HTTP Content-Type string representing the content type of the body. - # Corresponds to the JSON property `contentType` - # @return [String] - attr_accessor :content_type - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @data = args[:data] if args.key?(:data) @content_type = args[:content_type] if args.key?(:content_type) + @extensions = args[:extensions] if args.key?(:extensions) + @data = args[:data] if args.key?(:data) + end + end + + # Returns service account information associated with a project. + class GoogleCloudMlV1GetConfigResponse + include Google::Apis::Core::Hashable + + # The project number for `service_account`. + # Corresponds to the JSON property `serviceAccountProject` + # @return [Fixnum] + attr_accessor :service_account_project + + # The service account Cloud ML uses to access resources in the project. + # Corresponds to the JSON property `serviceAccount` + # @return [String] + attr_accessor :service_account + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @service_account_project = args[:service_account_project] if args.key?(:service_account_project) + @service_account = args[:service_account] if args.key?(:service_account) end end @@ -343,38 +116,6 @@ module Google class GoogleCloudMlV1beta1Version include Google::Apis::Core::Hashable - # Optional. The Google Cloud ML runtime version to use for this deployment. - # If not set, Google Cloud ML will choose a version. - # Corresponds to the JSON property `runtimeVersion` - # @return [String] - attr_accessor :runtime_version - - # Output only. The time the version was last used for prediction. - # Corresponds to the JSON property `lastUseTime` - # @return [String] - attr_accessor :last_use_time - - # Optional. The description specified for the version when it was created. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Required. The Google Cloud Storage location of the trained model used to - # create the version. See the - # [overview of model - # deployment](/ml-engine/docs/concepts/deployment-overview) for more - # informaiton. - # When passing Version to - # [projects.models.versions.create](/ml-engine/reference/rest/v1beta1/projects. - # models.versions/create) - # the model service uses the specified location as the source of the model. - # Once deployed, the model version is hosted by the prediction service, so - # this location is useful only as a historical record. - # The total number of model files can't exceed 1000. - # Corresponds to the JSON property `deploymentUri` - # @return [String] - attr_accessor :deployment_uri - # 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 @@ -401,45 +142,52 @@ module Google # @return [String] attr_accessor :name + # Output only. The time the version was last used for prediction. + # Corresponds to the JSON property `lastUseTime` + # @return [String] + attr_accessor :last_use_time + + # Optional. The Google Cloud ML runtime version to use for this deployment. + # If not set, Google Cloud ML will choose a version. + # Corresponds to the JSON property `runtimeVersion` + # @return [String] + attr_accessor :runtime_version + + # Optional. The description specified for the version when it was created. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # Required. The Google Cloud Storage location of the trained model used to + # create the version. See the + # [overview of model + # deployment](/ml-engine/docs/concepts/deployment-overview) for more + # informaiton. + # When passing Version to + # [projects.models.versions.create](/ml-engine/reference/rest/v1beta1/projects. + # models.versions/create) + # the model service uses the specified location as the source of the model. + # Once deployed, the model version is hosted by the prediction service, so + # this location is useful only as a historical record. + # The total number of model files can't exceed 1000. + # Corresponds to the JSON property `deploymentUri` + # @return [String] + attr_accessor :deployment_uri + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @runtime_version = args[:runtime_version] if args.key?(:runtime_version) - @last_use_time = args[:last_use_time] if args.key?(:last_use_time) - @description = args[:description] if args.key?(:description) - @deployment_uri = args[:deployment_uri] if args.key?(:deployment_uri) @is_default = args[:is_default] if args.key?(:is_default) @create_time = args[:create_time] if args.key?(:create_time) @manual_scaling = args[:manual_scaling] if args.key?(:manual_scaling) @name = args[:name] if args.key?(:name) - end - end - - # Returns service account information associated with a project. - class GoogleCloudMlV1GetConfigResponse - include Google::Apis::Core::Hashable - - # The project number for `service_account`. - # Corresponds to the JSON property `serviceAccountProject` - # @return [Fixnum] - attr_accessor :service_account_project - - # The service account Cloud ML uses to access resources in the project. - # Corresponds to the JSON property `serviceAccount` - # @return [String] - attr_accessor :service_account - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @service_account_project = args[:service_account_project] if args.key?(:service_account_project) - @service_account = args[:service_account] if args.key?(:service_account) + @last_use_time = args[:last_use_time] if args.key?(:last_use_time) + @runtime_version = args[:runtime_version] if args.key?(:runtime_version) + @description = args[:description] if args.key?(:description) + @deployment_uri = args[:deployment_uri] if args.key?(:deployment_uri) end end @@ -487,6 +235,11 @@ module Google class GoogleCloudMlV1PredictionOutput include Google::Apis::Core::Hashable + # The number of generated predictions. + # Corresponds to the JSON property `predictionCount` + # @return [Fixnum] + attr_accessor :prediction_count + # The number of data instances which resulted in errors. # Corresponds to the JSON property `errorCount` # @return [Fixnum] @@ -502,21 +255,16 @@ module Google # @return [Float] attr_accessor :node_hours - # The number of generated predictions. - # Corresponds to the JSON property `predictionCount` - # @return [Fixnum] - attr_accessor :prediction_count - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @prediction_count = args[:prediction_count] if args.key?(:prediction_count) @error_count = args[:error_count] if args.key?(:error_count) @output_path = args[:output_path] if args.key?(:output_path) @node_hours = args[:node_hours] if args.key?(:node_hours) - @prediction_count = args[:prediction_count] if args.key?(:prediction_count) end end @@ -524,24 +272,24 @@ module Google class GoogleLongrunningListOperationsResponse include Google::Apis::Core::Hashable - # The standard List next-page token. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - # A list of operations that matches the specified filter in the request. # Corresponds to the JSON property `operations` # @return [Array] attr_accessor :operations + # The standard List next-page token. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) @operations = args[:operations] if args.key?(:operations) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) end end @@ -571,6 +319,12 @@ module Google class GoogleCloudMlV1TrainingOutput include Google::Apis::Core::Hashable + # Results for individual Hyperparameter trials. + # Only set for hyperparameter tuning jobs. + # Corresponds to the JSON property `trials` + # @return [Array] + attr_accessor :trials + # The number of hyperparameter tuning trials that completed successfully. # Only set for hyperparameter tuning jobs. # Corresponds to the JSON property `completedTrialCount` @@ -588,22 +342,16 @@ module Google # @return [Float] attr_accessor :consumed_ml_units - # Results for individual Hyperparameter trials. - # Only set for hyperparameter tuning jobs. - # Corresponds to the JSON property `trials` - # @return [Array] - attr_accessor :trials - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @trials = args[:trials] if args.key?(:trials) @completed_trial_count = args[:completed_trial_count] if args.key?(:completed_trial_count) @is_hyperparameter_tuning_job = args[:is_hyperparameter_tuning_job] if args.key?(:is_hyperparameter_tuning_job) @consumed_ml_units = args[:consumed_ml_units] if args.key?(:consumed_ml_units) - @trials = args[:trials] if args.key?(:trials) end end @@ -834,24 +582,24 @@ module Google class GoogleCloudMlV1HyperparameterOutputHyperparameterMetric include Google::Apis::Core::Hashable - # The objective value at this training step. - # Corresponds to the JSON property `objectiveValue` - # @return [Float] - attr_accessor :objective_value - # The global training step for this metric. # Corresponds to the JSON property `trainingStep` # @return [Fixnum] attr_accessor :training_step + # The objective value at this training step. + # Corresponds to the JSON property `objectiveValue` + # @return [Float] + attr_accessor :objective_value + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @objective_value = args[:objective_value] if args.key?(:objective_value) @training_step = args[:training_step] if args.key?(:training_step) + @objective_value = args[:objective_value] if args.key?(:objective_value) end end @@ -1010,6 +758,31 @@ module Google class GoogleCloudMlV1PredictionInput include Google::Apis::Core::Hashable + # Required. The format of the input data files. + # Corresponds to the JSON property `dataFormat` + # @return [String] + attr_accessor :data_format + + # Optional. The Google Cloud ML runtime version to use for this batch + # prediction. If not set, Google Cloud ML will pick the runtime version used + # during the CreateVersion request for this model version, or choose the + # latest stable version when model version information is not available + # such as when the model is specified by uri. + # Corresponds to the JSON property `runtimeVersion` + # @return [String] + attr_accessor :runtime_version + + # Required. The Google Cloud Storage location of the input data files. + # May contain wildcards. + # Corresponds to the JSON property `inputPaths` + # @return [Array] + attr_accessor :input_paths + + # Required. The Google Compute Engine region to run the prediction job in. + # Corresponds to the JSON property `region` + # @return [String] + attr_accessor :region + # Use this field if you want to specify a version of the model to use. The # string is formatted the same way as `model_version`, with the addition # of the version information: @@ -1043,46 +816,21 @@ module Google # @return [String] attr_accessor :uri - # Required. The format of the input data files. - # Corresponds to the JSON property `dataFormat` - # @return [String] - attr_accessor :data_format - - # Optional. The Google Cloud ML runtime version to use for this batch - # prediction. If not set, Google Cloud ML will pick the runtime version used - # during the CreateVersion request for this model version, or choose the - # latest stable version when model version information is not available - # such as when the model is specified by uri. - # Corresponds to the JSON property `runtimeVersion` - # @return [String] - attr_accessor :runtime_version - - # Required. The Google Cloud Storage location of the input data files. - # May contain wildcards. - # Corresponds to the JSON property `inputPaths` - # @return [Array] - attr_accessor :input_paths - - # Required. The Google Compute Engine region to run the prediction job in. - # Corresponds to the JSON property `region` - # @return [String] - attr_accessor :region - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @data_format = args[:data_format] if args.key?(:data_format) + @runtime_version = args[:runtime_version] if args.key?(:runtime_version) + @input_paths = args[:input_paths] if args.key?(:input_paths) + @region = args[:region] if args.key?(:region) @version_name = args[:version_name] if args.key?(:version_name) @model_name = args[:model_name] if args.key?(:model_name) @output_path = args[:output_path] if args.key?(:output_path) @max_worker_count = args[:max_worker_count] if args.key?(:max_worker_count) @uri = args[:uri] if args.key?(:uri) - @data_format = args[:data_format] if args.key?(:data_format) - @runtime_version = args[:runtime_version] if args.key?(:runtime_version) - @input_paths = args[:input_paths] if args.key?(:input_paths) - @region = args[:region] if args.key?(:region) end end @@ -1212,6 +960,22 @@ module Google class GoogleCloudMlV1HyperparameterSpec include Google::Apis::Core::Hashable + # Required. The type of goal to use for tuning. Available types are + # `MAXIMIZE` and `MINIMIZE`. + # Defaults to `MAXIMIZE`. + # Corresponds to the JSON property `goal` + # @return [String] + attr_accessor :goal + + # Optional. The Tensorflow summary tag name to use for optimizing trials. For + # current versions of Tensorflow, this tag name should exactly match what is + # shown in Tensorboard, including all scopes. For versions of Tensorflow + # prior to 0.12, this should be only the tag passed to tf.Summary. + # By default, "training/hptuning/metric" will be used. + # Corresponds to the JSON property `hyperparameterMetricTag` + # @return [String] + attr_accessor :hyperparameter_metric_tag + # Required. The set of parameters to tune. # Corresponds to the JSON property `params` # @return [Array] @@ -1236,33 +1000,17 @@ module Google # @return [Fixnum] attr_accessor :max_parallel_trials - # Required. The type of goal to use for tuning. Available types are - # `MAXIMIZE` and `MINIMIZE`. - # Defaults to `MAXIMIZE`. - # Corresponds to the JSON property `goal` - # @return [String] - attr_accessor :goal - - # Optional. The Tensorflow summary tag name to use for optimizing trials. For - # current versions of Tensorflow, this tag name should exactly match what is - # shown in Tensorboard, including all scopes. For versions of Tensorflow - # prior to 0.12, this should be only the tag passed to tf.Summary. - # By default, "training/hptuning/metric" will be used. - # Corresponds to the JSON property `hyperparameterMetricTag` - # @return [String] - attr_accessor :hyperparameter_metric_tag - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @goal = args[:goal] if args.key?(:goal) + @hyperparameter_metric_tag = args[:hyperparameter_metric_tag] if args.key?(:hyperparameter_metric_tag) @params = args[:params] if args.key?(:params) @max_trials = args[:max_trials] if args.key?(:max_trials) @max_parallel_trials = args[:max_parallel_trials] if args.key?(:max_parallel_trials) - @goal = args[:goal] if args.key?(:goal) - @hyperparameter_metric_tag = args[:hyperparameter_metric_tag] if args.key?(:hyperparameter_metric_tag) end end @@ -1270,25 +1018,25 @@ module Google class GoogleCloudMlV1ListJobsResponse include Google::Apis::Core::Hashable - # The list of jobs. - # Corresponds to the JSON property `jobs` - # @return [Array] - attr_accessor :jobs - # Optional. Pass this token as the `page_token` field of the request for a # subsequent call. # Corresponds to the JSON property `nextPageToken` # @return [String] attr_accessor :next_page_token + # The list of jobs. + # Corresponds to the JSON property `jobs` + # @return [Array] + attr_accessor :jobs + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @jobs = args[:jobs] if args.key?(:jobs) @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @jobs = args[:jobs] if args.key?(:jobs) end end @@ -1343,7 +1091,7 @@ module Google # error message is needed, put the localized message in the error details or # localize it in the client. The optional error details may contain arbitrary # information about the error. There is a predefined set of error detail types - # in the package `google.rpc` which can be used for common error conditions. + # in the package `google.rpc` that can be used for common error conditions. # # Language mapping # The `Status` message is the logical representation of the error model, but it # is not necessarily the actual wire format. When the `Status` message is @@ -1359,7 +1107,7 @@ module Google # it may embed the `Status` in the normal response to indicate the partial # errors. # - Workflow errors. A typical workflow has multiple steps. Each step may - # have a `Status` message for error reporting purpose. + # have a `Status` message for error reporting. # - Batch operations. If a client uses batch request and batch response, the # `Status` message should be used directly inside batch response, one for # each error sub-response. @@ -1409,19 +1157,6 @@ module Google class GoogleCloudMlV1Model include Google::Apis::Core::Hashable - # Optional. The list of regions where the model is going to be deployed. - # Currently only one region per model is supported. - # Defaults to 'us-central1' if nothing is set. - # Note: - # * No matter where a model is deployed, it can always be accessed by - # users from anywhere, both for online and batch prediction. - # * The region for a batch prediction job is set by the region field when - # submitting the batch prediction job and does not take its value from - # this field. - # Corresponds to the JSON property `regions` - # @return [Array] - attr_accessor :regions - # Required. The name specified for the model when it was created. # The model name must be unique within the project it is created in. # Corresponds to the JSON property `name` @@ -1450,17 +1185,30 @@ module Google # @return [Google::Apis::MlV1::GoogleCloudMlV1Version] attr_accessor :default_version + # Optional. The list of regions where the model is going to be deployed. + # Currently only one region per model is supported. + # Defaults to 'us-central1' if nothing is set. + # Note: + # * No matter where a model is deployed, it can always be accessed by + # users from anywhere, both for online and batch prediction. + # * The region for a batch prediction job is set by the region field when + # submitting the batch prediction job and does not take its value from + # this field. + # Corresponds to the JSON property `regions` + # @return [Array] + attr_accessor :regions + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @regions = args[:regions] if args.key?(:regions) @name = args[:name] if args.key?(:name) @description = args[:description] if args.key?(:description) @online_prediction_logging = args[:online_prediction_logging] if args.key?(:online_prediction_logging) @default_version = args[:default_version] if args.key?(:default_version) + @regions = args[:regions] if args.key?(:regions) end end @@ -1483,6 +1231,32 @@ module Google end end + # Response message for the ListVersions method. + class GoogleCloudMlV1ListVersionsResponse + include Google::Apis::Core::Hashable + + # The list of versions. + # Corresponds to the JSON property `versions` + # @return [Array] + attr_accessor :versions + + # Optional. Pass this token as the `page_token` field of the request for a + # subsequent call. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @versions = args[:versions] if args.key?(:versions) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + # Request message for the CancelJob method. class GoogleCloudMlV1CancelJobRequest include Google::Apis::Core::Hashable @@ -1496,32 +1270,6 @@ module Google end end - # Response message for the ListVersions method. - class GoogleCloudMlV1ListVersionsResponse - include Google::Apis::Core::Hashable - - # Optional. Pass this token as the `page_token` field of the request for a - # subsequent call. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # The list of versions. - # Corresponds to the JSON property `versions` - # @return [Array] - attr_accessor :versions - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @versions = args[:versions] if args.key?(:versions) - end - end - # Options for manually scaling a model. class GoogleCloudMlV1beta1ManualScaling include Google::Apis::Core::Hashable @@ -1558,7 +1306,7 @@ module Google # error message is needed, put the localized message in the error details or # localize it in the client. The optional error details may contain arbitrary # information about the error. There is a predefined set of error detail types - # in the package `google.rpc` which can be used for common error conditions. + # in the package `google.rpc` that can be used for common error conditions. # # Language mapping # The `Status` message is the logical representation of the error model, but it # is not necessarily the actual wire format. When the `Status` message is @@ -1574,7 +1322,7 @@ module Google # it may embed the `Status` in the normal response to indicate the partial # errors. # - Workflow errors. A typical workflow has multiple steps. Each step may - # have a `Status` message for error reporting purpose. + # have a `Status` message for error reporting. # - Batch operations. If a client uses batch request and batch response, the # `Status` message should be used directly inside batch response, one for # each error sub-response. @@ -1586,6 +1334,12 @@ module Google class GoogleRpcStatus include Google::Apis::Core::Hashable + # A list of messages that carry the error details. There will be a + # common set of message types for APIs to use. + # Corresponds to the JSON property `details` + # @return [Array>] + attr_accessor :details + # The status code, which should be an enum value of google.rpc.Code. # Corresponds to the JSON property `code` # @return [Fixnum] @@ -1598,11 +1352,32 @@ module Google # @return [String] attr_accessor :message - # A list of messages that carry the error details. There will be a - # common set of message types for APIs to use. - # Corresponds to the JSON property `details` - # @return [Array>] - attr_accessor :details + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @details = args[:details] if args.key?(:details) + @code = args[:code] if args.key?(:code) + @message = args[:message] if args.key?(:message) + end + end + + # Response message for the ListModels method. + class GoogleCloudMlV1ListModelsResponse + include Google::Apis::Core::Hashable + + # The list of models. + # Corresponds to the JSON property `models` + # @return [Array] + attr_accessor :models + + # Optional. Pass this token as the `page_token` field of the request for a + # subsequent call. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token def initialize(**args) update!(**args) @@ -1610,9 +1385,241 @@ module Google # Update properties of this object def update!(**args) - @code = args[:code] if args.key?(:code) - @message = args[:message] if args.key?(:message) - @details = args[:details] if args.key?(:details) + @models = args[:models] if args.key?(:models) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # Represents input parameters for a training job. + class GoogleCloudMlV1TrainingInput + include Google::Apis::Core::Hashable + + # Optional. The Google Cloud ML runtime version to use for training. If not + # set, Google Cloud ML will choose the latest stable version. + # Corresponds to the JSON property `runtimeVersion` + # @return [String] + attr_accessor :runtime_version + + # Required. The Python module name to run after installing the packages. + # Corresponds to the JSON property `pythonModule` + # @return [String] + attr_accessor :python_module + + # Optional. Specifies the type of virtual machine to use for your training + # job's worker nodes. + # The supported values are the same as those described in the entry for + # `masterType`. + # This value must be present when `scaleTier` is set to `CUSTOM` and + # `workerCount` is greater than zero. + # Corresponds to the JSON property `workerType` + # @return [String] + attr_accessor :worker_type + + # Optional. Command line arguments to pass to the program. + # Corresponds to the JSON property `args` + # @return [Array] + attr_accessor :args + + # Required. The Google Compute Engine region to run the training job in. + # Corresponds to the JSON property `region` + # @return [String] + attr_accessor :region + + # Optional. Specifies the type of virtual machine to use for your training + # job's parameter server. + # The supported values are the same as those described in the entry for + # `master_type`. + # This value must be present when `scaleTier` is set to `CUSTOM` and + # `parameter_server_count` is greater than zero. + # Corresponds to the JSON property `parameterServerType` + # @return [String] + attr_accessor :parameter_server_type + + # Required. Specifies the machine types, the number of replicas for workers + # and parameter servers. + # Corresponds to the JSON property `scaleTier` + # @return [String] + attr_accessor :scale_tier + + # 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 + # this field is that Cloud ML validates the path for use in training. + # Corresponds to the JSON property `jobDir` + # @return [String] + attr_accessor :job_dir + + # Represents a set of hyperparameters to optimize. + # Corresponds to the JSON property `hyperparameters` + # @return [Google::Apis::MlV1::GoogleCloudMlV1HyperparameterSpec] + attr_accessor :hyperparameters + + # Optional. The number of parameter server replicas to use for the training + # job. Each replica in the cluster will be of the type specified in + # `parameter_server_type`. + # This value can only be used when `scale_tier` is set to `CUSTOM`.If you + # set this value, you must also set `parameter_server_type`. + # Corresponds to the JSON property `parameterServerCount` + # @return [Fixnum] + attr_accessor :parameter_server_count + + # Required. The Google Cloud Storage location of the packages with + # the training program and any additional dependencies. + # The maximum number of package URIs is 100. + # Corresponds to the JSON property `packageUris` + # @return [Array] + attr_accessor :package_uris + + # Optional. The number of worker replicas to use for the training job. Each + # replica in the cluster will be of the type specified in `worker_type`. + # This value can only be used when `scale_tier` is set to `CUSTOM`. If you + # set this value, you must also set `worker_type`. + # Corresponds to the JSON property `workerCount` + # @return [Fixnum] + attr_accessor :worker_count + + # Optional. Specifies the type of virtual machine to use for your training + # job's master worker. + # The following types are supported: + #
+ #
standard
+ #
+ # A basic machine configuration suitable for training simple models with + # small to moderate datasets. + #
+ #
large_model
+ #
+ # A machine with a lot of memory, specially suited for parameter servers + # when your model is large (having many hidden layers or layers with very + # large numbers of nodes). + #
+ #
complex_model_s
+ #
+ # A machine suitable for the master and workers of the cluster when your + # model requires more computation than the standard machine can handle + # satisfactorily. + #
+ #
complex_model_m
+ #
+ # A machine with roughly twice the number of cores and roughly double the + # memory of complex_model_s. + #
+ #
complex_model_l
+ #
+ # A machine with roughly twice the number of cores and roughly double the + # memory of complex_model_m. + #
+ #
standard_gpu
+ #
+ # A machine equivalent to standard that + # also includes a + # + # GPU that you can use in your trainer. + #
+ #
complex_model_m_gpu
+ #
+ # A machine equivalent to + # complex_model_m that also includes + # four GPUs. + #
+ #
+ # You must set this value when `scaleTier` is set to `CUSTOM`. + # Corresponds to the JSON property `masterType` + # @return [String] + attr_accessor :master_type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @runtime_version = args[:runtime_version] if args.key?(:runtime_version) + @python_module = args[:python_module] if args.key?(:python_module) + @worker_type = args[:worker_type] if args.key?(:worker_type) + @args = args[:args] if args.key?(:args) + @region = args[:region] if args.key?(:region) + @parameter_server_type = args[:parameter_server_type] if args.key?(:parameter_server_type) + @scale_tier = args[:scale_tier] if args.key?(:scale_tier) + @job_dir = args[:job_dir] if args.key?(:job_dir) + @hyperparameters = args[:hyperparameters] if args.key?(:hyperparameters) + @parameter_server_count = args[:parameter_server_count] if args.key?(:parameter_server_count) + @package_uris = args[:package_uris] if args.key?(:package_uris) + @worker_count = args[:worker_count] if args.key?(:worker_count) + @master_type = args[:master_type] if args.key?(:master_type) + end + end + + # Represents a training or prediction job. + class GoogleCloudMlV1Job + include Google::Apis::Core::Hashable + + # Output only. When the job processing was completed. + # Corresponds to the JSON property `endTime` + # @return [String] + attr_accessor :end_time + + # Output only. When the job processing was started. + # Corresponds to the JSON property `startTime` + # @return [String] + attr_accessor :start_time + + # Represents results of a prediction job. + # Corresponds to the JSON property `predictionOutput` + # @return [Google::Apis::MlV1::GoogleCloudMlV1PredictionOutput] + attr_accessor :prediction_output + + # Represents results of a training job. Output only. + # Corresponds to the JSON property `trainingOutput` + # @return [Google::Apis::MlV1::GoogleCloudMlV1TrainingOutput] + attr_accessor :training_output + + # Output only. When the job was created. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # Represents input parameters for a training job. + # Corresponds to the JSON property `trainingInput` + # @return [Google::Apis::MlV1::GoogleCloudMlV1TrainingInput] + attr_accessor :training_input + + # Represents input parameters for a prediction job. + # Corresponds to the JSON property `predictionInput` + # @return [Google::Apis::MlV1::GoogleCloudMlV1PredictionInput] + attr_accessor :prediction_input + + # Output only. The detailed state of a job. + # Corresponds to the JSON property `state` + # @return [String] + attr_accessor :state + + # Output only. The details of a failure or a cancellation. + # Corresponds to the JSON property `errorMessage` + # @return [String] + attr_accessor :error_message + + # Required. The user-specified id of the job. + # Corresponds to the JSON property `jobId` + # @return [String] + attr_accessor :job_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @end_time = args[:end_time] if args.key?(:end_time) + @start_time = args[:start_time] if args.key?(:start_time) + @prediction_output = args[:prediction_output] if args.key?(:prediction_output) + @training_output = args[:training_output] if args.key?(:training_output) + @create_time = args[:create_time] if args.key?(:create_time) + @training_input = args[:training_input] if args.key?(:training_input) + @prediction_input = args[:prediction_input] if args.key?(:prediction_input) + @state = args[:state] if args.key?(:state) + @error_message = args[:error_message] if args.key?(:error_message) + @job_id = args[:job_id] if args.key?(:job_id) end end end diff --git a/generated/google/apis/ml_v1/representations.rb b/generated/google/apis/ml_v1/representations.rb index b18d5d000..9747a453c 100644 --- a/generated/google/apis/ml_v1/representations.rb +++ b/generated/google/apis/ml_v1/representations.rb @@ -22,37 +22,19 @@ module Google module Apis module MlV1 - class GoogleCloudMlV1ListModelsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class GoogleCloudMlV1TrainingInput - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class GoogleCloudMlV1Job - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class GoogleApiHttpBody class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class GoogleCloudMlV1beta1Version + class GoogleCloudMlV1GetConfigResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class GoogleCloudMlV1GetConfigResponse + class GoogleCloudMlV1beta1Version class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -166,13 +148,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class GoogleCloudMlV1CancelJobRequest + class GoogleCloudMlV1ListVersionsResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class GoogleCloudMlV1ListVersionsResponse + class GoogleCloudMlV1CancelJobRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -191,74 +173,29 @@ module Google end class GoogleCloudMlV1ListModelsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :models, as: 'models', class: Google::Apis::MlV1::GoogleCloudMlV1Model, decorator: Google::Apis::MlV1::GoogleCloudMlV1Model::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :next_page_token, as: 'nextPageToken' - end + include Google::Apis::Core::JsonObjectSupport end class GoogleCloudMlV1TrainingInput - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :parameter_server_count, :numeric_string => true, as: 'parameterServerCount' - collection :package_uris, as: 'packageUris' - property :worker_count, :numeric_string => true, as: 'workerCount' - property :master_type, as: 'masterType' - property :runtime_version, as: 'runtimeVersion' - property :python_module, as: 'pythonModule' - property :worker_type, as: 'workerType' - collection :args, as: 'args' - property :region, as: 'region' - property :parameter_server_type, as: 'parameterServerType' - property :scale_tier, as: 'scaleTier' - property :job_dir, as: 'jobDir' - property :hyperparameters, as: 'hyperparameters', class: Google::Apis::MlV1::GoogleCloudMlV1HyperparameterSpec, decorator: Google::Apis::MlV1::GoogleCloudMlV1HyperparameterSpec::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class GoogleCloudMlV1Job - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :training_output, as: 'trainingOutput', class: Google::Apis::MlV1::GoogleCloudMlV1TrainingOutput, decorator: Google::Apis::MlV1::GoogleCloudMlV1TrainingOutput::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :create_time, as: 'createTime' - property :training_input, as: 'trainingInput', class: Google::Apis::MlV1::GoogleCloudMlV1TrainingInput, decorator: Google::Apis::MlV1::GoogleCloudMlV1TrainingInput::Representation - - property :state, as: 'state' - property :prediction_input, as: 'predictionInput', class: Google::Apis::MlV1::GoogleCloudMlV1PredictionInput, decorator: Google::Apis::MlV1::GoogleCloudMlV1PredictionInput::Representation - - property :error_message, as: 'errorMessage' - property :job_id, as: 'jobId' - property :end_time, as: 'endTime' - property :start_time, as: 'startTime' - property :prediction_output, as: 'predictionOutput', class: Google::Apis::MlV1::GoogleCloudMlV1PredictionOutput, decorator: Google::Apis::MlV1::GoogleCloudMlV1PredictionOutput::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class GoogleApiHttpBody # @private class Representation < Google::Apis::Core::JsonRepresentation - property :data, :base64 => true, as: 'data' property :content_type, as: 'contentType' - end - end - - class GoogleCloudMlV1beta1Version - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :runtime_version, as: 'runtimeVersion' - property :last_use_time, as: 'lastUseTime' - property :description, as: 'description' - property :deployment_uri, as: 'deploymentUri' - property :is_default, as: 'isDefault' - property :create_time, as: 'createTime' - property :manual_scaling, as: 'manualScaling', class: Google::Apis::MlV1::GoogleCloudMlV1beta1ManualScaling, decorator: Google::Apis::MlV1::GoogleCloudMlV1beta1ManualScaling::Representation - - property :name, as: 'name' + collection :extensions, as: 'extensions' + property :data, :base64 => true, as: 'data' end end @@ -270,6 +207,21 @@ module Google end end + class GoogleCloudMlV1beta1Version + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :is_default, as: 'isDefault' + property :create_time, as: 'createTime' + property :manual_scaling, as: 'manualScaling', class: Google::Apis::MlV1::GoogleCloudMlV1beta1ManualScaling, decorator: Google::Apis::MlV1::GoogleCloudMlV1beta1ManualScaling::Representation + + property :name, as: 'name' + property :last_use_time, as: 'lastUseTime' + property :runtime_version, as: 'runtimeVersion' + property :description, as: 'description' + property :deployment_uri, as: 'deploymentUri' + end + end + class GoogleCloudMlV1HyperparameterOutput # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -285,19 +237,19 @@ module Google class GoogleCloudMlV1PredictionOutput # @private class Representation < Google::Apis::Core::JsonRepresentation + property :prediction_count, :numeric_string => true, as: 'predictionCount' property :error_count, :numeric_string => true, as: 'errorCount' property :output_path, as: 'outputPath' property :node_hours, as: 'nodeHours' - property :prediction_count, :numeric_string => true, as: 'predictionCount' end end class GoogleLongrunningListOperationsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' collection :operations, as: 'operations', class: Google::Apis::MlV1::GoogleLongrunningOperation, decorator: Google::Apis::MlV1::GoogleLongrunningOperation::Representation + property :next_page_token, as: 'nextPageToken' end end @@ -311,11 +263,11 @@ module Google class GoogleCloudMlV1TrainingOutput # @private class Representation < Google::Apis::Core::JsonRepresentation + collection :trials, as: 'trials', class: Google::Apis::MlV1::GoogleCloudMlV1HyperparameterOutput, decorator: Google::Apis::MlV1::GoogleCloudMlV1HyperparameterOutput::Representation + property :completed_trial_count, :numeric_string => true, as: 'completedTrialCount' property :is_hyperparameter_tuning_job, as: 'isHyperparameterTuningJob' property :consumed_ml_units, as: 'consumedMLUnits' - collection :trials, as: 'trials', class: Google::Apis::MlV1::GoogleCloudMlV1HyperparameterOutput, decorator: Google::Apis::MlV1::GoogleCloudMlV1HyperparameterOutput::Representation - end end @@ -330,8 +282,8 @@ module Google class GoogleCloudMlV1HyperparameterOutputHyperparameterMetric # @private class Representation < Google::Apis::Core::JsonRepresentation - property :objective_value, as: 'objectiveValue' property :training_step, :numeric_string => true, as: 'trainingStep' + property :objective_value, as: 'objectiveValue' end end @@ -366,15 +318,15 @@ module Google class GoogleCloudMlV1PredictionInput # @private class Representation < Google::Apis::Core::JsonRepresentation + property :data_format, as: 'dataFormat' + property :runtime_version, as: 'runtimeVersion' + collection :input_paths, as: 'inputPaths' + property :region, as: 'region' property :version_name, as: 'versionName' property :model_name, as: 'modelName' property :output_path, as: 'outputPath' property :max_worker_count, :numeric_string => true, as: 'maxWorkerCount' property :uri, as: 'uri' - property :data_format, as: 'dataFormat' - property :runtime_version, as: 'runtimeVersion' - collection :input_paths, as: 'inputPaths' - property :region, as: 'region' end end @@ -409,21 +361,21 @@ module Google class GoogleCloudMlV1HyperparameterSpec # @private class Representation < Google::Apis::Core::JsonRepresentation + property :goal, as: 'goal' + property :hyperparameter_metric_tag, as: 'hyperparameterMetricTag' collection :params, as: 'params', class: Google::Apis::MlV1::GoogleCloudMlV1ParameterSpec, decorator: Google::Apis::MlV1::GoogleCloudMlV1ParameterSpec::Representation property :max_trials, as: 'maxTrials' property :max_parallel_trials, as: 'maxParallelTrials' - property :goal, as: 'goal' - property :hyperparameter_metric_tag, as: 'hyperparameterMetricTag' end end class GoogleCloudMlV1ListJobsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' collection :jobs, as: 'jobs', class: Google::Apis::MlV1::GoogleCloudMlV1Job, decorator: Google::Apis::MlV1::GoogleCloudMlV1Job::Representation - property :next_page_token, as: 'nextPageToken' end end @@ -448,12 +400,12 @@ module Google class GoogleCloudMlV1Model # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :regions, as: 'regions' property :name, as: 'name' property :description, as: 'description' property :online_prediction_logging, as: 'onlinePredictionLogging' property :default_version, as: 'defaultVersion', class: Google::Apis::MlV1::GoogleCloudMlV1Version, decorator: Google::Apis::MlV1::GoogleCloudMlV1Version::Representation + collection :regions, as: 'regions' end end @@ -463,18 +415,18 @@ module Google end end - class GoogleCloudMlV1CancelJobRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end - end - class GoogleCloudMlV1ListVersionsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' collection :versions, as: 'versions', class: Google::Apis::MlV1::GoogleCloudMlV1Version, decorator: Google::Apis::MlV1::GoogleCloudMlV1Version::Representation + property :next_page_token, as: 'nextPageToken' + end + end + + class GoogleCloudMlV1CancelJobRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation end end @@ -488,9 +440,58 @@ module Google class GoogleRpcStatus # @private class Representation < Google::Apis::Core::JsonRepresentation + collection :details, as: 'details' property :code, as: 'code' property :message, as: 'message' - collection :details, as: 'details' + end + end + + class GoogleCloudMlV1ListModelsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :models, as: 'models', class: Google::Apis::MlV1::GoogleCloudMlV1Model, decorator: Google::Apis::MlV1::GoogleCloudMlV1Model::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class GoogleCloudMlV1TrainingInput + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :runtime_version, as: 'runtimeVersion' + property :python_module, as: 'pythonModule' + property :worker_type, as: 'workerType' + collection :args, as: 'args' + property :region, as: 'region' + property :parameter_server_type, as: 'parameterServerType' + property :scale_tier, as: 'scaleTier' + property :job_dir, as: 'jobDir' + property :hyperparameters, as: 'hyperparameters', class: Google::Apis::MlV1::GoogleCloudMlV1HyperparameterSpec, decorator: Google::Apis::MlV1::GoogleCloudMlV1HyperparameterSpec::Representation + + property :parameter_server_count, :numeric_string => true, as: 'parameterServerCount' + collection :package_uris, as: 'packageUris' + property :worker_count, :numeric_string => true, as: 'workerCount' + property :master_type, as: 'masterType' + end + end + + class GoogleCloudMlV1Job + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :end_time, as: 'endTime' + property :start_time, as: 'startTime' + property :prediction_output, as: 'predictionOutput', class: Google::Apis::MlV1::GoogleCloudMlV1PredictionOutput, decorator: Google::Apis::MlV1::GoogleCloudMlV1PredictionOutput::Representation + + property :training_output, as: 'trainingOutput', class: Google::Apis::MlV1::GoogleCloudMlV1TrainingOutput, decorator: Google::Apis::MlV1::GoogleCloudMlV1TrainingOutput::Representation + + property :create_time, as: 'createTime' + property :training_input, as: 'trainingInput', class: Google::Apis::MlV1::GoogleCloudMlV1TrainingInput, decorator: Google::Apis::MlV1::GoogleCloudMlV1TrainingInput::Representation + + property :prediction_input, as: 'predictionInput', class: Google::Apis::MlV1::GoogleCloudMlV1PredictionInput, decorator: Google::Apis::MlV1::GoogleCloudMlV1PredictionInput::Representation + + property :state, as: 'state' + property :error_message, as: 'errorMessage' + property :job_id, as: 'jobId' end end end diff --git a/generated/google/apis/ml_v1/service.rb b/generated/google/apis/ml_v1/service.rb index 5e6d70886..4583501b5 100644 --- a/generated/google/apis/ml_v1/service.rb +++ b/generated/google/apis/ml_v1/service.rb @@ -47,51 +47,17 @@ module Google @batch_path = 'batch' end - # Get the service account information associated with your project. You need - # this information in order to grant the service account persmissions for - # the Google Cloud Storage location where you put your model training code - # for training the model with Google Cloud Machine Learning. - # @param [String] name - # Required. The project name. - # Authorization: requires `Viewer` role on the specified project. - # @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::MlV1::GoogleCloudMlV1GetConfigResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MlV1::GoogleCloudMlV1GetConfigResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_project_config(name, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/{+name}:getConfig', options) - command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1GetConfigResponse::Representation - command.response_class = Google::Apis::MlV1::GoogleCloudMlV1GetConfigResponse - command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - # Performs prediction on the data in the request. # **** REMOVE FROM GENERATED DOCUMENTATION # @param [String] name # Required. The resource name of a model or a version. # Authorization: requires `Viewer` role on the parent project. # @param [Google::Apis::MlV1::GoogleCloudMlV1PredictRequest] google_cloud_ml_v1__predict_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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -104,15 +70,49 @@ 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 predict_project(name, google_cloud_ml_v1__predict_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def predict_project(name, google_cloud_ml_v1__predict_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:predict', options) command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1PredictRequest::Representation command.request_object = google_cloud_ml_v1__predict_request_object command.response_representation = Google::Apis::MlV1::GoogleApiHttpBody::Representation command.response_class = Google::Apis::MlV1::GoogleApiHttpBody command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Get the service account information associated with your project. You need + # this information in order to grant the service account persmissions for + # the Google Cloud Storage location where you put your model training code + # for training the model with Google Cloud Machine Learning. + # @param [String] name + # Required. The project name. + # Authorization: requires `Viewer` role on the specified project. + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MlV1::GoogleCloudMlV1GetConfigResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MlV1::GoogleCloudMlV1GetConfigResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_config(name, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}:getConfig', options) + command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1GetConfigResponse::Representation + command.response_class = Google::Apis::MlV1::GoogleCloudMlV1GetConfigResponse + command.params['name'] = name unless name.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -128,11 +128,11 @@ module Google # corresponding to `Code.CANCELLED`. # @param [String] name # The name of the operation resource to be cancelled. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -145,13 +145,13 @@ 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 cancel_project_operation(name, fields: nil, quota_user: nil, options: nil, &block) + def cancel_project_operation(name, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:cancel', options) command.response_representation = Google::Apis::MlV1::GoogleProtobufEmpty::Representation command.response_class = Google::Apis::MlV1::GoogleProtobufEmpty command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -161,11 +161,11 @@ module Google # `google.rpc.Code.UNIMPLEMENTED`. # @param [String] name # The name of the operation resource to be deleted. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -178,13 +178,13 @@ 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 delete_project_operation(name, fields: nil, quota_user: nil, options: nil, &block) + def delete_project_operation(name, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', options) command.response_representation = Google::Apis::MlV1::GoogleProtobufEmpty::Representation command.response_class = Google::Apis::MlV1::GoogleProtobufEmpty command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -194,17 +194,17 @@ module Google # to use different resource name schemes, such as `users/*/operations`. # @param [String] name # The name of the operation collection. + # @param [String] filter + # The standard list filter. # @param [String] page_token # The standard list page token. # @param [Fixnum] page_size # The standard list page size. - # @param [String] filter - # The standard list filter. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -217,16 +217,16 @@ 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_project_operations(name, page_token: nil, page_size: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_project_operations(name, filter: nil, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}/operations', options) command.response_representation = Google::Apis::MlV1::GoogleLongrunningListOperationsResponse::Representation command.response_class = Google::Apis::MlV1::GoogleLongrunningListOperationsResponse command.params['name'] = name unless name.nil? + command.query['filter'] = filter unless filter.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? - command.query['filter'] = filter unless filter.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -235,11 +235,11 @@ module Google # service. # @param [String] name # The name of the operation resource. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -252,13 +252,13 @@ 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 get_project_operation(name, fields: nil, quota_user: nil, options: nil, &block) + def get_project_operation(name, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', options) command.response_representation = Google::Apis::MlV1::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::MlV1::GoogleLongrunningOperation command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -277,11 +277,11 @@ module Google # are more remaining results than this number, the response message will # contain a valid value in the `next_page_token` field. # The default value is 20, and the maximum page size is 100. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -294,15 +294,15 @@ 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_project_models(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_project_models(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/models', options) command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1ListModelsResponse::Representation command.response_class = Google::Apis::MlV1::GoogleCloudMlV1ListModelsResponse command.params['parent'] = parent unless parent.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -312,11 +312,11 @@ module Google # @param [String] name # Required. The name of the model. # Authorization: requires `Viewer` role on the parent project. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -329,13 +329,13 @@ 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 get_project_model(name, fields: nil, quota_user: nil, options: nil, &block) + def get_project_model(name, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', options) command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1Model::Representation command.response_class = Google::Apis::MlV1::GoogleCloudMlV1Model command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -348,11 +348,11 @@ module Google # Required. The project name. # Authorization: requires `Editor` role on the specified project. # @param [Google::Apis::MlV1::GoogleCloudMlV1Model] google_cloud_ml_v1__model_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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -365,15 +365,15 @@ 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 create_project_model(parent, google_cloud_ml_v1__model_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def create_project_model(parent, google_cloud_ml_v1__model_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/models', options) command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1Model::Representation command.request_object = google_cloud_ml_v1__model_object command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1Model::Representation command.response_class = Google::Apis::MlV1::GoogleCloudMlV1Model command.params['parent'] = parent unless parent.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -385,11 +385,11 @@ module Google # @param [String] name # Required. The name of the model. # Authorization: requires `Editor` role on the parent project. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -402,96 +402,13 @@ 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 delete_project_model(name, fields: nil, quota_user: nil, options: nil, &block) + def delete_project_model(name, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', options) command.response_representation = Google::Apis::MlV1::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::MlV1::GoogleLongrunningOperation command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Creates a new version of a model from a trained TensorFlow model. - # If the version created in the cloud by this call is the first deployed - # version of the specified model, it will be made the default version of the - # model. When you add a version to a model that already has one or more - # versions, the default version does not automatically change. If you want a - # new version to be the default, you must call - # [projects.models.versions.setDefault](/ml-engine/reference/rest/v1/projects. - # models.versions/setDefault). - # @param [String] parent - # Required. The name of the model. - # Authorization: requires `Editor` role on the parent project. - # @param [Google::Apis::MlV1::GoogleCloudMlV1Version] google_cloud_ml_v1__version_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::MlV1::GoogleLongrunningOperation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MlV1::GoogleLongrunningOperation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_project_model_version(parent, google_cloud_ml_v1__version_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+parent}/versions', options) - command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1Version::Representation - command.request_object = google_cloud_ml_v1__version_object - command.response_representation = Google::Apis::MlV1::GoogleLongrunningOperation::Representation - command.response_class = Google::Apis::MlV1::GoogleLongrunningOperation - command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Designates a version to be the default for the model. - # The default version is used for prediction requests made against the model - # that don't specify a version. - # The first version to be created for a model is automatically set as the - # default. You must make any subsequent changes to the default version - # setting manually using this method. - # @param [String] name - # Required. The name of the version to make the default for the model. You - # can get the names of all the versions of a model by calling - # [projects.models.versions.list](/ml-engine/reference/rest/v1/projects.models. - # versions/list). - # Authorization: requires `Editor` role on the parent project. - # @param [Google::Apis::MlV1::GoogleCloudMlV1SetDefaultVersionRequest] google_cloud_ml_v1__set_default_version_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::MlV1::GoogleCloudMlV1Version] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MlV1::GoogleCloudMlV1Version] - # - # @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_project_model_version_default(name, google_cloud_ml_v1__set_default_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+name}:setDefault', options) - command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1SetDefaultVersionRequest::Representation - command.request_object = google_cloud_ml_v1__set_default_version_request_object - command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1Version::Representation - command.response_class = Google::Apis::MlV1::GoogleCloudMlV1Version - command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -506,11 +423,11 @@ module Google # [projects.models.versions.list](/ml-engine/reference/rest/v1/projects.models. # versions/list). # Authorization: requires `Editor` role on the parent project. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -523,13 +440,13 @@ 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 delete_project_model_version(name, fields: nil, quota_user: nil, options: nil, &block) + def delete_project_model_version(name, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', options) command.response_representation = Google::Apis::MlV1::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::MlV1::GoogleLongrunningOperation command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -549,11 +466,11 @@ module Google # there are more remaining results than this number, the response message # will contain a valid value in the `next_page_token` field. # The default value is 20, and the maximum page size is 100. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -566,15 +483,15 @@ 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_project_model_versions(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_project_model_versions(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/versions', options) command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1ListVersionsResponse::Representation command.response_class = Google::Apis::MlV1::GoogleCloudMlV1ListVersionsResponse command.params['parent'] = parent unless parent.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -587,11 +504,11 @@ module Google # @param [String] name # Required. The name of the version. # Authorization: requires `Viewer` role on the parent project. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -604,47 +521,96 @@ 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 get_project_model_version(name, fields: nil, quota_user: nil, options: nil, &block) + def get_project_model_version(name, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', options) command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1Version::Representation command.response_class = Google::Apis::MlV1::GoogleCloudMlV1Version command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end - # Creates a training or a batch prediction job. + # Creates a new version of a model from a trained TensorFlow model. + # If the version created in the cloud by this call is the first deployed + # version of the specified model, it will be made the default version of the + # model. When you add a version to a model that already has one or more + # versions, the default version does not automatically change. If you want a + # new version to be the default, you must call + # [projects.models.versions.setDefault](/ml-engine/reference/rest/v1/projects. + # models.versions/setDefault). # @param [String] parent - # Required. The project name. - # Authorization: requires `Editor` role on the specified project. - # @param [Google::Apis::MlV1::GoogleCloudMlV1Job] google_cloud_ml_v1__job_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. + # Required. The name of the model. + # Authorization: requires `Editor` role on the parent project. + # @param [Google::Apis::MlV1::GoogleCloudMlV1Version] google_cloud_ml_v1__version_object # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::MlV1::GoogleCloudMlV1Job] parsed result object + # @yieldparam result [Google::Apis::MlV1::GoogleLongrunningOperation] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::MlV1::GoogleCloudMlV1Job] + # @return [Google::Apis::MlV1::GoogleLongrunningOperation] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_project_job(parent, google_cloud_ml_v1__job_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+parent}/jobs', options) - command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1Job::Representation - command.request_object = google_cloud_ml_v1__job_object - command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1Job::Representation - command.response_class = Google::Apis::MlV1::GoogleCloudMlV1Job + def create_project_model_version(parent, google_cloud_ml_v1__version_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+parent}/versions', options) + command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1Version::Representation + command.request_object = google_cloud_ml_v1__version_object + command.response_representation = Google::Apis::MlV1::GoogleLongrunningOperation::Representation + command.response_class = Google::Apis::MlV1::GoogleLongrunningOperation command.params['parent'] = parent unless parent.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Designates a version to be the default for the model. + # The default version is used for prediction requests made against the model + # that don't specify a version. + # The first version to be created for a model is automatically set as the + # default. You must make any subsequent changes to the default version + # setting manually using this method. + # @param [String] name + # Required. The name of the version to make the default for the model. You + # can get the names of all the versions of a model by calling + # [projects.models.versions.list](/ml-engine/reference/rest/v1/projects.models. + # versions/list). + # Authorization: requires `Editor` role on the parent project. + # @param [Google::Apis::MlV1::GoogleCloudMlV1SetDefaultVersionRequest] google_cloud_ml_v1__set_default_version_request_object + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MlV1::GoogleCloudMlV1Version] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MlV1::GoogleCloudMlV1Version] + # + # @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_project_model_version_default(name, google_cloud_ml_v1__set_default_version_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+name}:setDefault', options) + command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1SetDefaultVersionRequest::Representation + command.request_object = google_cloud_ml_v1__set_default_version_request_object + command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1Version::Representation + command.response_class = Google::Apis::MlV1::GoogleCloudMlV1Version + command.params['name'] = name unless name.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -653,11 +619,11 @@ module Google # Required. The name of the job to cancel. # Authorization: requires `Editor` role on the parent project. # @param [Google::Apis::MlV1::GoogleCloudMlV1CancelJobRequest] google_cloud_ml_v1__cancel_job_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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -670,15 +636,15 @@ 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 cancel_project_job(name, google_cloud_ml_v1__cancel_job_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def cancel_project_job(name, google_cloud_ml_v1__cancel_job_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:cancel', options) command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1CancelJobRequest::Representation command.request_object = google_cloud_ml_v1__cancel_job_request_object command.response_representation = Google::Apis::MlV1::GoogleProtobufEmpty::Representation command.response_class = Google::Apis::MlV1::GoogleProtobufEmpty command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -686,10 +652,6 @@ module Google # @param [String] parent # Required. The name of the project for which to list jobs. # Authorization: requires `Viewer` role on the specified project. - # @param [String] page_token - # Optional. A page token to request the next page of results. - # You get the token from the `next_page_token` field of the response from - # the previous call. # @param [Fixnum] page_size # Optional. The number of jobs to retrieve per "page" of results. If there # are more remaining results than this number, the response message will @@ -697,11 +659,15 @@ module Google # The default value is 20, and the maximum page size is 100. # @param [String] filter # Optional. Specifies the subset of jobs to retrieve. - # @param [String] fields - # Selector specifying which fields to include in a partial response. + # @param [String] page_token + # Optional. A page token to request the next page of results. + # You get the token from the `next_page_token` field of the response from + # the previous call. # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -714,16 +680,16 @@ 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_project_jobs(parent, page_token: nil, page_size: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_project_jobs(parent, page_size: nil, filter: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/jobs', options) command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1ListJobsResponse::Representation command.response_class = Google::Apis::MlV1::GoogleCloudMlV1ListJobsResponse command.params['parent'] = parent unless parent.nil? - command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['filter'] = filter unless filter.nil? - command.query['fields'] = fields unless fields.nil? + command.query['pageToken'] = page_token unless page_token.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -731,11 +697,11 @@ module Google # @param [String] name # Required. The name of the job to get the description of. # Authorization: requires `Viewer` role on the parent project. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -748,13 +714,47 @@ 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 get_project_job(name, fields: nil, quota_user: nil, options: nil, &block) + def get_project_job(name, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', options) command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1Job::Representation command.response_class = Google::Apis::MlV1::GoogleCloudMlV1Job command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Creates a training or a batch prediction job. + # @param [String] parent + # Required. The project name. + # Authorization: requires `Editor` role on the specified project. + # @param [Google::Apis::MlV1::GoogleCloudMlV1Job] google_cloud_ml_v1__job_object + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MlV1::GoogleCloudMlV1Job] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MlV1::GoogleCloudMlV1Job] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_project_job(parent, google_cloud_ml_v1__job_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+parent}/jobs', options) + command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1Job::Representation + command.request_object = google_cloud_ml_v1__job_object + command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1Job::Representation + command.response_class = Google::Apis::MlV1::GoogleCloudMlV1Job + command.params['parent'] = parent unless parent.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end diff --git a/generated/google/apis/monitoring_v3.rb b/generated/google/apis/monitoring_v3.rb index 42746a18d..fb9922af8 100644 --- a/generated/google/apis/monitoring_v3.rb +++ b/generated/google/apis/monitoring_v3.rb @@ -27,7 +27,7 @@ module Google # @see https://cloud.google.com/monitoring/api/ module MonitoringV3 VERSION = 'V3' - REVISION = '20170424' + REVISION = '20170522' # View and write monitoring data for all of your Google and third-party Cloud and API projects AUTH_MONITORING = 'https://www.googleapis.com/auth/monitoring' diff --git a/generated/google/apis/monitoring_v3/classes.rb b/generated/google/apis/monitoring_v3/classes.rb index c06941d86..cef29d10e 100644 --- a/generated/google/apis/monitoring_v3/classes.rb +++ b/generated/google/apis/monitoring_v3/classes.rb @@ -22,6 +22,608 @@ module Google module Apis module MonitoringV3 + # A single strongly-typed value. + class TypedValue + include Google::Apis::Core::Hashable + + # A 64-bit integer. Its range is approximately ±9.2x1018. + # Corresponds to the JSON property `int64Value` + # @return [Fixnum] + attr_accessor :int64_value + + # Distribution contains summary statistics for a population of values. It + # optionally contains a histogram representing the distribution of those values + # across a set of buckets.The summary statistics are the count, mean, sum of the + # squared deviation from the mean, the minimum, and the maximum of the set of + # population of values. The histogram is based on a sequence of buckets and + # gives a count of values that fall into each bucket. The boundaries of the + # buckets are given either explicitly or by formulas for buckets of fixed or + # exponentially increasing widths.Although it is not forbidden, it is generally + # a bad idea to include non-finite values (infinities or NaNs) in the population + # of values, as this will render the mean and sum_of_squared_deviation fields + # meaningless. + # Corresponds to the JSON property `distributionValue` + # @return [Google::Apis::MonitoringV3::Distribution] + attr_accessor :distribution_value + + # A Boolean value: true or false. + # Corresponds to the JSON property `boolValue` + # @return [Boolean] + attr_accessor :bool_value + alias_method :bool_value?, :bool_value + + # A variable-length string value. + # Corresponds to the JSON property `stringValue` + # @return [String] + attr_accessor :string_value + + # A 64-bit double-precision floating-point number. Its magnitude is + # approximately ±10±300 and it has 16 significant + # digits of precision. + # Corresponds to the JSON property `doubleValue` + # @return [Float] + attr_accessor :double_value + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @int64_value = args[:int64_value] if args.key?(:int64_value) + @distribution_value = args[:distribution_value] if args.key?(:distribution_value) + @bool_value = args[:bool_value] if args.key?(:bool_value) + @string_value = args[:string_value] if args.key?(:string_value) + @double_value = args[:double_value] if args.key?(:double_value) + end + end + + # A collection of data points sent from a collectd-based plugin. See the + # collectd documentation for more information. + class CollectdPayload + include Google::Apis::Core::Hashable + + # The measurement type instance. Example: "used". + # Corresponds to the JSON property `typeInstance` + # @return [String] + attr_accessor :type_instance + + # The measurement metadata. Example: "process_id" -> 12345 + # Corresponds to the JSON property `metadata` + # @return [Hash] + attr_accessor :metadata + + # The measurement type. Example: "memory". + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # The name of the plugin. Example: "disk". + # Corresponds to the JSON property `plugin` + # @return [String] + attr_accessor :plugin + + # The instance name of the plugin Example: "hdcl". + # Corresponds to the JSON property `pluginInstance` + # @return [String] + attr_accessor :plugin_instance + + # The end time of the interval. + # Corresponds to the JSON property `endTime` + # @return [String] + attr_accessor :end_time + + # The start time of the interval. + # Corresponds to the JSON property `startTime` + # @return [String] + attr_accessor :start_time + + # The measured values during this time interval. Each value must have a + # different dataSourceName. + # Corresponds to the JSON property `values` + # @return [Array] + attr_accessor :values + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @type_instance = args[:type_instance] if args.key?(:type_instance) + @metadata = args[:metadata] if args.key?(:metadata) + @type = args[:type] if args.key?(:type) + @plugin = args[:plugin] if args.key?(:plugin) + @plugin_instance = args[:plugin_instance] if args.key?(:plugin_instance) + @end_time = args[:end_time] if args.key?(:end_time) + @start_time = args[:start_time] if args.key?(:start_time) + @values = args[:values] if args.key?(:values) + end + end + + # Specifies a linear sequence of buckets that all have the same width (except + # overflow and underflow). Each bucket represents a constant absolute + # uncertainty on the specific value in the bucket.There are num_finite_buckets + + # 2 (= N) buckets. Bucket i has the following boundaries:Upper bound (0 <= i < N- + # 1): offset + (width * i). Lower bound (1 <= i < N): offset + (width * (i - 1)) + # . + class Linear + include Google::Apis::Core::Hashable + + # Must be greater than 0. + # Corresponds to the JSON property `numFiniteBuckets` + # @return [Fixnum] + attr_accessor :num_finite_buckets + + # Must be greater than 0. + # Corresponds to the JSON property `width` + # @return [Float] + attr_accessor :width + + # Lower bound of the first bucket. + # Corresponds to the JSON property `offset` + # @return [Float] + attr_accessor :offset + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @num_finite_buckets = args[:num_finite_buckets] if args.key?(:num_finite_buckets) + @width = args[:width] if args.key?(:width) + @offset = args[:offset] if args.key?(:offset) + end + end + + # A protocol buffer option, which can be attached to a message, field, + # enumeration, etc. + class Option + include Google::Apis::Core::Hashable + + # The option's name. For protobuf built-in options (options defined in + # descriptor.proto), this is the short name. For example, "map_entry". For + # custom options, it should be the fully-qualified name. For example, "google. + # api.http". + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The option's value packed in an Any message. If the value is a primitive, the + # corresponding wrapper type defined in google/protobuf/wrappers.proto should be + # used. If the value is an enum, it should be stored as an int32 value using the + # google.protobuf.Int32Value type. + # Corresponds to the JSON property `value` + # @return [Hash] + attr_accessor :value + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @name = args[:name] if args.key?(:name) + @value = args[:value] if args.key?(:value) + end + end + + # A generic empty message that you can re-use to avoid defining duplicated empty + # messages in your APIs. A typical example is to use it as the request or the + # response type of an API method. For instance: + # service Foo ` + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # ` + # The JSON representation for Empty is empty JSON object ``. + class Empty + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Specifies a set of buckets with arbitrary widths.There are size(bounds) + 1 (= + # N) buckets. Bucket i has the following boundaries:Upper bound (0 <= i < N-1): + # boundsi Lower bound (1 <= i < N); boundsi - 1The bounds field must contain at + # least one element. If bounds has only one element, then there are no finite + # buckets, and that single element is the common boundary of the overflow and + # underflow buckets. + class Explicit + include Google::Apis::Core::Hashable + + # The values must be monotonically increasing. + # Corresponds to the JSON property `bounds` + # @return [Array] + attr_accessor :bounds + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @bounds = args[:bounds] if args.key?(:bounds) + end + end + + # A time interval extending just after a start time through an end time. If the + # start time is the same as the end time, then the interval represents a single + # point in time. + class TimeInterval + include Google::Apis::Core::Hashable + + # Required. The end of the time interval. + # Corresponds to the JSON property `endTime` + # @return [String] + attr_accessor :end_time + + # Optional. The beginning of the time interval. The default value for the start + # time is the end time. The start time must not be later than the end time. + # Corresponds to the JSON property `startTime` + # @return [String] + attr_accessor :start_time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @end_time = args[:end_time] if args.key?(:end_time) + @start_time = args[:start_time] if args.key?(:start_time) + end + end + + # Specifies an exponential sequence of buckets that have a width that is + # proportional to the value of the lower bound. Each bucket represents a + # constant relative uncertainty on a specific value in the bucket.There are + # num_finite_buckets + 2 (= N) buckets. Bucket i has the following boundaries: + # Upper bound (0 <= i < N-1): scale * (growth_factor ^ i). Lower bound (1 <= i < + # N): scale * (growth_factor ^ (i - 1)). + class Exponential + include Google::Apis::Core::Hashable + + # Must be greater than 1. + # Corresponds to the JSON property `growthFactor` + # @return [Float] + attr_accessor :growth_factor + + # Must be greater than 0. + # Corresponds to the JSON property `scale` + # @return [Float] + attr_accessor :scale + + # Must be greater than 0. + # Corresponds to the JSON property `numFiniteBuckets` + # @return [Fixnum] + attr_accessor :num_finite_buckets + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @growth_factor = args[:growth_factor] if args.key?(:growth_factor) + @scale = args[:scale] if args.key?(:scale) + @num_finite_buckets = args[:num_finite_buckets] if args.key?(:num_finite_buckets) + end + end + + # A single data point in a time series. + class Point + include Google::Apis::Core::Hashable + + # A single strongly-typed value. + # Corresponds to the JSON property `value` + # @return [Google::Apis::MonitoringV3::TypedValue] + attr_accessor :value + + # A time interval extending just after a start time through an end time. If the + # start time is the same as the end time, then the interval represents a single + # point in time. + # Corresponds to the JSON property `interval` + # @return [Google::Apis::MonitoringV3::TimeInterval] + attr_accessor :interval + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @value = args[:value] if args.key?(:value) + @interval = args[:interval] if args.key?(:interval) + end + end + + # A specific metric, identified by specifying values for all of the labels of a + # MetricDescriptor. + class Metric + include Google::Apis::Core::Hashable + + # An existing metric type, see google.api.MetricDescriptor. For example, custom. + # googleapis.com/invoice/paid/amount. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # The set of label values that uniquely identify this metric. All labels listed + # in the MetricDescriptor must be assigned values. + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @type = args[:type] if args.key?(:type) + @labels = args[:labels] if args.key?(:labels) + end + end + + # A single field of a message type. + class Field + include Google::Apis::Core::Hashable + + # The field JSON name. + # Corresponds to the JSON property `jsonName` + # @return [String] + attr_accessor :json_name + + # The field type. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # The protocol buffer options. + # Corresponds to the JSON property `options` + # @return [Array] + attr_accessor :options + + # The index of the field type in Type.oneofs, for message or enumeration types. + # The first type has index 1; zero means the type is not in the list. + # Corresponds to the JSON property `oneofIndex` + # @return [Fixnum] + attr_accessor :oneof_index + + # The field cardinality. + # Corresponds to the JSON property `cardinality` + # @return [String] + attr_accessor :cardinality + + # Whether to use alternative packed wire representation. + # Corresponds to the JSON property `packed` + # @return [Boolean] + attr_accessor :packed + alias_method :packed?, :packed + + # The string value of the default value of this field. Proto2 syntax only. + # Corresponds to the JSON property `defaultValue` + # @return [String] + attr_accessor :default_value + + # The field name. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The field type URL, without the scheme, for message or enumeration types. + # Example: "type.googleapis.com/google.protobuf.Timestamp". + # Corresponds to the JSON property `typeUrl` + # @return [String] + attr_accessor :type_url + + # The field number. + # Corresponds to the JSON property `number` + # @return [Fixnum] + attr_accessor :number + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @json_name = args[:json_name] if args.key?(:json_name) + @kind = args[:kind] if args.key?(:kind) + @options = args[:options] if args.key?(:options) + @oneof_index = args[:oneof_index] if args.key?(:oneof_index) + @cardinality = args[:cardinality] if args.key?(:cardinality) + @packed = args[:packed] if args.key?(:packed) + @default_value = args[:default_value] if args.key?(:default_value) + @name = args[:name] if args.key?(:name) + @type_url = args[:type_url] if args.key?(:type_url) + @number = args[:number] if args.key?(:number) + end + end + + # The ListTimeSeries response. + class ListTimeSeriesResponse + include Google::Apis::Core::Hashable + + # One or more time series that match the filter included in the request. + # Corresponds to the JSON property `timeSeries` + # @return [Array] + attr_accessor :time_series + + # If there are more results than have been returned, then this field is set to a + # non-empty value. To see the additional results, use that value as pageToken in + # the next call to this method. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @time_series = args[:time_series] if args.key?(:time_series) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # A description of a label. + class LabelDescriptor + include Google::Apis::Core::Hashable + + # The label key. + # Corresponds to the JSON property `key` + # @return [String] + attr_accessor :key + + # A human-readable description for the label. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # The type of data that can be assigned to the label. + # Corresponds to the JSON property `valueType` + # @return [String] + attr_accessor :value_type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @key = args[:key] if args.key?(:key) + @description = args[:description] if args.key?(:description) + @value_type = args[:value_type] if args.key?(:value_type) + end + end + + # The description of a dynamic collection of monitored resources. Each group has + # a filter that is matched against monitored resources and their associated + # metadata. If a group's filter matches an available monitored resource, then + # that resource is a member of that group. Groups can contain any number of + # monitored resources, and each monitored resource can be a member of any number + # of groups.Groups can be nested in parent-child hierarchies. The parentName + # field identifies an optional parent for each group. If a group has a parent, + # then the only monitored resources available to be matched by the group's + # filter are the resources contained in the parent group. In other words, a + # group contains the monitored resources that match its filter and the filters + # of all the group's ancestors. A group without a parent can contain any + # monitored resource.For example, consider an infrastructure running a set of + # instances with two user-defined tags: "environment" and "role". A parent group + # has a filter, environment="production". A child of that parent group has a + # filter, role="transcoder". The parent group contains all instances in the + # production environment, regardless of their roles. The child group contains + # instances that have the transcoder role and are in the production environment. + # The monitored resources contained in a group can change at any moment, + # depending on what resources exist and what filters are associated with the + # group and its ancestors. + class Group + include Google::Apis::Core::Hashable + + # A user-assigned name for this group, used only for display purposes. + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # If true, the members of this group are considered to be a cluster. The system + # can perform additional analysis on groups that are clusters. + # Corresponds to the JSON property `isCluster` + # @return [Boolean] + attr_accessor :is_cluster + alias_method :is_cluster?, :is_cluster + + # The filter used to determine which monitored resources belong to this group. + # Corresponds to the JSON property `filter` + # @return [String] + attr_accessor :filter + + # Output only. The name of this group. The format is "projects/` + # project_id_or_number`/groups/`group_id`". When creating a group, this field is + # ignored and a new name is created consisting of the project specified in the + # call to CreateGroup and a unique `group_id` that is generated automatically. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The name of the group's parent, if it has one. The format is "projects/` + # project_id_or_number`/groups/`group_id`". For groups with no parent, + # parentName is the empty string, "". + # Corresponds to the JSON property `parentName` + # @return [String] + attr_accessor :parent_name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @display_name = args[:display_name] if args.key?(:display_name) + @is_cluster = args[:is_cluster] if args.key?(:is_cluster) + @filter = args[:filter] if args.key?(:filter) + @name = args[:name] if args.key?(:name) + @parent_name = args[:parent_name] if args.key?(:parent_name) + end + end + + # A protocol buffer message type. + class Type + include Google::Apis::Core::Hashable + + # The list of fields. + # Corresponds to the JSON property `fields` + # @return [Array] + attr_accessor :fields + + # The fully qualified message name. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The list of types appearing in oneof definitions in this type. + # Corresponds to the JSON property `oneofs` + # @return [Array] + attr_accessor :oneofs + + # SourceContext represents information about the source of a protobuf element, + # like the file in which it is defined. + # Corresponds to the JSON property `sourceContext` + # @return [Google::Apis::MonitoringV3::SourceContext] + attr_accessor :source_context + + # The source syntax. + # Corresponds to the JSON property `syntax` + # @return [String] + attr_accessor :syntax + + # The protocol buffer options. + # Corresponds to the JSON property `options` + # @return [Array] + attr_accessor :options + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @fields = args[:fields] if args.key?(:fields) + @name = args[:name] if args.key?(:name) + @oneofs = args[:oneofs] if args.key?(:oneofs) + @source_context = args[:source_context] if args.key?(:source_context) + @syntax = args[:syntax] if args.key?(:syntax) + @options = args[:options] if args.key?(:options) + end + end + # BucketOptions describes the bucket boundaries used to create a histogram for # the distribution. The buckets can be in a linear sequence, an exponential # sequence, or each bucket can be specified explicitly. BucketOptions does not @@ -139,50 +741,6 @@ module Google class MetricDescriptor include Google::Apis::Core::Hashable - # The resource name of the metric descriptor. Depending on the implementation, - # the name typically includes: (1) the parent resource name that defines the - # scope of the metric type or of its data; and (2) the metric's URL-encoded type, - # which also appears in the type field of this descriptor. For example, - # following is the resource name of a custom metric within the GCP project my- - # project-id: - # "projects/my-project-id/metricDescriptors/custom.googleapis.com%2Finvoice% - # 2Fpaid%2Famount" - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The metric type, including its DNS name prefix. The type is not URL-encoded. - # All user-defined custom metric types have the DNS name custom.googleapis.com. - # Metric types should use a natural hierarchical grouping. For example: - # "custom.googleapis.com/invoice/paid/amount" - # "appengine.googleapis.com/http/server/response_latencies" - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Whether the measurement is an integer, a floating-point number, etc. Some - # combinations of metric_kind and value_type might not be supported. - # Corresponds to the JSON property `valueType` - # @return [String] - attr_accessor :value_type - - # Whether the metric records instantaneous values, changes to a value, etc. Some - # combinations of metric_kind and value_type might not be supported. - # Corresponds to the JSON property `metricKind` - # @return [String] - attr_accessor :metric_kind - - # A concise name for the metric, which can be displayed in user interfaces. Use - # sentence case without an ending period, for example "Request count". - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # A detailed description of the metric, which can be used in documentation. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - # The unit in which the metric value is reported. It is only applicable if the # value_type is INT64, DOUBLE, or DISTRIBUTION. The supported units are a subset # of The Unified Code for Units of Measure (http://unitsofmeasure.org/ucum.html) @@ -242,20 +800,64 @@ module Google # @return [Array] attr_accessor :labels + # The resource name of the metric descriptor. Depending on the implementation, + # the name typically includes: (1) the parent resource name that defines the + # scope of the metric type or of its data; and (2) the metric's URL-encoded type, + # which also appears in the type field of this descriptor. For example, + # following is the resource name of a custom metric within the GCP project my- + # project-id: + # "projects/my-project-id/metricDescriptors/custom.googleapis.com%2Finvoice% + # 2Fpaid%2Famount" + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The metric type, including its DNS name prefix. The type is not URL-encoded. + # All user-defined custom metric types have the DNS name custom.googleapis.com. + # Metric types should use a natural hierarchical grouping. For example: + # "custom.googleapis.com/invoice/paid/amount" + # "appengine.googleapis.com/http/server/response_latencies" + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # Whether the measurement is an integer, a floating-point number, etc. Some + # combinations of metric_kind and value_type might not be supported. + # Corresponds to the JSON property `valueType` + # @return [String] + attr_accessor :value_type + + # Whether the metric records instantaneous values, changes to a value, etc. Some + # combinations of metric_kind and value_type might not be supported. + # Corresponds to the JSON property `metricKind` + # @return [String] + attr_accessor :metric_kind + + # A concise name for the metric, which can be displayed in user interfaces. Use + # sentence case without an ending period, for example "Request count". + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # A detailed description of the metric, which can be used in documentation. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @unit = args[:unit] if args.key?(:unit) + @labels = args[:labels] if args.key?(:labels) @name = args[:name] if args.key?(:name) @type = args[:type] if args.key?(:type) @value_type = args[:value_type] if args.key?(:value_type) @metric_kind = args[:metric_kind] if args.key?(:metric_kind) @display_name = args[:display_name] if args.key?(:display_name) @description = args[:description] if args.key?(:description) - @unit = args[:unit] if args.key?(:unit) - @labels = args[:labels] if args.key?(:labels) end end @@ -263,24 +865,24 @@ module Google class Range include Google::Apis::Core::Hashable - # The minimum of the population values. - # Corresponds to the JSON property `min` - # @return [Float] - attr_accessor :min - # The maximum of the population values. # Corresponds to the JSON property `max` # @return [Float] attr_accessor :max + # The minimum of the population values. + # Corresponds to the JSON property `min` + # @return [Float] + attr_accessor :min + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @min = args[:min] if args.key?(:min) @max = args[:max] if args.key?(:max) + @min = args[:min] if args.key?(:min) end end @@ -348,6 +950,11 @@ module Google class CreateCollectdTimeSeriesRequest include Google::Apis::Core::Hashable + # The version of collectd that collected the data. Example: "5.3.0-192.el6". + # Corresponds to the JSON property `collectdVersion` + # @return [String] + attr_accessor :collectd_version + # An object representing a resource that can be used for monitoring, logging, # billing, or other purposes. Examples include virtual machine instances, # databases, and storage devices such as disks. The type field identifies a @@ -372,20 +979,15 @@ module Google # @return [Array] attr_accessor :collectd_payloads - # The version of collectd that collected the data. Example: "5.3.0-192.el6". - # Corresponds to the JSON property `collectdVersion` - # @return [String] - attr_accessor :collectd_version - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @collectd_version = args[:collectd_version] if args.key?(:collectd_version) @resource = args[:resource] if args.key?(:resource) @collectd_payloads = args[:collectd_payloads] if args.key?(:collectd_payloads) - @collectd_version = args[:collectd_version] if args.key?(:collectd_version) end end @@ -424,6 +1026,31 @@ module Google class TimeSeries include Google::Apis::Core::Hashable + # A specific metric, identified by specifying values for all of the labels of a + # MetricDescriptor. + # Corresponds to the JSON property `metric` + # @return [Google::Apis::MonitoringV3::Metric] + attr_accessor :metric + + # The data points of this time series. When listing time series, the order of + # the points is specified by the list method.When creating a time series, this + # field must contain exactly one point and the point's type must be the same as + # the value type of the associated metric. If the associated metric's descriptor + # must be auto-created, then the value type of the descriptor is determined by + # the point's type, which must be BOOL, INT64, DOUBLE, or DISTRIBUTION. + # Corresponds to the JSON property `points` + # @return [Array] + attr_accessor :points + + # The value type of the time series. When listing time series, this value type + # might be different from the value type of the associated metric if this time + # series is an alignment or reduction of other time series.When creating a time + # series, this field is optional. If present, it must be the same as the type of + # the data in the points field. + # Corresponds to the JSON property `valueType` + # @return [String] + attr_accessor :value_type + # An object representing a resource that can be used for monitoring, logging, # billing, or other purposes. Examples include virtual machine instances, # databases, and storage devices such as disks. The type field identifies a @@ -451,42 +1078,17 @@ module Google # @return [String] attr_accessor :metric_kind - # A specific metric, identified by specifying values for all of the labels of a - # MetricDescriptor. - # Corresponds to the JSON property `metric` - # @return [Google::Apis::MonitoringV3::Metric] - attr_accessor :metric - - # The data points of this time series. When listing time series, the order of - # the points is specified by the list method.When creating a time series, this - # field must contain exactly one point and the point's type must be the same as - # the value type of the associated metric. If the associated metric's descriptor - # must be auto-created, then the value type of the descriptor is determined by - # the point's type, which must be BOOL, INT64, DOUBLE, or DISTRIBUTION. - # Corresponds to the JSON property `points` - # @return [Array] - attr_accessor :points - - # The value type of the time series. When listing time series, this value type - # might be different from the value type of the associated metric if this time - # series is an alignment or reduction of other time series.When creating a time - # series, this field is optional. If present, it must be the same as the type of - # the data in the points field. - # Corresponds to the JSON property `valueType` - # @return [String] - attr_accessor :value_type - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @resource = args[:resource] if args.key?(:resource) - @metric_kind = args[:metric_kind] if args.key?(:metric_kind) @metric = args[:metric] if args.key?(:metric) @points = args[:points] if args.key?(:points) @value_type = args[:value_type] if args.key?(:value_type) + @resource = args[:resource] if args.key?(:resource) + @metric_kind = args[:metric_kind] if args.key?(:metric_kind) end end @@ -676,16 +1278,6 @@ module Google class MonitoredResourceDescriptor include Google::Apis::Core::Hashable - # Optional. The resource name of the monitored resource descriptor: "projects/` - # project_id`/monitoredResourceDescriptors/`type`" where `type` is the value of - # the type field in this object and `project_id` is a project ID that provides - # API-specific context for accessing the type. APIs that do not use project - # information can use the resource name format "monitoredResourceDescriptors/` - # type`". - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - # Optional. A concise name for the monitored resource type that might be # displayed in user interfaces. It should be a Title Cased Noun Phrase, without # any article or other determiners. For example, "Google Cloud SQL Database". @@ -713,621 +1305,29 @@ module Google # @return [Array] attr_accessor :labels + # Optional. The resource name of the monitored resource descriptor: "projects/` + # project_id`/monitoredResourceDescriptors/`type`" where `type` is the value of + # the type field in this object and `project_id` is a project ID that provides + # API-specific context for accessing the type. APIs that do not use project + # information can use the resource name format "monitoredResourceDescriptors/` + # type`". + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @name = args[:name] if args.key?(:name) @display_name = args[:display_name] if args.key?(:display_name) @description = args[:description] if args.key?(:description) @type = args[:type] if args.key?(:type) @labels = args[:labels] if args.key?(:labels) - end - end - - # A single strongly-typed value. - class TypedValue - include Google::Apis::Core::Hashable - - # A Boolean value: true or false. - # Corresponds to the JSON property `boolValue` - # @return [Boolean] - attr_accessor :bool_value - alias_method :bool_value?, :bool_value - - # A variable-length string value. - # Corresponds to the JSON property `stringValue` - # @return [String] - attr_accessor :string_value - - # A 64-bit double-precision floating-point number. Its magnitude is - # approximately ±10±300 and it has 16 significant - # digits of precision. - # Corresponds to the JSON property `doubleValue` - # @return [Float] - attr_accessor :double_value - - # A 64-bit integer. Its range is approximately ±9.2x1018. - # Corresponds to the JSON property `int64Value` - # @return [Fixnum] - attr_accessor :int64_value - - # Distribution contains summary statistics for a population of values. It - # optionally contains a histogram representing the distribution of those values - # across a set of buckets.The summary statistics are the count, mean, sum of the - # squared deviation from the mean, the minimum, and the maximum of the set of - # population of values. The histogram is based on a sequence of buckets and - # gives a count of values that fall into each bucket. The boundaries of the - # buckets are given either explicitly or by formulas for buckets of fixed or - # exponentially increasing widths.Although it is not forbidden, it is generally - # a bad idea to include non-finite values (infinities or NaNs) in the population - # of values, as this will render the mean and sum_of_squared_deviation fields - # meaningless. - # Corresponds to the JSON property `distributionValue` - # @return [Google::Apis::MonitoringV3::Distribution] - attr_accessor :distribution_value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @bool_value = args[:bool_value] if args.key?(:bool_value) - @string_value = args[:string_value] if args.key?(:string_value) - @double_value = args[:double_value] if args.key?(:double_value) - @int64_value = args[:int64_value] if args.key?(:int64_value) - @distribution_value = args[:distribution_value] if args.key?(:distribution_value) - end - end - - # A collection of data points sent from a collectd-based plugin. See the - # collectd documentation for more information. - class CollectdPayload - include Google::Apis::Core::Hashable - - # The measurement type instance. Example: "used". - # Corresponds to the JSON property `typeInstance` - # @return [String] - attr_accessor :type_instance - - # The measurement metadata. Example: "process_id" -> 12345 - # Corresponds to the JSON property `metadata` - # @return [Hash] - attr_accessor :metadata - - # The measurement type. Example: "memory". - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # The name of the plugin. Example: "disk". - # Corresponds to the JSON property `plugin` - # @return [String] - attr_accessor :plugin - - # The instance name of the plugin Example: "hdcl". - # Corresponds to the JSON property `pluginInstance` - # @return [String] - attr_accessor :plugin_instance - - # The end time of the interval. - # Corresponds to the JSON property `endTime` - # @return [String] - attr_accessor :end_time - - # The start time of the interval. - # Corresponds to the JSON property `startTime` - # @return [String] - attr_accessor :start_time - - # The measured values during this time interval. Each value must have a - # different dataSourceName. - # Corresponds to the JSON property `values` - # @return [Array] - attr_accessor :values - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @type_instance = args[:type_instance] if args.key?(:type_instance) - @metadata = args[:metadata] if args.key?(:metadata) - @type = args[:type] if args.key?(:type) - @plugin = args[:plugin] if args.key?(:plugin) - @plugin_instance = args[:plugin_instance] if args.key?(:plugin_instance) - @end_time = args[:end_time] if args.key?(:end_time) - @start_time = args[:start_time] if args.key?(:start_time) - @values = args[:values] if args.key?(:values) - end - end - - # Specifies a linear sequence of buckets that all have the same width (except - # overflow and underflow). Each bucket represents a constant absolute - # uncertainty on the specific value in the bucket.There are num_finite_buckets + - # 2 (= N) buckets. Bucket i has the following boundaries:Upper bound (0 <= i < N- - # 1): offset + (width * i). Lower bound (1 <= i < N): offset + (width * (i - 1)) - # . - class Linear - include Google::Apis::Core::Hashable - - # Must be greater than 0. - # Corresponds to the JSON property `numFiniteBuckets` - # @return [Fixnum] - attr_accessor :num_finite_buckets - - # Must be greater than 0. - # Corresponds to the JSON property `width` - # @return [Float] - attr_accessor :width - - # Lower bound of the first bucket. - # Corresponds to the JSON property `offset` - # @return [Float] - attr_accessor :offset - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @num_finite_buckets = args[:num_finite_buckets] if args.key?(:num_finite_buckets) - @width = args[:width] if args.key?(:width) - @offset = args[:offset] if args.key?(:offset) - end - end - - # A generic empty message that you can re-use to avoid defining duplicated empty - # messages in your APIs. A typical example is to use it as the request or the - # response type of an API method. For instance: - # service Foo ` - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # ` - # The JSON representation for Empty is empty JSON object ``. - class Empty - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # A protocol buffer option, which can be attached to a message, field, - # enumeration, etc. - class Option - include Google::Apis::Core::Hashable - - # The option's value packed in an Any message. If the value is a primitive, the - # corresponding wrapper type defined in google/protobuf/wrappers.proto should be - # used. If the value is an enum, it should be stored as an int32 value using the - # google.protobuf.Int32Value type. - # Corresponds to the JSON property `value` - # @return [Hash] - attr_accessor :value - - # The option's name. For protobuf built-in options (options defined in - # descriptor.proto), this is the short name. For example, "map_entry". For - # custom options, it should be the fully-qualified name. For example, "google. - # api.http". - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @value = args[:value] if args.key?(:value) @name = args[:name] if args.key?(:name) end end - - # Specifies a set of buckets with arbitrary widths.There are size(bounds) + 1 (= - # N) buckets. Bucket i has the following boundaries:Upper bound (0 <= i < N-1): - # boundsi Lower bound (1 <= i < N); boundsi - 1The bounds field must contain at - # least one element. If bounds has only one element, then there are no finite - # buckets, and that single element is the common boundary of the overflow and - # underflow buckets. - class Explicit - include Google::Apis::Core::Hashable - - # The values must be monotonically increasing. - # Corresponds to the JSON property `bounds` - # @return [Array] - attr_accessor :bounds - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @bounds = args[:bounds] if args.key?(:bounds) - end - end - - # A time interval extending just after a start time through an end time. If the - # start time is the same as the end time, then the interval represents a single - # point in time. - class TimeInterval - include Google::Apis::Core::Hashable - - # Optional. The beginning of the time interval. The default value for the start - # time is the end time. The start time must not be later than the end time. - # Corresponds to the JSON property `startTime` - # @return [String] - attr_accessor :start_time - - # Required. The end of the time interval. - # Corresponds to the JSON property `endTime` - # @return [String] - attr_accessor :end_time - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @start_time = args[:start_time] if args.key?(:start_time) - @end_time = args[:end_time] if args.key?(:end_time) - end - end - - # Specifies an exponential sequence of buckets that have a width that is - # proportional to the value of the lower bound. Each bucket represents a - # constant relative uncertainty on a specific value in the bucket.There are - # num_finite_buckets + 2 (= N) buckets. Bucket i has the following boundaries: - # Upper bound (0 <= i < N-1): scale * (growth_factor ^ i). Lower bound (1 <= i < - # N): scale * (growth_factor ^ (i - 1)). - class Exponential - include Google::Apis::Core::Hashable - - # Must be greater than 0. - # Corresponds to the JSON property `scale` - # @return [Float] - attr_accessor :scale - - # Must be greater than 0. - # Corresponds to the JSON property `numFiniteBuckets` - # @return [Fixnum] - attr_accessor :num_finite_buckets - - # Must be greater than 1. - # Corresponds to the JSON property `growthFactor` - # @return [Float] - attr_accessor :growth_factor - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @scale = args[:scale] if args.key?(:scale) - @num_finite_buckets = args[:num_finite_buckets] if args.key?(:num_finite_buckets) - @growth_factor = args[:growth_factor] if args.key?(:growth_factor) - end - end - - # A single data point in a time series. - class Point - include Google::Apis::Core::Hashable - - # A single strongly-typed value. - # Corresponds to the JSON property `value` - # @return [Google::Apis::MonitoringV3::TypedValue] - attr_accessor :value - - # A time interval extending just after a start time through an end time. If the - # start time is the same as the end time, then the interval represents a single - # point in time. - # Corresponds to the JSON property `interval` - # @return [Google::Apis::MonitoringV3::TimeInterval] - attr_accessor :interval - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @value = args[:value] if args.key?(:value) - @interval = args[:interval] if args.key?(:interval) - end - end - - # A single field of a message type. - class Field - include Google::Apis::Core::Hashable - - # The field name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The field type URL, without the scheme, for message or enumeration types. - # Example: "type.googleapis.com/google.protobuf.Timestamp". - # Corresponds to the JSON property `typeUrl` - # @return [String] - attr_accessor :type_url - - # The field number. - # Corresponds to the JSON property `number` - # @return [Fixnum] - attr_accessor :number - - # The field type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The field JSON name. - # Corresponds to the JSON property `jsonName` - # @return [String] - attr_accessor :json_name - - # The protocol buffer options. - # Corresponds to the JSON property `options` - # @return [Array] - attr_accessor :options - - # The index of the field type in Type.oneofs, for message or enumeration types. - # The first type has index 1; zero means the type is not in the list. - # Corresponds to the JSON property `oneofIndex` - # @return [Fixnum] - attr_accessor :oneof_index - - # The field cardinality. - # Corresponds to the JSON property `cardinality` - # @return [String] - attr_accessor :cardinality - - # Whether to use alternative packed wire representation. - # Corresponds to the JSON property `packed` - # @return [Boolean] - attr_accessor :packed - alias_method :packed?, :packed - - # The string value of the default value of this field. Proto2 syntax only. - # Corresponds to the JSON property `defaultValue` - # @return [String] - attr_accessor :default_value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @name = args[:name] if args.key?(:name) - @type_url = args[:type_url] if args.key?(:type_url) - @number = args[:number] if args.key?(:number) - @kind = args[:kind] if args.key?(:kind) - @json_name = args[:json_name] if args.key?(:json_name) - @options = args[:options] if args.key?(:options) - @oneof_index = args[:oneof_index] if args.key?(:oneof_index) - @cardinality = args[:cardinality] if args.key?(:cardinality) - @packed = args[:packed] if args.key?(:packed) - @default_value = args[:default_value] if args.key?(:default_value) - end - end - - # A specific metric, identified by specifying values for all of the labels of a - # MetricDescriptor. - class Metric - include Google::Apis::Core::Hashable - - # An existing metric type, see google.api.MetricDescriptor. For example, custom. - # googleapis.com/invoice/paid/amount. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # The set of label values that uniquely identify this metric. All labels listed - # in the MetricDescriptor must be assigned values. - # Corresponds to the JSON property `labels` - # @return [Hash] - attr_accessor :labels - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @type = args[:type] if args.key?(:type) - @labels = args[:labels] if args.key?(:labels) - end - end - - # A description of a label. - class LabelDescriptor - include Google::Apis::Core::Hashable - - # The label key. - # Corresponds to the JSON property `key` - # @return [String] - attr_accessor :key - - # A human-readable description for the label. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # The type of data that can be assigned to the label. - # Corresponds to the JSON property `valueType` - # @return [String] - attr_accessor :value_type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @key = args[:key] if args.key?(:key) - @description = args[:description] if args.key?(:description) - @value_type = args[:value_type] if args.key?(:value_type) - end - end - - # The ListTimeSeries response. - class ListTimeSeriesResponse - include Google::Apis::Core::Hashable - - # One or more time series that match the filter included in the request. - # Corresponds to the JSON property `timeSeries` - # @return [Array] - attr_accessor :time_series - - # If there are more results than have been returned, then this field is set to a - # non-empty value. To see the additional results, use that value as pageToken in - # the next call to this method. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @time_series = args[:time_series] if args.key?(:time_series) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # A protocol buffer message type. - class Type - include Google::Apis::Core::Hashable - - # The protocol buffer options. - # Corresponds to the JSON property `options` - # @return [Array] - attr_accessor :options - - # The list of fields. - # Corresponds to the JSON property `fields` - # @return [Array] - attr_accessor :fields - - # The fully qualified message name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The list of types appearing in oneof definitions in this type. - # Corresponds to the JSON property `oneofs` - # @return [Array] - attr_accessor :oneofs - - # The source syntax. - # Corresponds to the JSON property `syntax` - # @return [String] - attr_accessor :syntax - - # SourceContext represents information about the source of a protobuf element, - # like the file in which it is defined. - # Corresponds to the JSON property `sourceContext` - # @return [Google::Apis::MonitoringV3::SourceContext] - attr_accessor :source_context - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @options = args[:options] if args.key?(:options) - @fields = args[:fields] if args.key?(:fields) - @name = args[:name] if args.key?(:name) - @oneofs = args[:oneofs] if args.key?(:oneofs) - @syntax = args[:syntax] if args.key?(:syntax) - @source_context = args[:source_context] if args.key?(:source_context) - end - end - - # The description of a dynamic collection of monitored resources. Each group has - # a filter that is matched against monitored resources and their associated - # metadata. If a group's filter matches an available monitored resource, then - # that resource is a member of that group. Groups can contain any number of - # monitored resources, and each monitored resource can be a member of any number - # of groups.Groups can be nested in parent-child hierarchies. The parentName - # field identifies an optional parent for each group. If a group has a parent, - # then the only monitored resources available to be matched by the group's - # filter are the resources contained in the parent group. In other words, a - # group contains the monitored resources that match its filter and the filters - # of all the group's ancestors. A group without a parent can contain any - # monitored resource.For example, consider an infrastructure running a set of - # instances with two user-defined tags: "environment" and "role". A parent group - # has a filter, environment="production". A child of that parent group has a - # filter, role="transcoder". The parent group contains all instances in the - # production environment, regardless of their roles. The child group contains - # instances that have the transcoder role and are in the production environment. - # The monitored resources contained in a group can change at any moment, - # depending on what resources exist and what filters are associated with the - # group and its ancestors. - class Group - include Google::Apis::Core::Hashable - - # Output only. The name of this group. The format is "projects/` - # project_id_or_number`/groups/`group_id`". When creating a group, this field is - # ignored and a new name is created consisting of the project specified in the - # call to CreateGroup and a unique `group_id` that is generated automatically. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The name of the group's parent, if it has one. The format is "projects/` - # project_id_or_number`/groups/`group_id`". For groups with no parent, - # parentName is the empty string, "". - # Corresponds to the JSON property `parentName` - # @return [String] - attr_accessor :parent_name - - # A user-assigned name for this group, used only for display purposes. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # If true, the members of this group are considered to be a cluster. The system - # can perform additional analysis on groups that are clusters. - # Corresponds to the JSON property `isCluster` - # @return [Boolean] - attr_accessor :is_cluster - alias_method :is_cluster?, :is_cluster - - # The filter used to determine which monitored resources belong to this group. - # Corresponds to the JSON property `filter` - # @return [String] - attr_accessor :filter - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @name = args[:name] if args.key?(:name) - @parent_name = args[:parent_name] if args.key?(:parent_name) - @display_name = args[:display_name] if args.key?(:display_name) - @is_cluster = args[:is_cluster] if args.key?(:is_cluster) - @filter = args[:filter] if args.key?(:filter) - end - end end end end diff --git a/generated/google/apis/monitoring_v3/representations.rb b/generated/google/apis/monitoring_v3/representations.rb index e3da6dd6f..c480a8af6 100644 --- a/generated/google/apis/monitoring_v3/representations.rb +++ b/generated/google/apis/monitoring_v3/representations.rb @@ -22,6 +22,96 @@ module Google module Apis module MonitoringV3 + class TypedValue + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CollectdPayload + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Linear + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Option + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Empty + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Explicit + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TimeInterval + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Exponential + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Point + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Metric + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Field + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListTimeSeriesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class LabelDescriptor + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Group + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Type + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class BucketOptions class Representation < Google::Apis::Core::JsonRepresentation; end @@ -113,93 +203,157 @@ module Google end class TypedValue - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :int64_value, :numeric_string => true, as: 'int64Value' + property :distribution_value, as: 'distributionValue', class: Google::Apis::MonitoringV3::Distribution, decorator: Google::Apis::MonitoringV3::Distribution::Representation - include Google::Apis::Core::JsonObjectSupport + property :bool_value, as: 'boolValue' + property :string_value, as: 'stringValue' + property :double_value, as: 'doubleValue' + end end class CollectdPayload - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :type_instance, as: 'typeInstance' + hash :metadata, as: 'metadata', class: Google::Apis::MonitoringV3::TypedValue, decorator: Google::Apis::MonitoringV3::TypedValue::Representation - include Google::Apis::Core::JsonObjectSupport + property :type, as: 'type' + property :plugin, as: 'plugin' + property :plugin_instance, as: 'pluginInstance' + property :end_time, as: 'endTime' + property :start_time, as: 'startTime' + collection :values, as: 'values', class: Google::Apis::MonitoringV3::CollectdValue, decorator: Google::Apis::MonitoringV3::CollectdValue::Representation + + end end class Linear - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Empty - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :num_finite_buckets, as: 'numFiniteBuckets' + property :width, as: 'width' + property :offset, as: 'offset' + end end class Option - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :name, as: 'name' + hash :value, as: 'value' + end + end - include Google::Apis::Core::JsonObjectSupport + class Empty + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end end class Explicit - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :bounds, as: 'bounds' + end end class TimeInterval - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :end_time, as: 'endTime' + property :start_time, as: 'startTime' + end end class Exponential - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :growth_factor, as: 'growthFactor' + property :scale, as: 'scale' + property :num_finite_buckets, as: 'numFiniteBuckets' + end end class Point - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :value, as: 'value', class: Google::Apis::MonitoringV3::TypedValue, decorator: Google::Apis::MonitoringV3::TypedValue::Representation - include Google::Apis::Core::JsonObjectSupport - end + property :interval, as: 'interval', class: Google::Apis::MonitoringV3::TimeInterval, decorator: Google::Apis::MonitoringV3::TimeInterval::Representation - class Field - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + end end class Metric - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :type, as: 'type' + hash :labels, as: 'labels' + end end - class LabelDescriptor - class Representation < Google::Apis::Core::JsonRepresentation; end + class Field + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :json_name, as: 'jsonName' + property :kind, as: 'kind' + collection :options, as: 'options', class: Google::Apis::MonitoringV3::Option, decorator: Google::Apis::MonitoringV3::Option::Representation - include Google::Apis::Core::JsonObjectSupport + property :oneof_index, as: 'oneofIndex' + property :cardinality, as: 'cardinality' + property :packed, as: 'packed' + property :default_value, as: 'defaultValue' + property :name, as: 'name' + property :type_url, as: 'typeUrl' + property :number, as: 'number' + end end class ListTimeSeriesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :time_series, as: 'timeSeries', class: Google::Apis::MonitoringV3::TimeSeries, decorator: Google::Apis::MonitoringV3::TimeSeries::Representation - include Google::Apis::Core::JsonObjectSupport + property :next_page_token, as: 'nextPageToken' + end end - class Type - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + class LabelDescriptor + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :key, as: 'key' + property :description, as: 'description' + property :value_type, as: 'valueType' + end end class Group - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :display_name, as: 'displayName' + property :is_cluster, as: 'isCluster' + property :filter, as: 'filter' + property :name, as: 'name' + property :parent_name, as: 'parentName' + end + end - include Google::Apis::Core::JsonObjectSupport + class Type + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :fields, as: 'fields', class: Google::Apis::MonitoringV3::Field, decorator: Google::Apis::MonitoringV3::Field::Representation + + property :name, as: 'name' + collection :oneofs, as: 'oneofs' + property :source_context, as: 'sourceContext', class: Google::Apis::MonitoringV3::SourceContext, decorator: Google::Apis::MonitoringV3::SourceContext::Representation + + property :syntax, as: 'syntax' + collection :options, as: 'options', class: Google::Apis::MonitoringV3::Option, decorator: Google::Apis::MonitoringV3::Option::Representation + + end end class BucketOptions @@ -234,23 +388,23 @@ module Google class MetricDescriptor # @private class Representation < Google::Apis::Core::JsonRepresentation + property :unit, as: 'unit' + collection :labels, as: 'labels', class: Google::Apis::MonitoringV3::LabelDescriptor, decorator: Google::Apis::MonitoringV3::LabelDescriptor::Representation + property :name, as: 'name' property :type, as: 'type' property :value_type, as: 'valueType' property :metric_kind, as: 'metricKind' property :display_name, as: 'displayName' property :description, as: 'description' - property :unit, as: 'unit' - collection :labels, as: 'labels', class: Google::Apis::MonitoringV3::LabelDescriptor, decorator: Google::Apis::MonitoringV3::LabelDescriptor::Representation - end end class Range # @private class Representation < Google::Apis::Core::JsonRepresentation - property :min, as: 'min' property :max, as: 'max' + property :min, as: 'min' end end @@ -276,11 +430,11 @@ module Google class CreateCollectdTimeSeriesRequest # @private class Representation < Google::Apis::Core::JsonRepresentation + property :collectd_version, as: 'collectdVersion' property :resource, as: 'resource', class: Google::Apis::MonitoringV3::MonitoredResource, decorator: Google::Apis::MonitoringV3::MonitoredResource::Representation collection :collectd_payloads, as: 'collectdPayloads', class: Google::Apis::MonitoringV3::CollectdPayload, decorator: Google::Apis::MonitoringV3::CollectdPayload::Representation - property :collectd_version, as: 'collectdVersion' end end @@ -296,14 +450,14 @@ module Google class TimeSeries # @private class Representation < Google::Apis::Core::JsonRepresentation - property :resource, as: 'resource', class: Google::Apis::MonitoringV3::MonitoredResource, decorator: Google::Apis::MonitoringV3::MonitoredResource::Representation - - property :metric_kind, as: 'metricKind' property :metric, as: 'metric', class: Google::Apis::MonitoringV3::Metric, decorator: Google::Apis::MonitoringV3::Metric::Representation collection :points, as: 'points', class: Google::Apis::MonitoringV3::Point, decorator: Google::Apis::MonitoringV3::Point::Representation property :value_type, as: 'valueType' + property :resource, as: 'resource', class: Google::Apis::MonitoringV3::MonitoredResource, decorator: Google::Apis::MonitoringV3::MonitoredResource::Representation + + property :metric_kind, as: 'metricKind' end end @@ -349,168 +503,14 @@ module Google class MonitoredResourceDescriptor # @private class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' property :display_name, as: 'displayName' property :description, as: 'description' property :type, as: 'type' collection :labels, as: 'labels', class: Google::Apis::MonitoringV3::LabelDescriptor, decorator: Google::Apis::MonitoringV3::LabelDescriptor::Representation - end - end - - class TypedValue - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :bool_value, as: 'boolValue' - property :string_value, as: 'stringValue' - property :double_value, as: 'doubleValue' - property :int64_value, :numeric_string => true, as: 'int64Value' - property :distribution_value, as: 'distributionValue', class: Google::Apis::MonitoringV3::Distribution, decorator: Google::Apis::MonitoringV3::Distribution::Representation - - end - end - - class CollectdPayload - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :type_instance, as: 'typeInstance' - hash :metadata, as: 'metadata', class: Google::Apis::MonitoringV3::TypedValue, decorator: Google::Apis::MonitoringV3::TypedValue::Representation - - property :type, as: 'type' - property :plugin, as: 'plugin' - property :plugin_instance, as: 'pluginInstance' - property :end_time, as: 'endTime' - property :start_time, as: 'startTime' - collection :values, as: 'values', class: Google::Apis::MonitoringV3::CollectdValue, decorator: Google::Apis::MonitoringV3::CollectdValue::Representation - - end - end - - class Linear - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :num_finite_buckets, as: 'numFiniteBuckets' - property :width, as: 'width' - property :offset, as: 'offset' - end - end - - class Empty - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end - end - - class Option - # @private - class Representation < Google::Apis::Core::JsonRepresentation - hash :value, as: 'value' property :name, as: 'name' end end - - class Explicit - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :bounds, as: 'bounds' - end - end - - class TimeInterval - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :start_time, as: 'startTime' - property :end_time, as: 'endTime' - end - end - - class Exponential - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :scale, as: 'scale' - property :num_finite_buckets, as: 'numFiniteBuckets' - property :growth_factor, as: 'growthFactor' - end - end - - class Point - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :value, as: 'value', class: Google::Apis::MonitoringV3::TypedValue, decorator: Google::Apis::MonitoringV3::TypedValue::Representation - - property :interval, as: 'interval', class: Google::Apis::MonitoringV3::TimeInterval, decorator: Google::Apis::MonitoringV3::TimeInterval::Representation - - end - end - - class Field - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - property :type_url, as: 'typeUrl' - property :number, as: 'number' - property :kind, as: 'kind' - property :json_name, as: 'jsonName' - collection :options, as: 'options', class: Google::Apis::MonitoringV3::Option, decorator: Google::Apis::MonitoringV3::Option::Representation - - property :oneof_index, as: 'oneofIndex' - property :cardinality, as: 'cardinality' - property :packed, as: 'packed' - property :default_value, as: 'defaultValue' - end - end - - class Metric - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :type, as: 'type' - hash :labels, as: 'labels' - end - end - - class LabelDescriptor - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :key, as: 'key' - property :description, as: 'description' - property :value_type, as: 'valueType' - end - end - - class ListTimeSeriesResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :time_series, as: 'timeSeries', class: Google::Apis::MonitoringV3::TimeSeries, decorator: Google::Apis::MonitoringV3::TimeSeries::Representation - - property :next_page_token, as: 'nextPageToken' - end - end - - class Type - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :options, as: 'options', class: Google::Apis::MonitoringV3::Option, decorator: Google::Apis::MonitoringV3::Option::Representation - - collection :fields, as: 'fields', class: Google::Apis::MonitoringV3::Field, decorator: Google::Apis::MonitoringV3::Field::Representation - - property :name, as: 'name' - collection :oneofs, as: 'oneofs' - property :syntax, as: 'syntax' - property :source_context, as: 'sourceContext', class: Google::Apis::MonitoringV3::SourceContext, decorator: Google::Apis::MonitoringV3::SourceContext::Representation - - end - end - - class Group - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - property :parent_name, as: 'parentName' - property :display_name, as: 'displayName' - property :is_cluster, as: 'isCluster' - property :filter, as: 'filter' - end - end end end end diff --git a/generated/google/apis/monitoring_v3/service.rb b/generated/google/apis/monitoring_v3/service.rb index 99f8ce0af..f71bac7c8 100644 --- a/generated/google/apis/monitoring_v3/service.rb +++ b/generated/google/apis/monitoring_v3/service.rb @@ -49,48 +49,519 @@ module Google @batch_path = 'batch' end + # Lists metric descriptors that match a filter. This method does not require a + # Stackdriver account. + # @param [String] name + # The project on which to execute the request. The format is "projects/` + # project_id_or_number`". + # @param [String] filter + # If this field is empty, all custom and system-defined metric descriptors are + # returned. Otherwise, the filter specifies which metric descriptors are to be + # returned. For example, the following filter matches all custom metrics: + # metric.type = starts_with("custom.googleapis.com/") + # @param [String] page_token + # If this field is not empty then it must contain the nextPageToken value + # returned by a previous call to this method. Using this field causes the method + # to return additional results from the previous method call. + # @param [Fixnum] page_size + # A positive number that is the maximum number of results to return. + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MonitoringV3::ListMetricDescriptorsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MonitoringV3::ListMetricDescriptorsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_metric_descriptors(name, filter: nil, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v3/{+name}/metricDescriptors', options) + command.response_representation = Google::Apis::MonitoringV3::ListMetricDescriptorsResponse::Representation + command.response_class = Google::Apis::MonitoringV3::ListMetricDescriptorsResponse + command.params['name'] = name unless name.nil? + command.query['filter'] = filter unless filter.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Gets a single metric descriptor. This method does not require a Stackdriver + # account. + # @param [String] name + # The metric descriptor on which to execute the request. The format is "projects/ + # `project_id_or_number`/metricDescriptors/`metric_id`". An example value of ` + # metric_id` is "compute.googleapis.com/instance/disk/read_bytes_count". + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MonitoringV3::MetricDescriptor] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MonitoringV3::MetricDescriptor] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_metric_descriptor(name, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v3/{+name}', options) + command.response_representation = Google::Apis::MonitoringV3::MetricDescriptor::Representation + command.response_class = Google::Apis::MonitoringV3::MetricDescriptor + command.params['name'] = name unless name.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Creates a new metric descriptor. User-created metric descriptors define custom + # metrics. + # @param [String] name + # The project on which to execute the request. The format is "projects/` + # project_id_or_number`". + # @param [Google::Apis::MonitoringV3::MetricDescriptor] metric_descriptor_object + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MonitoringV3::MetricDescriptor] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MonitoringV3::MetricDescriptor] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_project_metric_descriptor(name, metric_descriptor_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v3/{+name}/metricDescriptors', options) + command.request_representation = Google::Apis::MonitoringV3::MetricDescriptor::Representation + command.request_object = metric_descriptor_object + command.response_representation = Google::Apis::MonitoringV3::MetricDescriptor::Representation + command.response_class = Google::Apis::MonitoringV3::MetricDescriptor + command.params['name'] = name unless name.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a metric descriptor. Only user-created custom metrics can be deleted. + # @param [String] name + # The metric descriptor on which to execute the request. The format is "projects/ + # `project_id_or_number`/metricDescriptors/`metric_id`". An example of ` + # metric_id` is: "custom.googleapis.com/my_test_metric". + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MonitoringV3::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MonitoringV3::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_project_metric_descriptor(name, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:delete, 'v3/{+name}', options) + command.response_representation = Google::Apis::MonitoringV3::Empty::Representation + command.response_class = Google::Apis::MonitoringV3::Empty + command.params['name'] = name unless name.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Lists monitored resource descriptors that match a filter. This method does not + # require a Stackdriver account. + # @param [String] name + # The project on which to execute the request. The format is "projects/` + # project_id_or_number`". + # @param [String] filter + # An optional filter describing the descriptors to be returned. The filter can + # reference the descriptor's type and labels. For example, the following filter + # returns only Google Compute Engine descriptors that have an id label: + # resource.type = starts_with("gce_") AND resource.label:id + # @param [String] page_token + # If this field is not empty then it must contain the nextPageToken value + # returned by a previous call to this method. Using this field causes the method + # to return additional results from the previous method call. + # @param [Fixnum] page_size + # A positive number that is the maximum number of results to return. + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MonitoringV3::ListMonitoredResourceDescriptorsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MonitoringV3::ListMonitoredResourceDescriptorsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_monitored_resource_descriptors(name, filter: nil, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v3/{+name}/monitoredResourceDescriptors', options) + command.response_representation = Google::Apis::MonitoringV3::ListMonitoredResourceDescriptorsResponse::Representation + command.response_class = Google::Apis::MonitoringV3::ListMonitoredResourceDescriptorsResponse + command.params['name'] = name unless name.nil? + command.query['filter'] = filter unless filter.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Gets a single monitored resource descriptor. This method does not require a + # Stackdriver account. + # @param [String] name + # The monitored resource descriptor to get. The format is "projects/` + # project_id_or_number`/monitoredResourceDescriptors/`resource_type`". The ` + # resource_type` is a predefined type, such as cloudsql_database. + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MonitoringV3::MonitoredResourceDescriptor] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MonitoringV3::MonitoredResourceDescriptor] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_monitored_resource_descriptor(name, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v3/{+name}', options) + command.response_representation = Google::Apis::MonitoringV3::MonitoredResourceDescriptor::Representation + command.response_class = Google::Apis::MonitoringV3::MonitoredResourceDescriptor + command.params['name'] = name unless name.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Deletes an existing group. + # @param [String] name + # The group to delete. The format is "projects/`project_id_or_number`/groups/` + # group_id`". + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MonitoringV3::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MonitoringV3::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_project_group(name, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:delete, 'v3/{+name}', options) + command.response_representation = Google::Apis::MonitoringV3::Empty::Representation + command.response_class = Google::Apis::MonitoringV3::Empty + command.params['name'] = name unless name.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Lists the existing groups. + # @param [String] name + # The project whose groups are to be listed. The format is "projects/` + # project_id_or_number`". + # @param [String] children_of_group + # A group name: "projects/`project_id_or_number`/groups/`group_id`". Returns + # groups whose parentName field contains the group name. If no groups have this + # parent, the results are empty. + # @param [String] descendants_of_group + # A group name: "projects/`project_id_or_number`/groups/`group_id`". Returns the + # descendants of the specified group. This is a superset of the results returned + # by the childrenOfGroup filter, and includes children-of-children, and so forth. + # @param [String] page_token + # If this field is not empty then it must contain the nextPageToken value + # returned by a previous call to this method. Using this field causes the method + # to return additional results from the previous method call. + # @param [Fixnum] page_size + # A positive number that is the maximum number of results to return. + # @param [String] ancestors_of_group + # A group name: "projects/`project_id_or_number`/groups/`group_id`". Returns + # groups that are ancestors of the specified group. The groups are returned in + # order, starting with the immediate parent and ending with the most distant + # ancestor. If the specified group has no immediate parent, the results are + # empty. + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MonitoringV3::ListGroupsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MonitoringV3::ListGroupsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_groups(name, children_of_group: nil, descendants_of_group: nil, page_token: nil, page_size: nil, ancestors_of_group: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v3/{+name}/groups', options) + command.response_representation = Google::Apis::MonitoringV3::ListGroupsResponse::Representation + command.response_class = Google::Apis::MonitoringV3::ListGroupsResponse + command.params['name'] = name unless name.nil? + command.query['childrenOfGroup'] = children_of_group unless children_of_group.nil? + command.query['descendantsOfGroup'] = descendants_of_group unless descendants_of_group.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['ancestorsOfGroup'] = ancestors_of_group unless ancestors_of_group.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Gets a single group. + # @param [String] name + # The group to retrieve. The format is "projects/`project_id_or_number`/groups/` + # group_id`". + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MonitoringV3::Group] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MonitoringV3::Group] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_group(name, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v3/{+name}', options) + command.response_representation = Google::Apis::MonitoringV3::Group::Representation + command.response_class = Google::Apis::MonitoringV3::Group + command.params['name'] = name unless name.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Updates an existing group. You can change any group attributes except name. + # @param [String] name + # Output only. The name of this group. The format is "projects/` + # project_id_or_number`/groups/`group_id`". When creating a group, this field is + # ignored and a new name is created consisting of the project specified in the + # call to CreateGroup and a unique `group_id` that is generated automatically. + # @param [Google::Apis::MonitoringV3::Group] group_object + # @param [Boolean] validate_only + # If true, validate this request but do not update the existing group. + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MonitoringV3::Group] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MonitoringV3::Group] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_project_group(name, group_object = nil, validate_only: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:put, 'v3/{+name}', options) + command.request_representation = Google::Apis::MonitoringV3::Group::Representation + command.request_object = group_object + command.response_representation = Google::Apis::MonitoringV3::Group::Representation + command.response_class = Google::Apis::MonitoringV3::Group + command.params['name'] = name unless name.nil? + command.query['validateOnly'] = validate_only unless validate_only.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Creates a new group. + # @param [String] name + # The project in which to create the group. The format is "projects/` + # project_id_or_number`". + # @param [Google::Apis::MonitoringV3::Group] group_object + # @param [Boolean] validate_only + # If true, validate this request but do not create the group. + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MonitoringV3::Group] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MonitoringV3::Group] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_project_group(name, group_object = nil, validate_only: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v3/{+name}/groups', options) + command.request_representation = Google::Apis::MonitoringV3::Group::Representation + command.request_object = group_object + command.response_representation = Google::Apis::MonitoringV3::Group::Representation + command.response_class = Google::Apis::MonitoringV3::Group + command.params['name'] = name unless name.nil? + command.query['validateOnly'] = validate_only unless validate_only.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Lists the monitored resources that are members of a group. + # @param [String] name + # The group whose members are listed. The format is "projects/` + # project_id_or_number`/groups/`group_id`". + # @param [String] interval_end_time + # Required. The end of the time interval. + # @param [String] filter + # An optional list filter describing the members to be returned. The filter may + # reference the type, labels, and metadata of monitored resources that comprise + # the group. For example, to return only resources representing Compute Engine + # VM instances, use this filter: + # resource.type = "gce_instance" + # @param [String] page_token + # If this field is not empty then it must contain the nextPageToken value + # returned by a previous call to this method. Using this field causes the method + # to return additional results from the previous method call. + # @param [String] interval_start_time + # Optional. The beginning of the time interval. The default value for the start + # time is the end time. The start time must not be later than the end time. + # @param [Fixnum] page_size + # A positive number that is the maximum number of results to return. + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MonitoringV3::ListGroupMembersResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MonitoringV3::ListGroupMembersResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_group_members(name, interval_end_time: nil, filter: nil, page_token: nil, interval_start_time: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v3/{+name}/members', options) + command.response_representation = Google::Apis::MonitoringV3::ListGroupMembersResponse::Representation + command.response_class = Google::Apis::MonitoringV3::ListGroupMembersResponse + command.params['name'] = name unless name.nil? + command.query['interval.endTime'] = interval_end_time unless interval_end_time.nil? + command.query['filter'] = filter unless filter.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['interval.startTime'] = interval_start_time unless interval_start_time.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Stackdriver Monitoring Agent only: Creates a new time series. + # @param [String] name + # The project in which to create the time series. The format is "projects/ + # PROJECT_ID_OR_NUMBER". + # @param [Google::Apis::MonitoringV3::CreateCollectdTimeSeriesRequest] create_collectd_time_series_request_object + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MonitoringV3::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MonitoringV3::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_collectd_time_series(name, create_collectd_time_series_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v3/{+name}/collectdTimeSeries', options) + command.request_representation = Google::Apis::MonitoringV3::CreateCollectdTimeSeriesRequest::Representation + command.request_object = create_collectd_time_series_request_object + command.response_representation = Google::Apis::MonitoringV3::Empty::Representation + command.response_class = Google::Apis::MonitoringV3::Empty + command.params['name'] = name unless name.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + # Lists time series that match a filter. This method does not require a # Stackdriver account. # @param [String] name # The project on which to execute the request. The format is "projects/` # project_id_or_number`". - # @param [String] page_token - # If this field is not empty then it must contain the nextPageToken value - # returned by a previous call to this method. Using this field causes the method - # to return additional results from the previous method call. - # @param [String] aggregation_per_series_aligner - # The approach to be used to align individual time series. Not all alignment - # functions may be applied to all time series, depending on the metric type and - # value type of the original time series. Alignment may change the metric type - # or the value type of the time series.Time series data must be aligned in order - # to perform cross-time series reduction. If crossSeriesReducer is specified, - # then perSeriesAligner must be specified and not equal ALIGN_NONE and - # alignmentPeriod must be specified; otherwise, an error is returned. - # @param [String] interval_start_time - # Optional. The beginning of the time interval. The default value for the start - # time is the end time. The start time must not be later than the end time. - # @param [String] view - # Specifies which information is returned about the time series. - # @param [String] secondary_aggregation_cross_series_reducer - # The approach to be used to combine time series. Not all reducer functions may - # be applied to all time series, depending on the metric type and the value type - # of the original time series. Reduction may change the metric type of value - # type of the time series.Time series data must be aligned in order to perform - # cross-time series reduction. If crossSeriesReducer is specified, then - # perSeriesAligner must be specified and not equal ALIGN_NONE and - # alignmentPeriod must be specified; otherwise, an error is returned. - # @param [Array, String] secondary_aggregation_group_by_fields - # The set of fields to preserve when crossSeriesReducer is specified. The - # groupByFields determine how the time series are partitioned into subsets prior - # to applying the aggregation function. Each subset contains time series that - # have the same value for each of the grouping fields. Each individual time - # series is a member of exactly one subset. The crossSeriesReducer is applied to - # each subset of time series. It is not possible to reduce across different - # resource types, so this field implicitly contains resource.type. Fields not - # specified in groupByFields are aggregated away. If groupByFields is not - # specified and all the time series have the same resource type, then the time - # series are aggregated into a single output time series. If crossSeriesReducer - # is not defined, this field is ignored. # @param [Array, String] aggregation_group_by_fields # The set of fields to preserve when crossSeriesReducer is specified. The # groupByFields determine how the time series are partitioned into subsets prior @@ -112,25 +583,10 @@ module Google # perSeriesAligner is not specified or equals ALIGN_NONE, then this field is # ignored. If perSeriesAligner is specified and does not equal ALIGN_NONE, then # this field must be defined; otherwise an error is returned. - # @param [String] secondary_aggregation_alignment_period - # The alignment period for per-time series alignment. If present, - # alignmentPeriod must be at least 60 seconds. After per-time series alignment, - # each time series will contain data points only on the period boundaries. If - # perSeriesAligner is not specified or equals ALIGN_NONE, then this field is - # ignored. If perSeriesAligner is specified and does not equal ALIGN_NONE, then - # this field must be defined; otherwise an error is returned. # @param [Fixnum] page_size # A positive number that is the maximum number of results to return. When view # field sets to FULL, it limits the number of Points server will return; if view # field is HEADERS, it limits the number of TimeSeries server will return. - # @param [String] secondary_aggregation_per_series_aligner - # The approach to be used to align individual time series. Not all alignment - # functions may be applied to all time series, depending on the metric type and - # value type of the original time series. Alignment may change the metric type - # or the value type of the time series.Time series data must be aligned in order - # to perform cross-time series reduction. If crossSeriesReducer is specified, - # then perSeriesAligner must be specified and not equal ALIGN_NONE and - # alignmentPeriod must be specified; otherwise, an error is returned. # @param [String] order_by # Specifies the order in which the points of the time series should be returned. # By default, results are not ordered. Currently, this field must be left blank. @@ -148,11 +604,28 @@ module Google # labels and other information. For example: # metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND # metric.label.instance_name = "my-instance-name" - # @param [String] fields - # Selector specifying which fields to include in a partial response. + # @param [String] aggregation_per_series_aligner + # The approach to be used to align individual time series. Not all alignment + # functions may be applied to all time series, depending on the metric type and + # value type of the original time series. Alignment may change the metric type + # or the value type of the time series.Time series data must be aligned in order + # to perform cross-time series reduction. If crossSeriesReducer is specified, + # then perSeriesAligner must be specified and not equal ALIGN_NONE and + # alignmentPeriod must be specified; otherwise, an error is returned. + # @param [String] page_token + # If this field is not empty then it must contain the nextPageToken value + # returned by a previous call to this method. Using this field causes the method + # to return additional results from the previous method call. + # @param [String] interval_start_time + # Optional. The beginning of the time interval. The default value for the start + # time is the end time. The start time must not be later than the end time. + # @param [String] view + # Specifies which information is returned about the time series. # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -165,28 +638,24 @@ 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_project_time_series(name, page_token: nil, aggregation_per_series_aligner: nil, interval_start_time: nil, view: nil, secondary_aggregation_cross_series_reducer: nil, secondary_aggregation_group_by_fields: nil, aggregation_group_by_fields: nil, interval_end_time: nil, aggregation_alignment_period: nil, secondary_aggregation_alignment_period: nil, page_size: nil, secondary_aggregation_per_series_aligner: nil, order_by: nil, aggregation_cross_series_reducer: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_project_time_series(name, aggregation_group_by_fields: nil, interval_end_time: nil, aggregation_alignment_period: nil, page_size: nil, order_by: nil, aggregation_cross_series_reducer: nil, filter: nil, aggregation_per_series_aligner: nil, page_token: nil, interval_start_time: nil, view: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v3/{+name}/timeSeries', options) command.response_representation = Google::Apis::MonitoringV3::ListTimeSeriesResponse::Representation command.response_class = Google::Apis::MonitoringV3::ListTimeSeriesResponse command.params['name'] = name unless name.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['aggregation.perSeriesAligner'] = aggregation_per_series_aligner unless aggregation_per_series_aligner.nil? - command.query['interval.startTime'] = interval_start_time unless interval_start_time.nil? - command.query['view'] = view unless view.nil? - command.query['secondaryAggregation.crossSeriesReducer'] = secondary_aggregation_cross_series_reducer unless secondary_aggregation_cross_series_reducer.nil? - command.query['secondaryAggregation.groupByFields'] = secondary_aggregation_group_by_fields unless secondary_aggregation_group_by_fields.nil? command.query['aggregation.groupByFields'] = aggregation_group_by_fields unless aggregation_group_by_fields.nil? command.query['interval.endTime'] = interval_end_time unless interval_end_time.nil? command.query['aggregation.alignmentPeriod'] = aggregation_alignment_period unless aggregation_alignment_period.nil? - command.query['secondaryAggregation.alignmentPeriod'] = secondary_aggregation_alignment_period unless secondary_aggregation_alignment_period.nil? command.query['pageSize'] = page_size unless page_size.nil? - command.query['secondaryAggregation.perSeriesAligner'] = secondary_aggregation_per_series_aligner unless secondary_aggregation_per_series_aligner.nil? command.query['orderBy'] = order_by unless order_by.nil? command.query['aggregation.crossSeriesReducer'] = aggregation_cross_series_reducer unless aggregation_cross_series_reducer.nil? command.query['filter'] = filter unless filter.nil? - command.query['fields'] = fields unless fields.nil? + command.query['aggregation.perSeriesAligner'] = aggregation_per_series_aligner unless aggregation_per_series_aligner.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['interval.startTime'] = interval_start_time unless interval_start_time.nil? + command.query['view'] = view unless view.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -197,11 +666,11 @@ module Google # The project on which to execute the request. The format is "projects/` # project_id_or_number`". # @param [Google::Apis::MonitoringV3::CreateTimeSeriesRequest] create_time_series_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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -214,523 +683,15 @@ 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 create_time_series(name, create_time_series_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def create_time_series(name, create_time_series_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v3/{+name}/timeSeries', options) command.request_representation = Google::Apis::MonitoringV3::CreateTimeSeriesRequest::Representation command.request_object = create_time_series_request_object command.response_representation = Google::Apis::MonitoringV3::Empty::Representation command.response_class = Google::Apis::MonitoringV3::Empty command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Lists metric descriptors that match a filter. This method does not require a - # Stackdriver account. - # @param [String] name - # The project on which to execute the request. The format is "projects/` - # project_id_or_number`". - # @param [String] page_token - # If this field is not empty then it must contain the nextPageToken value - # returned by a previous call to this method. Using this field causes the method - # to return additional results from the previous method call. - # @param [Fixnum] page_size - # A positive number that is the maximum number of results to return. - # @param [String] filter - # If this field is empty, all custom and system-defined metric descriptors are - # returned. Otherwise, the filter specifies which metric descriptors are to be - # returned. For example, the following filter matches all custom metrics: - # metric.type = starts_with("custom.googleapis.com/") - # @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::MonitoringV3::ListMetricDescriptorsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MonitoringV3::ListMetricDescriptorsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_project_metric_descriptors(name, page_token: nil, page_size: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v3/{+name}/metricDescriptors', options) - command.response_representation = Google::Apis::MonitoringV3::ListMetricDescriptorsResponse::Representation - command.response_class = Google::Apis::MonitoringV3::ListMetricDescriptorsResponse - command.params['name'] = name unless name.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['filter'] = filter unless filter.nil? command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets a single metric descriptor. This method does not require a Stackdriver - # account. - # @param [String] name - # The metric descriptor on which to execute the request. The format is "projects/ - # `project_id_or_number`/metricDescriptors/`metric_id`". An example value of ` - # metric_id` is "compute.googleapis.com/instance/disk/read_bytes_count". - # @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::MonitoringV3::MetricDescriptor] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MonitoringV3::MetricDescriptor] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_project_metric_descriptor(name, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v3/{+name}', options) - command.response_representation = Google::Apis::MonitoringV3::MetricDescriptor::Representation - command.response_class = Google::Apis::MonitoringV3::MetricDescriptor - command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Creates a new metric descriptor. User-created metric descriptors define custom - # metrics. - # @param [String] name - # The project on which to execute the request. The format is "projects/` - # project_id_or_number`". - # @param [Google::Apis::MonitoringV3::MetricDescriptor] metric_descriptor_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::MonitoringV3::MetricDescriptor] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MonitoringV3::MetricDescriptor] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_project_metric_descriptor(name, metric_descriptor_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v3/{+name}/metricDescriptors', options) - command.request_representation = Google::Apis::MonitoringV3::MetricDescriptor::Representation - command.request_object = metric_descriptor_object - command.response_representation = Google::Apis::MonitoringV3::MetricDescriptor::Representation - command.response_class = Google::Apis::MonitoringV3::MetricDescriptor - command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Deletes a metric descriptor. Only user-created custom metrics can be deleted. - # @param [String] name - # The metric descriptor on which to execute the request. The format is "projects/ - # `project_id_or_number`/metricDescriptors/`metric_id`". An example of ` - # metric_id` is: "custom.googleapis.com/my_test_metric". - # @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::MonitoringV3::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MonitoringV3::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_project_metric_descriptor(name, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v3/{+name}', options) - command.response_representation = Google::Apis::MonitoringV3::Empty::Representation - command.response_class = Google::Apis::MonitoringV3::Empty - command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Lists monitored resource descriptors that match a filter. This method does not - # require a Stackdriver account. - # @param [String] name - # The project on which to execute the request. The format is "projects/` - # project_id_or_number`". - # @param [String] page_token - # If this field is not empty then it must contain the nextPageToken value - # returned by a previous call to this method. Using this field causes the method - # to return additional results from the previous method call. - # @param [Fixnum] page_size - # A positive number that is the maximum number of results to return. - # @param [String] filter - # An optional filter describing the descriptors to be returned. The filter can - # reference the descriptor's type and labels. For example, the following filter - # returns only Google Compute Engine descriptors that have an id label: - # resource.type = starts_with("gce_") AND resource.label:id - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::MonitoringV3::ListMonitoredResourceDescriptorsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MonitoringV3::ListMonitoredResourceDescriptorsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_project_monitored_resource_descriptors(name, page_token: nil, page_size: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v3/{+name}/monitoredResourceDescriptors', options) - command.response_representation = Google::Apis::MonitoringV3::ListMonitoredResourceDescriptorsResponse::Representation - command.response_class = Google::Apis::MonitoringV3::ListMonitoredResourceDescriptorsResponse - command.params['name'] = name unless name.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['filter'] = filter unless filter.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets a single monitored resource descriptor. This method does not require a - # Stackdriver account. - # @param [String] name - # The monitored resource descriptor to get. The format is "projects/` - # project_id_or_number`/monitoredResourceDescriptors/`resource_type`". The ` - # resource_type` is a predefined type, such as cloudsql_database. - # @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::MonitoringV3::MonitoredResourceDescriptor] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MonitoringV3::MonitoredResourceDescriptor] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_project_monitored_resource_descriptor(name, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v3/{+name}', options) - command.response_representation = Google::Apis::MonitoringV3::MonitoredResourceDescriptor::Representation - command.response_class = Google::Apis::MonitoringV3::MonitoredResourceDescriptor - command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Deletes an existing group. - # @param [String] name - # The group to delete. The format is "projects/`project_id_or_number`/groups/` - # group_id`". - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::MonitoringV3::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MonitoringV3::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_project_group(name, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v3/{+name}', options) - command.response_representation = Google::Apis::MonitoringV3::Empty::Representation - command.response_class = Google::Apis::MonitoringV3::Empty - command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Lists the existing groups. - # @param [String] name - # The project whose groups are to be listed. The format is "projects/` - # project_id_or_number`". - # @param [String] page_token - # If this field is not empty then it must contain the nextPageToken value - # returned by a previous call to this method. Using this field causes the method - # to return additional results from the previous method call. - # @param [Fixnum] page_size - # A positive number that is the maximum number of results to return. - # @param [String] ancestors_of_group - # A group name: "projects/`project_id_or_number`/groups/`group_id`". Returns - # groups that are ancestors of the specified group. The groups are returned in - # order, starting with the immediate parent and ending with the most distant - # ancestor. If the specified group has no immediate parent, the results are - # empty. - # @param [String] children_of_group - # A group name: "projects/`project_id_or_number`/groups/`group_id`". Returns - # groups whose parentName field contains the group name. If no groups have this - # parent, the results are empty. - # @param [String] descendants_of_group - # A group name: "projects/`project_id_or_number`/groups/`group_id`". Returns the - # descendants of the specified group. This is a superset of the results returned - # by the childrenOfGroup filter, and includes children-of-children, and so forth. - # @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::MonitoringV3::ListGroupsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MonitoringV3::ListGroupsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_project_groups(name, page_token: nil, page_size: nil, ancestors_of_group: nil, children_of_group: nil, descendants_of_group: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v3/{+name}/groups', options) - command.response_representation = Google::Apis::MonitoringV3::ListGroupsResponse::Representation - command.response_class = Google::Apis::MonitoringV3::ListGroupsResponse - command.params['name'] = name unless name.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['ancestorsOfGroup'] = ancestors_of_group unless ancestors_of_group.nil? - command.query['childrenOfGroup'] = children_of_group unless children_of_group.nil? - command.query['descendantsOfGroup'] = descendants_of_group unless descendants_of_group.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets a single group. - # @param [String] name - # The group to retrieve. The format is "projects/`project_id_or_number`/groups/` - # group_id`". - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::MonitoringV3::Group] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MonitoringV3::Group] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_project_group(name, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v3/{+name}', options) - command.response_representation = Google::Apis::MonitoringV3::Group::Representation - command.response_class = Google::Apis::MonitoringV3::Group - command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Updates an existing group. You can change any group attributes except name. - # @param [String] name - # Output only. The name of this group. The format is "projects/` - # project_id_or_number`/groups/`group_id`". When creating a group, this field is - # ignored and a new name is created consisting of the project specified in the - # call to CreateGroup and a unique `group_id` that is generated automatically. - # @param [Google::Apis::MonitoringV3::Group] group_object - # @param [Boolean] validate_only - # If true, validate this request but do not update the existing group. - # @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::MonitoringV3::Group] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MonitoringV3::Group] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_project_group(name, group_object = nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:put, 'v3/{+name}', options) - command.request_representation = Google::Apis::MonitoringV3::Group::Representation - command.request_object = group_object - command.response_representation = Google::Apis::MonitoringV3::Group::Representation - command.response_class = Google::Apis::MonitoringV3::Group - command.params['name'] = name unless name.nil? - command.query['validateOnly'] = validate_only unless validate_only.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Creates a new group. - # @param [String] name - # The project in which to create the group. The format is "projects/` - # project_id_or_number`". - # @param [Google::Apis::MonitoringV3::Group] group_object - # @param [Boolean] validate_only - # If true, validate this request but do not create the group. - # @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::MonitoringV3::Group] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MonitoringV3::Group] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_project_group(name, group_object = nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v3/{+name}/groups', options) - command.request_representation = Google::Apis::MonitoringV3::Group::Representation - command.request_object = group_object - command.response_representation = Google::Apis::MonitoringV3::Group::Representation - command.response_class = Google::Apis::MonitoringV3::Group - command.params['name'] = name unless name.nil? - command.query['validateOnly'] = validate_only unless validate_only.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 monitored resources that are members of a group. - # @param [String] name - # The group whose members are listed. The format is "projects/` - # project_id_or_number`/groups/`group_id`". - # @param [String] page_token - # If this field is not empty then it must contain the nextPageToken value - # returned by a previous call to this method. Using this field causes the method - # to return additional results from the previous method call. - # @param [Fixnum] page_size - # A positive number that is the maximum number of results to return. - # @param [String] interval_start_time - # Optional. The beginning of the time interval. The default value for the start - # time is the end time. The start time must not be later than the end time. - # @param [String] interval_end_time - # Required. The end of the time interval. - # @param [String] filter - # An optional list filter describing the members to be returned. The filter may - # reference the type, labels, and metadata of monitored resources that comprise - # the group. For example, to return only resources representing Compute Engine - # VM instances, use this filter: - # resource.type = "gce_instance" - # @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::MonitoringV3::ListGroupMembersResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MonitoringV3::ListGroupMembersResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_project_group_members(name, page_token: nil, page_size: nil, interval_start_time: nil, interval_end_time: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v3/{+name}/members', options) - command.response_representation = Google::Apis::MonitoringV3::ListGroupMembersResponse::Representation - command.response_class = Google::Apis::MonitoringV3::ListGroupMembersResponse - command.params['name'] = name unless name.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['interval.startTime'] = interval_start_time unless interval_start_time.nil? - command.query['interval.endTime'] = interval_end_time unless interval_end_time.nil? - command.query['filter'] = filter unless filter.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Stackdriver Monitoring Agent only: Creates a new time series. - # @param [String] name - # The project in which to create the time series. The format is "projects/ - # PROJECT_ID_OR_NUMBER". - # @param [Google::Apis::MonitoringV3::CreateCollectdTimeSeriesRequest] create_collectd_time_series_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::MonitoringV3::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MonitoringV3::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_collectd_time_series(name, create_collectd_time_series_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v3/{+name}/collectdTimeSeries', options) - command.request_representation = Google::Apis::MonitoringV3::CreateCollectdTimeSeriesRequest::Representation - command.request_object = create_collectd_time_series_request_object - command.response_representation = Google::Apis::MonitoringV3::Empty::Representation - command.response_class = Google::Apis::MonitoringV3::Empty - command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end diff --git a/generated/google/apis/oauth2_v2.rb b/generated/google/apis/oauth2_v2.rb index 871aaf6a1..1fab49d18 100644 --- a/generated/google/apis/oauth2_v2.rb +++ b/generated/google/apis/oauth2_v2.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/accounts/docs/OAuth2 module Oauth2V2 VERSION = 'V2' - REVISION = '20170424' + REVISION = '20170509' # Know the list of people in your circles, your age range, and language AUTH_PLUS_LOGIN = 'https://www.googleapis.com/auth/plus.login' diff --git a/generated/google/apis/partners_v2.rb b/generated/google/apis/partners_v2.rb index 7aa52359e..647b34fd9 100644 --- a/generated/google/apis/partners_v2.rb +++ b/generated/google/apis/partners_v2.rb @@ -26,7 +26,7 @@ module Google # @see https://developers.google.com/partners/ module PartnersV2 VERSION = 'V2' - REVISION = '20170503' + REVISION = '20170509' end end end diff --git a/generated/google/apis/partners_v2/classes.rb b/generated/google/apis/partners_v2/classes.rb index dce6dc323..972f23ee7 100644 --- a/generated/google/apis/partners_v2/classes.rb +++ b/generated/google/apis/partners_v2/classes.rb @@ -22,974 +22,10 @@ module Google module Apis module PartnersV2 - # Response message for CreateLead. - class CreateLeadResponse - include Google::Apis::Core::Hashable - - # A lead resource that represents an advertiser contact for a `Company`. These - # are usually generated via Google Partner Search (the advertiser portal). - # Corresponds to the JSON property `lead` - # @return [Google::Apis::PartnersV2::Lead] - attr_accessor :lead - - # The outcome of reCaptcha - # validation. - # Corresponds to the JSON property `recaptchaStatus` - # @return [String] - attr_accessor :recaptcha_status - - # Common data that is in each API response. - # Corresponds to the JSON property `responseMetadata` - # @return [Google::Apis::PartnersV2::ResponseMetadata] - attr_accessor :response_metadata - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @lead = args[:lead] if args.key?(:lead) - @recaptcha_status = args[:recaptcha_status] if args.key?(:recaptcha_status) - @response_metadata = args[:response_metadata] if args.key?(:response_metadata) - end - end - - # Response message for GetCompany. - class GetCompanyResponse - include Google::Apis::Core::Hashable - - # A company resource in the Google Partners API. Once certified, it qualifies - # for being searched by advertisers. - # Corresponds to the JSON property `company` - # @return [Google::Apis::PartnersV2::Company] - attr_accessor :company - - # Common data that is in each API response. - # Corresponds to the JSON property `responseMetadata` - # @return [Google::Apis::PartnersV2::ResponseMetadata] - attr_accessor :response_metadata - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @company = args[:company] if args.key?(:company) - @response_metadata = args[:response_metadata] if args.key?(:response_metadata) - end - end - - # A location with address and geographic coordinates. May optionally contain a - # detailed (multi-field) version of the address. - class Location - include Google::Apis::Core::Hashable - - # Top-level administrative subdivision of this country. - # Corresponds to the JSON property `administrativeArea` - # @return [String] - attr_accessor :administrative_area - - # Generally refers to the city/town portion of an address. - # Corresponds to the JSON property `locality` - # @return [String] - attr_accessor :locality - - # An object representing a latitude/longitude pair. This is expressed as a pair - # of doubles representing degrees latitude and degrees longitude. Unless - # specified otherwise, this must conform to the - # WGS84 - # standard. Values must be within normalized ranges. - # Example of normalization code in Python: - # def NormalizeLongitude(longitude): - # """Wraps decimal degrees longitude to [-180.0, 180.0].""" - # q, r = divmod(longitude, 360.0) - # if r > 180.0 or (r == 180.0 and q <= -1.0): - # return r - 360.0 - # return r - # def NormalizeLatLng(latitude, longitude): - # """Wraps decimal degrees latitude and longitude to - # [-90.0, 90.0] and [-180.0, 180.0], respectively.""" - # r = latitude % 360.0 - # if r <= 90.0: - # return r, NormalizeLongitude(longitude) - # elif r >= 270.0: - # return r - 360, NormalizeLongitude(longitude) - # else: - # return 180 - r, NormalizeLongitude(longitude + 180.0) - # assert 180.0 == NormalizeLongitude(180.0) - # assert -180.0 == NormalizeLongitude(-180.0) - # assert -179.0 == NormalizeLongitude(181.0) - # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0) - # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0) - # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) - # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0) - # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0) - # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0) - # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0) - # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) - # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) - # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) - # The code in logs/storage/validator/logs_validator_traits.cc treats this type - # as if it were annotated as ST_LOCATION. - # Corresponds to the JSON property `latLng` - # @return [Google::Apis::PartnersV2::LatLng] - attr_accessor :lat_lng - - # CLDR (Common Locale Data Repository) region code . - # Corresponds to the JSON property `regionCode` - # @return [String] - attr_accessor :region_code - - # Dependent locality or sublocality. Used for UK dependent localities, or - # neighborhoods or boroughs in other locations. - # Corresponds to the JSON property `dependentLocality` - # @return [String] - attr_accessor :dependent_locality - - # The single string version of the address. - # Corresponds to the JSON property `address` - # @return [String] - attr_accessor :address - - # Values are frequently alphanumeric. - # Corresponds to the JSON property `postalCode` - # @return [String] - attr_accessor :postal_code - - # Use of this code is very country-specific, but will refer to a secondary - # classification code for sorting mail. - # Corresponds to the JSON property `sortingCode` - # @return [String] - attr_accessor :sorting_code - - # Language code of the address. Should be in BCP 47 format. - # Corresponds to the JSON property `languageCode` - # @return [String] - attr_accessor :language_code - - # The following address lines represent the most specific part of any - # address. - # Corresponds to the JSON property `addressLine` - # @return [Array] - attr_accessor :address_line - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @administrative_area = args[:administrative_area] if args.key?(:administrative_area) - @locality = args[:locality] if args.key?(:locality) - @lat_lng = args[:lat_lng] if args.key?(:lat_lng) - @region_code = args[:region_code] if args.key?(:region_code) - @dependent_locality = args[:dependent_locality] if args.key?(:dependent_locality) - @address = args[:address] if args.key?(:address) - @postal_code = args[:postal_code] if args.key?(:postal_code) - @sorting_code = args[:sorting_code] if args.key?(:sorting_code) - @language_code = args[:language_code] if args.key?(:language_code) - @address_line = args[:address_line] if args.key?(:address_line) - end - end - - # Status for a Google Partners certification exam. - class CertificationExamStatus - include Google::Apis::Core::Hashable - - # The type of certification exam. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # The number of people who have passed the certification exam. - # Corresponds to the JSON property `numberUsersPass` - # @return [Fixnum] - attr_accessor :number_users_pass - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @type = args[:type] if args.key?(:type) - @number_users_pass = args[:number_users_pass] if args.key?(:number_users_pass) - end - end - - # A token that allows a user to take an exam. - class ExamToken - include Google::Apis::Core::Hashable - - # The type of the exam the token belongs to. - # Corresponds to the JSON property `examType` - # @return [String] - attr_accessor :exam_type - - # The id of the exam the token is for. - # Corresponds to the JSON property `examId` - # @return [Fixnum] - attr_accessor :exam_id - - # The token, only present if the user has access to the exam. - # Corresponds to the JSON property `token` - # @return [String] - attr_accessor :token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @exam_type = args[:exam_type] if args.key?(:exam_type) - @exam_id = args[:exam_id] if args.key?(:exam_id) - @token = args[:token] if args.key?(:token) - end - end - - # A set of opt-ins for a user. - class OptIns - include Google::Apis::Core::Hashable - - # An opt-in about receiving email regarding new features and products. - # Corresponds to the JSON property `specialOffers` - # @return [Boolean] - attr_accessor :special_offers - alias_method :special_offers?, :special_offers - - # An opt-in about receiving email with customized AdWords campaign management - # tips. - # Corresponds to the JSON property `performanceSuggestions` - # @return [Boolean] - attr_accessor :performance_suggestions - alias_method :performance_suggestions?, :performance_suggestions - - # An opt-in to receive special promotional gifts and material in the mail. - # Corresponds to the JSON property `physicalMail` - # @return [Boolean] - attr_accessor :physical_mail - alias_method :physical_mail?, :physical_mail - - # An opt-in to allow recieivng phone calls about their Partners account. - # Corresponds to the JSON property `phoneContact` - # @return [Boolean] - attr_accessor :phone_contact - alias_method :phone_contact?, :phone_contact - - # An opt-in about receiving email from Partners marketing teams. Includes - # member-only events and special promotional offers for Google products. - # Corresponds to the JSON property `marketComm` - # @return [Boolean] - attr_accessor :market_comm - alias_method :market_comm?, :market_comm - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @special_offers = args[:special_offers] if args.key?(:special_offers) - @performance_suggestions = args[:performance_suggestions] if args.key?(:performance_suggestions) - @physical_mail = args[:physical_mail] if args.key?(:physical_mail) - @phone_contact = args[:phone_contact] if args.key?(:phone_contact) - @market_comm = args[:market_comm] if args.key?(:market_comm) - end - end - - # Information related to ranking of results. - class Rank - include Google::Apis::Core::Hashable - - # The type of rank. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # The numerical value of the rank. - # Corresponds to the JSON property `value` - # @return [Float] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @type = args[:type] if args.key?(:type) - @value = args[:value] if args.key?(:value) - end - end - - # Response message for - # GetPartnersStatus. - class GetPartnersStatusResponse - include Google::Apis::Core::Hashable - - # Common data that is in each API response. - # Corresponds to the JSON property `responseMetadata` - # @return [Google::Apis::PartnersV2::ResponseMetadata] - attr_accessor :response_metadata - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @response_metadata = args[:response_metadata] if args.key?(:response_metadata) - end - end - - # The profile information of a Partners user. - class UserProfile - include Google::Apis::Core::Hashable - - # A list of ids representing which industries the user selected. - # Corresponds to the JSON property `industries` - # @return [Array] - attr_accessor :industries - - # A set of opt-ins for a user. - # Corresponds to the JSON property `emailOptIns` - # @return [Google::Apis::PartnersV2::OptIns] - attr_accessor :email_opt_ins - - # The user's family name. - # Corresponds to the JSON property `familyName` - # @return [String] - attr_accessor :family_name - - # The list of languages this user understands. - # Corresponds to the JSON property `languages` - # @return [Array] - attr_accessor :languages - - # A list of ids representing which markets the user was interested in. - # Corresponds to the JSON property `markets` - # @return [Array] - attr_accessor :markets - - # If the user has edit access to multiple accounts, the user can choose the - # preferred account and it is used when a personal account is needed. Can - # be empty. - # Corresponds to the JSON property `adwordsManagerAccount` - # @return [Fixnum] - attr_accessor :adwords_manager_account - - # The user's phone number. - # Corresponds to the JSON property `phoneNumber` - # @return [String] - attr_accessor :phone_number - - # The user's primary country, an ISO 2-character code. - # Corresponds to the JSON property `primaryCountryCode` - # @return [String] - attr_accessor :primary_country_code - - # The email address the user has selected on the Partners site as primary. - # Corresponds to the JSON property `emailAddress` - # @return [String] - attr_accessor :email_address - - # A list of ids representing which channels the user selected they were in. - # Corresponds to the JSON property `channels` - # @return [Array] - attr_accessor :channels - - # Whether the user's public profile is visible to anyone with the URL. - # Corresponds to the JSON property `profilePublic` - # @return [Boolean] - attr_accessor :profile_public - alias_method :profile_public?, :profile_public - - # A list of ids represnting which job categories the user selected. - # Corresponds to the JSON property `jobFunctions` - # @return [Array] - attr_accessor :job_functions - - # The user's given name. - # Corresponds to the JSON property `givenName` - # @return [String] - attr_accessor :given_name - - # A location with address and geographic coordinates. May optionally contain a - # detailed (multi-field) version of the address. - # Corresponds to the JSON property `address` - # @return [Google::Apis::PartnersV2::Location] - attr_accessor :address - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @industries = args[:industries] if args.key?(:industries) - @email_opt_ins = args[:email_opt_ins] if args.key?(:email_opt_ins) - @family_name = args[:family_name] if args.key?(:family_name) - @languages = args[:languages] if args.key?(:languages) - @markets = args[:markets] if args.key?(:markets) - @adwords_manager_account = args[:adwords_manager_account] if args.key?(:adwords_manager_account) - @phone_number = args[:phone_number] if args.key?(:phone_number) - @primary_country_code = args[:primary_country_code] if args.key?(:primary_country_code) - @email_address = args[:email_address] if args.key?(:email_address) - @channels = args[:channels] if args.key?(:channels) - @profile_public = args[:profile_public] if args.key?(:profile_public) - @job_functions = args[:job_functions] if args.key?(:job_functions) - @given_name = args[:given_name] if args.key?(:given_name) - @address = args[:address] if args.key?(:address) - end - end - - # Historical information about a Google Partners Offer. - class HistoricalOffer - include Google::Apis::Core::Hashable - - # ID of client. - # Corresponds to the JSON property `clientId` - # @return [Fixnum] - attr_accessor :client_id - - # Name of the client. - # Corresponds to the JSON property `clientName` - # @return [String] - attr_accessor :client_name - - # Time last action was taken. - # Corresponds to the JSON property `lastModifiedTime` - # @return [String] - attr_accessor :last_modified_time - - # Client's AdWords page URL. - # Corresponds to the JSON property `adwordsUrl` - # @return [String] - attr_accessor :adwords_url - - # Type of offer. - # Corresponds to the JSON property `offerType` - # @return [String] - attr_accessor :offer_type - - # Name (First + Last) of the partners user to whom the incentive is allocated. - # Corresponds to the JSON property `senderName` - # @return [String] - attr_accessor :sender_name - - # Country Code for the offer country. - # Corresponds to the JSON property `offerCountryCode` - # @return [String] - attr_accessor :offer_country_code - - # Time this offer expires. - # Corresponds to the JSON property `expirationTime` - # @return [String] - attr_accessor :expiration_time - - # Offer code. - # Corresponds to the JSON property `offerCode` - # @return [String] - attr_accessor :offer_code - - # Time offer was first created. - # Corresponds to the JSON property `creationTime` - # @return [String] - attr_accessor :creation_time - - # Status of the offer. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # Email address for client. - # Corresponds to the JSON property `clientEmail` - # @return [String] - attr_accessor :client_email - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @client_id = args[:client_id] if args.key?(:client_id) - @client_name = args[:client_name] if args.key?(:client_name) - @last_modified_time = args[:last_modified_time] if args.key?(:last_modified_time) - @adwords_url = args[:adwords_url] if args.key?(:adwords_url) - @offer_type = args[:offer_type] if args.key?(:offer_type) - @sender_name = args[:sender_name] if args.key?(:sender_name) - @offer_country_code = args[:offer_country_code] if args.key?(:offer_country_code) - @expiration_time = args[:expiration_time] if args.key?(:expiration_time) - @offer_code = args[:offer_code] if args.key?(:offer_code) - @creation_time = args[:creation_time] if args.key?(:creation_time) - @status = args[:status] if args.key?(:status) - @client_email = args[:client_email] if args.key?(:client_email) - end - end - - # Values to use instead of the user's respective defaults. These are only - # honored by whitelisted products. - class UserOverrides - include Google::Apis::Core::Hashable - - # IP address to use instead of the user's geo-located IP address. - # Corresponds to the JSON property `ipAddress` - # @return [String] - attr_accessor :ip_address - - # Logged-in user ID to impersonate instead of the user's ID. - # Corresponds to the JSON property `userId` - # @return [String] - attr_accessor :user_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @ip_address = args[:ip_address] if args.key?(:ip_address) - @user_id = args[:user_id] if args.key?(:user_id) - end - end - - # Request message for - # LogUserEvent. - class LogUserEventRequest - include Google::Apis::Core::Hashable - - # The category the action belongs to. - # Corresponds to the JSON property `eventCategory` - # @return [String] - attr_accessor :event_category - - # A lead resource that represents an advertiser contact for a `Company`. These - # are usually generated via Google Partner Search (the advertiser portal). - # Corresponds to the JSON property `lead` - # @return [Google::Apis::PartnersV2::Lead] - attr_accessor :lead - - # The action that occurred. - # Corresponds to the JSON property `eventAction` - # @return [String] - attr_accessor :event_action - - # Common data that is in each API request. - # Corresponds to the JSON property `requestMetadata` - # @return [Google::Apis::PartnersV2::RequestMetadata] - attr_accessor :request_metadata - - # The URL where the event occurred. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - # The scope of the event. - # Corresponds to the JSON property `eventScope` - # @return [String] - attr_accessor :event_scope - - # List of event data for the event. - # Corresponds to the JSON property `eventDatas` - # @return [Array] - attr_accessor :event_datas - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @event_category = args[:event_category] if args.key?(:event_category) - @lead = args[:lead] if args.key?(:lead) - @event_action = args[:event_action] if args.key?(:event_action) - @request_metadata = args[:request_metadata] if args.key?(:request_metadata) - @url = args[:url] if args.key?(:url) - @event_scope = args[:event_scope] if args.key?(:event_scope) - @event_datas = args[:event_datas] if args.key?(:event_datas) - end - end - - # Details of the analytics events for a `Company` within a single day. - class AnalyticsDataPoint - include Google::Apis::Core::Hashable - - # Number of times the type of event occurred. - # Meaning depends on context (e.g. profile views, contacts, etc.). - # Corresponds to the JSON property `eventCount` - # @return [Fixnum] - attr_accessor :event_count - - # Location information of where these events occurred. - # Corresponds to the JSON property `eventLocations` - # @return [Array] - attr_accessor :event_locations - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @event_count = args[:event_count] if args.key?(:event_count) - @event_locations = args[:event_locations] if args.key?(:event_locations) - end - end - - # Analytics data for a `Company` within a single day. - class Analytics - include Google::Apis::Core::Hashable - - # Details of the analytics events for a `Company` within a single day. - # Corresponds to the JSON property `contacts` - # @return [Google::Apis::PartnersV2::AnalyticsDataPoint] - attr_accessor :contacts - - # Represents a whole calendar date, e.g. date of birth. The time of day and - # time zone are either specified elsewhere or are not significant. The date - # is relative to the Proleptic Gregorian Calendar. The day may be 0 to - # represent a year and month where the day is not significant, e.g. credit card - # expiration date. The year may be 0 to represent a month and day independent - # of year, e.g. anniversary date. Related types are google.type.TimeOfDay - # and `google.protobuf.Timestamp`. - # Corresponds to the JSON property `eventDate` - # @return [Google::Apis::PartnersV2::Date] - attr_accessor :event_date - - # Details of the analytics events for a `Company` within a single day. - # Corresponds to the JSON property `profileViews` - # @return [Google::Apis::PartnersV2::AnalyticsDataPoint] - attr_accessor :profile_views - - # Details of the analytics events for a `Company` within a single day. - # Corresponds to the JSON property `searchViews` - # @return [Google::Apis::PartnersV2::AnalyticsDataPoint] - attr_accessor :search_views - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @contacts = args[:contacts] if args.key?(:contacts) - @event_date = args[:event_date] if args.key?(:event_date) - @profile_views = args[:profile_views] if args.key?(:profile_views) - @search_views = args[:search_views] if args.key?(:search_views) - end - end - - # Information about a particular AdWords Manager Account. - # Read more at https://support.google.com/adwords/answer/6139186 - class AdWordsManagerAccountInfo - include Google::Apis::Core::Hashable - - # The AdWords Manager Account id. - # Corresponds to the JSON property `id` - # @return [Fixnum] - attr_accessor :id - - # Name of the customer this account represents. - # Corresponds to the JSON property `customerName` - # @return [String] - attr_accessor :customer_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] if args.key?(:id) - @customer_name = args[:customer_name] if args.key?(:customer_name) - end - end - - # Basic information from a public profile. - class PublicProfile - include Google::Apis::Core::Hashable - - # The ID which can be used to retrieve more details about the public profile. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The URL of the public profile. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - # The URL to the main profile image of the public profile. - # Corresponds to the JSON property `profileImage` - # @return [String] - attr_accessor :profile_image - - # The display name of the public profile. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # The URL to the main display image of the public profile. Being deprecated. - # Corresponds to the JSON property `displayImageUrl` - # @return [String] - attr_accessor :display_image_url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] if args.key?(:id) - @url = args[:url] if args.key?(:url) - @profile_image = args[:profile_image] if args.key?(:profile_image) - @display_name = args[:display_name] if args.key?(:display_name) - @display_image_url = args[:display_image_url] if args.key?(:display_image_url) - end - end - - # Common data that is in each API response. - class ResponseMetadata - include Google::Apis::Core::Hashable - - # Debug information about this request. - # Corresponds to the JSON property `debugInfo` - # @return [Google::Apis::PartnersV2::DebugInfo] - attr_accessor :debug_info - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @debug_info = args[:debug_info] if args.key?(:debug_info) - end - end - - # reCaptcha challenge info. - class RecaptchaChallenge - include Google::Apis::Core::Hashable - - # The ID of the reCaptcha challenge. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The response to the reCaptcha challenge. - # Corresponds to the JSON property `response` - # @return [String] - attr_accessor :response - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] if args.key?(:id) - @response = args[:response] if args.key?(:response) - end - end - - # Available Offers to be distributed. - class AvailableOffer - include Google::Apis::Core::Hashable - - # Description of the offer. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Level of this offer. - # Corresponds to the JSON property `offerLevel` - # @return [String] - attr_accessor :offer_level - - # Name of the offer. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Whether or not the list of qualified customers is definitely complete. - # Corresponds to the JSON property `qualifiedCustomersComplete` - # @return [Boolean] - attr_accessor :qualified_customers_complete - alias_method :qualified_customers_complete?, :qualified_customers_complete - - # ID of this offer. - # Corresponds to the JSON property `id` - # @return [Fixnum] - attr_accessor :id - - # Offer info by country. - # Corresponds to the JSON property `countryOfferInfos` - # @return [Array] - attr_accessor :country_offer_infos - - # Type of offer. - # Corresponds to the JSON property `offerType` - # @return [String] - attr_accessor :offer_type - - # The maximum age of an account [in days] to be eligible. - # Corresponds to the JSON property `maxAccountAge` - # @return [Fixnum] - attr_accessor :max_account_age - - # Customers who qualify for this offer. - # Corresponds to the JSON property `qualifiedCustomer` - # @return [Array] - attr_accessor :qualified_customer - - # Terms of the offer. - # Corresponds to the JSON property `terms` - # @return [String] - attr_accessor :terms - - # Should special text be shown on the offers page. - # Corresponds to the JSON property `showSpecialOfferCopy` - # @return [Boolean] - attr_accessor :show_special_offer_copy - alias_method :show_special_offer_copy?, :show_special_offer_copy - - # The number of codes for this offer that are available for distribution. - # Corresponds to the JSON property `available` - # @return [Fixnum] - attr_accessor :available - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @description = args[:description] if args.key?(:description) - @offer_level = args[:offer_level] if args.key?(:offer_level) - @name = args[:name] if args.key?(:name) - @qualified_customers_complete = args[:qualified_customers_complete] if args.key?(:qualified_customers_complete) - @id = args[:id] if args.key?(:id) - @country_offer_infos = args[:country_offer_infos] if args.key?(:country_offer_infos) - @offer_type = args[:offer_type] if args.key?(:offer_type) - @max_account_age = args[:max_account_age] if args.key?(:max_account_age) - @qualified_customer = args[:qualified_customer] if args.key?(:qualified_customer) - @terms = args[:terms] if args.key?(:terms) - @show_special_offer_copy = args[:show_special_offer_copy] if args.key?(:show_special_offer_copy) - @available = args[:available] if args.key?(:available) - end - end - - # An object representing a latitude/longitude pair. This is expressed as a pair - # of doubles representing degrees latitude and degrees longitude. Unless - # specified otherwise, this must conform to the - # WGS84 - # standard. Values must be within normalized ranges. - # Example of normalization code in Python: - # def NormalizeLongitude(longitude): - # """Wraps decimal degrees longitude to [-180.0, 180.0].""" - # q, r = divmod(longitude, 360.0) - # if r > 180.0 or (r == 180.0 and q <= -1.0): - # return r - 360.0 - # return r - # def NormalizeLatLng(latitude, longitude): - # """Wraps decimal degrees latitude and longitude to - # [-90.0, 90.0] and [-180.0, 180.0], respectively.""" - # r = latitude % 360.0 - # if r <= 90.0: - # return r, NormalizeLongitude(longitude) - # elif r >= 270.0: - # return r - 360, NormalizeLongitude(longitude) - # else: - # return 180 - r, NormalizeLongitude(longitude + 180.0) - # assert 180.0 == NormalizeLongitude(180.0) - # assert -180.0 == NormalizeLongitude(-180.0) - # assert -179.0 == NormalizeLongitude(181.0) - # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0) - # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0) - # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) - # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0) - # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0) - # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0) - # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0) - # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) - # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) - # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) - # The code in logs/storage/validator/logs_validator_traits.cc treats this type - # as if it were annotated as ST_LOCATION. - class LatLng - include Google::Apis::Core::Hashable - - # The longitude in degrees. It must be in the range [-180.0, +180.0]. - # Corresponds to the JSON property `longitude` - # @return [Float] - attr_accessor :longitude - - # The latitude in degrees. It must be in the range [-90.0, +90.0]. - # Corresponds to the JSON property `latitude` - # @return [Float] - attr_accessor :latitude - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @longitude = args[:longitude] if args.key?(:longitude) - @latitude = args[:latitude] if args.key?(:latitude) - end - end - - # Represents an amount of money with its currency type. - class Money - include Google::Apis::Core::Hashable - - # The whole units of the amount. - # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. - # Corresponds to the JSON property `units` - # @return [Fixnum] - attr_accessor :units - - # The 3-letter currency code defined in ISO 4217. - # Corresponds to the JSON property `currencyCode` - # @return [String] - attr_accessor :currency_code - - # Number of nano (10^-9) units of the amount. - # The value must be between -999,999,999 and +999,999,999 inclusive. - # If `units` is positive, `nanos` must be positive or zero. - # If `units` is zero, `nanos` can be positive, zero, or negative. - # If `units` is negative, `nanos` must be negative or zero. - # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. - # Corresponds to the JSON property `nanos` - # @return [Fixnum] - attr_accessor :nanos - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @units = args[:units] if args.key?(:units) - @currency_code = args[:currency_code] if args.key?(:currency_code) - @nanos = args[:nanos] if args.key?(:nanos) - end - end - # Analytics aggregated data for a `Company` for a given date range. class AnalyticsSummary include Google::Apis::Core::Hashable - # Aggregated number of profile views for the `Company` for given date range. - # Corresponds to the JSON property `profileViewsCount` - # @return [Fixnum] - attr_accessor :profile_views_count - # Aggregated number of times users saw the `Company` # in Google Partners Search results for given date range. # Corresponds to the JSON property `searchViewsCount` @@ -1002,15 +38,20 @@ module Google # @return [Fixnum] attr_accessor :contacts_count + # Aggregated number of profile views for the `Company` for given date range. + # Corresponds to the JSON property `profileViewsCount` + # @return [Fixnum] + attr_accessor :profile_views_count + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @profile_views_count = args[:profile_views_count] if args.key?(:profile_views_count) @search_views_count = args[:search_views_count] if args.key?(:search_views_count) @contacts_count = args[:contacts_count] if args.key?(:contacts_count) + @profile_views_count = args[:profile_views_count] if args.key?(:profile_views_count) end end @@ -1019,16 +60,6 @@ module Google class LogMessageRequest include Google::Apis::Core::Hashable - # Map of client info, such as URL, browser navigator, browser platform, etc. - # Corresponds to the JSON property `clientInfo` - # @return [Hash] - attr_accessor :client_info - - # Common data that is in each API request. - # Corresponds to the JSON property `requestMetadata` - # @return [Google::Apis::PartnersV2::RequestMetadata] - attr_accessor :request_metadata - # Message level of client message. # Corresponds to the JSON property `level` # @return [String] @@ -1039,16 +70,26 @@ module Google # @return [String] attr_accessor :details + # Map of client info, such as URL, browser navigator, browser platform, etc. + # Corresponds to the JSON property `clientInfo` + # @return [Hash] + attr_accessor :client_info + + # Common data that is in each API request. + # Corresponds to the JSON property `requestMetadata` + # @return [Google::Apis::PartnersV2::RequestMetadata] + attr_accessor :request_metadata + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @client_info = args[:client_info] if args.key?(:client_info) - @request_metadata = args[:request_metadata] if args.key?(:request_metadata) @level = args[:level] if args.key?(:level) @details = args[:details] if args.key?(:details) + @client_info = args[:client_info] if args.key?(:client_info) + @request_metadata = args[:request_metadata] if args.key?(:request_metadata) end end @@ -1057,11 +98,6 @@ module Google class Lead include Google::Apis::Core::Hashable - # Timestamp of when this lead was created. - # Corresponds to the JSON property `createTime` - # @return [String] - attr_accessor :create_time - # Whether or not the lead signed up for marketing emails # Corresponds to the JSON property `marketingOptIn` # @return [Boolean] @@ -1073,16 +109,16 @@ module Google # @return [String] attr_accessor :type - # First name of lead source. - # Corresponds to the JSON property `givenName` - # @return [String] - attr_accessor :given_name - # Represents an amount of money with its currency type. # Corresponds to the JSON property `minMonthlyBudget` # @return [Google::Apis::PartnersV2::Money] attr_accessor :min_monthly_budget + # First name of lead source. + # Corresponds to the JSON property `givenName` + # @return [String] + attr_accessor :given_name + # Website URL of lead source. # Corresponds to the JSON property `websiteUrl` # @return [String] @@ -1095,16 +131,16 @@ module Google # @return [String] attr_accessor :language_code - # List of reasons for using Google Partner Search and creating a lead. - # Corresponds to the JSON property `gpsMotivations` - # @return [Array] - attr_accessor :gps_motivations - # The lead's state in relation to the company. # Corresponds to the JSON property `state` # @return [String] attr_accessor :state + # List of reasons for using Google Partner Search and creating a lead. + # Corresponds to the JSON property `gpsMotivations` + # @return [Array] + attr_accessor :gps_motivations + # Email address of lead source. # Corresponds to the JSON property `email` # @return [String] @@ -1115,25 +151,30 @@ module Google # @return [String] attr_accessor :family_name + # Comments lead source gave. + # Corresponds to the JSON property `comments` + # @return [String] + attr_accessor :comments + # ID of the lead. # Corresponds to the JSON property `id` # @return [String] attr_accessor :id - # Comments lead source gave. - # Corresponds to the JSON property `comments` + # Phone number of lead source. + # Corresponds to the JSON property `phoneNumber` # @return [String] - attr_accessor :comments + attr_accessor :phone_number # The AdWords Customer ID of the lead. # Corresponds to the JSON property `adwordsCustomerId` # @return [Fixnum] attr_accessor :adwords_customer_id - # Phone number of lead source. - # Corresponds to the JSON property `phoneNumber` + # Timestamp of when this lead was created. + # Corresponds to the JSON property `createTime` # @return [String] - attr_accessor :phone_number + attr_accessor :create_time def initialize(**args) update!(**args) @@ -1141,21 +182,21 @@ module Google # Update properties of this object def update!(**args) - @create_time = args[:create_time] if args.key?(:create_time) @marketing_opt_in = args[:marketing_opt_in] if args.key?(:marketing_opt_in) @type = args[:type] if args.key?(:type) - @given_name = args[:given_name] if args.key?(:given_name) @min_monthly_budget = args[:min_monthly_budget] if args.key?(:min_monthly_budget) + @given_name = args[:given_name] if args.key?(:given_name) @website_url = args[:website_url] if args.key?(:website_url) @language_code = args[:language_code] if args.key?(:language_code) - @gps_motivations = args[:gps_motivations] if args.key?(:gps_motivations) @state = args[:state] if args.key?(:state) + @gps_motivations = args[:gps_motivations] if args.key?(:gps_motivations) @email = args[:email] if args.key?(:email) @family_name = args[:family_name] if args.key?(:family_name) - @id = args[:id] if args.key?(:id) @comments = args[:comments] if args.key?(:comments) - @adwords_customer_id = args[:adwords_customer_id] if args.key?(:adwords_customer_id) + @id = args[:id] if args.key?(:id) @phone_number = args[:phone_number] if args.key?(:phone_number) + @adwords_customer_id = args[:adwords_customer_id] if args.key?(:adwords_customer_id) + @create_time = args[:create_time] if args.key?(:create_time) end end @@ -1163,11 +204,6 @@ module Google class DebugInfo include Google::Apis::Core::Hashable - # URL of the service that handled this request. - # Corresponds to the JSON property `serviceUrl` - # @return [String] - attr_accessor :service_url - # Info about the server that serviced this request. # Corresponds to the JSON property `serverInfo` # @return [String] @@ -1178,15 +214,20 @@ module Google # @return [String] attr_accessor :server_trace_info + # URL of the service that handled this request. + # Corresponds to the JSON property `serviceUrl` + # @return [String] + attr_accessor :service_url + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @service_url = args[:service_url] if args.key?(:service_url) @server_info = args[:server_info] if args.key?(:server_info) @server_trace_info = args[:server_trace_info] if args.key?(:server_trace_info) + @service_url = args[:service_url] if args.key?(:service_url) end end @@ -1221,44 +262,6 @@ module Google class CompanyRelation include Google::Apis::Core::Hashable - # Indicates if the user is an admin for this company. - # Corresponds to the JSON property `companyAdmin` - # @return [Boolean] - attr_accessor :company_admin - alias_method :company_admin?, :company_admin - - # The primary address for this company. - # Corresponds to the JSON property `address` - # @return [String] - attr_accessor :address - - # The flag that indicates if the company is pending verification. - # Corresponds to the JSON property `isPending` - # @return [Boolean] - attr_accessor :is_pending - alias_method :is_pending?, :is_pending - - # The timestamp of when affiliation was requested. - # @OutputOnly - # Corresponds to the JSON property `creationTime` - # @return [String] - attr_accessor :creation_time - - # The state of relationship, in terms of approvals. - # Corresponds to the JSON property `state` - # @return [String] - attr_accessor :state - - # The name (in the company's primary language) for the company. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The AdWords manager account # associated this company. - # Corresponds to the JSON property `managerAccount` - # @return [Fixnum] - attr_accessor :manager_account - # The segment the company is classified as. # Corresponds to the JSON property `segment` # @return [Array] @@ -1301,19 +304,50 @@ module Google # @return [String] attr_accessor :resolved_timestamp + # Indicates if the user is an admin for this company. + # Corresponds to the JSON property `companyAdmin` + # @return [Boolean] + attr_accessor :company_admin + alias_method :company_admin?, :company_admin + + # The primary address for this company. + # Corresponds to the JSON property `address` + # @return [String] + attr_accessor :address + + # The flag that indicates if the company is pending verification. + # Corresponds to the JSON property `isPending` + # @return [Boolean] + attr_accessor :is_pending + alias_method :is_pending?, :is_pending + + # The timestamp of when affiliation was requested. + # @OutputOnly + # Corresponds to the JSON property `creationTime` + # @return [String] + attr_accessor :creation_time + + # The state of relationship, in terms of approvals. + # Corresponds to the JSON property `state` + # @return [String] + attr_accessor :state + + # The name (in the company's primary language) for the company. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The AdWords manager account # associated this company. + # Corresponds to the JSON property `managerAccount` + # @return [Fixnum] + attr_accessor :manager_account + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @company_admin = args[:company_admin] if args.key?(:company_admin) - @address = args[:address] if args.key?(:address) - @is_pending = args[:is_pending] if args.key?(:is_pending) - @creation_time = args[:creation_time] if args.key?(:creation_time) - @state = args[:state] if args.key?(:state) - @name = args[:name] if args.key?(:name) - @manager_account = args[:manager_account] if args.key?(:manager_account) @segment = args[:segment] if args.key?(:segment) @specialization_status = args[:specialization_status] if args.key?(:specialization_status) @badge_tier = args[:badge_tier] if args.key?(:badge_tier) @@ -1322,6 +356,13 @@ module Google @company_id = args[:company_id] if args.key?(:company_id) @logo_url = args[:logo_url] if args.key?(:logo_url) @resolved_timestamp = args[:resolved_timestamp] if args.key?(:resolved_timestamp) + @company_admin = args[:company_admin] if args.key?(:company_admin) + @address = args[:address] if args.key?(:address) + @is_pending = args[:is_pending] if args.key?(:is_pending) + @creation_time = args[:creation_time] if args.key?(:creation_time) + @state = args[:state] if args.key?(:state) + @name = args[:name] if args.key?(:name) + @manager_account = args[:manager_account] if args.key?(:manager_account) end end @@ -1412,42 +453,20 @@ module Google end end - # Request message for CreateLead. - class CreateLeadRequest - include Google::Apis::Core::Hashable - - # Common data that is in each API request. - # Corresponds to the JSON property `requestMetadata` - # @return [Google::Apis::PartnersV2::RequestMetadata] - attr_accessor :request_metadata - - # A lead resource that represents an advertiser contact for a `Company`. These - # are usually generated via Google Partner Search (the advertiser portal). - # Corresponds to the JSON property `lead` - # @return [Google::Apis::PartnersV2::Lead] - attr_accessor :lead - - # reCaptcha challenge info. - # Corresponds to the JSON property `recaptchaChallenge` - # @return [Google::Apis::PartnersV2::RecaptchaChallenge] - attr_accessor :recaptcha_challenge - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @request_metadata = args[:request_metadata] if args.key?(:request_metadata) - @lead = args[:lead] if args.key?(:lead) - @recaptcha_challenge = args[:recaptcha_challenge] if args.key?(:recaptcha_challenge) - end - end - # Common data that is in each API request. class RequestMetadata include Google::Apis::Core::Hashable + # Experiment IDs the current request belongs to. + # Corresponds to the JSON property `experimentIds` + # @return [Array] + attr_accessor :experiment_ids + + # Source of traffic for the current request. + # Corresponds to the JSON property `trafficSource` + # @return [Google::Apis::PartnersV2::TrafficSource] + attr_accessor :traffic_source + # Locale to use for the current request. # Corresponds to the JSON property `locale` # @return [String] @@ -1464,15 +483,39 @@ module Google # @return [String] attr_accessor :partners_session_id - # Experiment IDs the current request belongs to. - # Corresponds to the JSON property `experimentIds` - # @return [Array] - attr_accessor :experiment_ids + def initialize(**args) + update!(**args) + end - # Source of traffic for the current request. - # Corresponds to the JSON property `trafficSource` - # @return [Google::Apis::PartnersV2::TrafficSource] - attr_accessor :traffic_source + # Update properties of this object + def update!(**args) + @experiment_ids = args[:experiment_ids] if args.key?(:experiment_ids) + @traffic_source = args[:traffic_source] if args.key?(:traffic_source) + @locale = args[:locale] if args.key?(:locale) + @user_overrides = args[:user_overrides] if args.key?(:user_overrides) + @partners_session_id = args[:partners_session_id] if args.key?(:partners_session_id) + end + end + + # Request message for CreateLead. + class CreateLeadRequest + include Google::Apis::Core::Hashable + + # A lead resource that represents an advertiser contact for a `Company`. These + # are usually generated via Google Partner Search (the advertiser portal). + # Corresponds to the JSON property `lead` + # @return [Google::Apis::PartnersV2::Lead] + attr_accessor :lead + + # reCaptcha challenge info. + # Corresponds to the JSON property `recaptchaChallenge` + # @return [Google::Apis::PartnersV2::RecaptchaChallenge] + attr_accessor :recaptcha_challenge + + # Common data that is in each API request. + # Corresponds to the JSON property `requestMetadata` + # @return [Google::Apis::PartnersV2::RequestMetadata] + attr_accessor :request_metadata def initialize(**args) update!(**args) @@ -1480,11 +523,9 @@ module Google # Update properties of this object def update!(**args) - @locale = args[:locale] if args.key?(:locale) - @user_overrides = args[:user_overrides] if args.key?(:user_overrides) - @partners_session_id = args[:partners_session_id] if args.key?(:partners_session_id) - @experiment_ids = args[:experiment_ids] if args.key?(:experiment_ids) - @traffic_source = args[:traffic_source] if args.key?(:traffic_source) + @lead = args[:lead] if args.key?(:lead) + @recaptcha_challenge = args[:recaptcha_challenge] if args.key?(:recaptcha_challenge) + @request_metadata = args[:request_metadata] if args.key?(:request_metadata) end end @@ -1492,24 +533,24 @@ module Google class EventData include Google::Apis::Core::Hashable - # Data type. - # Corresponds to the JSON property `key` - # @return [String] - attr_accessor :key - # Data values. # Corresponds to the JSON property `values` # @return [Array] attr_accessor :values + # Data type. + # Corresponds to the JSON property `key` + # @return [String] + attr_accessor :key + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @key = args[:key] if args.key?(:key) @values = args[:values] if args.key?(:values) + @key = args[:key] if args.key?(:key) end end @@ -1568,6 +609,11 @@ module Google class ListOffersResponse include Google::Apis::Core::Hashable + # Available Offers to be distributed. + # Corresponds to the JSON property `availableOffers` + # @return [Array] + attr_accessor :available_offers + # Common data that is in each API response. # Corresponds to the JSON property `responseMetadata` # @return [Google::Apis::PartnersV2::ResponseMetadata] @@ -1578,20 +624,15 @@ module Google # @return [String] attr_accessor :no_offer_reason - # Available Offers to be distributed. - # Corresponds to the JSON property `availableOffers` - # @return [Array] - attr_accessor :available_offers - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @available_offers = args[:available_offers] if args.key?(:available_offers) @response_metadata = args[:response_metadata] if args.key?(:response_metadata) @no_offer_reason = args[:no_offer_reason] if args.key?(:no_offer_reason) - @available_offers = args[:available_offers] if args.key?(:available_offers) end end @@ -1692,21 +733,11 @@ module Google # @return [String] attr_accessor :adwords_url - # External CID for the customer. - # Corresponds to the JSON property `externalCid` - # @return [Fixnum] - attr_accessor :external_cid - # Time the customer was created. # Corresponds to the JSON property `creationTime` # @return [String] attr_accessor :creation_time - # Country code of the customer. - # Corresponds to the JSON property `countryCode` - # @return [String] - attr_accessor :country_code - # Days the customer is still eligible. # Corresponds to the JSON property `eligibilityDaysLeft` # @return [Fixnum] @@ -1717,6 +748,16 @@ module Google # @return [String] attr_accessor :offer_type + # External CID for the customer. + # Corresponds to the JSON property `externalCid` + # @return [Fixnum] + attr_accessor :external_cid + + # Country code of the customer. + # Corresponds to the JSON property `countryCode` + # @return [String] + attr_accessor :country_code + def initialize(**args) update!(**args) end @@ -1727,11 +768,11 @@ module Google @name = args[:name] if args.key?(:name) @spend_x_amount = args[:spend_x_amount] if args.key?(:spend_x_amount) @adwords_url = args[:adwords_url] if args.key?(:adwords_url) - @external_cid = args[:external_cid] if args.key?(:external_cid) @creation_time = args[:creation_time] if args.key?(:creation_time) - @country_code = args[:country_code] if args.key?(:country_code) @eligibility_days_left = args[:eligibility_days_left] if args.key?(:eligibility_days_left) @offer_type = args[:offer_type] if args.key?(:offer_type) + @external_cid = args[:external_cid] if args.key?(:external_cid) + @country_code = args[:country_code] if args.key?(:country_code) end end @@ -1739,11 +780,6 @@ module Google class CertificationStatus include Google::Apis::Core::Hashable - # Number of people who are certified, - # Corresponds to the JSON property `userCount` - # @return [Fixnum] - attr_accessor :user_count - # Whether certification is passing. # Corresponds to the JSON property `isCertified` # @return [Boolean] @@ -1760,16 +796,21 @@ module Google # @return [String] attr_accessor :type + # Number of people who are certified, + # Corresponds to the JSON property `userCount` + # @return [Fixnum] + attr_accessor :user_count + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @user_count = args[:user_count] if args.key?(:user_count) @is_certified = args[:is_certified] if args.key?(:is_certified) @exam_statuses = args[:exam_statuses] if args.key?(:exam_statuses) @type = args[:type] if args.key?(:type) + @user_count = args[:user_count] if args.key?(:user_count) end end @@ -1836,6 +877,11 @@ module Google class ListOffersHistoryResponse include Google::Apis::Core::Hashable + # Number of results across all pages. + # Corresponds to the JSON property `totalResults` + # @return [Fixnum] + attr_accessor :total_results + # True if this response is showing entire company history. # Corresponds to the JSON property `showingEntireCompany` # @return [Boolean] @@ -1863,23 +909,18 @@ module Google attr_accessor :can_show_entire_company alias_method :can_show_entire_company?, :can_show_entire_company - # Number of results across all pages. - # Corresponds to the JSON property `totalResults` - # @return [Fixnum] - attr_accessor :total_results - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @total_results = args[:total_results] if args.key?(:total_results) @showing_entire_company = args[:showing_entire_company] if args.key?(:showing_entire_company) @offers = args[:offers] if args.key?(:offers) @next_page_token = args[:next_page_token] if args.key?(:next_page_token) @response_metadata = args[:response_metadata] if args.key?(:response_metadata) @can_show_entire_company = args[:can_show_entire_company] if args.key?(:can_show_entire_company) - @total_results = args[:total_results] if args.key?(:total_results) end end @@ -1977,30 +1018,6 @@ module Google class User include Google::Apis::Core::Hashable - # The list of achieved certifications. These are calculated based on exam - # results and other requirements. - # @OutputOnly - # Corresponds to the JSON property `certificationStatus` - # @return [Array] - attr_accessor :certification_status - - # The email address used by the user used for company verification. - # @OutputOnly - # Corresponds to the JSON property `companyVerificationEmail` - # @return [String] - attr_accessor :company_verification_email - - # A CompanyRelation resource representing information about a user's - # affiliation and standing with a company in Partners. - # Corresponds to the JSON property `company` - # @return [Google::Apis::PartnersV2::CompanyRelation] - attr_accessor :company - - # The profile information of a Partners user. - # Corresponds to the JSON property `profile` - # @return [Google::Apis::PartnersV2::UserProfile] - attr_accessor :profile - # The most recent time the user interacted with the Partners site. # @OutputOnly # Corresponds to the JSON property `lastAccessTime` @@ -2038,22 +1055,46 @@ module Google # @return [Google::Apis::PartnersV2::PublicProfile] attr_accessor :public_profile + # The list of achieved certifications. These are calculated based on exam + # results and other requirements. + # @OutputOnly + # Corresponds to the JSON property `certificationStatus` + # @return [Array] + attr_accessor :certification_status + + # The email address used by the user used for company verification. + # @OutputOnly + # Corresponds to the JSON property `companyVerificationEmail` + # @return [String] + attr_accessor :company_verification_email + + # A CompanyRelation resource representing information about a user's + # affiliation and standing with a company in Partners. + # Corresponds to the JSON property `company` + # @return [Google::Apis::PartnersV2::CompanyRelation] + attr_accessor :company + + # The profile information of a Partners user. + # Corresponds to the JSON property `profile` + # @return [Google::Apis::PartnersV2::UserProfile] + attr_accessor :profile + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @certification_status = args[:certification_status] if args.key?(:certification_status) - @company_verification_email = args[:company_verification_email] if args.key?(:company_verification_email) - @company = args[:company] if args.key?(:company) - @profile = args[:profile] if args.key?(:profile) @last_access_time = args[:last_access_time] if args.key?(:last_access_time) @primary_emails = args[:primary_emails] if args.key?(:primary_emails) @available_adwords_manager_accounts = args[:available_adwords_manager_accounts] if args.key?(:available_adwords_manager_accounts) @exam_status = args[:exam_status] if args.key?(:exam_status) @id = args[:id] if args.key?(:id) @public_profile = args[:public_profile] if args.key?(:public_profile) + @certification_status = args[:certification_status] if args.key?(:certification_status) + @company_verification_email = args[:company_verification_email] if args.key?(:company_verification_email) + @company = args[:company] if args.key?(:company) + @profile = args[:profile] if args.key?(:profile) end end @@ -2105,11 +1146,6 @@ module Google class ListLeadsResponse include Google::Apis::Core::Hashable - # The list of leads. - # Corresponds to the JSON property `leads` - # @return [Array] - attr_accessor :leads - # A token to retrieve next page of results. # Pass this value in the `ListLeadsRequest.page_token` field in the # subsequent call to @@ -2129,16 +1165,21 @@ module Google # @return [Fixnum] attr_accessor :total_size + # The list of leads. + # Corresponds to the JSON property `leads` + # @return [Array] + attr_accessor :leads + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @leads = args[:leads] if args.key?(:leads) @next_page_token = args[:next_page_token] if args.key?(:next_page_token) @response_metadata = args[:response_metadata] if args.key?(:response_metadata) @total_size = args[:total_size] if args.key?(:total_size) + @leads = args[:leads] if args.key?(:leads) end end @@ -2147,79 +1188,6 @@ module Google class Company include Google::Apis::Core::Hashable - # The Primary AdWords Manager Account id. - # Corresponds to the JSON property `primaryAdwordsManagerAccountId` - # @return [Fixnum] - attr_accessor :primary_adwords_manager_account_id - - # The name of the company. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The list of localized info for the company. - # Corresponds to the JSON property `localizedInfos` - # @return [Array] - attr_accessor :localized_infos - - # The ID of the company. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The list of Google Partners certification statuses for the company. - # Corresponds to the JSON property `certificationStatuses` - # @return [Array] - attr_accessor :certification_statuses - - # Represents an amount of money with its currency type. - # Corresponds to the JSON property `originalMinMonthlyBudget` - # @return [Google::Apis::PartnersV2::Money] - attr_accessor :original_min_monthly_budget - - # Basic information from a public profile. - # Corresponds to the JSON property `publicProfile` - # @return [Google::Apis::PartnersV2::PublicProfile] - attr_accessor :public_profile - - # Services the company can help with. - # Corresponds to the JSON property `services` - # @return [Array] - attr_accessor :services - - # A location with address and geographic coordinates. May optionally contain a - # detailed (multi-field) version of the address. - # Corresponds to the JSON property `primaryLocation` - # @return [Google::Apis::PartnersV2::Location] - attr_accessor :primary_location - - # Information related to the ranking of the company within the list of - # companies. - # Corresponds to the JSON property `ranks` - # @return [Array] - attr_accessor :ranks - - # Partner badge tier - # Corresponds to the JSON property `badgeTier` - # @return [String] - attr_accessor :badge_tier - - # The list of Google Partners specialization statuses for the company. - # Corresponds to the JSON property `specializationStatus` - # @return [Array] - attr_accessor :specialization_status - - # Company type labels listed on the company's profile. - # Corresponds to the JSON property `companyTypes` - # @return [Array] - attr_accessor :company_types - - # Email domains that allow users with a matching email address to get - # auto-approved for associating with this company. - # Corresponds to the JSON property `autoApprovalEmailDomains` - # @return [Array] - attr_accessor :auto_approval_email_domains - # The public viewability status of the company's profile. # Corresponds to the JSON property `profileStatus` # @return [String] @@ -2262,26 +1230,85 @@ module Google # @return [Array] attr_accessor :additional_websites + # The Primary AdWords Manager Account id. + # Corresponds to the JSON property `primaryAdwordsManagerAccountId` + # @return [Fixnum] + attr_accessor :primary_adwords_manager_account_id + + # The name of the company. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The list of localized info for the company. + # Corresponds to the JSON property `localizedInfos` + # @return [Array] + attr_accessor :localized_infos + + # The list of Google Partners certification statuses for the company. + # Corresponds to the JSON property `certificationStatuses` + # @return [Array] + attr_accessor :certification_statuses + + # The ID of the company. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # Represents an amount of money with its currency type. + # Corresponds to the JSON property `originalMinMonthlyBudget` + # @return [Google::Apis::PartnersV2::Money] + attr_accessor :original_min_monthly_budget + + # Basic information from a public profile. + # Corresponds to the JSON property `publicProfile` + # @return [Google::Apis::PartnersV2::PublicProfile] + attr_accessor :public_profile + + # A location with address and geographic coordinates. May optionally contain a + # detailed (multi-field) version of the address. + # Corresponds to the JSON property `primaryLocation` + # @return [Google::Apis::PartnersV2::Location] + attr_accessor :primary_location + + # Services the company can help with. + # Corresponds to the JSON property `services` + # @return [Array] + attr_accessor :services + + # Information related to the ranking of the company within the list of + # companies. + # Corresponds to the JSON property `ranks` + # @return [Array] + attr_accessor :ranks + + # The list of Google Partners specialization statuses for the company. + # Corresponds to the JSON property `specializationStatus` + # @return [Array] + attr_accessor :specialization_status + + # Partner badge tier + # Corresponds to the JSON property `badgeTier` + # @return [String] + attr_accessor :badge_tier + + # Email domains that allow users with a matching email address to get + # auto-approved for associating with this company. + # Corresponds to the JSON property `autoApprovalEmailDomains` + # @return [Array] + attr_accessor :auto_approval_email_domains + + # Company type labels listed on the company's profile. + # Corresponds to the JSON property `companyTypes` + # @return [Array] + attr_accessor :company_types + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @primary_adwords_manager_account_id = args[:primary_adwords_manager_account_id] if args.key?(:primary_adwords_manager_account_id) - @name = args[:name] if args.key?(:name) - @localized_infos = args[:localized_infos] if args.key?(:localized_infos) - @id = args[:id] if args.key?(:id) - @certification_statuses = args[:certification_statuses] if args.key?(:certification_statuses) - @original_min_monthly_budget = args[:original_min_monthly_budget] if args.key?(:original_min_monthly_budget) - @public_profile = args[:public_profile] if args.key?(:public_profile) - @services = args[:services] if args.key?(:services) - @primary_location = args[:primary_location] if args.key?(:primary_location) - @ranks = args[:ranks] if args.key?(:ranks) - @badge_tier = args[:badge_tier] if args.key?(:badge_tier) - @specialization_status = args[:specialization_status] if args.key?(:specialization_status) - @company_types = args[:company_types] if args.key?(:company_types) - @auto_approval_email_domains = args[:auto_approval_email_domains] if args.key?(:auto_approval_email_domains) @profile_status = args[:profile_status] if args.key?(:profile_status) @primary_language_code = args[:primary_language_code] if args.key?(:primary_language_code) @locations = args[:locations] if args.key?(:locations) @@ -2289,6 +1316,979 @@ module Google @industries = args[:industries] if args.key?(:industries) @website_url = args[:website_url] if args.key?(:website_url) @additional_websites = args[:additional_websites] if args.key?(:additional_websites) + @primary_adwords_manager_account_id = args[:primary_adwords_manager_account_id] if args.key?(:primary_adwords_manager_account_id) + @name = args[:name] if args.key?(:name) + @localized_infos = args[:localized_infos] if args.key?(:localized_infos) + @certification_statuses = args[:certification_statuses] if args.key?(:certification_statuses) + @id = args[:id] if args.key?(:id) + @original_min_monthly_budget = args[:original_min_monthly_budget] if args.key?(:original_min_monthly_budget) + @public_profile = args[:public_profile] if args.key?(:public_profile) + @primary_location = args[:primary_location] if args.key?(:primary_location) + @services = args[:services] if args.key?(:services) + @ranks = args[:ranks] if args.key?(:ranks) + @specialization_status = args[:specialization_status] if args.key?(:specialization_status) + @badge_tier = args[:badge_tier] if args.key?(:badge_tier) + @auto_approval_email_domains = args[:auto_approval_email_domains] if args.key?(:auto_approval_email_domains) + @company_types = args[:company_types] if args.key?(:company_types) + end + end + + # Response message for CreateLead. + class CreateLeadResponse + include Google::Apis::Core::Hashable + + # Common data that is in each API response. + # Corresponds to the JSON property `responseMetadata` + # @return [Google::Apis::PartnersV2::ResponseMetadata] + attr_accessor :response_metadata + + # A lead resource that represents an advertiser contact for a `Company`. These + # are usually generated via Google Partner Search (the advertiser portal). + # Corresponds to the JSON property `lead` + # @return [Google::Apis::PartnersV2::Lead] + attr_accessor :lead + + # The outcome of reCaptcha + # validation. + # Corresponds to the JSON property `recaptchaStatus` + # @return [String] + attr_accessor :recaptcha_status + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @response_metadata = args[:response_metadata] if args.key?(:response_metadata) + @lead = args[:lead] if args.key?(:lead) + @recaptcha_status = args[:recaptcha_status] if args.key?(:recaptcha_status) + end + end + + # Response message for GetCompany. + class GetCompanyResponse + include Google::Apis::Core::Hashable + + # A company resource in the Google Partners API. Once certified, it qualifies + # for being searched by advertisers. + # Corresponds to the JSON property `company` + # @return [Google::Apis::PartnersV2::Company] + attr_accessor :company + + # Common data that is in each API response. + # Corresponds to the JSON property `responseMetadata` + # @return [Google::Apis::PartnersV2::ResponseMetadata] + attr_accessor :response_metadata + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @company = args[:company] if args.key?(:company) + @response_metadata = args[:response_metadata] if args.key?(:response_metadata) + end + end + + # A location with address and geographic coordinates. May optionally contain a + # detailed (multi-field) version of the address. + class Location + include Google::Apis::Core::Hashable + + # Values are frequently alphanumeric. + # Corresponds to the JSON property `postalCode` + # @return [String] + attr_accessor :postal_code + + # Use of this code is very country-specific, but will refer to a secondary + # classification code for sorting mail. + # Corresponds to the JSON property `sortingCode` + # @return [String] + attr_accessor :sorting_code + + # Language code of the address. Should be in BCP 47 format. + # Corresponds to the JSON property `languageCode` + # @return [String] + attr_accessor :language_code + + # The following address lines represent the most specific part of any + # address. + # Corresponds to the JSON property `addressLine` + # @return [Array] + attr_accessor :address_line + + # Generally refers to the city/town portion of an address. + # Corresponds to the JSON property `locality` + # @return [String] + attr_accessor :locality + + # Top-level administrative subdivision of this country. + # Corresponds to the JSON property `administrativeArea` + # @return [String] + attr_accessor :administrative_area + + # An object representing a latitude/longitude pair. This is expressed as a pair + # of doubles representing degrees latitude and degrees longitude. Unless + # specified otherwise, this must conform to the + # WGS84 + # standard. Values must be within normalized ranges. + # Example of normalization code in Python: + # def NormalizeLongitude(longitude): + # """Wraps decimal degrees longitude to [-180.0, 180.0].""" + # q, r = divmod(longitude, 360.0) + # if r > 180.0 or (r == 180.0 and q <= -1.0): + # return r - 360.0 + # return r + # def NormalizeLatLng(latitude, longitude): + # """Wraps decimal degrees latitude and longitude to + # [-90.0, 90.0] and [-180.0, 180.0], respectively.""" + # r = latitude % 360.0 + # if r <= 90.0: + # return r, NormalizeLongitude(longitude) + # elif r >= 270.0: + # return r - 360, NormalizeLongitude(longitude) + # else: + # return 180 - r, NormalizeLongitude(longitude + 180.0) + # assert 180.0 == NormalizeLongitude(180.0) + # assert -180.0 == NormalizeLongitude(-180.0) + # assert -179.0 == NormalizeLongitude(181.0) + # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0) + # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0) + # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) + # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0) + # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0) + # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0) + # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0) + # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) + # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) + # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) + # The code in logs/storage/validator/logs_validator_traits.cc treats this type + # as if it were annotated as ST_LOCATION. + # Corresponds to the JSON property `latLng` + # @return [Google::Apis::PartnersV2::LatLng] + attr_accessor :lat_lng + + # The single string version of the address. + # Corresponds to the JSON property `address` + # @return [String] + attr_accessor :address + + # CLDR (Common Locale Data Repository) region code . + # Corresponds to the JSON property `regionCode` + # @return [String] + attr_accessor :region_code + + # Dependent locality or sublocality. Used for UK dependent localities, or + # neighborhoods or boroughs in other locations. + # Corresponds to the JSON property `dependentLocality` + # @return [String] + attr_accessor :dependent_locality + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @postal_code = args[:postal_code] if args.key?(:postal_code) + @sorting_code = args[:sorting_code] if args.key?(:sorting_code) + @language_code = args[:language_code] if args.key?(:language_code) + @address_line = args[:address_line] if args.key?(:address_line) + @locality = args[:locality] if args.key?(:locality) + @administrative_area = args[:administrative_area] if args.key?(:administrative_area) + @lat_lng = args[:lat_lng] if args.key?(:lat_lng) + @address = args[:address] if args.key?(:address) + @region_code = args[:region_code] if args.key?(:region_code) + @dependent_locality = args[:dependent_locality] if args.key?(:dependent_locality) + end + end + + # Status for a Google Partners certification exam. + class CertificationExamStatus + include Google::Apis::Core::Hashable + + # The number of people who have passed the certification exam. + # Corresponds to the JSON property `numberUsersPass` + # @return [Fixnum] + attr_accessor :number_users_pass + + # The type of certification exam. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @number_users_pass = args[:number_users_pass] if args.key?(:number_users_pass) + @type = args[:type] if args.key?(:type) + end + end + + # A token that allows a user to take an exam. + class ExamToken + include Google::Apis::Core::Hashable + + # The token, only present if the user has access to the exam. + # Corresponds to the JSON property `token` + # @return [String] + attr_accessor :token + + # The type of the exam the token belongs to. + # Corresponds to the JSON property `examType` + # @return [String] + attr_accessor :exam_type + + # The id of the exam the token is for. + # Corresponds to the JSON property `examId` + # @return [Fixnum] + attr_accessor :exam_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @token = args[:token] if args.key?(:token) + @exam_type = args[:exam_type] if args.key?(:exam_type) + @exam_id = args[:exam_id] if args.key?(:exam_id) + end + end + + # A set of opt-ins for a user. + class OptIns + include Google::Apis::Core::Hashable + + # An opt-in to receive special promotional gifts and material in the mail. + # Corresponds to the JSON property `physicalMail` + # @return [Boolean] + attr_accessor :physical_mail + alias_method :physical_mail?, :physical_mail + + # An opt-in to allow recieivng phone calls about their Partners account. + # Corresponds to the JSON property `phoneContact` + # @return [Boolean] + attr_accessor :phone_contact + alias_method :phone_contact?, :phone_contact + + # An opt-in about receiving email from Partners marketing teams. Includes + # member-only events and special promotional offers for Google products. + # Corresponds to the JSON property `marketComm` + # @return [Boolean] + attr_accessor :market_comm + alias_method :market_comm?, :market_comm + + # An opt-in about receiving email regarding new features and products. + # Corresponds to the JSON property `specialOffers` + # @return [Boolean] + attr_accessor :special_offers + alias_method :special_offers?, :special_offers + + # An opt-in about receiving email with customized AdWords campaign management + # tips. + # Corresponds to the JSON property `performanceSuggestions` + # @return [Boolean] + attr_accessor :performance_suggestions + alias_method :performance_suggestions?, :performance_suggestions + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @physical_mail = args[:physical_mail] if args.key?(:physical_mail) + @phone_contact = args[:phone_contact] if args.key?(:phone_contact) + @market_comm = args[:market_comm] if args.key?(:market_comm) + @special_offers = args[:special_offers] if args.key?(:special_offers) + @performance_suggestions = args[:performance_suggestions] if args.key?(:performance_suggestions) + end + end + + # Information related to ranking of results. + class Rank + include Google::Apis::Core::Hashable + + # The type of rank. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # The numerical value of the rank. + # Corresponds to the JSON property `value` + # @return [Float] + attr_accessor :value + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @type = args[:type] if args.key?(:type) + @value = args[:value] if args.key?(:value) + end + end + + # The profile information of a Partners user. + class UserProfile + include Google::Apis::Core::Hashable + + # The user's given name. + # Corresponds to the JSON property `givenName` + # @return [String] + attr_accessor :given_name + + # A location with address and geographic coordinates. May optionally contain a + # detailed (multi-field) version of the address. + # Corresponds to the JSON property `address` + # @return [Google::Apis::PartnersV2::Location] + attr_accessor :address + + # A list of ids representing which industries the user selected. + # Corresponds to the JSON property `industries` + # @return [Array] + attr_accessor :industries + + # The list of languages this user understands. + # Corresponds to the JSON property `languages` + # @return [Array] + attr_accessor :languages + + # A set of opt-ins for a user. + # Corresponds to the JSON property `emailOptIns` + # @return [Google::Apis::PartnersV2::OptIns] + attr_accessor :email_opt_ins + + # The user's family name. + # Corresponds to the JSON property `familyName` + # @return [String] + attr_accessor :family_name + + # A list of ids representing which markets the user was interested in. + # Corresponds to the JSON property `markets` + # @return [Array] + attr_accessor :markets + + # The user's phone number. + # Corresponds to the JSON property `phoneNumber` + # @return [String] + attr_accessor :phone_number + + # If the user has edit access to multiple accounts, the user can choose the + # preferred account and it is used when a personal account is needed. Can + # be empty. + # Corresponds to the JSON property `adwordsManagerAccount` + # @return [Fixnum] + attr_accessor :adwords_manager_account + + # The user's primary country, an ISO 2-character code. + # Corresponds to the JSON property `primaryCountryCode` + # @return [String] + attr_accessor :primary_country_code + + # The email address the user has selected on the Partners site as primary. + # Corresponds to the JSON property `emailAddress` + # @return [String] + attr_accessor :email_address + + # A list of ids representing which channels the user selected they were in. + # Corresponds to the JSON property `channels` + # @return [Array] + attr_accessor :channels + + # Whether the user's public profile is visible to anyone with the URL. + # Corresponds to the JSON property `profilePublic` + # @return [Boolean] + attr_accessor :profile_public + alias_method :profile_public?, :profile_public + + # A list of ids represnting which job categories the user selected. + # Corresponds to the JSON property `jobFunctions` + # @return [Array] + attr_accessor :job_functions + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @given_name = args[:given_name] if args.key?(:given_name) + @address = args[:address] if args.key?(:address) + @industries = args[:industries] if args.key?(:industries) + @languages = args[:languages] if args.key?(:languages) + @email_opt_ins = args[:email_opt_ins] if args.key?(:email_opt_ins) + @family_name = args[:family_name] if args.key?(:family_name) + @markets = args[:markets] if args.key?(:markets) + @phone_number = args[:phone_number] if args.key?(:phone_number) + @adwords_manager_account = args[:adwords_manager_account] if args.key?(:adwords_manager_account) + @primary_country_code = args[:primary_country_code] if args.key?(:primary_country_code) + @email_address = args[:email_address] if args.key?(:email_address) + @channels = args[:channels] if args.key?(:channels) + @profile_public = args[:profile_public] if args.key?(:profile_public) + @job_functions = args[:job_functions] if args.key?(:job_functions) + end + end + + # Response message for + # GetPartnersStatus. + class GetPartnersStatusResponse + include Google::Apis::Core::Hashable + + # Common data that is in each API response. + # Corresponds to the JSON property `responseMetadata` + # @return [Google::Apis::PartnersV2::ResponseMetadata] + attr_accessor :response_metadata + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @response_metadata = args[:response_metadata] if args.key?(:response_metadata) + end + end + + # Historical information about a Google Partners Offer. + class HistoricalOffer + include Google::Apis::Core::Hashable + + # Time offer was first created. + # Corresponds to the JSON property `creationTime` + # @return [String] + attr_accessor :creation_time + + # Status of the offer. + # Corresponds to the JSON property `status` + # @return [String] + attr_accessor :status + + # Email address for client. + # Corresponds to the JSON property `clientEmail` + # @return [String] + attr_accessor :client_email + + # ID of client. + # Corresponds to the JSON property `clientId` + # @return [Fixnum] + attr_accessor :client_id + + # Name of the client. + # Corresponds to the JSON property `clientName` + # @return [String] + attr_accessor :client_name + + # Time last action was taken. + # Corresponds to the JSON property `lastModifiedTime` + # @return [String] + attr_accessor :last_modified_time + + # Client's AdWords page URL. + # Corresponds to the JSON property `adwordsUrl` + # @return [String] + attr_accessor :adwords_url + + # Type of offer. + # Corresponds to the JSON property `offerType` + # @return [String] + attr_accessor :offer_type + + # Name (First + Last) of the partners user to whom the incentive is allocated. + # Corresponds to the JSON property `senderName` + # @return [String] + attr_accessor :sender_name + + # Country Code for the offer country. + # Corresponds to the JSON property `offerCountryCode` + # @return [String] + attr_accessor :offer_country_code + + # Time this offer expires. + # Corresponds to the JSON property `expirationTime` + # @return [String] + attr_accessor :expiration_time + + # Offer code. + # Corresponds to the JSON property `offerCode` + # @return [String] + attr_accessor :offer_code + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @creation_time = args[:creation_time] if args.key?(:creation_time) + @status = args[:status] if args.key?(:status) + @client_email = args[:client_email] if args.key?(:client_email) + @client_id = args[:client_id] if args.key?(:client_id) + @client_name = args[:client_name] if args.key?(:client_name) + @last_modified_time = args[:last_modified_time] if args.key?(:last_modified_time) + @adwords_url = args[:adwords_url] if args.key?(:adwords_url) + @offer_type = args[:offer_type] if args.key?(:offer_type) + @sender_name = args[:sender_name] if args.key?(:sender_name) + @offer_country_code = args[:offer_country_code] if args.key?(:offer_country_code) + @expiration_time = args[:expiration_time] if args.key?(:expiration_time) + @offer_code = args[:offer_code] if args.key?(:offer_code) + end + end + + # Request message for + # LogUserEvent. + class LogUserEventRequest + include Google::Apis::Core::Hashable + + # The category the action belongs to. + # Corresponds to the JSON property `eventCategory` + # @return [String] + attr_accessor :event_category + + # A lead resource that represents an advertiser contact for a `Company`. These + # are usually generated via Google Partner Search (the advertiser portal). + # Corresponds to the JSON property `lead` + # @return [Google::Apis::PartnersV2::Lead] + attr_accessor :lead + + # The action that occurred. + # Corresponds to the JSON property `eventAction` + # @return [String] + attr_accessor :event_action + + # The URL where the event occurred. + # Corresponds to the JSON property `url` + # @return [String] + attr_accessor :url + + # Common data that is in each API request. + # Corresponds to the JSON property `requestMetadata` + # @return [Google::Apis::PartnersV2::RequestMetadata] + attr_accessor :request_metadata + + # List of event data for the event. + # Corresponds to the JSON property `eventDatas` + # @return [Array] + attr_accessor :event_datas + + # The scope of the event. + # Corresponds to the JSON property `eventScope` + # @return [String] + attr_accessor :event_scope + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @event_category = args[:event_category] if args.key?(:event_category) + @lead = args[:lead] if args.key?(:lead) + @event_action = args[:event_action] if args.key?(:event_action) + @url = args[:url] if args.key?(:url) + @request_metadata = args[:request_metadata] if args.key?(:request_metadata) + @event_datas = args[:event_datas] if args.key?(:event_datas) + @event_scope = args[:event_scope] if args.key?(:event_scope) + end + end + + # Values to use instead of the user's respective defaults. These are only + # honored by whitelisted products. + class UserOverrides + include Google::Apis::Core::Hashable + + # IP address to use instead of the user's geo-located IP address. + # Corresponds to the JSON property `ipAddress` + # @return [String] + attr_accessor :ip_address + + # Logged-in user ID to impersonate instead of the user's ID. + # Corresponds to the JSON property `userId` + # @return [String] + attr_accessor :user_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @ip_address = args[:ip_address] if args.key?(:ip_address) + @user_id = args[:user_id] if args.key?(:user_id) + end + end + + # Details of the analytics events for a `Company` within a single day. + class AnalyticsDataPoint + include Google::Apis::Core::Hashable + + # Location information of where these events occurred. + # Corresponds to the JSON property `eventLocations` + # @return [Array] + attr_accessor :event_locations + + # Number of times the type of event occurred. + # Meaning depends on context (e.g. profile views, contacts, etc.). + # Corresponds to the JSON property `eventCount` + # @return [Fixnum] + attr_accessor :event_count + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @event_locations = args[:event_locations] if args.key?(:event_locations) + @event_count = args[:event_count] if args.key?(:event_count) + end + end + + # Analytics data for a `Company` within a single day. + class Analytics + include Google::Apis::Core::Hashable + + # Details of the analytics events for a `Company` within a single day. + # Corresponds to the JSON property `contacts` + # @return [Google::Apis::PartnersV2::AnalyticsDataPoint] + attr_accessor :contacts + + # Represents a whole calendar date, e.g. date of birth. The time of day and + # time zone are either specified elsewhere or are not significant. The date + # is relative to the Proleptic Gregorian Calendar. The day may be 0 to + # represent a year and month where the day is not significant, e.g. credit card + # expiration date. The year may be 0 to represent a month and day independent + # of year, e.g. anniversary date. Related types are google.type.TimeOfDay + # and `google.protobuf.Timestamp`. + # Corresponds to the JSON property `eventDate` + # @return [Google::Apis::PartnersV2::Date] + attr_accessor :event_date + + # Details of the analytics events for a `Company` within a single day. + # Corresponds to the JSON property `profileViews` + # @return [Google::Apis::PartnersV2::AnalyticsDataPoint] + attr_accessor :profile_views + + # Details of the analytics events for a `Company` within a single day. + # Corresponds to the JSON property `searchViews` + # @return [Google::Apis::PartnersV2::AnalyticsDataPoint] + attr_accessor :search_views + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @contacts = args[:contacts] if args.key?(:contacts) + @event_date = args[:event_date] if args.key?(:event_date) + @profile_views = args[:profile_views] if args.key?(:profile_views) + @search_views = args[:search_views] if args.key?(:search_views) + end + end + + # Basic information from a public profile. + class PublicProfile + include Google::Apis::Core::Hashable + + # The URL to the main profile image of the public profile. + # Corresponds to the JSON property `profileImage` + # @return [String] + attr_accessor :profile_image + + # The display name of the public profile. + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # The URL to the main display image of the public profile. Being deprecated. + # Corresponds to the JSON property `displayImageUrl` + # @return [String] + attr_accessor :display_image_url + + # The ID which can be used to retrieve more details about the public profile. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # The URL of the public profile. + # Corresponds to the JSON property `url` + # @return [String] + attr_accessor :url + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @profile_image = args[:profile_image] if args.key?(:profile_image) + @display_name = args[:display_name] if args.key?(:display_name) + @display_image_url = args[:display_image_url] if args.key?(:display_image_url) + @id = args[:id] if args.key?(:id) + @url = args[:url] if args.key?(:url) + end + end + + # Information about a particular AdWords Manager Account. + # Read more at https://support.google.com/adwords/answer/6139186 + class AdWordsManagerAccountInfo + include Google::Apis::Core::Hashable + + # The AdWords Manager Account id. + # Corresponds to the JSON property `id` + # @return [Fixnum] + attr_accessor :id + + # Name of the customer this account represents. + # Corresponds to the JSON property `customerName` + # @return [String] + attr_accessor :customer_name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @id = args[:id] if args.key?(:id) + @customer_name = args[:customer_name] if args.key?(:customer_name) + end + end + + # Common data that is in each API response. + class ResponseMetadata + include Google::Apis::Core::Hashable + + # Debug information about this request. + # Corresponds to the JSON property `debugInfo` + # @return [Google::Apis::PartnersV2::DebugInfo] + attr_accessor :debug_info + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @debug_info = args[:debug_info] if args.key?(:debug_info) + end + end + + # reCaptcha challenge info. + class RecaptchaChallenge + include Google::Apis::Core::Hashable + + # The ID of the reCaptcha challenge. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # The response to the reCaptcha challenge. + # Corresponds to the JSON property `response` + # @return [String] + attr_accessor :response + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @id = args[:id] if args.key?(:id) + @response = args[:response] if args.key?(:response) + end + end + + # Available Offers to be distributed. + class AvailableOffer + include Google::Apis::Core::Hashable + + # Offer info by country. + # Corresponds to the JSON property `countryOfferInfos` + # @return [Array] + attr_accessor :country_offer_infos + + # Type of offer. + # Corresponds to the JSON property `offerType` + # @return [String] + attr_accessor :offer_type + + # The maximum age of an account [in days] to be eligible. + # Corresponds to the JSON property `maxAccountAge` + # @return [Fixnum] + attr_accessor :max_account_age + + # Customers who qualify for this offer. + # Corresponds to the JSON property `qualifiedCustomer` + # @return [Array] + attr_accessor :qualified_customer + + # Terms of the offer. + # Corresponds to the JSON property `terms` + # @return [String] + attr_accessor :terms + + # Should special text be shown on the offers page. + # Corresponds to the JSON property `showSpecialOfferCopy` + # @return [Boolean] + attr_accessor :show_special_offer_copy + alias_method :show_special_offer_copy?, :show_special_offer_copy + + # The number of codes for this offer that are available for distribution. + # Corresponds to the JSON property `available` + # @return [Fixnum] + attr_accessor :available + + # Description of the offer. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # Level of this offer. + # Corresponds to the JSON property `offerLevel` + # @return [String] + attr_accessor :offer_level + + # Name of the offer. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # ID of this offer. + # Corresponds to the JSON property `id` + # @return [Fixnum] + attr_accessor :id + + # Whether or not the list of qualified customers is definitely complete. + # Corresponds to the JSON property `qualifiedCustomersComplete` + # @return [Boolean] + attr_accessor :qualified_customers_complete + alias_method :qualified_customers_complete?, :qualified_customers_complete + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @country_offer_infos = args[:country_offer_infos] if args.key?(:country_offer_infos) + @offer_type = args[:offer_type] if args.key?(:offer_type) + @max_account_age = args[:max_account_age] if args.key?(:max_account_age) + @qualified_customer = args[:qualified_customer] if args.key?(:qualified_customer) + @terms = args[:terms] if args.key?(:terms) + @show_special_offer_copy = args[:show_special_offer_copy] if args.key?(:show_special_offer_copy) + @available = args[:available] if args.key?(:available) + @description = args[:description] if args.key?(:description) + @offer_level = args[:offer_level] if args.key?(:offer_level) + @name = args[:name] if args.key?(:name) + @id = args[:id] if args.key?(:id) + @qualified_customers_complete = args[:qualified_customers_complete] if args.key?(:qualified_customers_complete) + end + end + + # An object representing a latitude/longitude pair. This is expressed as a pair + # of doubles representing degrees latitude and degrees longitude. Unless + # specified otherwise, this must conform to the + # WGS84 + # standard. Values must be within normalized ranges. + # Example of normalization code in Python: + # def NormalizeLongitude(longitude): + # """Wraps decimal degrees longitude to [-180.0, 180.0].""" + # q, r = divmod(longitude, 360.0) + # if r > 180.0 or (r == 180.0 and q <= -1.0): + # return r - 360.0 + # return r + # def NormalizeLatLng(latitude, longitude): + # """Wraps decimal degrees latitude and longitude to + # [-90.0, 90.0] and [-180.0, 180.0], respectively.""" + # r = latitude % 360.0 + # if r <= 90.0: + # return r, NormalizeLongitude(longitude) + # elif r >= 270.0: + # return r - 360, NormalizeLongitude(longitude) + # else: + # return 180 - r, NormalizeLongitude(longitude + 180.0) + # assert 180.0 == NormalizeLongitude(180.0) + # assert -180.0 == NormalizeLongitude(-180.0) + # assert -179.0 == NormalizeLongitude(181.0) + # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0) + # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0) + # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) + # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0) + # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0) + # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0) + # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0) + # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) + # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) + # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) + # The code in logs/storage/validator/logs_validator_traits.cc treats this type + # as if it were annotated as ST_LOCATION. + class LatLng + include Google::Apis::Core::Hashable + + # The latitude in degrees. It must be in the range [-90.0, +90.0]. + # Corresponds to the JSON property `latitude` + # @return [Float] + attr_accessor :latitude + + # The longitude in degrees. It must be in the range [-180.0, +180.0]. + # Corresponds to the JSON property `longitude` + # @return [Float] + attr_accessor :longitude + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @latitude = args[:latitude] if args.key?(:latitude) + @longitude = args[:longitude] if args.key?(:longitude) + end + end + + # Represents an amount of money with its currency type. + class Money + include Google::Apis::Core::Hashable + + # The 3-letter currency code defined in ISO 4217. + # Corresponds to the JSON property `currencyCode` + # @return [String] + attr_accessor :currency_code + + # Number of nano (10^-9) units of the amount. + # The value must be between -999,999,999 and +999,999,999 inclusive. + # If `units` is positive, `nanos` must be positive or zero. + # If `units` is zero, `nanos` can be positive, zero, or negative. + # If `units` is negative, `nanos` must be negative or zero. + # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. + # Corresponds to the JSON property `nanos` + # @return [Fixnum] + attr_accessor :nanos + + # The whole units of the amount. + # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. + # Corresponds to the JSON property `units` + # @return [Fixnum] + attr_accessor :units + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @currency_code = args[:currency_code] if args.key?(:currency_code) + @nanos = args[:nanos] if args.key?(:nanos) + @units = args[:units] if args.key?(:units) end end end diff --git a/generated/google/apis/partners_v2/representations.rb b/generated/google/apis/partners_v2/representations.rb index 50229cb40..d9bcdf9e4 100644 --- a/generated/google/apis/partners_v2/representations.rb +++ b/generated/google/apis/partners_v2/representations.rb @@ -22,132 +22,6 @@ module Google module Apis module PartnersV2 - class CreateLeadResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class GetCompanyResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Location - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CertificationExamStatus - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ExamToken - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class OptIns - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Rank - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class GetPartnersStatusResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UserProfile - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class HistoricalOffer - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UserOverrides - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class LogUserEventRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AnalyticsDataPoint - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Analytics - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AdWordsManagerAccountInfo - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class PublicProfile - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ResponseMetadata - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class RecaptchaChallenge - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AvailableOffer - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class LatLng - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Money - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class AnalyticsSummary class Representation < Google::Apis::Core::JsonRepresentation; end @@ -202,13 +76,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class CreateLeadRequest + class RequestMetadata class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class RequestMetadata + class CreateLeadRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -317,294 +191,179 @@ module Google end class CreateLeadResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :lead, as: 'lead', class: Google::Apis::PartnersV2::Lead, decorator: Google::Apis::PartnersV2::Lead::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :recaptcha_status, as: 'recaptchaStatus' - property :response_metadata, as: 'responseMetadata', class: Google::Apis::PartnersV2::ResponseMetadata, decorator: Google::Apis::PartnersV2::ResponseMetadata::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class GetCompanyResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :company, as: 'company', class: Google::Apis::PartnersV2::Company, decorator: Google::Apis::PartnersV2::Company::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :response_metadata, as: 'responseMetadata', class: Google::Apis::PartnersV2::ResponseMetadata, decorator: Google::Apis::PartnersV2::ResponseMetadata::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class Location - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :administrative_area, as: 'administrativeArea' - property :locality, as: 'locality' - property :lat_lng, as: 'latLng', class: Google::Apis::PartnersV2::LatLng, decorator: Google::Apis::PartnersV2::LatLng::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :region_code, as: 'regionCode' - property :dependent_locality, as: 'dependentLocality' - property :address, as: 'address' - property :postal_code, as: 'postalCode' - property :sorting_code, as: 'sortingCode' - property :language_code, as: 'languageCode' - collection :address_line, as: 'addressLine' - end + include Google::Apis::Core::JsonObjectSupport end class CertificationExamStatus - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :type, as: 'type' - property :number_users_pass, as: 'numberUsersPass' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ExamToken - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :exam_type, as: 'examType' - property :exam_id, :numeric_string => true, as: 'examId' - property :token, as: 'token' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class OptIns - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :special_offers, as: 'specialOffers' - property :performance_suggestions, as: 'performanceSuggestions' - property :physical_mail, as: 'physicalMail' - property :phone_contact, as: 'phoneContact' - property :market_comm, as: 'marketComm' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class Rank - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :type, as: 'type' - property :value, as: 'value' - end - end + class Representation < Google::Apis::Core::JsonRepresentation; end - class GetPartnersStatusResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :response_metadata, as: 'responseMetadata', class: Google::Apis::PartnersV2::ResponseMetadata, decorator: Google::Apis::PartnersV2::ResponseMetadata::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class UserProfile - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :industries, as: 'industries' - property :email_opt_ins, as: 'emailOptIns', class: Google::Apis::PartnersV2::OptIns, decorator: Google::Apis::PartnersV2::OptIns::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :family_name, as: 'familyName' - collection :languages, as: 'languages' - collection :markets, as: 'markets' - property :adwords_manager_account, :numeric_string => true, as: 'adwordsManagerAccount' - property :phone_number, as: 'phoneNumber' - property :primary_country_code, as: 'primaryCountryCode' - property :email_address, as: 'emailAddress' - collection :channels, as: 'channels' - property :profile_public, as: 'profilePublic' - collection :job_functions, as: 'jobFunctions' - property :given_name, as: 'givenName' - property :address, as: 'address', class: Google::Apis::PartnersV2::Location, decorator: Google::Apis::PartnersV2::Location::Representation + include Google::Apis::Core::JsonObjectSupport + end - end + class GetPartnersStatusResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class HistoricalOffer - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :client_id, :numeric_string => true, as: 'clientId' - property :client_name, as: 'clientName' - property :last_modified_time, as: 'lastModifiedTime' - property :adwords_url, as: 'adwordsUrl' - property :offer_type, as: 'offerType' - property :sender_name, as: 'senderName' - property :offer_country_code, as: 'offerCountryCode' - property :expiration_time, as: 'expirationTime' - property :offer_code, as: 'offerCode' - property :creation_time, as: 'creationTime' - property :status, as: 'status' - property :client_email, as: 'clientEmail' - end - end + class Representation < Google::Apis::Core::JsonRepresentation; end - class UserOverrides - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :ip_address, as: 'ipAddress' - property :user_id, as: 'userId' - end + include Google::Apis::Core::JsonObjectSupport end class LogUserEventRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :event_category, as: 'eventCategory' - property :lead, as: 'lead', class: Google::Apis::PartnersV2::Lead, decorator: Google::Apis::PartnersV2::Lead::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :event_action, as: 'eventAction' - property :request_metadata, as: 'requestMetadata', class: Google::Apis::PartnersV2::RequestMetadata, decorator: Google::Apis::PartnersV2::RequestMetadata::Representation + include Google::Apis::Core::JsonObjectSupport + end - property :url, as: 'url' - property :event_scope, as: 'eventScope' - collection :event_datas, as: 'eventDatas', class: Google::Apis::PartnersV2::EventData, decorator: Google::Apis::PartnersV2::EventData::Representation + class UserOverrides + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class AnalyticsDataPoint - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :event_count, as: 'eventCount' - collection :event_locations, as: 'eventLocations', class: Google::Apis::PartnersV2::LatLng, decorator: Google::Apis::PartnersV2::LatLng::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class Analytics - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :contacts, as: 'contacts', class: Google::Apis::PartnersV2::AnalyticsDataPoint, decorator: Google::Apis::PartnersV2::AnalyticsDataPoint::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :event_date, as: 'eventDate', class: Google::Apis::PartnersV2::Date, decorator: Google::Apis::PartnersV2::Date::Representation - - property :profile_views, as: 'profileViews', class: Google::Apis::PartnersV2::AnalyticsDataPoint, decorator: Google::Apis::PartnersV2::AnalyticsDataPoint::Representation - - property :search_views, as: 'searchViews', class: Google::Apis::PartnersV2::AnalyticsDataPoint, decorator: Google::Apis::PartnersV2::AnalyticsDataPoint::Representation - - end - end - - class AdWordsManagerAccountInfo - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :id, :numeric_string => true, as: 'id' - property :customer_name, as: 'customerName' - end + include Google::Apis::Core::JsonObjectSupport end class PublicProfile - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :url, as: 'url' - property :profile_image, as: 'profileImage' - property :display_name, as: 'displayName' - property :display_image_url, as: 'displayImageUrl' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AdWordsManagerAccountInfo + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ResponseMetadata - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :debug_info, as: 'debugInfo', class: Google::Apis::PartnersV2::DebugInfo, decorator: Google::Apis::PartnersV2::DebugInfo::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class RecaptchaChallenge - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :response, as: 'response' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class AvailableOffer - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :description, as: 'description' - property :offer_level, as: 'offerLevel' - property :name, as: 'name' - property :qualified_customers_complete, as: 'qualifiedCustomersComplete' - property :id, :numeric_string => true, as: 'id' - collection :country_offer_infos, as: 'countryOfferInfos', class: Google::Apis::PartnersV2::CountryOfferInfo, decorator: Google::Apis::PartnersV2::CountryOfferInfo::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :offer_type, as: 'offerType' - property :max_account_age, as: 'maxAccountAge' - collection :qualified_customer, as: 'qualifiedCustomer', class: Google::Apis::PartnersV2::OfferCustomer, decorator: Google::Apis::PartnersV2::OfferCustomer::Representation - - property :terms, as: 'terms' - property :show_special_offer_copy, as: 'showSpecialOfferCopy' - property :available, as: 'available' - end + include Google::Apis::Core::JsonObjectSupport end class LatLng - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :longitude, as: 'longitude' - property :latitude, as: 'latitude' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class Money - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :units, :numeric_string => true, as: 'units' - property :currency_code, as: 'currencyCode' - property :nanos, as: 'nanos' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class AnalyticsSummary # @private class Representation < Google::Apis::Core::JsonRepresentation - property :profile_views_count, as: 'profileViewsCount' property :search_views_count, as: 'searchViewsCount' property :contacts_count, as: 'contactsCount' + property :profile_views_count, as: 'profileViewsCount' end end class LogMessageRequest # @private class Representation < Google::Apis::Core::JsonRepresentation + property :level, as: 'level' + property :details, as: 'details' hash :client_info, as: 'clientInfo' property :request_metadata, as: 'requestMetadata', class: Google::Apis::PartnersV2::RequestMetadata, decorator: Google::Apis::PartnersV2::RequestMetadata::Representation - property :level, as: 'level' - property :details, as: 'details' end end class Lead # @private class Representation < Google::Apis::Core::JsonRepresentation - property :create_time, as: 'createTime' property :marketing_opt_in, as: 'marketingOptIn' property :type, as: 'type' - property :given_name, as: 'givenName' property :min_monthly_budget, as: 'minMonthlyBudget', class: Google::Apis::PartnersV2::Money, decorator: Google::Apis::PartnersV2::Money::Representation + property :given_name, as: 'givenName' property :website_url, as: 'websiteUrl' property :language_code, as: 'languageCode' - collection :gps_motivations, as: 'gpsMotivations' property :state, as: 'state' + collection :gps_motivations, as: 'gpsMotivations' property :email, as: 'email' property :family_name, as: 'familyName' - property :id, as: 'id' property :comments, as: 'comments' - property :adwords_customer_id, :numeric_string => true, as: 'adwordsCustomerId' + property :id, as: 'id' property :phone_number, as: 'phoneNumber' + property :adwords_customer_id, :numeric_string => true, as: 'adwordsCustomerId' + property :create_time, as: 'createTime' end end class DebugInfo # @private class Representation < Google::Apis::Core::JsonRepresentation - property :service_url, as: 'serviceUrl' property :server_info, as: 'serverInfo' property :server_trace_info, as: 'serverTraceInfo' + property :service_url, as: 'serviceUrl' end end @@ -620,13 +379,6 @@ module Google class CompanyRelation # @private class Representation < Google::Apis::Core::JsonRepresentation - property :company_admin, as: 'companyAdmin' - property :address, as: 'address' - property :is_pending, as: 'isPending' - property :creation_time, as: 'creationTime' - property :state, as: 'state' - property :name, as: 'name' - property :manager_account, :numeric_string => true, as: 'managerAccount' collection :segment, as: 'segment' collection :specialization_status, as: 'specializationStatus', class: Google::Apis::PartnersV2::SpecializationStatus, decorator: Google::Apis::PartnersV2::SpecializationStatus::Representation @@ -636,6 +388,13 @@ module Google property :company_id, as: 'companyId' property :logo_url, as: 'logoUrl' property :resolved_timestamp, as: 'resolvedTimestamp' + property :company_admin, as: 'companyAdmin' + property :address, as: 'address' + property :is_pending, as: 'isPending' + property :creation_time, as: 'creationTime' + property :state, as: 'state' + property :name, as: 'name' + property :manager_account, :numeric_string => true, as: 'managerAccount' end end @@ -662,27 +421,27 @@ module Google end end - class CreateLeadRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :request_metadata, as: 'requestMetadata', class: Google::Apis::PartnersV2::RequestMetadata, decorator: Google::Apis::PartnersV2::RequestMetadata::Representation - - property :lead, as: 'lead', class: Google::Apis::PartnersV2::Lead, decorator: Google::Apis::PartnersV2::Lead::Representation - - property :recaptcha_challenge, as: 'recaptchaChallenge', class: Google::Apis::PartnersV2::RecaptchaChallenge, decorator: Google::Apis::PartnersV2::RecaptchaChallenge::Representation - - end - end - class RequestMetadata # @private class Representation < Google::Apis::Core::JsonRepresentation + collection :experiment_ids, as: 'experimentIds' + property :traffic_source, as: 'trafficSource', class: Google::Apis::PartnersV2::TrafficSource, decorator: Google::Apis::PartnersV2::TrafficSource::Representation + property :locale, as: 'locale' property :user_overrides, as: 'userOverrides', class: Google::Apis::PartnersV2::UserOverrides, decorator: Google::Apis::PartnersV2::UserOverrides::Representation property :partners_session_id, as: 'partnersSessionId' - collection :experiment_ids, as: 'experimentIds' - property :traffic_source, as: 'trafficSource', class: Google::Apis::PartnersV2::TrafficSource, decorator: Google::Apis::PartnersV2::TrafficSource::Representation + end + end + + class CreateLeadRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :lead, as: 'lead', class: Google::Apis::PartnersV2::Lead, decorator: Google::Apis::PartnersV2::Lead::Representation + + property :recaptcha_challenge, as: 'recaptchaChallenge', class: Google::Apis::PartnersV2::RecaptchaChallenge, decorator: Google::Apis::PartnersV2::RecaptchaChallenge::Representation + + property :request_metadata, as: 'requestMetadata', class: Google::Apis::PartnersV2::RequestMetadata, decorator: Google::Apis::PartnersV2::RequestMetadata::Representation end end @@ -690,8 +449,8 @@ module Google class EventData # @private class Representation < Google::Apis::Core::JsonRepresentation - property :key, as: 'key' collection :values, as: 'values' + property :key, as: 'key' end end @@ -710,11 +469,11 @@ module Google class ListOffersResponse # @private class Representation < Google::Apis::Core::JsonRepresentation + collection :available_offers, as: 'availableOffers', class: Google::Apis::PartnersV2::AvailableOffer, decorator: Google::Apis::PartnersV2::AvailableOffer::Representation + property :response_metadata, as: 'responseMetadata', class: Google::Apis::PartnersV2::ResponseMetadata, decorator: Google::Apis::PartnersV2::ResponseMetadata::Representation property :no_offer_reason, as: 'noOfferReason' - collection :available_offers, as: 'availableOffers', class: Google::Apis::PartnersV2::AvailableOffer, decorator: Google::Apis::PartnersV2::AvailableOffer::Representation - end end @@ -746,22 +505,22 @@ module Google property :name, as: 'name' property :spend_x_amount, as: 'spendXAmount' property :adwords_url, as: 'adwordsUrl' - property :external_cid, :numeric_string => true, as: 'externalCid' property :creation_time, as: 'creationTime' - property :country_code, as: 'countryCode' property :eligibility_days_left, as: 'eligibilityDaysLeft' property :offer_type, as: 'offerType' + property :external_cid, :numeric_string => true, as: 'externalCid' + property :country_code, as: 'countryCode' end end class CertificationStatus # @private class Representation < Google::Apis::Core::JsonRepresentation - property :user_count, as: 'userCount' property :is_certified, as: 'isCertified' collection :exam_statuses, as: 'examStatuses', class: Google::Apis::PartnersV2::CertificationExamStatus, decorator: Google::Apis::PartnersV2::CertificationExamStatus::Representation property :type, as: 'type' + property :user_count, as: 'userCount' end end @@ -786,6 +545,7 @@ module Google class ListOffersHistoryResponse # @private class Representation < Google::Apis::Core::JsonRepresentation + property :total_results, as: 'totalResults' property :showing_entire_company, as: 'showingEntireCompany' collection :offers, as: 'offers', class: Google::Apis::PartnersV2::HistoricalOffer, decorator: Google::Apis::PartnersV2::HistoricalOffer::Representation @@ -793,7 +553,6 @@ module Google property :response_metadata, as: 'responseMetadata', class: Google::Apis::PartnersV2::ResponseMetadata, decorator: Google::Apis::PartnersV2::ResponseMetadata::Representation property :can_show_entire_company, as: 'canShowEntireCompany' - property :total_results, as: 'totalResults' end end @@ -827,13 +586,6 @@ module Google class User # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :certification_status, as: 'certificationStatus', class: Google::Apis::PartnersV2::Certification, decorator: Google::Apis::PartnersV2::Certification::Representation - - property :company_verification_email, as: 'companyVerificationEmail' - property :company, as: 'company', class: Google::Apis::PartnersV2::CompanyRelation, decorator: Google::Apis::PartnersV2::CompanyRelation::Representation - - property :profile, as: 'profile', class: Google::Apis::PartnersV2::UserProfile, decorator: Google::Apis::PartnersV2::UserProfile::Representation - property :last_access_time, as: 'lastAccessTime' collection :primary_emails, as: 'primaryEmails' collection :available_adwords_manager_accounts, as: 'availableAdwordsManagerAccounts', class: Google::Apis::PartnersV2::AdWordsManagerAccountInfo, decorator: Google::Apis::PartnersV2::AdWordsManagerAccountInfo::Representation @@ -843,6 +595,13 @@ module Google property :id, as: 'id' property :public_profile, as: 'publicProfile', class: Google::Apis::PartnersV2::PublicProfile, decorator: Google::Apis::PartnersV2::PublicProfile::Representation + collection :certification_status, as: 'certificationStatus', class: Google::Apis::PartnersV2::Certification, decorator: Google::Apis::PartnersV2::Certification::Representation + + property :company_verification_email, as: 'companyVerificationEmail' + property :company, as: 'company', class: Google::Apis::PartnersV2::CompanyRelation, decorator: Google::Apis::PartnersV2::CompanyRelation::Representation + + property :profile, as: 'profile', class: Google::Apis::PartnersV2::UserProfile, decorator: Google::Apis::PartnersV2::UserProfile::Representation + end end @@ -862,39 +621,18 @@ module Google class ListLeadsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :leads, as: 'leads', class: Google::Apis::PartnersV2::Lead, decorator: Google::Apis::PartnersV2::Lead::Representation - property :next_page_token, as: 'nextPageToken' property :response_metadata, as: 'responseMetadata', class: Google::Apis::PartnersV2::ResponseMetadata, decorator: Google::Apis::PartnersV2::ResponseMetadata::Representation property :total_size, as: 'totalSize' + collection :leads, as: 'leads', class: Google::Apis::PartnersV2::Lead, decorator: Google::Apis::PartnersV2::Lead::Representation + end end class Company # @private class Representation < Google::Apis::Core::JsonRepresentation - property :primary_adwords_manager_account_id, :numeric_string => true, as: 'primaryAdwordsManagerAccountId' - property :name, as: 'name' - collection :localized_infos, as: 'localizedInfos', class: Google::Apis::PartnersV2::LocalizedCompanyInfo, decorator: Google::Apis::PartnersV2::LocalizedCompanyInfo::Representation - - property :id, as: 'id' - collection :certification_statuses, as: 'certificationStatuses', class: Google::Apis::PartnersV2::CertificationStatus, decorator: Google::Apis::PartnersV2::CertificationStatus::Representation - - property :original_min_monthly_budget, as: 'originalMinMonthlyBudget', class: Google::Apis::PartnersV2::Money, decorator: Google::Apis::PartnersV2::Money::Representation - - property :public_profile, as: 'publicProfile', class: Google::Apis::PartnersV2::PublicProfile, decorator: Google::Apis::PartnersV2::PublicProfile::Representation - - collection :services, as: 'services' - property :primary_location, as: 'primaryLocation', class: Google::Apis::PartnersV2::Location, decorator: Google::Apis::PartnersV2::Location::Representation - - collection :ranks, as: 'ranks', class: Google::Apis::PartnersV2::Rank, decorator: Google::Apis::PartnersV2::Rank::Representation - - property :badge_tier, as: 'badgeTier' - collection :specialization_status, as: 'specializationStatus', class: Google::Apis::PartnersV2::SpecializationStatus, decorator: Google::Apis::PartnersV2::SpecializationStatus::Representation - - collection :company_types, as: 'companyTypes' - collection :auto_approval_email_domains, as: 'autoApprovalEmailDomains' property :profile_status, as: 'profileStatus' property :primary_language_code, as: 'primaryLanguageCode' collection :locations, as: 'locations', class: Google::Apis::PartnersV2::Location, decorator: Google::Apis::PartnersV2::Location::Representation @@ -904,6 +642,268 @@ module Google collection :industries, as: 'industries' property :website_url, as: 'websiteUrl' collection :additional_websites, as: 'additionalWebsites' + property :primary_adwords_manager_account_id, :numeric_string => true, as: 'primaryAdwordsManagerAccountId' + property :name, as: 'name' + collection :localized_infos, as: 'localizedInfos', class: Google::Apis::PartnersV2::LocalizedCompanyInfo, decorator: Google::Apis::PartnersV2::LocalizedCompanyInfo::Representation + + collection :certification_statuses, as: 'certificationStatuses', class: Google::Apis::PartnersV2::CertificationStatus, decorator: Google::Apis::PartnersV2::CertificationStatus::Representation + + property :id, as: 'id' + property :original_min_monthly_budget, as: 'originalMinMonthlyBudget', class: Google::Apis::PartnersV2::Money, decorator: Google::Apis::PartnersV2::Money::Representation + + property :public_profile, as: 'publicProfile', class: Google::Apis::PartnersV2::PublicProfile, decorator: Google::Apis::PartnersV2::PublicProfile::Representation + + property :primary_location, as: 'primaryLocation', class: Google::Apis::PartnersV2::Location, decorator: Google::Apis::PartnersV2::Location::Representation + + collection :services, as: 'services' + collection :ranks, as: 'ranks', class: Google::Apis::PartnersV2::Rank, decorator: Google::Apis::PartnersV2::Rank::Representation + + collection :specialization_status, as: 'specializationStatus', class: Google::Apis::PartnersV2::SpecializationStatus, decorator: Google::Apis::PartnersV2::SpecializationStatus::Representation + + property :badge_tier, as: 'badgeTier' + collection :auto_approval_email_domains, as: 'autoApprovalEmailDomains' + collection :company_types, as: 'companyTypes' + end + end + + class CreateLeadResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :response_metadata, as: 'responseMetadata', class: Google::Apis::PartnersV2::ResponseMetadata, decorator: Google::Apis::PartnersV2::ResponseMetadata::Representation + + property :lead, as: 'lead', class: Google::Apis::PartnersV2::Lead, decorator: Google::Apis::PartnersV2::Lead::Representation + + property :recaptcha_status, as: 'recaptchaStatus' + end + end + + class GetCompanyResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :company, as: 'company', class: Google::Apis::PartnersV2::Company, decorator: Google::Apis::PartnersV2::Company::Representation + + property :response_metadata, as: 'responseMetadata', class: Google::Apis::PartnersV2::ResponseMetadata, decorator: Google::Apis::PartnersV2::ResponseMetadata::Representation + + end + end + + class Location + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :postal_code, as: 'postalCode' + property :sorting_code, as: 'sortingCode' + property :language_code, as: 'languageCode' + collection :address_line, as: 'addressLine' + property :locality, as: 'locality' + property :administrative_area, as: 'administrativeArea' + property :lat_lng, as: 'latLng', class: Google::Apis::PartnersV2::LatLng, decorator: Google::Apis::PartnersV2::LatLng::Representation + + property :address, as: 'address' + property :region_code, as: 'regionCode' + property :dependent_locality, as: 'dependentLocality' + end + end + + class CertificationExamStatus + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :number_users_pass, as: 'numberUsersPass' + property :type, as: 'type' + end + end + + class ExamToken + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :token, as: 'token' + property :exam_type, as: 'examType' + property :exam_id, :numeric_string => true, as: 'examId' + end + end + + class OptIns + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :physical_mail, as: 'physicalMail' + property :phone_contact, as: 'phoneContact' + property :market_comm, as: 'marketComm' + property :special_offers, as: 'specialOffers' + property :performance_suggestions, as: 'performanceSuggestions' + end + end + + class Rank + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :type, as: 'type' + property :value, as: 'value' + end + end + + class UserProfile + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :given_name, as: 'givenName' + property :address, as: 'address', class: Google::Apis::PartnersV2::Location, decorator: Google::Apis::PartnersV2::Location::Representation + + collection :industries, as: 'industries' + collection :languages, as: 'languages' + property :email_opt_ins, as: 'emailOptIns', class: Google::Apis::PartnersV2::OptIns, decorator: Google::Apis::PartnersV2::OptIns::Representation + + property :family_name, as: 'familyName' + collection :markets, as: 'markets' + property :phone_number, as: 'phoneNumber' + property :adwords_manager_account, :numeric_string => true, as: 'adwordsManagerAccount' + property :primary_country_code, as: 'primaryCountryCode' + property :email_address, as: 'emailAddress' + collection :channels, as: 'channels' + property :profile_public, as: 'profilePublic' + collection :job_functions, as: 'jobFunctions' + end + end + + class GetPartnersStatusResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :response_metadata, as: 'responseMetadata', class: Google::Apis::PartnersV2::ResponseMetadata, decorator: Google::Apis::PartnersV2::ResponseMetadata::Representation + + end + end + + class HistoricalOffer + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :creation_time, as: 'creationTime' + property :status, as: 'status' + property :client_email, as: 'clientEmail' + property :client_id, :numeric_string => true, as: 'clientId' + property :client_name, as: 'clientName' + property :last_modified_time, as: 'lastModifiedTime' + property :adwords_url, as: 'adwordsUrl' + property :offer_type, as: 'offerType' + property :sender_name, as: 'senderName' + property :offer_country_code, as: 'offerCountryCode' + property :expiration_time, as: 'expirationTime' + property :offer_code, as: 'offerCode' + end + end + + class LogUserEventRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :event_category, as: 'eventCategory' + property :lead, as: 'lead', class: Google::Apis::PartnersV2::Lead, decorator: Google::Apis::PartnersV2::Lead::Representation + + property :event_action, as: 'eventAction' + property :url, as: 'url' + property :request_metadata, as: 'requestMetadata', class: Google::Apis::PartnersV2::RequestMetadata, decorator: Google::Apis::PartnersV2::RequestMetadata::Representation + + collection :event_datas, as: 'eventDatas', class: Google::Apis::PartnersV2::EventData, decorator: Google::Apis::PartnersV2::EventData::Representation + + property :event_scope, as: 'eventScope' + end + end + + class UserOverrides + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :ip_address, as: 'ipAddress' + property :user_id, as: 'userId' + end + end + + class AnalyticsDataPoint + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :event_locations, as: 'eventLocations', class: Google::Apis::PartnersV2::LatLng, decorator: Google::Apis::PartnersV2::LatLng::Representation + + property :event_count, as: 'eventCount' + end + end + + class Analytics + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :contacts, as: 'contacts', class: Google::Apis::PartnersV2::AnalyticsDataPoint, decorator: Google::Apis::PartnersV2::AnalyticsDataPoint::Representation + + property :event_date, as: 'eventDate', class: Google::Apis::PartnersV2::Date, decorator: Google::Apis::PartnersV2::Date::Representation + + property :profile_views, as: 'profileViews', class: Google::Apis::PartnersV2::AnalyticsDataPoint, decorator: Google::Apis::PartnersV2::AnalyticsDataPoint::Representation + + property :search_views, as: 'searchViews', class: Google::Apis::PartnersV2::AnalyticsDataPoint, decorator: Google::Apis::PartnersV2::AnalyticsDataPoint::Representation + + end + end + + class PublicProfile + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :profile_image, as: 'profileImage' + property :display_name, as: 'displayName' + property :display_image_url, as: 'displayImageUrl' + property :id, as: 'id' + property :url, as: 'url' + end + end + + class AdWordsManagerAccountInfo + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :id, :numeric_string => true, as: 'id' + property :customer_name, as: 'customerName' + end + end + + class ResponseMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :debug_info, as: 'debugInfo', class: Google::Apis::PartnersV2::DebugInfo, decorator: Google::Apis::PartnersV2::DebugInfo::Representation + + end + end + + class RecaptchaChallenge + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :id, as: 'id' + property :response, as: 'response' + end + end + + class AvailableOffer + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :country_offer_infos, as: 'countryOfferInfos', class: Google::Apis::PartnersV2::CountryOfferInfo, decorator: Google::Apis::PartnersV2::CountryOfferInfo::Representation + + property :offer_type, as: 'offerType' + property :max_account_age, as: 'maxAccountAge' + collection :qualified_customer, as: 'qualifiedCustomer', class: Google::Apis::PartnersV2::OfferCustomer, decorator: Google::Apis::PartnersV2::OfferCustomer::Representation + + property :terms, as: 'terms' + property :show_special_offer_copy, as: 'showSpecialOfferCopy' + property :available, as: 'available' + property :description, as: 'description' + property :offer_level, as: 'offerLevel' + property :name, as: 'name' + property :id, :numeric_string => true, as: 'id' + property :qualified_customers_complete, as: 'qualifiedCustomersComplete' + end + end + + class LatLng + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :latitude, as: 'latitude' + property :longitude, as: 'longitude' + end + end + + class Money + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :currency_code, as: 'currencyCode' + property :nanos, as: 'nanos' + property :units, :numeric_string => true, as: 'units' end end end diff --git a/generated/google/apis/partners_v2/service.rb b/generated/google/apis/partners_v2/service.rb index 79b55b9a0..202b3e31a 100644 --- a/generated/google/apis/partners_v2/service.rb +++ b/generated/google/apis/partners_v2/service.rb @@ -33,26 +33,89 @@ module Google # # @see https://developers.google.com/partners/ class PartnersService < Google::Apis::Core::BaseService - # @return [String] - # API key. Your API key identifies your project and provides you with API access, - # quota, and reports. Required unless you provide an OAuth 2.0 token. - attr_accessor :key - # @return [String] # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. attr_accessor :quota_user + # @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 + def initialize super('https://partners.googleapis.com/', '') @batch_path = 'batch' end - # Lists the Offers available for the current user - # @param [String] request_metadata_user_overrides_user_id - # Logged-in user ID to impersonate instead of the user's ID. + # Lists advertiser leads for a user's associated company. + # Should only be called within the context of an authorized logged in user. # @param [String] request_metadata_partners_session_id # Google Partners session ID. + # @param [String] request_metadata_user_overrides_user_id + # Logged-in user ID to impersonate instead of the user's ID. + # @param [String] page_token + # A token identifying a page of results that the server returns. + # Typically, this is the value of `ListLeadsResponse.next_page_token` + # returned from the previous call to + # ListLeads. + # @param [Fixnum] page_size + # Requested page size. Server may return fewer leads than requested. + # If unspecified, server picks an appropriate default. + # @param [String] request_metadata_traffic_source_traffic_source_id + # Identifier to indicate where the traffic comes from. + # An identifier has multiple letters created by a team which redirected the + # traffic to us. + # @param [String] request_metadata_locale + # Locale to use for the current request. + # @param [String] request_metadata_user_overrides_ip_address + # IP address to use instead of the user's geo-located IP address. + # @param [Array, String] request_metadata_experiment_ids + # Experiment IDs the current request belongs to. + # @param [String] order_by + # How to order Leads. Currently, only `create_time` + # and `create_time desc` are supported + # @param [String] request_metadata_traffic_source_traffic_sub_id + # Second level identifier to indicate where the traffic comes from. + # An identifier has multiple letters created by a team which redirected the + # traffic to us. + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::PartnersV2::ListLeadsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::PartnersV2::ListLeadsResponse] + # + # @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_leads(request_metadata_partners_session_id: nil, request_metadata_user_overrides_user_id: nil, page_token: nil, page_size: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, order_by: nil, request_metadata_traffic_source_traffic_sub_id: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/leads', options) + command.response_representation = Google::Apis::PartnersV2::ListLeadsResponse::Representation + command.response_class = Google::Apis::PartnersV2::ListLeadsResponse + command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil? + command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil? + command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil? + command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil? + command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil? + command.query['orderBy'] = order_by unless order_by.nil? + command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Lists the Offers available for the current user # @param [String] request_metadata_traffic_source_traffic_source_id # Identifier to indicate where the traffic comes from. # An identifier has multiple letters created by a team which redirected the @@ -67,6 +130,10 @@ module Google # Second level identifier to indicate where the traffic comes from. # An identifier has multiple letters created by a team which redirected the # traffic to us. + # @param [String] request_metadata_user_overrides_user_id + # Logged-in user ID to impersonate instead of the user's ID. + # @param [String] request_metadata_partners_session_id + # Google Partners session ID. # @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. @@ -84,17 +151,17 @@ 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_offers(request_metadata_user_overrides_user_id: nil, request_metadata_partners_session_id: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, request_metadata_traffic_source_traffic_sub_id: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_offers(request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, request_metadata_traffic_source_traffic_sub_id: nil, request_metadata_user_overrides_user_id: nil, request_metadata_partners_session_id: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v2/offers', options) command.response_representation = Google::Apis::PartnersV2::ListOffersResponse::Representation command.response_class = Google::Apis::PartnersV2::ListOffersResponse - command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil? - command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil? command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil? command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil? command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil? command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil? command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil? + command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil? + command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) @@ -121,16 +188,16 @@ module Google # Experiment IDs the current request belongs to. # @param [Boolean] entire_company # if true, show history for the entire company. Requires user to be admin. - # @param [String] request_metadata_traffic_source_traffic_sub_id - # Second level identifier to indicate where the traffic comes from. - # An identifier has multiple letters created by a team which redirected the - # traffic to us. # @param [String] order_by # Comma-separated list of fields to order by, e.g.: "foo,bar,baz". # Use "foo desc" to sort descending. # List of valid field names is: name, offer_code, expiration_time, status, # last_modified_time, sender_name, creation_time, country_code, # offer_type. + # @param [String] request_metadata_traffic_source_traffic_sub_id + # Second level identifier to indicate where the traffic comes from. + # An identifier has multiple letters created by a team which redirected the + # traffic to us. # @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. @@ -148,7 +215,7 @@ 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_offer_histories(request_metadata_user_overrides_user_id: nil, request_metadata_partners_session_id: nil, page_token: nil, page_size: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, entire_company: nil, request_metadata_traffic_source_traffic_sub_id: nil, order_by: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_offer_histories(request_metadata_user_overrides_user_id: nil, request_metadata_partners_session_id: nil, page_token: nil, page_size: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, entire_company: nil, order_by: nil, request_metadata_traffic_source_traffic_sub_id: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v2/offers/history', options) command.response_representation = Google::Apis::PartnersV2::ListOffersHistoryResponse::Representation command.response_class = Google::Apis::PartnersV2::ListOffersHistoryResponse @@ -161,8 +228,8 @@ module Google command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil? command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil? command.query['entireCompany'] = entire_company unless entire_company.nil? - command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil? command.query['orderBy'] = order_by unless order_by.nil? + command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) @@ -170,6 +237,12 @@ module Google # Lists analytics data for a user's associated company. # Should only be called within the context of an authorized logged in user. + # @param [Array, String] request_metadata_experiment_ids + # Experiment IDs the current request belongs to. + # @param [String] request_metadata_traffic_source_traffic_sub_id + # Second level identifier to indicate where the traffic comes from. + # An identifier has multiple letters created by a team which redirected the + # traffic to us. # @param [String] request_metadata_user_overrides_user_id # Logged-in user ID to impersonate instead of the user's ID. # @param [String] request_metadata_partners_session_id @@ -198,12 +271,6 @@ module Google # Locale to use for the current request. # @param [String] request_metadata_user_overrides_ip_address # IP address to use instead of the user's geo-located IP address. - # @param [Array, String] request_metadata_experiment_ids - # Experiment IDs the current request belongs to. - # @param [String] request_metadata_traffic_source_traffic_sub_id - # Second level identifier to indicate where the traffic comes from. - # An identifier has multiple letters created by a team which redirected the - # traffic to us. # @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. @@ -221,10 +288,12 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_analytics(request_metadata_user_overrides_user_id: nil, request_metadata_partners_session_id: nil, page_token: nil, page_size: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, request_metadata_traffic_source_traffic_sub_id: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_analytics(request_metadata_experiment_ids: nil, request_metadata_traffic_source_traffic_sub_id: nil, request_metadata_user_overrides_user_id: nil, request_metadata_partners_session_id: nil, page_token: nil, page_size: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v2/analytics', options) command.response_representation = Google::Apis::PartnersV2::ListAnalyticsResponse::Representation command.response_class = Google::Apis::PartnersV2::ListAnalyticsResponse + command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil? + command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil? command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil? command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil? command.query['pageToken'] = page_token unless page_token.nil? @@ -232,22 +301,12 @@ module Google command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil? command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil? command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil? - command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil? - command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end # Lists states for current user. - # @param [String] request_metadata_traffic_source_traffic_sub_id - # Second level identifier to indicate where the traffic comes from. - # An identifier has multiple letters created by a team which redirected the - # traffic to us. - # @param [String] request_metadata_user_overrides_user_id - # Logged-in user ID to impersonate instead of the user's ID. - # @param [String] request_metadata_partners_session_id - # Google Partners session ID. # @param [String] request_metadata_traffic_source_traffic_source_id # Identifier to indicate where the traffic comes from. # An identifier has multiple letters created by a team which redirected the @@ -258,6 +317,14 @@ module Google # IP address to use instead of the user's geo-located IP address. # @param [Array, String] request_metadata_experiment_ids # Experiment IDs the current request belongs to. + # @param [String] request_metadata_traffic_source_traffic_sub_id + # Second level identifier to indicate where the traffic comes from. + # An identifier has multiple letters created by a team which redirected the + # traffic to us. + # @param [String] request_metadata_partners_session_id + # Google Partners session ID. + # @param [String] request_metadata_user_overrides_user_id + # Logged-in user ID to impersonate instead of the user's ID. # @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. @@ -275,17 +342,17 @@ 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_user_states(request_metadata_traffic_source_traffic_sub_id: nil, request_metadata_user_overrides_user_id: nil, request_metadata_partners_session_id: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_user_states(request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, request_metadata_traffic_source_traffic_sub_id: nil, request_metadata_partners_session_id: nil, request_metadata_user_overrides_user_id: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v2/userStates', options) command.response_representation = Google::Apis::PartnersV2::ListUserStatesResponse::Representation command.response_class = Google::Apis::PartnersV2::ListUserStatesResponse - command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil? - command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil? - command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil? command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil? command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil? command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil? command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil? + command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil? + command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil? + command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) @@ -346,14 +413,10 @@ module Google # Updates the specified lead. # @param [Google::Apis::PartnersV2::Lead] lead_object - # @param [String] request_metadata_traffic_source_traffic_sub_id - # Second level identifier to indicate where the traffic comes from. - # An identifier has multiple letters created by a team which redirected the - # traffic to us. - # @param [String] request_metadata_partners_session_id - # Google Partners session ID. # @param [String] request_metadata_user_overrides_user_id # Logged-in user ID to impersonate instead of the user's ID. + # @param [String] request_metadata_partners_session_id + # Google Partners session ID. # @param [String] request_metadata_traffic_source_traffic_source_id # Identifier to indicate where the traffic comes from. # An identifier has multiple letters created by a team which redirected the @@ -368,6 +431,10 @@ module Google # Only `state` and `adwords_customer_id` are currently supported. # @param [Array, String] request_metadata_experiment_ids # Experiment IDs the current request belongs to. + # @param [String] request_metadata_traffic_source_traffic_sub_id + # Second level identifier to indicate where the traffic comes from. + # An identifier has multiple letters created by a team which redirected the + # traffic to us. # @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. @@ -385,20 +452,20 @@ 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 update_leads(lead_object = nil, request_metadata_traffic_source_traffic_sub_id: nil, request_metadata_partners_session_id: nil, request_metadata_user_overrides_user_id: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, update_mask: nil, request_metadata_experiment_ids: nil, quota_user: nil, fields: nil, options: nil, &block) + def update_leads(lead_object = nil, request_metadata_user_overrides_user_id: nil, request_metadata_partners_session_id: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, update_mask: nil, request_metadata_experiment_ids: nil, request_metadata_traffic_source_traffic_sub_id: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:patch, 'v2/leads', options) command.request_representation = Google::Apis::PartnersV2::Lead::Representation command.request_object = lead_object command.response_representation = Google::Apis::PartnersV2::Lead::Representation command.response_class = Google::Apis::PartnersV2::Lead - command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil? - command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil? command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil? + command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil? command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil? command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil? command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil? + command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) @@ -464,30 +531,241 @@ module Google execute_or_queue_command(command, &block) end - # Gets a company. - # @param [String] company_id - # The ID of the company to retrieve. - # @param [String] request_metadata_user_overrides_user_id - # Logged-in user ID to impersonate instead of the user's ID. - # @param [String] request_metadata_partners_session_id - # Google Partners session ID. - # @param [String] view - # The view of `Company` resource to be returned. This must not be - # `COMPANY_VIEW_UNSPECIFIED`. - # @param [String] address - # The address to use for sorting the company's addresses by proximity. - # If not given, the geo-located address of the request is used. - # Used when order_by is set. - # @param [String] request_metadata_locale - # Locale to use for the current request. + # Creates a user's company relation. Affiliates the user to a company. + # @param [String] user_id + # The ID of the user. Can be set to me to mean + # the currently authenticated user. + # @param [Google::Apis::PartnersV2::CompanyRelation] company_relation_object # @param [String] request_metadata_traffic_source_traffic_source_id # Identifier to indicate where the traffic comes from. # An identifier has multiple letters created by a team which redirected the # traffic to us. + # @param [String] request_metadata_locale + # Locale to use for the current request. # @param [String] request_metadata_user_overrides_ip_address # IP address to use instead of the user's geo-located IP address. # @param [Array, String] request_metadata_experiment_ids # Experiment IDs the current request belongs to. + # @param [String] request_metadata_traffic_source_traffic_sub_id + # Second level identifier to indicate where the traffic comes from. + # An identifier has multiple letters created by a team which redirected the + # traffic to us. + # @param [String] request_metadata_partners_session_id + # Google Partners session ID. + # @param [String] request_metadata_user_overrides_user_id + # Logged-in user ID to impersonate instead of the user's ID. + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::PartnersV2::CompanyRelation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::PartnersV2::CompanyRelation] + # + # @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_user_company_relation(user_id, company_relation_object = nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, request_metadata_traffic_source_traffic_sub_id: nil, request_metadata_partners_session_id: nil, request_metadata_user_overrides_user_id: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:put, 'v2/users/{userId}/companyRelation', options) + command.request_representation = Google::Apis::PartnersV2::CompanyRelation::Representation + command.request_object = company_relation_object + command.response_representation = Google::Apis::PartnersV2::CompanyRelation::Representation + command.response_class = Google::Apis::PartnersV2::CompanyRelation + command.params['userId'] = user_id unless user_id.nil? + command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil? + command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil? + command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil? + command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil? + command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil? + command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil? + command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a user's company relation. Unaffiliaites the user from a company. + # @param [String] user_id + # The ID of the user. Can be set to me to mean + # the currently authenticated user. + # @param [String] request_metadata_partners_session_id + # Google Partners session ID. + # @param [String] request_metadata_user_overrides_user_id + # Logged-in user ID to impersonate instead of the user's ID. + # @param [String] request_metadata_traffic_source_traffic_source_id + # Identifier to indicate where the traffic comes from. + # An identifier has multiple letters created by a team which redirected the + # traffic to us. + # @param [String] request_metadata_locale + # Locale to use for the current request. + # @param [String] request_metadata_user_overrides_ip_address + # IP address to use instead of the user's geo-located IP address. + # @param [Array, String] request_metadata_experiment_ids + # Experiment IDs the current request belongs to. + # @param [String] request_metadata_traffic_source_traffic_sub_id + # Second level identifier to indicate where the traffic comes from. + # An identifier has multiple letters created by a team which redirected the + # traffic to us. + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::PartnersV2::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::PartnersV2::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_user_company_relation(user_id, request_metadata_partners_session_id: nil, request_metadata_user_overrides_user_id: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, request_metadata_traffic_source_traffic_sub_id: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:delete, 'v2/users/{userId}/companyRelation', options) + command.response_representation = Google::Apis::PartnersV2::Empty::Representation + command.response_class = Google::Apis::PartnersV2::Empty + command.params['userId'] = user_id unless user_id.nil? + command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil? + command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil? + command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil? + command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil? + command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil? + command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil? + command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Gets a user. + # @param [String] user_id + # Identifier of the user. Can be set to me to mean the currently + # authenticated user. + # @param [String] request_metadata_traffic_source_traffic_sub_id + # Second level identifier to indicate where the traffic comes from. + # An identifier has multiple letters created by a team which redirected the + # traffic to us. + # @param [String] request_metadata_user_overrides_user_id + # Logged-in user ID to impersonate instead of the user's ID. + # @param [String] request_metadata_partners_session_id + # Google Partners session ID. + # @param [String] user_view + # Specifies what parts of the user information to return. + # @param [String] request_metadata_traffic_source_traffic_source_id + # Identifier to indicate where the traffic comes from. + # An identifier has multiple letters created by a team which redirected the + # traffic to us. + # @param [String] request_metadata_locale + # Locale to use for the current request. + # @param [String] request_metadata_user_overrides_ip_address + # IP address to use instead of the user's geo-located IP address. + # @param [Array, String] request_metadata_experiment_ids + # Experiment IDs the current request belongs to. + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::PartnersV2::User] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::PartnersV2::User] + # + # @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_user(user_id, request_metadata_traffic_source_traffic_sub_id: nil, request_metadata_user_overrides_user_id: nil, request_metadata_partners_session_id: nil, user_view: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/users/{userId}', options) + command.response_representation = Google::Apis::PartnersV2::User::Representation + command.response_class = Google::Apis::PartnersV2::User + command.params['userId'] = user_id unless user_id.nil? + command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil? + command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil? + command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil? + command.query['userView'] = user_view unless user_view.nil? + command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil? + command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil? + command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil? + command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Updates a user's profile. A user can only update their own profile and + # should only be called within the context of a logged in user. + # @param [Google::Apis::PartnersV2::UserProfile] user_profile_object + # @param [String] request_metadata_traffic_source_traffic_source_id + # Identifier to indicate where the traffic comes from. + # An identifier has multiple letters created by a team which redirected the + # traffic to us. + # @param [String] request_metadata_locale + # Locale to use for the current request. + # @param [String] request_metadata_user_overrides_ip_address + # IP address to use instead of the user's geo-located IP address. + # @param [Array, String] request_metadata_experiment_ids + # Experiment IDs the current request belongs to. + # @param [String] request_metadata_traffic_source_traffic_sub_id + # Second level identifier to indicate where the traffic comes from. + # An identifier has multiple letters created by a team which redirected the + # traffic to us. + # @param [String] request_metadata_partners_session_id + # Google Partners session ID. + # @param [String] request_metadata_user_overrides_user_id + # Logged-in user ID to impersonate instead of the user's ID. + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::PartnersV2::UserProfile] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::PartnersV2::UserProfile] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_user_profile(user_profile_object = nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, request_metadata_traffic_source_traffic_sub_id: nil, request_metadata_partners_session_id: nil, request_metadata_user_overrides_user_id: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:patch, 'v2/users/profile', options) + command.request_representation = Google::Apis::PartnersV2::UserProfile::Representation + command.request_object = user_profile_object + command.response_representation = Google::Apis::PartnersV2::UserProfile::Representation + command.response_class = Google::Apis::PartnersV2::UserProfile + command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil? + command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil? + command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil? + command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil? + command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil? + command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil? + command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Gets a company. + # @param [String] company_id + # The ID of the company to retrieve. + # @param [Array, String] request_metadata_experiment_ids + # Experiment IDs the current request belongs to. # @param [String] currency_code # If the company's budget is in a different currency code than this one, then # the converted budget is converted to this currency code. @@ -500,6 +778,25 @@ module Google # Second level identifier to indicate where the traffic comes from. # An identifier has multiple letters created by a team which redirected the # traffic to us. + # @param [String] request_metadata_user_overrides_user_id + # Logged-in user ID to impersonate instead of the user's ID. + # @param [String] request_metadata_partners_session_id + # Google Partners session ID. + # @param [String] view + # The view of `Company` resource to be returned. This must not be + # `COMPANY_VIEW_UNSPECIFIED`. + # @param [String] request_metadata_locale + # Locale to use for the current request. + # @param [String] address + # The address to use for sorting the company's addresses by proximity. + # If not given, the geo-located address of the request is used. + # Used when order_by is set. + # @param [String] request_metadata_traffic_source_traffic_source_id + # Identifier to indicate where the traffic comes from. + # An identifier has multiple letters created by a team which redirected the + # traffic to us. + # @param [String] request_metadata_user_overrides_ip_address + # IP address to use instead of the user's geo-located IP address. # @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. @@ -517,28 +814,41 @@ 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 get_company(company_id, request_metadata_user_overrides_user_id: nil, request_metadata_partners_session_id: nil, view: nil, address: nil, request_metadata_locale: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, currency_code: nil, order_by: nil, request_metadata_traffic_source_traffic_sub_id: nil, quota_user: nil, fields: nil, options: nil, &block) + def get_company(company_id, request_metadata_experiment_ids: nil, currency_code: nil, order_by: nil, request_metadata_traffic_source_traffic_sub_id: nil, request_metadata_user_overrides_user_id: nil, request_metadata_partners_session_id: nil, view: nil, request_metadata_locale: nil, address: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_user_overrides_ip_address: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v2/companies/{companyId}', options) command.response_representation = Google::Apis::PartnersV2::GetCompanyResponse::Representation command.response_class = Google::Apis::PartnersV2::GetCompanyResponse command.params['companyId'] = company_id unless company_id.nil? - command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil? - command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil? - command.query['view'] = view unless view.nil? - command.query['address'] = address unless address.nil? - command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil? - command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil? - command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil? command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil? command.query['currencyCode'] = currency_code unless currency_code.nil? command.query['orderBy'] = order_by unless order_by.nil? command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil? + command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil? + command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil? + command.query['view'] = view unless view.nil? + command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil? + command.query['address'] = address unless address.nil? + command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil? + command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end # Lists companies. + # @param [Fixnum] min_monthly_budget_nanos + # Number of nano (10^-9) units of the amount. + # The value must be between -999,999,999 and +999,999,999 inclusive. + # If `units` is positive, `nanos` must be positive or zero. + # If `units` is zero, `nanos` can be positive, zero, or negative. + # If `units` is negative, `nanos` must be negative or zero. + # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. + # @param [String] request_metadata_traffic_source_traffic_sub_id + # Second level identifier to indicate where the traffic comes from. + # An identifier has multiple letters created by a team which redirected the + # traffic to us. + # @param [String] request_metadata_partners_session_id + # Google Partners session ID. # @param [String] company_name # Company name to search for. # @param [String] page_token @@ -576,10 +886,10 @@ module Google # specializations, or one of the services in the "services" field. # @param [String] max_monthly_budget_currency_code # The 3-letter currency code defined in ISO 4217. - # @param [String] request_metadata_user_overrides_user_id - # Logged-in user ID to impersonate instead of the user's ID. # @param [String] min_monthly_budget_currency_code # The 3-letter currency code defined in ISO 4217. + # @param [String] request_metadata_user_overrides_user_id + # Logged-in user ID to impersonate instead of the user's ID. # @param [String] view # The view of the `Company` resource to be returned. This must not be # `COMPANY_VIEW_UNSPECIFIED`. @@ -609,19 +919,6 @@ module Google # Identifier to indicate where the traffic comes from. # An identifier has multiple letters created by a team which redirected the # traffic to us. - # @param [String] request_metadata_traffic_source_traffic_sub_id - # Second level identifier to indicate where the traffic comes from. - # An identifier has multiple letters created by a team which redirected the - # traffic to us. - # @param [Fixnum] min_monthly_budget_nanos - # Number of nano (10^-9) units of the amount. - # The value must be between -999,999,999 and +999,999,999 inclusive. - # If `units` is positive, `nanos` must be positive or zero. - # If `units` is zero, `nanos` can be positive, zero, or negative. - # If `units` is negative, `nanos` must be negative or zero. - # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. - # @param [String] request_metadata_partners_session_id - # Google Partners session ID. # @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. @@ -639,10 +936,13 @@ 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_companies(company_name: nil, page_token: nil, industries: nil, website_url: nil, gps_motivations: nil, language_codes: nil, page_size: nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, order_by: nil, specializations: nil, max_monthly_budget_currency_code: nil, request_metadata_user_overrides_user_id: nil, min_monthly_budget_currency_code: nil, view: nil, request_metadata_locale: nil, address: nil, min_monthly_budget_units: nil, max_monthly_budget_nanos: nil, services: nil, max_monthly_budget_units: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_traffic_source_traffic_sub_id: nil, min_monthly_budget_nanos: nil, request_metadata_partners_session_id: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_companies(min_monthly_budget_nanos: nil, request_metadata_traffic_source_traffic_sub_id: nil, request_metadata_partners_session_id: nil, company_name: nil, page_token: nil, industries: nil, website_url: nil, gps_motivations: nil, language_codes: nil, page_size: nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, order_by: nil, specializations: nil, max_monthly_budget_currency_code: nil, min_monthly_budget_currency_code: nil, request_metadata_user_overrides_user_id: nil, view: nil, request_metadata_locale: nil, address: nil, min_monthly_budget_units: nil, max_monthly_budget_nanos: nil, services: nil, max_monthly_budget_units: nil, request_metadata_traffic_source_traffic_source_id: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v2/companies', options) command.response_representation = Google::Apis::PartnersV2::ListCompaniesResponse::Representation command.response_class = Google::Apis::PartnersV2::ListCompaniesResponse + command.query['minMonthlyBudget.nanos'] = min_monthly_budget_nanos unless min_monthly_budget_nanos.nil? + command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil? + command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil? command.query['companyName'] = company_name unless company_name.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['industries'] = industries unless industries.nil? @@ -655,8 +955,8 @@ module Google command.query['orderBy'] = order_by unless order_by.nil? command.query['specializations'] = specializations unless specializations.nil? command.query['maxMonthlyBudget.currencyCode'] = max_monthly_budget_currency_code unless max_monthly_budget_currency_code.nil? - command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil? command.query['minMonthlyBudget.currencyCode'] = min_monthly_budget_currency_code unless min_monthly_budget_currency_code.nil? + command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil? command.query['view'] = view unless view.nil? command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil? command.query['address'] = address unless address.nil? @@ -665,9 +965,6 @@ module Google command.query['services'] = services unless services.nil? command.query['maxMonthlyBudget.units'] = max_monthly_budget_units unless max_monthly_budget_units.nil? command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil? - command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil? - command.query['minMonthlyBudget.nanos'] = min_monthly_budget_nanos unless min_monthly_budget_nanos.nil? - command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) @@ -706,236 +1003,6 @@ module Google execute_or_queue_command(command, &block) end - # Creates a user's company relation. Affiliates the user to a company. - # @param [String] user_id - # The ID of the user. Can be set to me to mean - # the currently authenticated user. - # @param [Google::Apis::PartnersV2::CompanyRelation] company_relation_object - # @param [String] request_metadata_user_overrides_user_id - # Logged-in user ID to impersonate instead of the user's ID. - # @param [String] request_metadata_partners_session_id - # Google Partners session ID. - # @param [String] request_metadata_traffic_source_traffic_source_id - # Identifier to indicate where the traffic comes from. - # An identifier has multiple letters created by a team which redirected the - # traffic to us. - # @param [String] request_metadata_locale - # Locale to use for the current request. - # @param [String] request_metadata_user_overrides_ip_address - # IP address to use instead of the user's geo-located IP address. - # @param [Array, String] request_metadata_experiment_ids - # Experiment IDs the current request belongs to. - # @param [String] request_metadata_traffic_source_traffic_sub_id - # Second level identifier to indicate where the traffic comes from. - # An identifier has multiple letters created by a team which redirected the - # traffic to us. - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PartnersV2::CompanyRelation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PartnersV2::CompanyRelation] - # - # @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_user_company_relation(user_id, company_relation_object = nil, request_metadata_user_overrides_user_id: nil, request_metadata_partners_session_id: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, request_metadata_traffic_source_traffic_sub_id: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:put, 'v2/users/{userId}/companyRelation', options) - command.request_representation = Google::Apis::PartnersV2::CompanyRelation::Representation - command.request_object = company_relation_object - command.response_representation = Google::Apis::PartnersV2::CompanyRelation::Representation - command.response_class = Google::Apis::PartnersV2::CompanyRelation - command.params['userId'] = user_id unless user_id.nil? - command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil? - command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil? - command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil? - command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil? - command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil? - command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil? - command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Deletes a user's company relation. Unaffiliaites the user from a company. - # @param [String] user_id - # The ID of the user. Can be set to me to mean - # the currently authenticated user. - # @param [String] request_metadata_traffic_source_traffic_source_id - # Identifier to indicate where the traffic comes from. - # An identifier has multiple letters created by a team which redirected the - # traffic to us. - # @param [String] request_metadata_locale - # Locale to use for the current request. - # @param [String] request_metadata_user_overrides_ip_address - # IP address to use instead of the user's geo-located IP address. - # @param [Array, String] request_metadata_experiment_ids - # Experiment IDs the current request belongs to. - # @param [String] request_metadata_traffic_source_traffic_sub_id - # Second level identifier to indicate where the traffic comes from. - # An identifier has multiple letters created by a team which redirected the - # traffic to us. - # @param [String] request_metadata_partners_session_id - # Google Partners session ID. - # @param [String] request_metadata_user_overrides_user_id - # Logged-in user ID to impersonate instead of the user's ID. - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PartnersV2::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PartnersV2::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_user_company_relation(user_id, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, request_metadata_traffic_source_traffic_sub_id: nil, request_metadata_partners_session_id: nil, request_metadata_user_overrides_user_id: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:delete, 'v2/users/{userId}/companyRelation', options) - command.response_representation = Google::Apis::PartnersV2::Empty::Representation - command.response_class = Google::Apis::PartnersV2::Empty - command.params['userId'] = user_id unless user_id.nil? - command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil? - command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil? - command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil? - command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil? - command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil? - command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil? - command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Gets a user. - # @param [String] user_id - # Identifier of the user. Can be set to me to mean the currently - # authenticated user. - # @param [String] request_metadata_user_overrides_ip_address - # IP address to use instead of the user's geo-located IP address. - # @param [Array, String] request_metadata_experiment_ids - # Experiment IDs the current request belongs to. - # @param [String] request_metadata_traffic_source_traffic_sub_id - # Second level identifier to indicate where the traffic comes from. - # An identifier has multiple letters created by a team which redirected the - # traffic to us. - # @param [String] request_metadata_partners_session_id - # Google Partners session ID. - # @param [String] request_metadata_user_overrides_user_id - # Logged-in user ID to impersonate instead of the user's ID. - # @param [String] user_view - # Specifies what parts of the user information to return. - # @param [String] request_metadata_traffic_source_traffic_source_id - # Identifier to indicate where the traffic comes from. - # An identifier has multiple letters created by a team which redirected the - # traffic to us. - # @param [String] request_metadata_locale - # Locale to use for the current request. - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PartnersV2::User] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PartnersV2::User] - # - # @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_user(user_id, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, request_metadata_traffic_source_traffic_sub_id: nil, request_metadata_partners_session_id: nil, request_metadata_user_overrides_user_id: nil, user_view: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v2/users/{userId}', options) - command.response_representation = Google::Apis::PartnersV2::User::Representation - command.response_class = Google::Apis::PartnersV2::User - command.params['userId'] = user_id unless user_id.nil? - command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil? - command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil? - command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil? - command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil? - command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil? - command.query['userView'] = user_view unless user_view.nil? - command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil? - command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Updates a user's profile. A user can only update their own profile and - # should only be called within the context of a logged in user. - # @param [Google::Apis::PartnersV2::UserProfile] user_profile_object - # @param [String] request_metadata_traffic_source_traffic_sub_id - # Second level identifier to indicate where the traffic comes from. - # An identifier has multiple letters created by a team which redirected the - # traffic to us. - # @param [String] request_metadata_user_overrides_user_id - # Logged-in user ID to impersonate instead of the user's ID. - # @param [String] request_metadata_partners_session_id - # Google Partners session ID. - # @param [String] request_metadata_traffic_source_traffic_source_id - # Identifier to indicate where the traffic comes from. - # An identifier has multiple letters created by a team which redirected the - # traffic to us. - # @param [String] request_metadata_locale - # Locale to use for the current request. - # @param [String] request_metadata_user_overrides_ip_address - # IP address to use instead of the user's geo-located IP address. - # @param [Array, String] request_metadata_experiment_ids - # Experiment IDs the current request belongs to. - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PartnersV2::UserProfile] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PartnersV2::UserProfile] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_user_profile(user_profile_object = nil, request_metadata_traffic_source_traffic_sub_id: nil, request_metadata_user_overrides_user_id: nil, request_metadata_partners_session_id: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:patch, 'v2/users/profile', options) - command.request_representation = Google::Apis::PartnersV2::UserProfile::Representation - command.request_object = user_profile_object - command.response_representation = Google::Apis::PartnersV2::UserProfile::Representation - command.response_class = Google::Apis::PartnersV2::UserProfile - command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil? - command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil? - command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil? - command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil? - command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil? - command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil? - command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - # Logs a user event. # @param [Google::Apis::PartnersV2::LogUserEventRequest] log_user_event_request_object # @param [String] quota_user @@ -1001,16 +1068,10 @@ module Google # Gets an Exam Token for a Partner's user to take an exam in the Exams System # @param [String] exam_type # The exam type we are requesting a token for. - # @param [Array, String] request_metadata_experiment_ids - # Experiment IDs the current request belongs to. - # @param [String] request_metadata_traffic_source_traffic_sub_id - # Second level identifier to indicate where the traffic comes from. - # An identifier has multiple letters created by a team which redirected the - # traffic to us. - # @param [String] request_metadata_partners_session_id - # Google Partners session ID. # @param [String] request_metadata_user_overrides_user_id # Logged-in user ID to impersonate instead of the user's ID. + # @param [String] request_metadata_partners_session_id + # Google Partners session ID. # @param [String] request_metadata_traffic_source_traffic_source_id # Identifier to indicate where the traffic comes from. # An identifier has multiple letters created by a team which redirected the @@ -1019,6 +1080,12 @@ module Google # Locale to use for the current request. # @param [String] request_metadata_user_overrides_ip_address # IP address to use instead of the user's geo-located IP address. + # @param [Array, String] request_metadata_experiment_ids + # Experiment IDs the current request belongs to. + # @param [String] request_metadata_traffic_source_traffic_sub_id + # Second level identifier to indicate where the traffic comes from. + # An identifier has multiple letters created by a team which redirected the + # traffic to us. # @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. @@ -1036,85 +1103,18 @@ 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 get_exam_token(exam_type, request_metadata_experiment_ids: nil, request_metadata_traffic_source_traffic_sub_id: nil, request_metadata_partners_session_id: nil, request_metadata_user_overrides_user_id: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, quota_user: nil, fields: nil, options: nil, &block) + def get_exam_token(exam_type, request_metadata_user_overrides_user_id: nil, request_metadata_partners_session_id: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, request_metadata_traffic_source_traffic_sub_id: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v2/exams/{examType}/token', options) command.response_representation = Google::Apis::PartnersV2::ExamToken::Representation command.response_class = Google::Apis::PartnersV2::ExamToken command.params['examType'] = exam_type unless exam_type.nil? - command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil? - command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil? - command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil? - command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil? - command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil? - command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil? - command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Lists advertiser leads for a user's associated company. - # Should only be called within the context of an authorized logged in user. - # @param [String] request_metadata_user_overrides_user_id - # Logged-in user ID to impersonate instead of the user's ID. - # @param [String] request_metadata_partners_session_id - # Google Partners session ID. - # @param [String] page_token - # A token identifying a page of results that the server returns. - # Typically, this is the value of `ListLeadsResponse.next_page_token` - # returned from the previous call to - # ListLeads. - # @param [Fixnum] page_size - # Requested page size. Server may return fewer leads than requested. - # If unspecified, server picks an appropriate default. - # @param [String] request_metadata_traffic_source_traffic_source_id - # Identifier to indicate where the traffic comes from. - # An identifier has multiple letters created by a team which redirected the - # traffic to us. - # @param [String] request_metadata_locale - # Locale to use for the current request. - # @param [String] request_metadata_user_overrides_ip_address - # IP address to use instead of the user's geo-located IP address. - # @param [Array, String] request_metadata_experiment_ids - # Experiment IDs the current request belongs to. - # @param [String] request_metadata_traffic_source_traffic_sub_id - # Second level identifier to indicate where the traffic comes from. - # An identifier has multiple letters created by a team which redirected the - # traffic to us. - # @param [String] order_by - # How to order Leads. Currently, only `create_time` - # and `create_time desc` are supported - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PartnersV2::ListLeadsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PartnersV2::ListLeadsResponse] - # - # @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_leads(request_metadata_user_overrides_user_id: nil, request_metadata_partners_session_id: nil, page_token: nil, page_size: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, request_metadata_traffic_source_traffic_sub_id: nil, order_by: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v2/leads', options) - command.response_representation = Google::Apis::PartnersV2::ListLeadsResponse::Representation - command.response_class = Google::Apis::PartnersV2::ListLeadsResponse command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil? command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['pageSize'] = page_size unless page_size.nil? command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil? command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil? command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil? command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil? command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil? - command.query['orderBy'] = order_by unless order_by.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) @@ -1123,8 +1123,8 @@ module Google protected def apply_command_defaults(command) - command.query['key'] = key unless key.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['key'] = key unless key.nil? end end end diff --git a/generated/google/apis/people_v1.rb b/generated/google/apis/people_v1.rb index da92111e2..26210ee3b 100644 --- a/generated/google/apis/people_v1.rb +++ b/generated/google/apis/people_v1.rb @@ -25,7 +25,19 @@ module Google # @see https://developers.google.com/people/ module PeopleV1 VERSION = 'V1' - REVISION = '20170503' + REVISION = '20170524' + + # View your email address + AUTH_USERINFO_EMAIL = 'https://www.googleapis.com/auth/userinfo.email' + + # View your phone numbers + AUTH_USER_PHONENUMBERS_READ = 'https://www.googleapis.com/auth/user.phonenumbers.read' + + # View your contacts + AUTH_CONTACTS_READONLY = 'https://www.googleapis.com/auth/contacts.readonly' + + # View your complete date of birth + AUTH_USER_BIRTHDAY_READ = 'https://www.googleapis.com/auth/user.birthday.read' # Know the list of people in your circles, your age range, and language AUTH_PLUS_LOGIN = 'https://www.googleapis.com/auth/plus.login' @@ -41,18 +53,6 @@ module Google # View your street addresses AUTH_USER_ADDRESSES_READ = 'https://www.googleapis.com/auth/user.addresses.read' - - # View your phone numbers - AUTH_USER_PHONENUMBERS_READ = 'https://www.googleapis.com/auth/user.phonenumbers.read' - - # View your email address - AUTH_USERINFO_EMAIL = 'https://www.googleapis.com/auth/userinfo.email' - - # View your complete date of birth - AUTH_USER_BIRTHDAY_READ = 'https://www.googleapis.com/auth/user.birthday.read' - - # View your contacts - AUTH_CONTACTS_READONLY = 'https://www.googleapis.com/auth/contacts.readonly' end end end diff --git a/generated/google/apis/people_v1/classes.rb b/generated/google/apis/people_v1/classes.rb index 5cb62a6e8..d0bdcee55 100644 --- a/generated/google/apis/people_v1/classes.rb +++ b/generated/google/apis/people_v1/classes.rb @@ -22,202 +22,6 @@ module Google module Apis module PeopleV1 - # A Google contact group membership. - class ContactGroupMembership - include Google::Apis::Core::Hashable - - # The contact group ID for the contact group membership. The contact group - # ID can be custom or predefined. Possible values include, but are not - # limited to, the following: - # * `myContacts` - # * `starred` - # * A numerical ID for user-created groups. - # Corresponds to the JSON property `contactGroupId` - # @return [String] - attr_accessor :contact_group_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @contact_group_id = args[:contact_group_id] if args.key?(:contact_group_id) - end - end - - # The `Status` type defines a logical error model that is suitable for different - # programming environments, including REST APIs and RPC APIs. It is used by - # [gRPC](https://github.com/grpc). The error model is designed to be: - # - Simple to use and understand for most users - # - Flexible enough to meet unexpected needs - # # Overview - # The `Status` message contains three pieces of data: error code, error message, - # and error details. The error code should be an enum value of - # google.rpc.Code, but it may accept additional error codes if needed. The - # error message should be a developer-facing English message that helps - # developers *understand* and *resolve* the error. If a localized user-facing - # error message is needed, put the localized message in the error details or - # localize it in the client. The optional error details may contain arbitrary - # information about the error. There is a predefined set of error detail types - # in the package `google.rpc` which can be used for common error conditions. - # # Language mapping - # The `Status` message is the logical representation of the error model, but it - # is not necessarily the actual wire format. When the `Status` message is - # exposed in different client libraries and different wire protocols, it can be - # mapped differently. For example, it will likely be mapped to some exceptions - # in Java, but more likely mapped to some error codes in C. - # # Other uses - # The error model and the `Status` message can be used in a variety of - # environments, either with or without APIs, to provide a - # consistent developer experience across different environments. - # Example uses of this error model include: - # - Partial errors. If a service needs to return partial errors to the client, - # it may embed the `Status` in the normal response to indicate the partial - # errors. - # - Workflow errors. A typical workflow has multiple steps. Each step may - # have a `Status` message for error reporting purpose. - # - Batch operations. If a client uses batch request and batch response, the - # `Status` message should be used directly inside batch response, one for - # each error sub-response. - # - Asynchronous operations. If an API call embeds asynchronous operation - # results in its response, the status of those operations should be - # represented directly using the `Status` message. - # - Logging. If some API errors are stored in logs, the message `Status` could - # be used directly after any stripping needed for security/privacy reasons. - class Status - include Google::Apis::Core::Hashable - - # A list of messages that carry the error details. There will be a - # common set of message types for APIs to use. - # Corresponds to the JSON property `details` - # @return [Array>] - attr_accessor :details - - # The status code, which should be an enum value of google.rpc.Code. - # Corresponds to the JSON property `code` - # @return [Fixnum] - attr_accessor :code - - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # google.rpc.Status.details field, or localized by the client. - # Corresponds to the JSON property `message` - # @return [String] - attr_accessor :message - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @details = args[:details] if args.key?(:details) - @code = args[:code] if args.key?(:code) - @message = args[:message] if args.key?(:message) - end - end - - # The read-only metadata about a person. - class PersonMetadata - include Google::Apis::Core::Hashable - - # DEPRECATED(Please read person.metadata.sources.profile_metadata instead). - # The type of the person object. - # Corresponds to the JSON property `objectType` - # @return [String] - attr_accessor :object_type - - # Resource names of people linked to this resource. - # Corresponds to the JSON property `linkedPeopleResourceNames` - # @return [Array] - attr_accessor :linked_people_resource_names - - # The sources of data for the person. - # Corresponds to the JSON property `sources` - # @return [Array] - attr_accessor :sources - - # Any former resource names this person has had. Populated only for - # [`connections.list`](/people/api/rest/v1/people.connections/list) requests - # that include a sync token. - # The resource name may change when adding or removing fields that link a - # contact and profile such as a verified email, verified phone number, or - # profile URL. - # Corresponds to the JSON property `previousResourceNames` - # @return [Array] - attr_accessor :previous_resource_names - - # True if the person resource has been deleted. Populated only for - # [`connections.list`](/people/api/rest/v1/people.connections/list) requests - # that include a sync token. - # Corresponds to the JSON property `deleted` - # @return [Boolean] - attr_accessor :deleted - alias_method :deleted?, :deleted - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @object_type = args[:object_type] if args.key?(:object_type) - @linked_people_resource_names = args[:linked_people_resource_names] if args.key?(:linked_people_resource_names) - @sources = args[:sources] if args.key?(:sources) - @previous_resource_names = args[:previous_resource_names] if args.key?(:previous_resource_names) - @deleted = args[:deleted] if args.key?(:deleted) - end - end - - # An event related to the person. - class Event - include Google::Apis::Core::Hashable - - # The read-only type of the event translated and formatted in the - # viewer's account locale or the `Accept-Language` HTTP header locale. - # Corresponds to the JSON property `formattedType` - # @return [String] - attr_accessor :formatted_type - - # Metadata about a field. - # Corresponds to the JSON property `metadata` - # @return [Google::Apis::PeopleV1::FieldMetadata] - attr_accessor :metadata - - # The type of the event. The type can be custom or predefined. - # Possible values include, but are not limited to, the following: - # * `anniversary` - # * `other` - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Represents a whole calendar date, for example a date of birth. The time - # of day and time zone are either specified elsewhere or are not - # significant. The date is relative to the - # [Proleptic Gregorian Calendar](https://en.wikipedia.org/wiki/ - # Proleptic_Gregorian_calendar). - # The day may be 0 to represent a year and month where the day is not - # significant. The year may be 0 to represent a month and day independent - # of year; for example, anniversary date. - # Corresponds to the JSON property `date` - # @return [Google::Apis::PeopleV1::Date] - attr_accessor :date - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @formatted_type = args[:formatted_type] if args.key?(:formatted_type) - @metadata = args[:metadata] if args.key?(:metadata) - @type = args[:type] if args.key?(:type) - @date = args[:date] if args.key?(:date) - end - end - # The read-only metadata about a profile. class ProfileMetadata include Google::Apis::Core::Hashable @@ -279,10 +83,16 @@ module Google class Url include Google::Apis::Core::Hashable - # Metadata about a field. - # Corresponds to the JSON property `metadata` - # @return [Google::Apis::PeopleV1::FieldMetadata] - attr_accessor :metadata + # The URL. + # Corresponds to the JSON property `value` + # @return [String] + attr_accessor :value + + # The read-only type of the URL translated and formatted in the viewer's + # account locale or the `Accept-Language` HTTP header locale. + # Corresponds to the JSON property `formattedType` + # @return [String] + attr_accessor :formatted_type # The type of the URL. The type can be custom or predefined. # Possible values include, but are not limited to, the following: @@ -299,16 +109,10 @@ module Google # @return [String] attr_accessor :type - # The URL. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - # The read-only type of the URL translated and formatted in the viewer's - # account locale or the `Accept-Language` HTTP header locale. - # Corresponds to the JSON property `formattedType` - # @return [String] - attr_accessor :formatted_type + # Metadata about a field. + # Corresponds to the JSON property `metadata` + # @return [Google::Apis::PeopleV1::FieldMetadata] + attr_accessor :metadata def initialize(**args) update!(**args) @@ -316,10 +120,10 @@ module Google # Update properties of this object def update!(**args) - @metadata = args[:metadata] if args.key?(:metadata) - @type = args[:type] if args.key?(:type) @value = args[:value] if args.key?(:value) @formatted_type = args[:formatted_type] if args.key?(:formatted_type) + @type = args[:type] if args.key?(:type) + @metadata = args[:metadata] if args.key?(:metadata) end end @@ -328,11 +132,6 @@ module Google class CoverPhoto include Google::Apis::Core::Hashable - # Metadata about a field. - # Corresponds to the JSON property `metadata` - # @return [Google::Apis::PeopleV1::FieldMetadata] - attr_accessor :metadata - # True if the cover photo is the default cover photo; # false if the cover photo is a user-provided cover photo. # Corresponds to the JSON property `default` @@ -340,6 +139,11 @@ module Google attr_accessor :default alias_method :default?, :default + # Metadata about a field. + # Corresponds to the JSON property `metadata` + # @return [Google::Apis::PeopleV1::FieldMetadata] + attr_accessor :metadata + # The URL of the cover photo. # Corresponds to the JSON property `url` # @return [String] @@ -351,8 +155,8 @@ module Google # Update properties of this object def update!(**args) - @metadata = args[:metadata] if args.key?(:metadata) @default = args[:default] if args.key?(:default) + @metadata = args[:metadata] if args.key?(:metadata) @url = args[:url] if args.key?(:url) end end @@ -361,6 +165,20 @@ module Google class ImClient include Google::Apis::Core::Hashable + # Metadata about a field. + # Corresponds to the JSON property `metadata` + # @return [Google::Apis::PeopleV1::FieldMetadata] + attr_accessor :metadata + + # The type of the IM client. The type can be custom or predefined. + # Possible values include, but are not limited to, the following: + # * `home` + # * `work` + # * `other` + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + # The protocol of the IM client. The protocol can be custom or predefined. # Possible values include, but are not limited to, the following: # * `aim` @@ -376,20 +194,6 @@ module Google # @return [String] attr_accessor :protocol - # Metadata about a field. - # Corresponds to the JSON property `metadata` - # @return [Google::Apis::PeopleV1::FieldMetadata] - attr_accessor :metadata - - # The type of the IM client. The type can be custom or predefined. - # Possible values include, but are not limited to, the following: - # * `home` - # * `work` - # * `other` - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - # The user name used in the IM client. # Corresponds to the JSON property `username` # @return [String] @@ -413,9 +217,9 @@ module Google # Update properties of this object def update!(**args) - @protocol = args[:protocol] if args.key?(:protocol) @metadata = args[:metadata] if args.key?(:metadata) @type = args[:type] if args.key?(:type) + @protocol = args[:protocol] if args.key?(:protocol) @username = args[:username] if args.key?(:username) @formatted_protocol = args[:formatted_protocol] if args.key?(:formatted_protocol) @formatted_type = args[:formatted_type] if args.key?(:formatted_type) @@ -467,11 +271,6 @@ module Google # @return [String] attr_accessor :display_name - # Metadata about a field. - # Corresponds to the JSON property `metadata` - # @return [Google::Apis::PeopleV1::FieldMetadata] - attr_accessor :metadata - # The type of the email address. The type can be custom or predefined. # Possible values include, but are not limited to, the following: # * `home` @@ -481,6 +280,11 @@ module Google # @return [String] attr_accessor :type + # Metadata about a field. + # Corresponds to the JSON property `metadata` + # @return [Google::Apis::PeopleV1::FieldMetadata] + attr_accessor :metadata + def initialize(**args) update!(**args) end @@ -490,8 +294,8 @@ module Google @value = args[:value] if args.key?(:value) @formatted_type = args[:formatted_type] if args.key?(:formatted_type) @display_name = args[:display_name] if args.key?(:display_name) - @metadata = args[:metadata] if args.key?(:metadata) @type = args[:type] if args.key?(:type) + @metadata = args[:metadata] if args.key?(:metadata) end end @@ -499,16 +303,16 @@ module Google class Nickname include Google::Apis::Core::Hashable - # Metadata about a field. - # Corresponds to the JSON property `metadata` - # @return [Google::Apis::PeopleV1::FieldMetadata] - attr_accessor :metadata - # The type of the nickname. # Corresponds to the JSON property `type` # @return [String] attr_accessor :type + # Metadata about a field. + # Corresponds to the JSON property `metadata` + # @return [Google::Apis::PeopleV1::FieldMetadata] + attr_accessor :metadata + # The nickname. # Corresponds to the JSON property `value` # @return [String] @@ -520,8 +324,8 @@ module Google # Update properties of this object def update!(**args) - @metadata = args[:metadata] if args.key?(:metadata) @type = args[:type] if args.key?(:type) + @metadata = args[:metadata] if args.key?(:metadata) @value = args[:value] if args.key?(:value) end end @@ -575,16 +379,16 @@ module Google class Membership include Google::Apis::Core::Hashable - # A Google contact group membership. - # Corresponds to the JSON property `contactGroupMembership` - # @return [Google::Apis::PeopleV1::ContactGroupMembership] - attr_accessor :contact_group_membership - # A Google Apps Domain membership. # Corresponds to the JSON property `domainMembership` # @return [Google::Apis::PeopleV1::DomainMembership] attr_accessor :domain_membership + # A Google contact group membership. + # Corresponds to the JSON property `contactGroupMembership` + # @return [Google::Apis::PeopleV1::ContactGroupMembership] + attr_accessor :contact_group_membership + # Metadata about a field. # Corresponds to the JSON property `metadata` # @return [Google::Apis::PeopleV1::FieldMetadata] @@ -596,8 +400,8 @@ module Google # Update properties of this object def update!(**args) - @contact_group_membership = args[:contact_group_membership] if args.key?(:contact_group_membership) @domain_membership = args[:domain_membership] if args.key?(:domain_membership) + @contact_group_membership = args[:contact_group_membership] if args.key?(:contact_group_membership) @metadata = args[:metadata] if args.key?(:metadata) end end @@ -606,12 +410,6 @@ module Google class RelationshipStatus include Google::Apis::Core::Hashable - # The read-only value of the relationship status translated and formatted in - # the viewer's account locale or the `Accept-Language` HTTP header locale. - # Corresponds to the JSON property `formattedValue` - # @return [String] - attr_accessor :formatted_value - # Metadata about a field. # Corresponds to the JSON property `metadata` # @return [Google::Apis::PeopleV1::FieldMetadata] @@ -632,55 +430,21 @@ module Google # @return [String] attr_accessor :value + # The read-only value of the relationship status translated and formatted in + # the viewer's account locale or the `Accept-Language` HTTP header locale. + # Corresponds to the JSON property `formattedValue` + # @return [String] + attr_accessor :formatted_value + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @formatted_value = args[:formatted_value] if args.key?(:formatted_value) @metadata = args[:metadata] if args.key?(:metadata) @value = args[:value] if args.key?(:value) - end - end - - # Represents a whole calendar date, for example a date of birth. The time - # of day and time zone are either specified elsewhere or are not - # significant. The date is relative to the - # [Proleptic Gregorian Calendar](https://en.wikipedia.org/wiki/ - # Proleptic_Gregorian_calendar). - # The day may be 0 to represent a year and month where the day is not - # significant. The year may be 0 to represent a month and day independent - # of year; for example, anniversary date. - class Date - include Google::Apis::Core::Hashable - - # Year of date. Must be from 1 to 9999, or 0 if specifying a date without - # a year. - # Corresponds to the JSON property `year` - # @return [Fixnum] - attr_accessor :year - - # Day of month. Must be from 1 to 31 and valid for the year and month, or 0 - # if specifying a year/month where the day is not significant. - # Corresponds to the JSON property `day` - # @return [Fixnum] - attr_accessor :day - - # Month of year. Must be from 1 to 12. - # Corresponds to the JSON property `month` - # @return [Fixnum] - attr_accessor :month - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @year = args[:year] if args.key?(:year) - @day = args[:day] if args.key?(:day) - @month = args[:month] if args.key?(:month) + @formatted_value = args[:formatted_value] if args.key?(:formatted_value) end end @@ -709,40 +473,50 @@ module Google end end + # Represents a whole calendar date, for example a date of birth. The time + # of day and time zone are either specified elsewhere or are not + # significant. The date is relative to the + # [Proleptic Gregorian Calendar](https://en.wikipedia.org/wiki/ + # Proleptic_Gregorian_calendar). + # The day may be 0 to represent a year and month where the day is not + # significant. The year may be 0 to represent a month and day independent + # of year; for example, anniversary date. + class Date + include Google::Apis::Core::Hashable + + # Day of month. Must be from 1 to 31 and valid for the year and month, or 0 + # if specifying a year/month where the day is not significant. + # Corresponds to the JSON property `day` + # @return [Fixnum] + attr_accessor :day + + # Year of date. Must be from 1 to 9999, or 0 if specifying a date without + # a year. + # Corresponds to the JSON property `year` + # @return [Fixnum] + attr_accessor :year + + # Month of year. Must be from 1 to 12. + # Corresponds to the JSON property `month` + # @return [Fixnum] + attr_accessor :month + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @day = args[:day] if args.key?(:day) + @year = args[:year] if args.key?(:year) + @month = args[:month] if args.key?(:month) + end + end + # A person's name. If the name is a mononym, the family name is empty. class Name include Google::Apis::Core::Hashable - # The honorific prefixes, such as `Mrs.` or `Dr.` - # Corresponds to the JSON property `honorificPrefix` - # @return [String] - attr_accessor :honorific_prefix - - # The honorific suffixes spelled as they sound. - # Corresponds to the JSON property `phoneticHonorificSuffix` - # @return [String] - attr_accessor :phonetic_honorific_suffix - - # The given name. - # Corresponds to the JSON property `givenName` - # @return [String] - attr_accessor :given_name - - # The middle name(s). - # Corresponds to the JSON property `middleName` - # @return [String] - attr_accessor :middle_name - - # The honorific prefixes spelled as they sound. - # Corresponds to the JSON property `phoneticHonorificPrefix` - # @return [String] - attr_accessor :phonetic_honorific_prefix - - # The given name spelled as it sounds. - # Corresponds to the JSON property `phoneticGivenName` - # @return [String] - attr_accessor :phonetic_given_name - # The family name spelled as it sounds. # Corresponds to the JSON property `phoneticFamilyName` # @return [String] @@ -786,18 +560,42 @@ module Google # @return [String] attr_accessor :honorific_suffix + # The honorific prefixes, such as `Mrs.` or `Dr.` + # Corresponds to the JSON property `honorificPrefix` + # @return [String] + attr_accessor :honorific_prefix + + # The honorific suffixes spelled as they sound. + # Corresponds to the JSON property `phoneticHonorificSuffix` + # @return [String] + attr_accessor :phonetic_honorific_suffix + + # The given name. + # Corresponds to the JSON property `givenName` + # @return [String] + attr_accessor :given_name + + # The middle name(s). + # Corresponds to the JSON property `middleName` + # @return [String] + attr_accessor :middle_name + + # The honorific prefixes spelled as they sound. + # Corresponds to the JSON property `phoneticHonorificPrefix` + # @return [String] + attr_accessor :phonetic_honorific_prefix + + # The given name spelled as it sounds. + # Corresponds to the JSON property `phoneticGivenName` + # @return [String] + attr_accessor :phonetic_given_name + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @honorific_prefix = args[:honorific_prefix] if args.key?(:honorific_prefix) - @phonetic_honorific_suffix = args[:phonetic_honorific_suffix] if args.key?(:phonetic_honorific_suffix) - @given_name = args[:given_name] if args.key?(:given_name) - @middle_name = args[:middle_name] if args.key?(:middle_name) - @phonetic_honorific_prefix = args[:phonetic_honorific_prefix] if args.key?(:phonetic_honorific_prefix) - @phonetic_given_name = args[:phonetic_given_name] if args.key?(:phonetic_given_name) @phonetic_family_name = args[:phonetic_family_name] if args.key?(:phonetic_family_name) @family_name = args[:family_name] if args.key?(:family_name) @phonetic_middle_name = args[:phonetic_middle_name] if args.key?(:phonetic_middle_name) @@ -806,6 +604,12 @@ module Google @display_name_last_first = args[:display_name_last_first] if args.key?(:display_name_last_first) @display_name = args[:display_name] if args.key?(:display_name) @honorific_suffix = args[:honorific_suffix] if args.key?(:honorific_suffix) + @honorific_prefix = args[:honorific_prefix] if args.key?(:honorific_prefix) + @phonetic_honorific_suffix = args[:phonetic_honorific_suffix] if args.key?(:phonetic_honorific_suffix) + @given_name = args[:given_name] if args.key?(:given_name) + @middle_name = args[:middle_name] if args.key?(:middle_name) + @phonetic_honorific_prefix = args[:phonetic_honorific_prefix] if args.key?(:phonetic_honorific_prefix) + @phonetic_given_name = args[:phonetic_given_name] if args.key?(:phonetic_given_name) end end @@ -813,24 +617,24 @@ module Google class BraggingRights include Google::Apis::Core::Hashable - # The bragging rights; for example, `climbed mount everest`. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - # Metadata about a field. # Corresponds to the JSON property `metadata` # @return [Google::Apis::PeopleV1::FieldMetadata] attr_accessor :metadata + # The bragging rights; for example, `climbed mount everest`. + # 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) - @value = args[:value] if args.key?(:value) @metadata = args[:metadata] if args.key?(:metadata) + @value = args[:value] if args.key?(:value) end end @@ -838,25 +642,25 @@ module Google class Locale include Google::Apis::Core::Hashable + # Metadata about a field. + # Corresponds to the JSON property `metadata` + # @return [Google::Apis::PeopleV1::FieldMetadata] + attr_accessor :metadata + # The well-formed [IETF BCP 47](https://tools.ietf.org/html/bcp47) # language tag representing the locale. # Corresponds to the JSON property `value` # @return [String] attr_accessor :value - # Metadata about a field. - # Corresponds to the JSON property `metadata` - # @return [Google::Apis::PeopleV1::FieldMetadata] - attr_accessor :metadata - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @value = args[:value] if args.key?(:value) @metadata = args[:metadata] if args.key?(:metadata) + @value = args[:value] if args.key?(:value) end end @@ -865,29 +669,6 @@ module Google class Organization include Google::Apis::Core::Hashable - # The person's department at the organization. - # Corresponds to the JSON property `department` - # @return [String] - attr_accessor :department - - # The phonetic name of the organization. - # Corresponds to the JSON property `phoneticName` - # @return [String] - attr_accessor :phonetic_name - - # The type of the organization. The type can be custom or predefined. - # Possible values include, but are not limited to, the following: - # * `work` - # * `school` - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # The person's job description at the organization. - # Corresponds to the JSON property `jobDescription` - # @return [String] - attr_accessor :job_description - # Represents a whole calendar date, for example a date of birth. The time # of day and time zone are either specified elsewhere or are not # significant. The date is relative to the @@ -916,16 +697,16 @@ module Google # @return [Google::Apis::PeopleV1::FieldMetadata] attr_accessor :metadata - # The person's job title at the organization. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - # The location of the organization office the person works at. # Corresponds to the JSON property `location` # @return [String] attr_accessor :location + # The person's job title at the organization. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + # True if the organization is the person's current organization; # false if the organization is a past organization. # Corresponds to the JSON property `current` @@ -933,6 +714,12 @@ module Google attr_accessor :current alias_method :current?, :current + # The read-only type of the organization translated and formatted in the + # viewer's account locale or the `Accept-Language` HTTP header locale. + # Corresponds to the JSON property `formattedType` + # @return [String] + attr_accessor :formatted_type + # Represents a whole calendar date, for example a date of birth. The time # of day and time zone are either specified elsewhere or are not # significant. The date is relative to the @@ -945,37 +732,54 @@ module Google # @return [Google::Apis::PeopleV1::Date] attr_accessor :start_date - # The read-only type of the organization translated and formatted in the - # viewer's account locale or the `Accept-Language` HTTP header locale. - # Corresponds to the JSON property `formattedType` - # @return [String] - attr_accessor :formatted_type - # The domain name associated with the organization; for example, `google.com`. # Corresponds to the JSON property `domain` # @return [String] attr_accessor :domain + # The person's department at the organization. + # Corresponds to the JSON property `department` + # @return [String] + attr_accessor :department + + # The phonetic name of the organization. + # Corresponds to the JSON property `phoneticName` + # @return [String] + attr_accessor :phonetic_name + + # The type of the organization. The type can be custom or predefined. + # Possible values include, but are not limited to, the following: + # * `work` + # * `school` + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # The person's job description at the organization. + # Corresponds to the JSON property `jobDescription` + # @return [String] + attr_accessor :job_description + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @department = args[:department] if args.key?(:department) - @phonetic_name = args[:phonetic_name] if args.key?(:phonetic_name) - @type = args[:type] if args.key?(:type) - @job_description = args[:job_description] if args.key?(:job_description) @end_date = args[:end_date] if args.key?(:end_date) @symbol = args[:symbol] if args.key?(:symbol) @name = args[:name] if args.key?(:name) @metadata = args[:metadata] if args.key?(:metadata) - @title = args[:title] if args.key?(:title) @location = args[:location] if args.key?(:location) + @title = args[:title] if args.key?(:title) @current = args[:current] if args.key?(:current) - @start_date = args[:start_date] if args.key?(:start_date) @formatted_type = args[:formatted_type] if args.key?(:formatted_type) + @start_date = args[:start_date] if args.key?(:start_date) @domain = args[:domain] if args.key?(:domain) + @department = args[:department] if args.key?(:department) + @phonetic_name = args[:phonetic_name] if args.key?(:phonetic_name) + @type = args[:type] if args.key?(:type) + @job_description = args[:job_description] if args.key?(:job_description) end end @@ -983,11 +787,6 @@ module Google class Biography include Google::Apis::Core::Hashable - # The short biography. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - # The content type of the biography. # Corresponds to the JSON property `contentType` # @return [String] @@ -998,15 +797,20 @@ module Google # @return [Google::Apis::PeopleV1::FieldMetadata] attr_accessor :metadata + # The short biography. + # 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) - @value = args[:value] if args.key?(:value) @content_type = args[:content_type] if args.key?(:content_type) @metadata = args[:metadata] if args.key?(:metadata) + @value = args[:value] if args.key?(:value) end end @@ -1014,24 +818,24 @@ module Google class AgeRangeType include Google::Apis::Core::Hashable - # The age range. - # Corresponds to the JSON property `ageRange` - # @return [String] - attr_accessor :age_range - # Metadata about a field. # Corresponds to the JSON property `metadata` # @return [Google::Apis::PeopleV1::FieldMetadata] attr_accessor :metadata + # The age range. + # Corresponds to the JSON property `ageRange` + # @return [String] + attr_accessor :age_range + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @age_range = args[:age_range] if args.key?(:age_range) @metadata = args[:metadata] if args.key?(:metadata) + @age_range = args[:age_range] if args.key?(:age_range) end end @@ -1071,6 +875,91 @@ module Google end end + # The response for a single person + class PersonResponse + include Google::Apis::Core::Hashable + + # Information about a person merged from various data sources such as the + # authenticated user's contacts and profile data. + # Most fields can have multiple items. The items in a field have no guaranteed + # order, but each non-empty field is guaranteed to have exactly one field with + # `metadata.primary` set to true. + # Corresponds to the JSON property `person` + # @return [Google::Apis::PeopleV1::Person] + attr_accessor :person + + # The `Status` type defines a logical error model that is suitable for different + # programming environments, including REST APIs and RPC APIs. It is used by + # [gRPC](https://github.com/grpc). The error model is designed to be: + # - Simple to use and understand for most users + # - Flexible enough to meet unexpected needs + # # Overview + # The `Status` message contains three pieces of data: error code, error message, + # and error details. The error code should be an enum value of + # google.rpc.Code, but it may accept additional error codes if needed. The + # error message should be a developer-facing English message that helps + # developers *understand* and *resolve* the error. If a localized user-facing + # error message is needed, put the localized message in the error details or + # localize it in the client. The optional error details may contain arbitrary + # information about the error. There is a predefined set of error detail types + # in the package `google.rpc` that can be used for common error conditions. + # # Language mapping + # The `Status` message is the logical representation of the error model, but it + # is not necessarily the actual wire format. When the `Status` message is + # exposed in different client libraries and different wire protocols, it can be + # mapped differently. For example, it will likely be mapped to some exceptions + # in Java, but more likely mapped to some error codes in C. + # # Other uses + # The error model and the `Status` message can be used in a variety of + # environments, either with or without APIs, to provide a + # consistent developer experience across different environments. + # Example uses of this error model include: + # - Partial errors. If a service needs to return partial errors to the client, + # it may embed the `Status` in the normal response to indicate the partial + # errors. + # - Workflow errors. A typical workflow has multiple steps. Each step may + # have a `Status` message for error reporting. + # - Batch operations. If a client uses batch request and batch response, the + # `Status` message should be used directly inside batch response, one for + # each error sub-response. + # - Asynchronous operations. If an API call embeds asynchronous operation + # results in its response, the status of those operations should be + # represented directly using the `Status` message. + # - Logging. If some API errors are stored in logs, the message `Status` could + # be used directly after any stripping needed for security/privacy reasons. + # Corresponds to the JSON property `status` + # @return [Google::Apis::PeopleV1::Status] + attr_accessor :status + + # DEPRECATED(Please use status instead). + # [HTTP 1.1 status + # code](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html). + # Corresponds to the JSON property `httpStatusCode` + # @return [Fixnum] + attr_accessor :http_status_code + + # The original requested resource name. May be different than the resource + # name on the returned person. + # The resource name can change when adding or removing fields that link a + # contact and profile such as a verified email, verified phone number, or a + # profile URL. + # Corresponds to the JSON property `requestedResourceName` + # @return [String] + attr_accessor :requested_resource_name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @person = args[:person] if args.key?(:person) + @status = args[:status] if args.key?(:status) + @http_status_code = args[:http_status_code] if args.key?(:http_status_code) + @requested_resource_name = args[:requested_resource_name] if args.key?(:requested_resource_name) + end + end + # A person's read-only relationship interest . class RelationshipInterest include Google::Apis::Core::Hashable @@ -1149,100 +1038,10 @@ module Google end end - # The response for a single person - class PersonResponse - include Google::Apis::Core::Hashable - - # The original requested resource name. May be different than the resource - # name on the returned person. - # The resource name can change when adding or removing fields that link a - # contact and profile such as a verified email, verified phone number, or a - # profile URL. - # Corresponds to the JSON property `requestedResourceName` - # @return [String] - attr_accessor :requested_resource_name - - # Information about a person merged from various data sources such as the - # authenticated user's contacts and profile data. - # Most fields can have multiple items. The items in a field have no guaranteed - # order, but each non-empty field is guaranteed to have exactly one field with - # `metadata.primary` set to true. - # Corresponds to the JSON property `person` - # @return [Google::Apis::PeopleV1::Person] - attr_accessor :person - - # The `Status` type defines a logical error model that is suitable for different - # programming environments, including REST APIs and RPC APIs. It is used by - # [gRPC](https://github.com/grpc). The error model is designed to be: - # - Simple to use and understand for most users - # - Flexible enough to meet unexpected needs - # # Overview - # The `Status` message contains three pieces of data: error code, error message, - # and error details. The error code should be an enum value of - # google.rpc.Code, but it may accept additional error codes if needed. The - # error message should be a developer-facing English message that helps - # developers *understand* and *resolve* the error. If a localized user-facing - # error message is needed, put the localized message in the error details or - # localize it in the client. The optional error details may contain arbitrary - # information about the error. There is a predefined set of error detail types - # in the package `google.rpc` which can be used for common error conditions. - # # Language mapping - # The `Status` message is the logical representation of the error model, but it - # is not necessarily the actual wire format. When the `Status` message is - # exposed in different client libraries and different wire protocols, it can be - # mapped differently. For example, it will likely be mapped to some exceptions - # in Java, but more likely mapped to some error codes in C. - # # Other uses - # The error model and the `Status` message can be used in a variety of - # environments, either with or without APIs, to provide a - # consistent developer experience across different environments. - # Example uses of this error model include: - # - Partial errors. If a service needs to return partial errors to the client, - # it may embed the `Status` in the normal response to indicate the partial - # errors. - # - Workflow errors. A typical workflow has multiple steps. Each step may - # have a `Status` message for error reporting purpose. - # - Batch operations. If a client uses batch request and batch response, the - # `Status` message should be used directly inside batch response, one for - # each error sub-response. - # - Asynchronous operations. If an API call embeds asynchronous operation - # results in its response, the status of those operations should be - # represented directly using the `Status` message. - # - Logging. If some API errors are stored in logs, the message `Status` could - # be used directly after any stripping needed for security/privacy reasons. - # Corresponds to the JSON property `status` - # @return [Google::Apis::PeopleV1::Status] - attr_accessor :status - - # DEPRECATED(Please use status instead). - # [HTTP 1.1 status - # code](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html). - # Corresponds to the JSON property `httpStatusCode` - # @return [Fixnum] - attr_accessor :http_status_code - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @requested_resource_name = args[:requested_resource_name] if args.key?(:requested_resource_name) - @person = args[:person] if args.key?(:person) - @status = args[:status] if args.key?(:status) - @http_status_code = args[:http_status_code] if args.key?(:http_status_code) - end - end - # A person's relation to another person. class Relation include Google::Apis::Core::Hashable - # Metadata about a field. - # Corresponds to the JSON property `metadata` - # @return [Google::Apis::PeopleV1::FieldMetadata] - attr_accessor :metadata - # The person's relation to the other person. The type can be custom or # predefined. # Possible values include, but are not limited to, the following values: @@ -1264,10 +1063,10 @@ module Google # @return [String] attr_accessor :type - # The name of the other person this relation refers to. - # Corresponds to the JSON property `person` - # @return [String] - attr_accessor :person + # Metadata about a field. + # Corresponds to the JSON property `metadata` + # @return [Google::Apis::PeopleV1::FieldMetadata] + attr_accessor :metadata # The type of the relation translated and formatted in the viewer's account # locale or the locale specified in the Accept-Language HTTP header. @@ -1275,16 +1074,21 @@ module Google # @return [String] attr_accessor :formatted_type + # The name of the other person this relation refers to. + # Corresponds to the JSON property `person` + # @return [String] + attr_accessor :person + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @metadata = args[:metadata] if args.key?(:metadata) @type = args[:type] if args.key?(:type) - @person = args[:person] if args.key?(:person) + @metadata = args[:metadata] if args.key?(:metadata) @formatted_type = args[:formatted_type] if args.key?(:formatted_type) + @person = args[:person] if args.key?(:person) end end @@ -1321,16 +1125,6 @@ module Google class Person include Google::Apis::Core::Hashable - # The person's cover photos. - # Corresponds to the JSON property `coverPhotos` - # @return [Array] - attr_accessor :cover_photos - - # The person's instant messaging clients. - # Corresponds to the JSON property `imClients` - # @return [Array] - attr_accessor :im_clients - # The person's birthdays. # Corresponds to the JSON property `birthdays` # @return [Array] @@ -1356,16 +1150,16 @@ module Google # @return [Array] attr_accessor :nicknames - # The person's names. - # Corresponds to the JSON property `names` - # @return [Array] - attr_accessor :names - # The person's relations. # Corresponds to the JSON property `relations` # @return [Array] attr_accessor :relations + # The person's names. + # Corresponds to the JSON property `names` + # @return [Array] + attr_accessor :names + # The person's occupations. # Corresponds to the JSON property `occupations` # @return [Array] @@ -1407,17 +1201,17 @@ module Google # @return [Array] attr_accessor :genders + # The person's interests. + # Corresponds to the JSON property `interests` + # @return [Array] + attr_accessor :interests + # The resource name for the person, assigned by the server. An ASCII string # with a max length of 27 characters, in the form of `people/`. # Corresponds to the JSON property `resourceName` # @return [String] attr_accessor :resource_name - # The person's interests. - # Corresponds to the JSON property `interests` - # @return [Array] - attr_accessor :interests - # The person's biographies. # Corresponds to the JSON property `biographies` # @return [Array] @@ -1473,21 +1267,29 @@ module Google # @return [Array] attr_accessor :phone_numbers + # The person's cover photos. + # Corresponds to the JSON property `coverPhotos` + # @return [Array] + attr_accessor :cover_photos + + # The person's instant messaging clients. + # Corresponds to the JSON property `imClients` + # @return [Array] + attr_accessor :im_clients + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @cover_photos = args[:cover_photos] if args.key?(:cover_photos) - @im_clients = args[:im_clients] if args.key?(:im_clients) @birthdays = args[:birthdays] if args.key?(:birthdays) @locales = args[:locales] if args.key?(:locales) @relationship_interests = args[:relationship_interests] if args.key?(:relationship_interests) @urls = args[:urls] if args.key?(:urls) @nicknames = args[:nicknames] if args.key?(:nicknames) - @names = args[:names] if args.key?(:names) @relations = args[:relations] if args.key?(:relations) + @names = args[:names] if args.key?(:names) @occupations = args[:occupations] if args.key?(:occupations) @email_addresses = args[:email_addresses] if args.key?(:email_addresses) @organizations = args[:organizations] if args.key?(:organizations) @@ -1496,8 +1298,8 @@ module Google @metadata = args[:metadata] if args.key?(:metadata) @residences = args[:residences] if args.key?(:residences) @genders = args[:genders] if args.key?(:genders) - @resource_name = args[:resource_name] if args.key?(:resource_name) @interests = args[:interests] if args.key?(:interests) + @resource_name = args[:resource_name] if args.key?(:resource_name) @biographies = args[:biographies] if args.key?(:biographies) @skills = args[:skills] if args.key?(:skills) @relationship_statuses = args[:relationship_statuses] if args.key?(:relationship_statuses) @@ -1509,6 +1311,8 @@ module Google @events = args[:events] if args.key?(:events) @memberships = args[:memberships] if args.key?(:memberships) @phone_numbers = args[:phone_numbers] if args.key?(:phone_numbers) + @cover_photos = args[:cover_photos] if args.key?(:cover_photos) + @im_clients = args[:im_clients] if args.key?(:im_clients) end end @@ -1535,24 +1339,6 @@ module Google class PhoneNumber include Google::Apis::Core::Hashable - # The read-only type of the phone number translated and formatted in the - # viewer's account locale or the the `Accept-Language` HTTP header locale. - # Corresponds to the JSON property `formattedType` - # @return [String] - attr_accessor :formatted_type - - # The read-only canonicalized [ITU-T E.164](https://law.resource.org/pub/us/cfr/ - # ibr/004/itu-t.E.164.1.2008.pdf) - # form of the phone number. - # Corresponds to the JSON property `canonicalForm` - # @return [String] - attr_accessor :canonical_form - - # Metadata about a field. - # Corresponds to the JSON property `metadata` - # @return [Google::Apis::PeopleV1::FieldMetadata] - attr_accessor :metadata - # The type of the phone number. The type can be custom or predefined. # Possible values include, but are not limited to, the following: # * `home` @@ -1571,22 +1357,40 @@ module Google # @return [String] attr_accessor :type + # Metadata about a field. + # Corresponds to the JSON property `metadata` + # @return [Google::Apis::PeopleV1::FieldMetadata] + attr_accessor :metadata + # The phone number. # Corresponds to the JSON property `value` # @return [String] attr_accessor :value + # The read-only type of the phone number translated and formatted in the + # viewer's account locale or the the `Accept-Language` HTTP header locale. + # Corresponds to the JSON property `formattedType` + # @return [String] + attr_accessor :formatted_type + + # The read-only canonicalized [ITU-T E.164](https://law.resource.org/pub/us/cfr/ + # ibr/004/itu-t.E.164.1.2008.pdf) + # form of the phone number. + # Corresponds to the JSON property `canonicalForm` + # @return [String] + attr_accessor :canonical_form + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @type = args[:type] if args.key?(:type) + @metadata = args[:metadata] if args.key?(:metadata) + @value = args[:value] if args.key?(:value) @formatted_type = args[:formatted_type] if args.key?(:formatted_type) @canonical_form = args[:canonical_form] if args.key?(:canonical_form) - @metadata = args[:metadata] if args.key?(:metadata) - @type = args[:type] if args.key?(:type) - @value = args[:value] if args.key?(:value) end end @@ -1595,24 +1399,27 @@ module Google class Photo include Google::Apis::Core::Hashable - # The URL of the photo. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - # Metadata about a field. # Corresponds to the JSON property `metadata` # @return [Google::Apis::PeopleV1::FieldMetadata] attr_accessor :metadata + # The URL of the photo. You can change the desired size by appending a query + # parameter `sz=` at the end of the url. Example: + # `https://lh3.googleusercontent.com/-T_wVWLlmg7w/AAAAAAAAAAI/AAAAAAAABa8/ + # 00gzXvDBYqw/s100/photo.jpg?sz=50` + # Corresponds to the JSON property `url` + # @return [String] + attr_accessor :url + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @url = args[:url] if args.key?(:url) @metadata = args[:metadata] if args.key?(:metadata) + @url = args[:url] if args.key?(:url) end end @@ -1625,20 +1432,20 @@ module Google # @return [String] attr_accessor :next_page_token - # The list of people that the requestor is connected to. - # Corresponds to the JSON property `connections` - # @return [Array] - attr_accessor :connections + # The total number of items in the list without pagination. + # Corresponds to the JSON property `totalItems` + # @return [Fixnum] + attr_accessor :total_items # The token that can be used to retrieve changes since the last request. # Corresponds to the JSON property `nextSyncToken` # @return [String] attr_accessor :next_sync_token - # The total number of items in the list without pagination. - # Corresponds to the JSON property `totalItems` - # @return [Fixnum] - attr_accessor :total_items + # The list of people that the requestor is connected to. + # Corresponds to the JSON property `connections` + # @return [Array] + attr_accessor :connections # DEPRECATED(Please use total_items). The total number of people in the list # without pagination. @@ -1653,9 +1460,9 @@ module Google # Update properties of this object def update!(**args) @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @connections = args[:connections] if args.key?(:connections) - @next_sync_token = args[:next_sync_token] if args.key?(:next_sync_token) @total_items = args[:total_items] if args.key?(:total_items) + @next_sync_token = args[:next_sync_token] if args.key?(:next_sync_token) + @connections = args[:connections] if args.key?(:connections) @total_people = args[:total_people] if args.key?(:total_people) end end @@ -1666,16 +1473,16 @@ module Google class Birthday include Google::Apis::Core::Hashable - # Metadata about a field. - # Corresponds to the JSON property `metadata` - # @return [Google::Apis::PeopleV1::FieldMetadata] - attr_accessor :metadata - # A free-form string representing the user's birthday. # Corresponds to the JSON property `text` # @return [String] attr_accessor :text + # Metadata about a field. + # Corresponds to the JSON property `metadata` + # @return [Google::Apis::PeopleV1::FieldMetadata] + attr_accessor :metadata + # Represents a whole calendar date, for example a date of birth. The time # of day and time zone are either specified elsewhere or are not # significant. The date is relative to the @@ -1694,8 +1501,8 @@ module Google # Update properties of this object def update!(**args) - @metadata = args[:metadata] if args.key?(:metadata) @text = args[:text] if args.key?(:text) + @metadata = args[:metadata] if args.key?(:metadata) @date = args[:date] if args.key?(:date) end end @@ -1705,6 +1512,12 @@ module Google class Address include Google::Apis::Core::Hashable + # The [ISO 3166-1 alpha-2](http://www.iso.org/iso/country_codes.htm) country + # code of the address. + # Corresponds to the JSON property `countryCode` + # @return [String] + attr_accessor :country_code + # The read-only type of the address translated and formatted in the viewer's # account locale or the `Accept-Language` HTTP header locale. # Corresponds to the JSON property `formattedType` @@ -1766,18 +1579,13 @@ module Google # @return [Google::Apis::PeopleV1::FieldMetadata] attr_accessor :metadata - # The [ISO 3166-1 alpha-2](http://www.iso.org/iso/country_codes.htm) country - # code of the address. - # Corresponds to the JSON property `countryCode` - # @return [String] - attr_accessor :country_code - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @country_code = args[:country_code] if args.key?(:country_code) @formatted_type = args[:formatted_type] if args.key?(:formatted_type) @city = args[:city] if args.key?(:city) @formatted_value = args[:formatted_value] if args.key?(:formatted_value) @@ -1789,7 +1597,6 @@ module Google @region = args[:region] if args.key?(:region) @street_address = args[:street_address] if args.key?(:street_address) @metadata = args[:metadata] if args.key?(:metadata) - @country_code = args[:country_code] if args.key?(:country_code) end end @@ -1797,11 +1604,6 @@ module Google class Residence include Google::Apis::Core::Hashable - # Metadata about a field. - # Corresponds to the JSON property `metadata` - # @return [Google::Apis::PeopleV1::FieldMetadata] - attr_accessor :metadata - # True if the residence is the person's current residence; # false if the residence is a past residence. # Corresponds to the JSON property `current` @@ -1809,6 +1611,11 @@ module Google attr_accessor :current alias_method :current?, :current + # Metadata about a field. + # Corresponds to the JSON property `metadata` + # @return [Google::Apis::PeopleV1::FieldMetadata] + attr_accessor :metadata + # The address of the residence. # Corresponds to the JSON property `value` # @return [String] @@ -1820,11 +1627,207 @@ module Google # Update properties of this object def update!(**args) - @metadata = args[:metadata] if args.key?(:metadata) @current = args[:current] if args.key?(:current) + @metadata = args[:metadata] if args.key?(:metadata) @value = args[:value] if args.key?(:value) end end + + # The `Status` type defines a logical error model that is suitable for different + # programming environments, including REST APIs and RPC APIs. It is used by + # [gRPC](https://github.com/grpc). The error model is designed to be: + # - Simple to use and understand for most users + # - Flexible enough to meet unexpected needs + # # Overview + # The `Status` message contains three pieces of data: error code, error message, + # and error details. The error code should be an enum value of + # google.rpc.Code, but it may accept additional error codes if needed. The + # error message should be a developer-facing English message that helps + # developers *understand* and *resolve* the error. If a localized user-facing + # error message is needed, put the localized message in the error details or + # localize it in the client. The optional error details may contain arbitrary + # information about the error. There is a predefined set of error detail types + # in the package `google.rpc` that can be used for common error conditions. + # # Language mapping + # The `Status` message is the logical representation of the error model, but it + # is not necessarily the actual wire format. When the `Status` message is + # exposed in different client libraries and different wire protocols, it can be + # mapped differently. For example, it will likely be mapped to some exceptions + # in Java, but more likely mapped to some error codes in C. + # # Other uses + # The error model and the `Status` message can be used in a variety of + # environments, either with or without APIs, to provide a + # consistent developer experience across different environments. + # Example uses of this error model include: + # - Partial errors. If a service needs to return partial errors to the client, + # it may embed the `Status` in the normal response to indicate the partial + # errors. + # - Workflow errors. A typical workflow has multiple steps. Each step may + # have a `Status` message for error reporting. + # - Batch operations. If a client uses batch request and batch response, the + # `Status` message should be used directly inside batch response, one for + # each error sub-response. + # - Asynchronous operations. If an API call embeds asynchronous operation + # results in its response, the status of those operations should be + # represented directly using the `Status` message. + # - Logging. If some API errors are stored in logs, the message `Status` could + # be used directly after any stripping needed for security/privacy reasons. + class Status + include Google::Apis::Core::Hashable + + # The status code, which should be an enum value of google.rpc.Code. + # Corresponds to the JSON property `code` + # @return [Fixnum] + attr_accessor :code + + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # google.rpc.Status.details field, or localized by the client. + # Corresponds to the JSON property `message` + # @return [String] + attr_accessor :message + + # A list of messages that carry the error details. There will be a + # common set of message types for APIs to use. + # Corresponds to the JSON property `details` + # @return [Array>] + attr_accessor :details + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @code = args[:code] if args.key?(:code) + @message = args[:message] if args.key?(:message) + @details = args[:details] if args.key?(:details) + end + end + + # A Google contact group membership. + class ContactGroupMembership + include Google::Apis::Core::Hashable + + # The contact group ID for the contact group membership. The contact group + # ID can be custom or predefined. Possible values include, but are not + # limited to, the following: + # * `myContacts` + # * `starred` + # * A numerical ID for user-created groups. + # Corresponds to the JSON property `contactGroupId` + # @return [String] + attr_accessor :contact_group_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @contact_group_id = args[:contact_group_id] if args.key?(:contact_group_id) + end + end + + # The read-only metadata about a person. + class PersonMetadata + include Google::Apis::Core::Hashable + + # Resource names of people linked to this resource. + # Corresponds to the JSON property `linkedPeopleResourceNames` + # @return [Array] + attr_accessor :linked_people_resource_names + + # Any former resource names this person has had. Populated only for + # [`connections.list`](/people/api/rest/v1/people.connections/list) requests + # that include a sync token. + # The resource name may change when adding or removing fields that link a + # contact and profile such as a verified email, verified phone number, or + # profile URL. + # Corresponds to the JSON property `previousResourceNames` + # @return [Array] + attr_accessor :previous_resource_names + + # The sources of data for the person. + # Corresponds to the JSON property `sources` + # @return [Array] + attr_accessor :sources + + # True if the person resource has been deleted. Populated only for + # [`connections.list`](/people/api/rest/v1/people.connections/list) requests + # that include a sync token. + # Corresponds to the JSON property `deleted` + # @return [Boolean] + attr_accessor :deleted + alias_method :deleted?, :deleted + + # DEPRECATED(Please read person.metadata.sources.profile_metadata instead). + # The type of the person object. + # Corresponds to the JSON property `objectType` + # @return [String] + attr_accessor :object_type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @linked_people_resource_names = args[:linked_people_resource_names] if args.key?(:linked_people_resource_names) + @previous_resource_names = args[:previous_resource_names] if args.key?(:previous_resource_names) + @sources = args[:sources] if args.key?(:sources) + @deleted = args[:deleted] if args.key?(:deleted) + @object_type = args[:object_type] if args.key?(:object_type) + end + end + + # An event related to the person. + class Event + include Google::Apis::Core::Hashable + + # The type of the event. The type can be custom or predefined. + # Possible values include, but are not limited to, the following: + # * `anniversary` + # * `other` + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # Metadata about a field. + # Corresponds to the JSON property `metadata` + # @return [Google::Apis::PeopleV1::FieldMetadata] + attr_accessor :metadata + + # Represents a whole calendar date, for example a date of birth. The time + # of day and time zone are either specified elsewhere or are not + # significant. The date is relative to the + # [Proleptic Gregorian Calendar](https://en.wikipedia.org/wiki/ + # Proleptic_Gregorian_calendar). + # The day may be 0 to represent a year and month where the day is not + # significant. The year may be 0 to represent a month and day independent + # of year; for example, anniversary date. + # Corresponds to the JSON property `date` + # @return [Google::Apis::PeopleV1::Date] + attr_accessor :date + + # The read-only type of the event translated and formatted in the + # viewer's account locale or the `Accept-Language` HTTP header locale. + # Corresponds to the JSON property `formattedType` + # @return [String] + attr_accessor :formatted_type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @type = args[:type] if args.key?(:type) + @metadata = args[:metadata] if args.key?(:metadata) + @date = args[:date] if args.key?(:date) + @formatted_type = args[:formatted_type] if args.key?(:formatted_type) + end + end end end end diff --git a/generated/google/apis/people_v1/representations.rb b/generated/google/apis/people_v1/representations.rb index 10475c311..c9b197ad9 100644 --- a/generated/google/apis/people_v1/representations.rb +++ b/generated/google/apis/people_v1/representations.rb @@ -22,30 +22,6 @@ module Google module Apis module PeopleV1 - class ContactGroupMembership - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Status - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class PersonMetadata - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Event - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class ProfileMetadata class Representation < Google::Apis::Core::JsonRepresentation; end @@ -118,13 +94,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class Date + class Tagline class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class Tagline + class Date class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -172,6 +148,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class PersonResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class RelationshipInterest class Representation < Google::Apis::Core::JsonRepresentation; end @@ -184,12 +166,6 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class PersonResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class Relation class Representation < Google::Apis::Core::JsonRepresentation; end @@ -250,44 +226,28 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class ContactGroupMembership - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :contact_group_id, as: 'contactGroupId' - end + class Status + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end - class Status - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :details, as: 'details' - property :code, as: 'code' - property :message, as: 'message' - end + class ContactGroupMembership + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class PersonMetadata - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :object_type, as: 'objectType' - collection :linked_people_resource_names, as: 'linkedPeopleResourceNames' - collection :sources, as: 'sources', class: Google::Apis::PeopleV1::Source, decorator: Google::Apis::PeopleV1::Source::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - collection :previous_resource_names, as: 'previousResourceNames' - property :deleted, as: 'deleted' - end + include Google::Apis::Core::JsonObjectSupport end class Event - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :formatted_type, as: 'formattedType' - property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :type, as: 'type' - property :date, as: 'date', class: Google::Apis::PeopleV1::Date, decorator: Google::Apis::PeopleV1::Date::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class ProfileMetadata @@ -310,20 +270,20 @@ module Google class Url # @private class Representation < Google::Apis::Core::JsonRepresentation - property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation - - property :type, as: 'type' property :value, as: 'value' property :formatted_type, as: 'formattedType' + property :type, as: 'type' + property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation + end end class CoverPhoto # @private class Representation < Google::Apis::Core::JsonRepresentation + property :default, as: 'default' property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation - property :default, as: 'default' property :url, as: 'url' end end @@ -331,10 +291,10 @@ module Google class ImClient # @private class Representation < Google::Apis::Core::JsonRepresentation - property :protocol, as: 'protocol' property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation property :type, as: 'type' + property :protocol, as: 'protocol' property :username, as: 'username' property :formatted_protocol, as: 'formattedProtocol' property :formatted_type, as: 'formattedType' @@ -356,18 +316,18 @@ module Google property :value, as: 'value' property :formatted_type, as: 'formattedType' property :display_name, as: 'displayName' + property :type, as: 'type' property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation - property :type, as: 'type' end end class Nickname # @private class Representation < Google::Apis::Core::JsonRepresentation + property :type, as: 'type' property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation - property :type, as: 'type' property :value, as: 'value' end end @@ -391,10 +351,10 @@ module Google class Membership # @private class Representation < Google::Apis::Core::JsonRepresentation - property :contact_group_membership, as: 'contactGroupMembership', class: Google::Apis::PeopleV1::ContactGroupMembership, decorator: Google::Apis::PeopleV1::ContactGroupMembership::Representation - property :domain_membership, as: 'domainMembership', class: Google::Apis::PeopleV1::DomainMembership, decorator: Google::Apis::PeopleV1::DomainMembership::Representation + property :contact_group_membership, as: 'contactGroupMembership', class: Google::Apis::PeopleV1::ContactGroupMembership, decorator: Google::Apis::PeopleV1::ContactGroupMembership::Representation + property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation end @@ -403,19 +363,10 @@ module Google class RelationshipStatus # @private class Representation < Google::Apis::Core::JsonRepresentation - property :formatted_value, as: 'formattedValue' property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation property :value, as: 'value' - end - end - - class Date - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :year, as: 'year' - property :day, as: 'day' - property :month, as: 'month' + property :formatted_value, as: 'formattedValue' end end @@ -428,15 +379,18 @@ module Google end end + class Date + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :day, as: 'day' + property :year, as: 'year' + property :month, as: 'month' + end + end + class Name # @private class Representation < Google::Apis::Core::JsonRepresentation - property :honorific_prefix, as: 'honorificPrefix' - property :phonetic_honorific_suffix, as: 'phoneticHonorificSuffix' - property :given_name, as: 'givenName' - property :middle_name, as: 'middleName' - property :phonetic_honorific_prefix, as: 'phoneticHonorificPrefix' - property :phonetic_given_name, as: 'phoneticGivenName' property :phonetic_family_name, as: 'phoneticFamilyName' property :family_name, as: 'familyName' property :phonetic_middle_name, as: 'phoneticMiddleName' @@ -446,66 +400,72 @@ module Google property :display_name_last_first, as: 'displayNameLastFirst' property :display_name, as: 'displayName' property :honorific_suffix, as: 'honorificSuffix' + property :honorific_prefix, as: 'honorificPrefix' + property :phonetic_honorific_suffix, as: 'phoneticHonorificSuffix' + property :given_name, as: 'givenName' + property :middle_name, as: 'middleName' + property :phonetic_honorific_prefix, as: 'phoneticHonorificPrefix' + property :phonetic_given_name, as: 'phoneticGivenName' end end class BraggingRights # @private class Representation < Google::Apis::Core::JsonRepresentation - property :value, as: 'value' property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation + property :value, as: 'value' end end class Locale # @private class Representation < Google::Apis::Core::JsonRepresentation - property :value, as: 'value' property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation + property :value, as: 'value' end end class Organization # @private class Representation < Google::Apis::Core::JsonRepresentation - property :department, as: 'department' - property :phonetic_name, as: 'phoneticName' - property :type, as: 'type' - property :job_description, as: 'jobDescription' property :end_date, as: 'endDate', class: Google::Apis::PeopleV1::Date, decorator: Google::Apis::PeopleV1::Date::Representation property :symbol, as: 'symbol' property :name, as: 'name' property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation - property :title, as: 'title' property :location, as: 'location' + property :title, as: 'title' property :current, as: 'current' + property :formatted_type, as: 'formattedType' property :start_date, as: 'startDate', class: Google::Apis::PeopleV1::Date, decorator: Google::Apis::PeopleV1::Date::Representation - property :formatted_type, as: 'formattedType' property :domain, as: 'domain' + property :department, as: 'department' + property :phonetic_name, as: 'phoneticName' + property :type, as: 'type' + property :job_description, as: 'jobDescription' end end class Biography # @private class Representation < Google::Apis::Core::JsonRepresentation - property :value, as: 'value' property :content_type, as: 'contentType' property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation + property :value, as: 'value' end end class AgeRangeType # @private class Representation < Google::Apis::Core::JsonRepresentation - property :age_range, as: 'ageRange' property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation + property :age_range, as: 'ageRange' end end @@ -519,6 +479,18 @@ module Google end end + class PersonResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :person, as: 'person', class: Google::Apis::PeopleV1::Person, decorator: Google::Apis::PeopleV1::Person::Representation + + property :status, as: 'status', class: Google::Apis::PeopleV1::Status, decorator: Google::Apis::PeopleV1::Status::Representation + + property :http_status_code, as: 'httpStatusCode' + property :requested_resource_name, as: 'requestedResourceName' + end + end + class RelationshipInterest # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -540,26 +512,14 @@ module Google end end - class PersonResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :requested_resource_name, as: 'requestedResourceName' - property :person, as: 'person', class: Google::Apis::PeopleV1::Person, decorator: Google::Apis::PeopleV1::Person::Representation - - property :status, as: 'status', class: Google::Apis::PeopleV1::Status, decorator: Google::Apis::PeopleV1::Status::Representation - - property :http_status_code, as: 'httpStatusCode' - end - end - class Relation # @private class Representation < Google::Apis::Core::JsonRepresentation + property :type, as: 'type' property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation - property :type, as: 'type' - property :person, as: 'person' property :formatted_type, as: 'formattedType' + property :person, as: 'person' end end @@ -575,10 +535,6 @@ module Google class Person # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :cover_photos, as: 'coverPhotos', class: Google::Apis::PeopleV1::CoverPhoto, decorator: Google::Apis::PeopleV1::CoverPhoto::Representation - - collection :im_clients, as: 'imClients', class: Google::Apis::PeopleV1::ImClient, decorator: Google::Apis::PeopleV1::ImClient::Representation - collection :birthdays, as: 'birthdays', class: Google::Apis::PeopleV1::Birthday, decorator: Google::Apis::PeopleV1::Birthday::Representation collection :locales, as: 'locales', class: Google::Apis::PeopleV1::Locale, decorator: Google::Apis::PeopleV1::Locale::Representation @@ -589,10 +545,10 @@ module Google collection :nicknames, as: 'nicknames', class: Google::Apis::PeopleV1::Nickname, decorator: Google::Apis::PeopleV1::Nickname::Representation - collection :names, as: 'names', class: Google::Apis::PeopleV1::Name, decorator: Google::Apis::PeopleV1::Name::Representation - collection :relations, as: 'relations', class: Google::Apis::PeopleV1::Relation, decorator: Google::Apis::PeopleV1::Relation::Representation + collection :names, as: 'names', class: Google::Apis::PeopleV1::Name, decorator: Google::Apis::PeopleV1::Name::Representation + collection :occupations, as: 'occupations', class: Google::Apis::PeopleV1::Occupation, decorator: Google::Apis::PeopleV1::Occupation::Representation collection :email_addresses, as: 'emailAddresses', class: Google::Apis::PeopleV1::EmailAddress, decorator: Google::Apis::PeopleV1::EmailAddress::Representation @@ -608,9 +564,9 @@ module Google collection :genders, as: 'genders', class: Google::Apis::PeopleV1::Gender, decorator: Google::Apis::PeopleV1::Gender::Representation - property :resource_name, as: 'resourceName' collection :interests, as: 'interests', class: Google::Apis::PeopleV1::Interest, decorator: Google::Apis::PeopleV1::Interest::Representation + property :resource_name, as: 'resourceName' collection :biographies, as: 'biographies', class: Google::Apis::PeopleV1::Biography, decorator: Google::Apis::PeopleV1::Biography::Representation collection :skills, as: 'skills', class: Google::Apis::PeopleV1::Skill, decorator: Google::Apis::PeopleV1::Skill::Representation @@ -632,6 +588,10 @@ module Google collection :phone_numbers, as: 'phoneNumbers', class: Google::Apis::PeopleV1::PhoneNumber, decorator: Google::Apis::PeopleV1::PhoneNumber::Representation + collection :cover_photos, as: 'coverPhotos', class: Google::Apis::PeopleV1::CoverPhoto, decorator: Google::Apis::PeopleV1::CoverPhoto::Representation + + collection :im_clients, as: 'imClients', class: Google::Apis::PeopleV1::ImClient, decorator: Google::Apis::PeopleV1::ImClient::Representation + end end @@ -646,21 +606,21 @@ module Google class PhoneNumber # @private class Representation < Google::Apis::Core::JsonRepresentation - property :formatted_type, as: 'formattedType' - property :canonical_form, as: 'canonicalForm' + property :type, as: 'type' property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation - property :type, as: 'type' property :value, as: 'value' + property :formatted_type, as: 'formattedType' + property :canonical_form, as: 'canonicalForm' end end class Photo # @private class Representation < Google::Apis::Core::JsonRepresentation - property :url, as: 'url' property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation + property :url, as: 'url' end end @@ -668,10 +628,10 @@ module Google # @private class Representation < Google::Apis::Core::JsonRepresentation property :next_page_token, as: 'nextPageToken' + property :total_items, as: 'totalItems' + property :next_sync_token, as: 'nextSyncToken' collection :connections, as: 'connections', class: Google::Apis::PeopleV1::Person, decorator: Google::Apis::PeopleV1::Person::Representation - property :next_sync_token, as: 'nextSyncToken' - property :total_items, as: 'totalItems' property :total_people, as: 'totalPeople' end end @@ -679,9 +639,9 @@ module Google class Birthday # @private class Representation < Google::Apis::Core::JsonRepresentation + property :text, as: 'text' property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation - property :text, as: 'text' property :date, as: 'date', class: Google::Apis::PeopleV1::Date, decorator: Google::Apis::PeopleV1::Date::Representation end @@ -690,6 +650,7 @@ module Google class Address # @private class Representation < Google::Apis::Core::JsonRepresentation + property :country_code, as: 'countryCode' property :formatted_type, as: 'formattedType' property :city, as: 'city' property :formatted_value, as: 'formattedValue' @@ -702,19 +663,58 @@ module Google property :street_address, as: 'streetAddress' property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation - property :country_code, as: 'countryCode' end end class Residence # @private class Representation < Google::Apis::Core::JsonRepresentation + property :current, as: 'current' property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation - property :current, as: 'current' property :value, as: 'value' end end + + class Status + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :code, as: 'code' + property :message, as: 'message' + collection :details, as: 'details' + end + end + + class ContactGroupMembership + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :contact_group_id, as: 'contactGroupId' + end + end + + class PersonMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :linked_people_resource_names, as: 'linkedPeopleResourceNames' + collection :previous_resource_names, as: 'previousResourceNames' + collection :sources, as: 'sources', class: Google::Apis::PeopleV1::Source, decorator: Google::Apis::PeopleV1::Source::Representation + + property :deleted, as: 'deleted' + property :object_type, as: 'objectType' + end + end + + class Event + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :type, as: 'type' + property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation + + property :date, as: 'date', class: Google::Apis::PeopleV1::Date, decorator: Google::Apis::PeopleV1::Date::Representation + + property :formatted_type, as: 'formattedType' + end + end end end end diff --git a/generated/google/apis/people_v1/service.rb b/generated/google/apis/people_v1/service.rb index f762ce321..c69e6f159 100644 --- a/generated/google/apis/people_v1/service.rb +++ b/generated/google/apis/people_v1/service.rb @@ -32,16 +32,16 @@ module Google # # @see https://developers.google.com/people/ class PeopleServiceService < Google::Apis::Core::BaseService - # @return [String] - # API key. Your API key identifies your project and provides you with API access, - # quota, and reports. Required unless you provide an OAuth 2.0 token. - attr_accessor :key - # @return [String] # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. attr_accessor :quota_user + # @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 + def initialize super('https://people.googleapis.com/', '') @batch_path = 'batch' @@ -51,22 +51,19 @@ module Google # of requested resource names. Use `people/me` to indicate the authenticated # user. # @param [String] request_mask_include_field - # Comma-separated list of fields to be included in the response. Omitting - # this field will include all fields except for connections.list requests, - # which have a default mask that includes common fields like metadata, name, - # photo, and profile url. - # Each path should start with `person.`: for example, `person.names` or - # `person.photos`. + # Required. Comma-separated list of person fields to be included in the + # response. Each path should start with `person.`: for example, + # `person.names` or `person.photos`. # @param [Array, String] resource_names # The resource name, such as one returned by # [`people.connections.list`](/people/api/rest/v1/people.connections/list), # of one of the people to provide information about. You can include this # parameter up to 50 times in one request. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -79,18 +76,18 @@ 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 get_people(request_mask_include_field: nil, resource_names: nil, fields: nil, quota_user: nil, options: nil, &block) + def get_people(request_mask_include_field: nil, resource_names: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/people:batchGet', options) command.response_representation = Google::Apis::PeopleV1::GetPeopleResponse::Representation command.response_class = Google::Apis::PeopleV1::GetPeopleResponse command.query['requestMask.includeField'] = request_mask_include_field unless request_mask_include_field.nil? command.query['resourceNames'] = resource_names unless resource_names.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end - # Provides information about a person for a resource name. Use + # Provides information about a person by specifying a resource name. Use # `people/me` to indicate the authenticated user. # @param [String] resource_name # The resource name of the person to provide information about. @@ -99,17 +96,14 @@ module Google # identifies the user, such as the resource names returned by # [`people.connections.list`](/people/api/rest/v1/people.connections/list). # @param [String] request_mask_include_field - # Comma-separated list of fields to be included in the response. Omitting - # this field will include all fields except for connections.list requests, - # which have a default mask that includes common fields like metadata, name, - # photo, and profile url. - # Each path should start with `person.`: for example, `person.names` or - # `person.photos`. - # @param [String] fields - # Selector specifying which fields to include in a partial response. + # Required. Comma-separated list of person fields to be included in the + # response. Each path should start with `person.`: for example, + # `person.names` or `person.photos`. # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -122,14 +116,14 @@ 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 get_person(resource_name, request_mask_include_field: nil, fields: nil, quota_user: nil, options: nil, &block) + def get_person(resource_name, request_mask_include_field: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+resourceName}', options) command.response_representation = Google::Apis::PeopleV1::Person::Representation command.response_class = Google::Apis::PeopleV1::Person command.params['resourceName'] = resource_name unless resource_name.nil? command.query['requestMask.includeField'] = request_mask_include_field unless request_mask_include_field.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -137,32 +131,29 @@ module Google # linked profiles. # @param [String] resource_name # The resource name to return connections for. Only `people/me` is valid. + # @param [Boolean] request_sync_token + # Whether the response should include a sync token, which can be used to get + # all changes since the last request. + # @param [String] page_token + # The token of the page to be returned. + # @param [Fixnum] page_size + # The number of connections to include in the response. Valid values are + # between 1 and 2000, inclusive. Defaults to 100. + # @param [String] request_mask_include_field + # Required. Comma-separated list of person fields to be included in the + # response. Each path should start with `person.`: for example, + # `person.names` or `person.photos`. # @param [String] sync_token # A sync token, returned by a previous call to `people.connections.list`. # Only resources changed since the sync token was created will be returned. # @param [String] sort_order # The order in which the connections should be sorted. Defaults to # `LAST_MODIFIED_ASCENDING`. - # @param [Boolean] request_sync_token - # Whether the response should include a sync token, which can be used to get - # all changes since the last request. - # @param [String] page_token - # The token of the page to be returned. - # @param [String] request_mask_include_field - # Comma-separated list of fields to be included in the response. Omitting - # this field will include all fields except for connections.list requests, - # which have a default mask that includes common fields like metadata, name, - # photo, and profile url. - # Each path should start with `person.`: for example, `person.names` or - # `person.photos`. - # @param [Fixnum] page_size - # The number of connections to include in the response. Valid values are - # between 1 and 500, inclusive. Defaults to 100. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -175,27 +166,27 @@ 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_person_connections(resource_name, sync_token: nil, sort_order: nil, request_sync_token: nil, page_token: nil, request_mask_include_field: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_person_connections(resource_name, request_sync_token: nil, page_token: nil, page_size: nil, request_mask_include_field: nil, sync_token: nil, sort_order: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+resourceName}/connections', options) command.response_representation = Google::Apis::PeopleV1::ListConnectionsResponse::Representation command.response_class = Google::Apis::PeopleV1::ListConnectionsResponse command.params['resourceName'] = resource_name unless resource_name.nil? - command.query['syncToken'] = sync_token unless sync_token.nil? - command.query['sortOrder'] = sort_order unless sort_order.nil? command.query['requestSyncToken'] = request_sync_token unless request_sync_token.nil? command.query['pageToken'] = page_token unless page_token.nil? - command.query['requestMask.includeField'] = request_mask_include_field unless request_mask_include_field.nil? command.query['pageSize'] = page_size unless page_size.nil? - command.query['fields'] = fields unless fields.nil? + command.query['requestMask.includeField'] = request_mask_include_field unless request_mask_include_field.nil? + command.query['syncToken'] = sync_token unless sync_token.nil? + command.query['sortOrder'] = sort_order unless sort_order.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.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['key'] = key unless key.nil? end end end diff --git a/generated/google/apis/plus_domains_v1.rb b/generated/google/apis/plus_domains_v1.rb index e55a85189..a7dd79f28 100644 --- a/generated/google/apis/plus_domains_v1.rb +++ b/generated/google/apis/plus_domains_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/+/domains/ module PlusDomainsV1 VERSION = 'V1' - REVISION = '20170410' + REVISION = '20170523' # View your circles and the people and pages in them AUTH_PLUS_CIRCLES_READ = 'https://www.googleapis.com/auth/plus.circles.read' diff --git a/generated/google/apis/plus_v1.rb b/generated/google/apis/plus_v1.rb index 62570829d..6ef5e1249 100644 --- a/generated/google/apis/plus_v1.rb +++ b/generated/google/apis/plus_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/+/api/ module PlusV1 VERSION = 'V1' - REVISION = '20170410' + REVISION = '20170523' # Know the list of people in your circles, your age range, and language AUTH_PLUS_LOGIN = 'https://www.googleapis.com/auth/plus.login' diff --git a/generated/google/apis/proximitybeacon_v1beta1.rb b/generated/google/apis/proximitybeacon_v1beta1.rb index 0524ecb40..b9593488b 100644 --- a/generated/google/apis/proximitybeacon_v1beta1.rb +++ b/generated/google/apis/proximitybeacon_v1beta1.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/beacons/proximity/ module ProximitybeaconV1beta1 VERSION = 'V1beta1' - REVISION = '20170504' + REVISION = '20170517' # View and modify your beacons AUTH_USERLOCATION_BEACON_REGISTRY = 'https://www.googleapis.com/auth/userlocation.beacon.registry' diff --git a/generated/google/apis/proximitybeacon_v1beta1/classes.rb b/generated/google/apis/proximitybeacon_v1beta1/classes.rb index 926139cc7..857224840 100644 --- a/generated/google/apis/proximitybeacon_v1beta1/classes.rb +++ b/generated/google/apis/proximitybeacon_v1beta1/classes.rb @@ -22,10 +22,264 @@ module Google module Apis module ProximitybeaconV1beta1 + # A subset of attachment information served via the + # `beaconinfo.getforobserved` method, used when your users encounter your + # beacons. + class AttachmentInfo + include Google::Apis::Core::Hashable + + # Specifies what kind of attachment this is. Tells a client how to + # interpret the `data` field. Format is namespace/type, for + # example scrupulous-wombat-12345/welcome-message + # Corresponds to the JSON property `namespacedType` + # @return [String] + attr_accessor :namespaced_type + + # An opaque data container for client-provided data. + # Corresponds to the JSON property `data` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :data + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @namespaced_type = args[:namespaced_type] if args.key?(:namespaced_type) + @data = args[:data] if args.key?(:data) + end + end + + # A subset of beacon information served via the `beaconinfo.getforobserved` + # method, which you call when users of your app encounter your beacons. + class BeaconInfo + include Google::Apis::Core::Hashable + + # The name under which the beacon is registered. + # Corresponds to the JSON property `beaconName` + # @return [String] + attr_accessor :beacon_name + + # Defines a unique identifier of a beacon as broadcast by the device. + # Corresponds to the JSON property `advertisedId` + # @return [Google::Apis::ProximitybeaconV1beta1::AdvertisedId] + attr_accessor :advertised_id + + # Attachments matching the type(s) requested. + # May be empty if no attachment types were requested. + # Corresponds to the JSON property `attachments` + # @return [Array] + attr_accessor :attachments + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @beacon_name = args[:beacon_name] if args.key?(:beacon_name) + @advertised_id = args[:advertised_id] if args.key?(:advertised_id) + @attachments = args[:attachments] if args.key?(:attachments) + end + end + + # Response for a request to delete attachments. + class DeleteAttachmentsResponse + include Google::Apis::Core::Hashable + + # The number of attachments that were deleted. + # Corresponds to the JSON property `numDeleted` + # @return [Fixnum] + attr_accessor :num_deleted + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @num_deleted = args[:num_deleted] if args.key?(:num_deleted) + end + end + + # Information a client needs to provision and register beacons that + # broadcast Eddystone-EID format beacon IDs, using Elliptic curve + # Diffie-Hellman key exchange. See + # [the Eddystone specification](https://github.com/google/eddystone/tree/master/ + # eddystone-eid) at GitHub. + class EphemeralIdRegistrationParams + include Google::Apis::Core::Hashable + + # The beacon service's public key for use by a beacon to derive its + # Identity Key using Elliptic Curve Diffie-Hellman key exchange. + # Corresponds to the JSON property `serviceEcdhPublicKey` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :service_ecdh_public_key + + # Indicates the minimum rotation period supported by the service. + # See EddystoneEidRegistration.rotation_period_exponent + # Corresponds to the JSON property `minRotationPeriodExponent` + # @return [Fixnum] + attr_accessor :min_rotation_period_exponent + + # Indicates the maximum rotation period supported by the service. + # See EddystoneEidRegistration.rotation_period_exponent + # Corresponds to the JSON property `maxRotationPeriodExponent` + # @return [Fixnum] + attr_accessor :max_rotation_period_exponent + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @service_ecdh_public_key = args[:service_ecdh_public_key] if args.key?(:service_ecdh_public_key) + @min_rotation_period_exponent = args[:min_rotation_period_exponent] if args.key?(:min_rotation_period_exponent) + @max_rotation_period_exponent = args[:max_rotation_period_exponent] if args.key?(:max_rotation_period_exponent) + end + end + + # Represents one beacon observed once. + class Observation + include Google::Apis::Core::Hashable + + # The array of telemetry bytes received from the beacon. The server is + # responsible for parsing it. This field may frequently be empty, as + # with a beacon that transmits telemetry only occasionally. + # Corresponds to the JSON property `telemetry` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :telemetry + + # Time when the beacon was observed. + # Corresponds to the JSON property `timestampMs` + # @return [String] + attr_accessor :timestamp_ms + + # Defines a unique identifier of a beacon as broadcast by the device. + # Corresponds to the JSON property `advertisedId` + # @return [Google::Apis::ProximitybeaconV1beta1::AdvertisedId] + attr_accessor :advertised_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @telemetry = args[:telemetry] if args.key?(:telemetry) + @timestamp_ms = args[:timestamp_ms] if args.key?(:timestamp_ms) + @advertised_id = args[:advertised_id] if args.key?(:advertised_id) + end + end + + # Response that contains the requested diagnostics. + class ListDiagnosticsResponse + include Google::Apis::Core::Hashable + + # Token that can be used for pagination. Returned only if the + # request matches more beacons than can be returned in this response. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The diagnostics matching the given request. + # Corresponds to the JSON property `diagnostics` + # @return [Array] + attr_accessor :diagnostics + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @diagnostics = args[:diagnostics] if args.key?(:diagnostics) + end + end + + # Information about the requested beacons, optionally including attachment + # data. + class GetInfoForObservedBeaconsResponse + include Google::Apis::Core::Hashable + + # Public information about beacons. + # May be empty if the request matched no beacons. + # Corresponds to the JSON property `beacons` + # @return [Array] + attr_accessor :beacons + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @beacons = args[:beacons] if args.key?(:beacons) + end + end + # Details of a beacon device. class Beacon include Google::Apis::Core::Hashable + # Write-only registration parameters for beacons using Eddystone-EID format. + # Two ways of securely registering an Eddystone-EID beacon with the service + # are supported: + # 1. Perform an ECDH key exchange via this API, including a previous call + # to `GET /v1beta1/eidparams`. In this case the fields + # `beacon_ecdh_public_key` and `service_ecdh_public_key` should be + # populated and `beacon_identity_key` should not be populated. This + # method ensures that only the two parties in the ECDH key exchange can + # compute the identity key, which becomes a secret between them. + # 2. Derive or obtain the beacon's identity key via other secure means + # (perhaps an ECDH key exchange between the beacon and a mobile device + # or any other secure method), and then submit the resulting identity key + # to the service. In this case `beacon_identity_key` field should be + # populated, and neither of `beacon_ecdh_public_key` nor + # `service_ecdh_public_key` fields should be. The security of this method + # depends on how securely the parties involved (in particular the + # bluetooth client) handle the identity key, and obviously on how + # securely the identity key was generated. + # See [the Eddystone specification](https://github.com/google/eddystone/tree/ + # master/eddystone-eid) at GitHub. + # Corresponds to the JSON property `ephemeralIdRegistration` + # @return [Google::Apis::ProximitybeaconV1beta1::EphemeralIdRegistration] + attr_accessor :ephemeral_id_registration + + # Some beacons may require a user to provide an authorization key before + # changing any of its configuration (e.g. broadcast frames, transmit power). + # This field provides a place to store and control access to that key. + # This field is populated in responses to `GET /v1beta1/beacons/3!beaconId` + # from users with write access to the given beacon. That is to say: If the + # user is authorized to write the beacon's confidential data in the service, + # the service considers them authorized to configure the beacon. Note + # that this key grants nothing on the service, only on the beacon itself. + # Corresponds to the JSON property `provisioningKey` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :provisioning_key + + # Free text used to identify and describe the beacon. Maximum length 140 + # characters. + # Optional. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # The [Google Places API](/places/place-id) Place ID of the place where + # the beacon is deployed. This is given when the beacon is registered or + # updated, not automatically detected in any way. + # Optional. + # Corresponds to the JSON property `placeId` + # @return [String] + attr_accessor :place_id + # An object representing a latitude/longitude pair. This is expressed as a pair # of doubles representing degrees latitude and degrees longitude. Unless # specified otherwise, this must conform to the @@ -61,27 +315,10 @@ module Google # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) - # The code in logs/storage/validator/logs_validator_traits.cc treats this type - # as if it were annotated as ST_LOCATION. # Corresponds to the JSON property `latLng` # @return [Google::Apis::ProximitybeaconV1beta1::LatLng] attr_accessor :lat_lng - # The [Google Places API](/places/place-id) Place ID of the place where - # the beacon is deployed. This is given when the beacon is registered or - # updated, not automatically detected in any way. - # Optional. - # Corresponds to the JSON property `placeId` - # @return [String] - attr_accessor :place_id - - # Free text used to identify and describe the beacon. Maximum length 140 - # characters. - # Optional. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - # Properties of the beacon device, for example battery type or firmware # version. # Optional. @@ -123,60 +360,23 @@ module Google # @return [Google::Apis::ProximitybeaconV1beta1::AdvertisedId] attr_accessor :advertised_id - # Write-only registration parameters for beacons using Eddystone-EID format. - # Two ways of securely registering an Eddystone-EID beacon with the service - # are supported: - # 1. Perform an ECDH key exchange via this API, including a previous call - # to `GET /v1beta1/eidparams`. In this case the fields - # `beacon_ecdh_public_key` and `service_ecdh_public_key` should be - # populated and `beacon_identity_key` should not be populated. This - # method ensures that only the two parties in the ECDH key exchange can - # compute the identity key, which becomes a secret between them. - # 2. Derive or obtain the beacon's identity key via other secure means - # (perhaps an ECDH key exchange between the beacon and a mobile device - # or any other secure method), and then submit the resulting identity key - # to the service. In this case `beacon_identity_key` field should be - # populated, and neither of `beacon_ecdh_public_key` nor - # `service_ecdh_public_key` fields should be. The security of this method - # depends on how securely the parties involved (in particular the - # bluetooth client) handle the identity key, and obviously on how - # securely the identity key was generated. - # See [the Eddystone specification](https://github.com/google/eddystone/tree/ - # master/eddystone-eid) at GitHub. - # Corresponds to the JSON property `ephemeralIdRegistration` - # @return [Google::Apis::ProximitybeaconV1beta1::EphemeralIdRegistration] - attr_accessor :ephemeral_id_registration - - # Some beacons may require a user to provide an authorization key before - # changing any of its configuration (e.g. broadcast frames, transmit power). - # This field provides a place to store and control access to that key. - # This field is populated in responses to `GET /v1beta1/beacons/3!beaconId` - # from users with write access to the given beacon. That is to say: If the - # user is authorized to write the beacon's confidential data in the service, - # the service considers them authorized to configure the beacon. Note - # that this key grants nothing on the service, only on the beacon itself. - # Corresponds to the JSON property `provisioningKey` - # NOTE: Values are automatically base64 encoded/decoded in the client library. - # @return [String] - attr_accessor :provisioning_key - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @lat_lng = args[:lat_lng] if args.key?(:lat_lng) - @place_id = args[:place_id] if args.key?(:place_id) + @ephemeral_id_registration = args[:ephemeral_id_registration] if args.key?(:ephemeral_id_registration) + @provisioning_key = args[:provisioning_key] if args.key?(:provisioning_key) @description = args[:description] if args.key?(:description) + @place_id = args[:place_id] if args.key?(:place_id) + @lat_lng = args[:lat_lng] if args.key?(:lat_lng) @properties = args[:properties] if args.key?(:properties) @status = args[:status] if args.key?(:status) @indoor_level = args[:indoor_level] if args.key?(:indoor_level) @beacon_name = args[:beacon_name] if args.key?(:beacon_name) @expected_stability = args[:expected_stability] if args.key?(:expected_stability) @advertised_id = args[:advertised_id] if args.key?(:advertised_id) - @ephemeral_id_registration = args[:ephemeral_id_registration] if args.key?(:ephemeral_id_registration) - @provisioning_key = args[:provisioning_key] if args.key?(:provisioning_key) end end @@ -184,6 +384,12 @@ module Google class AdvertisedId include Google::Apis::Core::Hashable + # Specifies the identifier type. + # Required. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + # The actual beacon identifier, as broadcast by the beacon hardware. Must be # [base64](http://tools.ietf.org/html/rfc4648#section-4) encoded in HTTP # requests, and will be so encoded (with padding) in responses. The base64 @@ -195,20 +401,14 @@ module Google # @return [String] attr_accessor :id - # Specifies the identifier type. - # Required. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @id = args[:id] if args.key?(:id) @type = args[:type] if args.key?(:type) + @id = args[:id] if args.key?(:id) end end @@ -290,39 +490,6 @@ module Google end end - # Response that contains list beacon results and pagination help. - class ListBeaconsResponse - include Google::Apis::Core::Hashable - - # An opaque pagination token that the client may provide in their next - # request to retrieve the next page of results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # The beacons that matched the search criteria. - # Corresponds to the JSON property `beacons` - # @return [Array] - attr_accessor :beacons - - # Estimate of the total number of beacons matched by the query. Higher - # values may be less accurate. - # Corresponds to the JSON property `totalCount` - # @return [Fixnum] - attr_accessor :total_count - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @beacons = args[:beacons] if args.key?(:beacons) - @total_count = args[:total_count] if args.key?(:total_count) - end - end - # Diagnostics for a single beacon. class Diagnostics include Google::Apis::Core::Hashable @@ -361,6 +528,39 @@ module Google end end + # Response that contains list beacon results and pagination help. + class ListBeaconsResponse + include Google::Apis::Core::Hashable + + # An opaque pagination token that the client may provide in their next + # request to retrieve the next page of results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The beacons that matched the search criteria. + # Corresponds to the JSON property `beacons` + # @return [Array] + attr_accessor :beacons + + # Estimate of the total number of beacons matched by the query. Higher + # values may be less accurate. + # Corresponds to the JSON property `totalCount` + # @return [Fixnum] + attr_accessor :total_count + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @beacons = args[:beacons] if args.key?(:beacons) + @total_count = args[:total_count] if args.key?(:total_count) + end + end + # Request for beacon and attachment information about beacons that # a mobile client has encountered "in the wild". class GetInfoForObservedBeaconsRequest @@ -416,13 +616,6 @@ module Google class BeaconAttachment include Google::Apis::Core::Hashable - # Resource name of this attachment. Attachment names have the format: - # beacons/beacon_id/attachments/attachment_id. - # Leave this empty on creation. - # Corresponds to the JSON property `attachmentName` - # @return [String] - attr_accessor :attachment_name - # Specifies what kind of attachment this is. Tells a client how to # interpret the `data` field. Format is namespace/type. Namespace # provides type separation between clients. Type describes the type of @@ -447,16 +640,23 @@ module Google # @return [String] attr_accessor :creation_time_ms + # Resource name of this attachment. Attachment names have the format: + # beacons/beacon_id/attachments/attachment_id. + # Leave this empty on creation. + # Corresponds to the JSON property `attachmentName` + # @return [String] + attr_accessor :attachment_name + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @attachment_name = args[:attachment_name] if args.key?(:attachment_name) @namespaced_type = args[:namespaced_type] if args.key?(:namespaced_type) @data = args[:data] if args.key?(:data) @creation_time_ms = args[:creation_time_ms] if args.key?(:creation_time_ms) + @attachment_name = args[:attachment_name] if args.key?(:attachment_name) end end @@ -483,16 +683,6 @@ module Google class EphemeralIdRegistration include Google::Apis::Core::Hashable - # An initial ephemeral ID calculated using the clock value submitted as - # `initial_clock_value`, and the secret key generated by the - # Diffie-Hellman key exchange using `service_ecdh_public_key` and - # `service_ecdh_public_key`. This initial EID value will be used by the - # service to confirm that the key exchange process was successful. - # Corresponds to the JSON property `initialEid` - # NOTE: Values are automatically base64 encoded/decoded in the client library. - # @return [String] - attr_accessor :initial_eid - # The initial clock value of the beacon. The beacon's clock must have # begun counting at this value immediately prior to transmitting this # value to the resolving service. Significant delay in transmitting this @@ -537,18 +727,28 @@ module Google # @return [String] attr_accessor :beacon_identity_key + # An initial ephemeral ID calculated using the clock value submitted as + # `initial_clock_value`, and the secret key generated by the + # Diffie-Hellman key exchange using `service_ecdh_public_key` and + # `service_ecdh_public_key`. This initial EID value will be used by the + # service to confirm that the key exchange process was successful. + # Corresponds to the JSON property `initialEid` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :initial_eid + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @initial_eid = args[:initial_eid] if args.key?(:initial_eid) @initial_clock_value = args[:initial_clock_value] if args.key?(:initial_clock_value) @beacon_ecdh_public_key = args[:beacon_ecdh_public_key] if args.key?(:beacon_ecdh_public_key) @rotation_period_exponent = args[:rotation_period_exponent] if args.key?(:rotation_period_exponent) @service_ecdh_public_key = args[:service_ecdh_public_key] if args.key?(:service_ecdh_public_key) @beacon_identity_key = args[:beacon_identity_key] if args.key?(:beacon_identity_key) + @initial_eid = args[:initial_eid] if args.key?(:initial_eid) end end @@ -587,8 +787,6 @@ module Google # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) - # The code in logs/storage/validator/logs_validator_traits.cc treats this type - # as if it were annotated as ST_LOCATION. class LatLng include Google::Apis::Core::Hashable @@ -638,228 +836,26 @@ module Google class Namespace include Google::Apis::Core::Hashable - # Resource name of this namespace. Namespaces names have the format: - # namespaces/namespace. - # Corresponds to the JSON property `namespaceName` - # @return [String] - attr_accessor :namespace_name - # Specifies what clients may receive attachments under this namespace # via `beaconinfo.getforobserved`. # Corresponds to the JSON property `servingVisibility` # @return [String] attr_accessor :serving_visibility + # Resource name of this namespace. Namespaces names have the format: + # namespaces/namespace. + # Corresponds to the JSON property `namespaceName` + # @return [String] + attr_accessor :namespace_name + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @namespace_name = args[:namespace_name] if args.key?(:namespace_name) @serving_visibility = args[:serving_visibility] if args.key?(:serving_visibility) - end - end - - # A subset of beacon information served via the `beaconinfo.getforobserved` - # method, which you call when users of your app encounter your beacons. - class BeaconInfo - include Google::Apis::Core::Hashable - - # Defines a unique identifier of a beacon as broadcast by the device. - # Corresponds to the JSON property `advertisedId` - # @return [Google::Apis::ProximitybeaconV1beta1::AdvertisedId] - attr_accessor :advertised_id - - # Attachments matching the type(s) requested. - # May be empty if no attachment types were requested. - # Corresponds to the JSON property `attachments` - # @return [Array] - attr_accessor :attachments - - # The name under which the beacon is registered. - # Corresponds to the JSON property `beaconName` - # @return [String] - attr_accessor :beacon_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @advertised_id = args[:advertised_id] if args.key?(:advertised_id) - @attachments = args[:attachments] if args.key?(:attachments) - @beacon_name = args[:beacon_name] if args.key?(:beacon_name) - end - end - - # A subset of attachment information served via the - # `beaconinfo.getforobserved` method, used when your users encounter your - # beacons. - class AttachmentInfo - include Google::Apis::Core::Hashable - - # Specifies what kind of attachment this is. Tells a client how to - # interpret the `data` field. Format is namespace/type, for - # example scrupulous-wombat-12345/welcome-message - # Corresponds to the JSON property `namespacedType` - # @return [String] - attr_accessor :namespaced_type - - # An opaque data container for client-provided data. - # Corresponds to the JSON property `data` - # NOTE: Values are automatically base64 encoded/decoded in the client library. - # @return [String] - attr_accessor :data - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @namespaced_type = args[:namespaced_type] if args.key?(:namespaced_type) - @data = args[:data] if args.key?(:data) - end - end - - # Information a client needs to provision and register beacons that - # broadcast Eddystone-EID format beacon IDs, using Elliptic curve - # Diffie-Hellman key exchange. See - # [the Eddystone specification](https://github.com/google/eddystone/tree/master/ - # eddystone-eid) at GitHub. - class EphemeralIdRegistrationParams - include Google::Apis::Core::Hashable - - # Indicates the minimum rotation period supported by the service. - # See EddystoneEidRegistration.rotation_period_exponent - # Corresponds to the JSON property `minRotationPeriodExponent` - # @return [Fixnum] - attr_accessor :min_rotation_period_exponent - - # Indicates the maximum rotation period supported by the service. - # See EddystoneEidRegistration.rotation_period_exponent - # Corresponds to the JSON property `maxRotationPeriodExponent` - # @return [Fixnum] - attr_accessor :max_rotation_period_exponent - - # The beacon service's public key for use by a beacon to derive its - # Identity Key using Elliptic Curve Diffie-Hellman key exchange. - # Corresponds to the JSON property `serviceEcdhPublicKey` - # NOTE: Values are automatically base64 encoded/decoded in the client library. - # @return [String] - attr_accessor :service_ecdh_public_key - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @min_rotation_period_exponent = args[:min_rotation_period_exponent] if args.key?(:min_rotation_period_exponent) - @max_rotation_period_exponent = args[:max_rotation_period_exponent] if args.key?(:max_rotation_period_exponent) - @service_ecdh_public_key = args[:service_ecdh_public_key] if args.key?(:service_ecdh_public_key) - end - end - - # Response for a request to delete attachments. - class DeleteAttachmentsResponse - include Google::Apis::Core::Hashable - - # The number of attachments that were deleted. - # Corresponds to the JSON property `numDeleted` - # @return [Fixnum] - attr_accessor :num_deleted - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @num_deleted = args[:num_deleted] if args.key?(:num_deleted) - end - end - - # Represents one beacon observed once. - class Observation - include Google::Apis::Core::Hashable - - # The array of telemetry bytes received from the beacon. The server is - # responsible for parsing it. This field may frequently be empty, as - # with a beacon that transmits telemetry only occasionally. - # Corresponds to the JSON property `telemetry` - # NOTE: Values are automatically base64 encoded/decoded in the client library. - # @return [String] - attr_accessor :telemetry - - # Time when the beacon was observed. - # Corresponds to the JSON property `timestampMs` - # @return [String] - attr_accessor :timestamp_ms - - # Defines a unique identifier of a beacon as broadcast by the device. - # Corresponds to the JSON property `advertisedId` - # @return [Google::Apis::ProximitybeaconV1beta1::AdvertisedId] - attr_accessor :advertised_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @telemetry = args[:telemetry] if args.key?(:telemetry) - @timestamp_ms = args[:timestamp_ms] if args.key?(:timestamp_ms) - @advertised_id = args[:advertised_id] if args.key?(:advertised_id) - end - end - - # Response that contains the requested diagnostics. - class ListDiagnosticsResponse - include Google::Apis::Core::Hashable - - # The diagnostics matching the given request. - # Corresponds to the JSON property `diagnostics` - # @return [Array] - attr_accessor :diagnostics - - # Token that can be used for pagination. Returned only if the - # request matches more beacons than can be returned in this response. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @diagnostics = args[:diagnostics] if args.key?(:diagnostics) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # Information about the requested beacons, optionally including attachment - # data. - class GetInfoForObservedBeaconsResponse - include Google::Apis::Core::Hashable - - # Public information about beacons. - # May be empty if the request matched no beacons. - # Corresponds to the JSON property `beacons` - # @return [Array] - attr_accessor :beacons - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @beacons = args[:beacons] if args.key?(:beacons) + @namespace_name = args[:namespace_name] if args.key?(:namespace_name) end end end diff --git a/generated/google/apis/proximitybeacon_v1beta1/representations.rb b/generated/google/apis/proximitybeacon_v1beta1/representations.rb index 0885e5115..efb8c03a1 100644 --- a/generated/google/apis/proximitybeacon_v1beta1/representations.rb +++ b/generated/google/apis/proximitybeacon_v1beta1/representations.rb @@ -22,6 +22,48 @@ module Google module Apis module ProximitybeaconV1beta1 + class AttachmentInfo + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BeaconInfo + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DeleteAttachmentsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class EphemeralIdRegistrationParams + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Observation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListDiagnosticsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GetInfoForObservedBeaconsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class Beacon class Representation < Google::Apis::Core::JsonRepresentation; end @@ -52,13 +94,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class ListBeaconsResponse + class Diagnostics class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class Diagnostics + class ListBeaconsResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -106,55 +148,78 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class BeaconInfo - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class AttachmentInfo - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :namespaced_type, as: 'namespacedType' + property :data, :base64 => true, as: 'data' + end end - class EphemeralIdRegistrationParams - class Representation < Google::Apis::Core::JsonRepresentation; end + class BeaconInfo + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :beacon_name, as: 'beaconName' + property :advertised_id, as: 'advertisedId', class: Google::Apis::ProximitybeaconV1beta1::AdvertisedId, decorator: Google::Apis::ProximitybeaconV1beta1::AdvertisedId::Representation - include Google::Apis::Core::JsonObjectSupport + collection :attachments, as: 'attachments', class: Google::Apis::ProximitybeaconV1beta1::AttachmentInfo, decorator: Google::Apis::ProximitybeaconV1beta1::AttachmentInfo::Representation + + end end class DeleteAttachmentsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :num_deleted, as: 'numDeleted' + end + end - include Google::Apis::Core::JsonObjectSupport + class EphemeralIdRegistrationParams + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :service_ecdh_public_key, :base64 => true, as: 'serviceEcdhPublicKey' + property :min_rotation_period_exponent, as: 'minRotationPeriodExponent' + property :max_rotation_period_exponent, as: 'maxRotationPeriodExponent' + end end class Observation - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :telemetry, :base64 => true, as: 'telemetry' + property :timestamp_ms, as: 'timestampMs' + property :advertised_id, as: 'advertisedId', class: Google::Apis::ProximitybeaconV1beta1::AdvertisedId, decorator: Google::Apis::ProximitybeaconV1beta1::AdvertisedId::Representation - include Google::Apis::Core::JsonObjectSupport + end end class ListDiagnosticsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :diagnostics, as: 'diagnostics', class: Google::Apis::ProximitybeaconV1beta1::Diagnostics, decorator: Google::Apis::ProximitybeaconV1beta1::Diagnostics::Representation - include Google::Apis::Core::JsonObjectSupport + end end class GetInfoForObservedBeaconsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :beacons, as: 'beacons', class: Google::Apis::ProximitybeaconV1beta1::BeaconInfo, decorator: Google::Apis::ProximitybeaconV1beta1::BeaconInfo::Representation - include Google::Apis::Core::JsonObjectSupport + end end class Beacon # @private class Representation < Google::Apis::Core::JsonRepresentation + property :ephemeral_id_registration, as: 'ephemeralIdRegistration', class: Google::Apis::ProximitybeaconV1beta1::EphemeralIdRegistration, decorator: Google::Apis::ProximitybeaconV1beta1::EphemeralIdRegistration::Representation + + property :provisioning_key, :base64 => true, as: 'provisioningKey' + property :description, as: 'description' + property :place_id, as: 'placeId' property :lat_lng, as: 'latLng', class: Google::Apis::ProximitybeaconV1beta1::LatLng, decorator: Google::Apis::ProximitybeaconV1beta1::LatLng::Representation - property :place_id, as: 'placeId' - property :description, as: 'description' hash :properties, as: 'properties' property :status, as: 'status' property :indoor_level, as: 'indoorLevel', class: Google::Apis::ProximitybeaconV1beta1::IndoorLevel, decorator: Google::Apis::ProximitybeaconV1beta1::IndoorLevel::Representation @@ -163,17 +228,14 @@ module Google property :expected_stability, as: 'expectedStability' property :advertised_id, as: 'advertisedId', class: Google::Apis::ProximitybeaconV1beta1::AdvertisedId, decorator: Google::Apis::ProximitybeaconV1beta1::AdvertisedId::Representation - property :ephemeral_id_registration, as: 'ephemeralIdRegistration', class: Google::Apis::ProximitybeaconV1beta1::EphemeralIdRegistration, decorator: Google::Apis::ProximitybeaconV1beta1::EphemeralIdRegistration::Representation - - property :provisioning_key, :base64 => true, as: 'provisioningKey' end end class AdvertisedId # @private class Representation < Google::Apis::Core::JsonRepresentation - property :id, :base64 => true, as: 'id' property :type, as: 'type' + property :id, :base64 => true, as: 'id' end end @@ -201,16 +263,6 @@ module Google end end - class ListBeaconsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - collection :beacons, as: 'beacons', class: Google::Apis::ProximitybeaconV1beta1::Beacon, decorator: Google::Apis::ProximitybeaconV1beta1::Beacon::Representation - - property :total_count, :numeric_string => true, as: 'totalCount' - end - end - class Diagnostics # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -221,6 +273,16 @@ module Google end end + class ListBeaconsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :beacons, as: 'beacons', class: Google::Apis::ProximitybeaconV1beta1::Beacon, decorator: Google::Apis::ProximitybeaconV1beta1::Beacon::Representation + + property :total_count, :numeric_string => true, as: 'totalCount' + end + end + class GetInfoForObservedBeaconsRequest # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -239,22 +301,22 @@ module Google class BeaconAttachment # @private class Representation < Google::Apis::Core::JsonRepresentation - property :attachment_name, as: 'attachmentName' property :namespaced_type, as: 'namespacedType' property :data, :base64 => true, as: 'data' property :creation_time_ms, as: 'creationTimeMs' + property :attachment_name, as: 'attachmentName' end end class EphemeralIdRegistration # @private class Representation < Google::Apis::Core::JsonRepresentation - property :initial_eid, :base64 => true, as: 'initialEid' property :initial_clock_value, :numeric_string => true, as: 'initialClockValue' property :beacon_ecdh_public_key, :base64 => true, as: 'beaconEcdhPublicKey' property :rotation_period_exponent, as: 'rotationPeriodExponent' property :service_ecdh_public_key, :base64 => true, as: 'serviceEcdhPublicKey' property :beacon_identity_key, :base64 => true, as: 'beaconIdentityKey' + property :initial_eid, :base64 => true, as: 'initialEid' end end @@ -277,70 +339,8 @@ module Google class Namespace # @private class Representation < Google::Apis::Core::JsonRepresentation - property :namespace_name, as: 'namespaceName' property :serving_visibility, as: 'servingVisibility' - end - end - - class BeaconInfo - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :advertised_id, as: 'advertisedId', class: Google::Apis::ProximitybeaconV1beta1::AdvertisedId, decorator: Google::Apis::ProximitybeaconV1beta1::AdvertisedId::Representation - - collection :attachments, as: 'attachments', class: Google::Apis::ProximitybeaconV1beta1::AttachmentInfo, decorator: Google::Apis::ProximitybeaconV1beta1::AttachmentInfo::Representation - - property :beacon_name, as: 'beaconName' - end - end - - class AttachmentInfo - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :namespaced_type, as: 'namespacedType' - property :data, :base64 => true, as: 'data' - end - end - - class EphemeralIdRegistrationParams - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :min_rotation_period_exponent, as: 'minRotationPeriodExponent' - property :max_rotation_period_exponent, as: 'maxRotationPeriodExponent' - property :service_ecdh_public_key, :base64 => true, as: 'serviceEcdhPublicKey' - end - end - - class DeleteAttachmentsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :num_deleted, as: 'numDeleted' - end - end - - class Observation - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :telemetry, :base64 => true, as: 'telemetry' - property :timestamp_ms, as: 'timestampMs' - property :advertised_id, as: 'advertisedId', class: Google::Apis::ProximitybeaconV1beta1::AdvertisedId, decorator: Google::Apis::ProximitybeaconV1beta1::AdvertisedId::Representation - - end - end - - class ListDiagnosticsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :diagnostics, as: 'diagnostics', class: Google::Apis::ProximitybeaconV1beta1::Diagnostics, decorator: Google::Apis::ProximitybeaconV1beta1::Diagnostics::Representation - - property :next_page_token, as: 'nextPageToken' - end - end - - class GetInfoForObservedBeaconsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :beacons, as: 'beacons', class: Google::Apis::ProximitybeaconV1beta1::BeaconInfo, decorator: Google::Apis::ProximitybeaconV1beta1::BeaconInfo::Representation - + property :namespace_name, as: 'namespaceName' end end end diff --git a/generated/google/apis/proximitybeacon_v1beta1/service.rb b/generated/google/apis/proximitybeacon_v1beta1/service.rb index 87851559f..528fe7863 100644 --- a/generated/google/apis/proximitybeacon_v1beta1/service.rb +++ b/generated/google/apis/proximitybeacon_v1beta1/service.rb @@ -32,99 +32,21 @@ module Google # # @see https://developers.google.com/beacons/proximity/ class ProximitybeaconService < Google::Apis::Core::BaseService - # @return [String] - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - attr_accessor :quota_user - # @return [String] # API key. Your API key identifies your project and provides you with API access, # quota, and reports. Required unless you provide an OAuth 2.0 token. attr_accessor :key + # @return [String] + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + attr_accessor :quota_user + def initialize super('https://proximitybeacon.googleapis.com/', '') @batch_path = 'batch' end - # Updates the information about the specified namespace. Only the namespace - # visibility can be updated. - # @param [String] namespace_name - # Resource name of this namespace. Namespaces names have the format: - # namespaces/namespace. - # @param [Google::Apis::ProximitybeaconV1beta1::Namespace] namespace_object - # @param [String] project_id - # The project id of the namespace to update. If the project id is not - # specified then the project making the request is used. The project id - # must match the project that owns the beacon. - # Optional. - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ProximitybeaconV1beta1::Namespace] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ProximitybeaconV1beta1::Namespace] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_namespace(namespace_name, namespace_object = nil, project_id: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:put, 'v1beta1/{+namespaceName}', options) - command.request_representation = Google::Apis::ProximitybeaconV1beta1::Namespace::Representation - command.request_object = namespace_object - command.response_representation = Google::Apis::ProximitybeaconV1beta1::Namespace::Representation - command.response_class = Google::Apis::ProximitybeaconV1beta1::Namespace - command.params['namespaceName'] = namespace_name unless namespace_name.nil? - command.query['projectId'] = project_id unless project_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Lists all attachment namespaces owned by your Google Developers Console - # project. Attachment data associated with a beacon must include a - # namespaced type, and the namespace must be owned by your project. - # Authenticate using an [OAuth access token](https://developers.google.com/ - # identity/protocols/OAuth2) - # from a signed-in user with **viewer**, **Is owner** or **Can edit** - # permissions in the Google Developers Console project. - # @param [String] project_id - # The project id to list namespaces under. - # Optional. - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ProximitybeaconV1beta1::ListNamespacesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ProximitybeaconV1beta1::ListNamespacesResponse] - # - # @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_namespaces(project_id: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1beta1/namespaces', options) - command.response_representation = Google::Apis::ProximitybeaconV1beta1::ListNamespacesResponse::Representation - command.response_class = Google::Apis::ProximitybeaconV1beta1::ListNamespacesResponse - command.query['projectId'] = project_id unless project_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - # Gets the Proximity Beacon API's current public key and associated # parameters used to initiate the Diffie-Hellman key exchange required to # register a beacon that broadcasts the Eddystone-EID format. This key @@ -158,6 +80,55 @@ module Google execute_or_queue_command(command, &block) end + # Activates a beacon. A beacon that is active will return information + # and attachment data when queried via `beaconinfo.getforobserved`. + # Calling this method on an already active beacon will do nothing (but + # will return a successful response code). + # Authenticate using an [OAuth access token](https://developers.google.com/ + # identity/protocols/OAuth2) + # from a signed-in user with **Is owner** or **Can edit** permissions in the + # Google Developers Console project. + # @param [String] beacon_name + # Beacon that should be activated. A beacon name has the format + # "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by + # the beacon and N is a code for the beacon's type. Possible values are + # `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` + # for AltBeacon. For Eddystone-EID beacons, you may use either the + # current EID or the beacon's "stable" UID. + # Required. + # @param [String] project_id + # The project id of the beacon to activate. If the project id is not + # specified then the project making the request is used. The project id + # must match the project that owns the beacon. + # Optional. + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ProximitybeaconV1beta1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProximitybeaconV1beta1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def activate_beacon(beacon_name, project_id: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+beaconName}:activate', options) + command.response_representation = Google::Apis::ProximitybeaconV1beta1::Empty::Representation + command.response_class = Google::Apis::ProximitybeaconV1beta1::Empty + command.params['beaconName'] = beacon_name unless beacon_name.nil? + command.query['projectId'] = project_id unless project_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + # Returns detailed information about the specified beacon. # Authenticate using an [OAuth access token](https://developers.google.com/ # identity/protocols/OAuth2) @@ -408,6 +379,47 @@ module Google execute_or_queue_command(command, &block) end + # Registers a previously unregistered beacon given its `advertisedId`. + # These IDs are unique within the system. An ID can be registered only once. + # Authenticate using an [OAuth access token](https://developers.google.com/ + # identity/protocols/OAuth2) + # from a signed-in user with **Is owner** or **Can edit** permissions in the + # Google Developers Console project. + # @param [Google::Apis::ProximitybeaconV1beta1::Beacon] beacon_object + # @param [String] project_id + # The project id of the project the beacon will be registered to. If + # the project id is not specified then the project making the request + # is used. + # Optional. + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ProximitybeaconV1beta1::Beacon] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProximitybeaconV1beta1::Beacon] + # + # @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 register_beacon(beacon_object = nil, project_id: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/beacons:register', options) + command.request_representation = Google::Apis::ProximitybeaconV1beta1::Beacon::Representation + command.request_object = beacon_object + command.response_representation = Google::Apis::ProximitybeaconV1beta1::Beacon::Representation + command.response_class = Google::Apis::ProximitybeaconV1beta1::Beacon + command.query['projectId'] = project_id unless project_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + # Searches the beacon registry for beacons that match the given search # criteria. Only those beacons that the client has permission to list # will be returned. @@ -518,68 +530,28 @@ module Google execute_or_queue_command(command, &block) end - # Registers a previously unregistered beacon given its `advertisedId`. - # These IDs are unique within the system. An ID can be registered only once. + # List the diagnostics for a single beacon. You can also list diagnostics for + # all the beacons owned by your Google Developers Console project by using + # the beacon name `beacons/-`. # Authenticate using an [OAuth access token](https://developers.google.com/ # identity/protocols/OAuth2) - # from a signed-in user with **Is owner** or **Can edit** permissions in the - # Google Developers Console project. - # @param [Google::Apis::ProximitybeaconV1beta1::Beacon] beacon_object - # @param [String] project_id - # The project id of the project the beacon will be registered to. If - # the project id is not specified then the project making the request - # is used. - # Optional. - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ProximitybeaconV1beta1::Beacon] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ProximitybeaconV1beta1::Beacon] - # - # @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 register_beacon(beacon_object = nil, project_id: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1beta1/beacons:register', options) - command.request_representation = Google::Apis::ProximitybeaconV1beta1::Beacon::Representation - command.request_object = beacon_object - command.response_representation = Google::Apis::ProximitybeaconV1beta1::Beacon::Representation - command.response_class = Google::Apis::ProximitybeaconV1beta1::Beacon - command.query['projectId'] = project_id unless project_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Activates a beacon. A beacon that is active will return information - # and attachment data when queried via `beaconinfo.getforobserved`. - # Calling this method on an already active beacon will do nothing (but - # will return a successful response code). - # Authenticate using an [OAuth access token](https://developers.google.com/ - # identity/protocols/OAuth2) - # from a signed-in user with **Is owner** or **Can edit** permissions in the - # Google Developers Console project. + # from a signed-in user with **viewer**, **Is owner** or **Can edit** + # permissions in the Google Developers Console project. # @param [String] beacon_name - # Beacon that should be activated. A beacon name has the format - # "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by - # the beacon and N is a code for the beacon's type. Possible values are - # `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` - # for AltBeacon. For Eddystone-EID beacons, you may use either the - # current EID or the beacon's "stable" UID. - # Required. + # Beacon that the diagnostics are for. + # @param [Fixnum] page_size + # Specifies the maximum number of results to return. Defaults to + # 10. Maximum 1000. Optional. + # @param [String] alert_filter + # Requests only beacons that have the given alert. For example, to find + # beacons that have low batteries use `alert_filter=LOW_BATTERY`. # @param [String] project_id - # The project id of the beacon to activate. If the project id is not - # specified then the project making the request is used. The project id - # must match the project that owns the beacon. - # Optional. + # Requests only diagnostic records for the given project id. If not set, + # then the project making the request will be used for looking up + # diagnostic records. Optional. + # @param [String] page_token + # Requests results that occur after the `page_token`, obtained from the + # response to a previous request. Optional. # @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. @@ -589,20 +561,23 @@ module Google # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ProximitybeaconV1beta1::Empty] parsed result object + # @yieldparam result [Google::Apis::ProximitybeaconV1beta1::ListDiagnosticsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::ProximitybeaconV1beta1::Empty] + # @return [Google::Apis::ProximitybeaconV1beta1::ListDiagnosticsResponse] # # @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 activate_beacon(beacon_name, project_id: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1beta1/{+beaconName}:activate', options) - command.response_representation = Google::Apis::ProximitybeaconV1beta1::Empty::Representation - command.response_class = Google::Apis::ProximitybeaconV1beta1::Empty + def list_beacon_diagnostics(beacon_name, page_size: nil, alert_filter: nil, project_id: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+beaconName}/diagnostics', options) + command.response_representation = Google::Apis::ProximitybeaconV1beta1::ListDiagnosticsResponse::Representation + command.response_class = Google::Apis::ProximitybeaconV1beta1::ListDiagnosticsResponse command.params['beaconName'] = beacon_name unless beacon_name.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['alertFilter'] = alert_filter unless alert_filter.nil? command.query['projectId'] = project_id unless project_id.nil? + command.query['pageToken'] = page_token unless page_token.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) @@ -791,6 +766,11 @@ module Google # for AltBeacon. For Eddystone-EID beacons, you may use either the # current EID or the beacon's "stable" UID. # Required. + # @param [String] namespaced_type + # Specifies the namespace and type of attachments to delete in + # `namespace/type` format. Accepts `*/*` to specify + # "all types in all namespaces". + # Optional. # @param [String] project_id # The project id to delete beacon attachments under. This field can be # used when "*" is specified to mean all attachment namespaces. Projects @@ -798,11 +778,6 @@ module Google # specified and the projectId string is empty, then the project # making the request is used. # Optional. - # @param [String] namespaced_type - # Specifies the namespace and type of attachments to delete in - # `namespace/type` format. Accepts `*/*` to specify - # "all types in all namespaces". - # Optional. # @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. @@ -820,65 +795,12 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def batch_beacon_attachment_delete(beacon_name, project_id: nil, namespaced_type: nil, quota_user: nil, fields: nil, options: nil, &block) + def batch_beacon_attachment_delete(beacon_name, namespaced_type: nil, project_id: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta1/{+beaconName}/attachments:batchDelete', options) command.response_representation = Google::Apis::ProximitybeaconV1beta1::DeleteAttachmentsResponse::Representation command.response_class = Google::Apis::ProximitybeaconV1beta1::DeleteAttachmentsResponse command.params['beaconName'] = beacon_name unless beacon_name.nil? - command.query['projectId'] = project_id unless project_id.nil? command.query['namespacedType'] = namespaced_type unless namespaced_type.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # List the diagnostics for a single beacon. You can also list diagnostics for - # all the beacons owned by your Google Developers Console project by using - # the beacon name `beacons/-`. - # Authenticate using an [OAuth access token](https://developers.google.com/ - # identity/protocols/OAuth2) - # from a signed-in user with **viewer**, **Is owner** or **Can edit** - # permissions in the Google Developers Console project. - # @param [String] beacon_name - # Beacon that the diagnostics are for. - # @param [String] page_token - # Requests results that occur after the `page_token`, obtained from the - # response to a previous request. Optional. - # @param [Fixnum] page_size - # Specifies the maximum number of results to return. Defaults to - # 10. Maximum 1000. Optional. - # @param [String] alert_filter - # Requests only beacons that have the given alert. For example, to find - # beacons that have low batteries use `alert_filter=LOW_BATTERY`. - # @param [String] project_id - # Requests only diagnostic records for the given project id. If not set, - # then the project making the request will be used for looking up - # diagnostic records. Optional. - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ProximitybeaconV1beta1::ListDiagnosticsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ProximitybeaconV1beta1::ListDiagnosticsResponse] - # - # @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_beacon_diagnostics(beacon_name, page_token: nil, page_size: nil, alert_filter: nil, project_id: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1beta1/{+beaconName}/diagnostics', options) - command.response_representation = Google::Apis::ProximitybeaconV1beta1::ListDiagnosticsResponse::Representation - command.response_class = Google::Apis::ProximitybeaconV1beta1::ListDiagnosticsResponse - command.params['beaconName'] = beacon_name unless beacon_name.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['alertFilter'] = alert_filter unless alert_filter.nil? command.query['projectId'] = project_id unless project_id.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? @@ -918,12 +840,90 @@ module Google command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end + + # Lists all attachment namespaces owned by your Google Developers Console + # project. Attachment data associated with a beacon must include a + # namespaced type, and the namespace must be owned by your project. + # Authenticate using an [OAuth access token](https://developers.google.com/ + # identity/protocols/OAuth2) + # from a signed-in user with **viewer**, **Is owner** or **Can edit** + # permissions in the Google Developers Console project. + # @param [String] project_id + # The project id to list namespaces under. + # Optional. + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ProximitybeaconV1beta1::ListNamespacesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProximitybeaconV1beta1::ListNamespacesResponse] + # + # @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_namespaces(project_id: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/namespaces', options) + command.response_representation = Google::Apis::ProximitybeaconV1beta1::ListNamespacesResponse::Representation + command.response_class = Google::Apis::ProximitybeaconV1beta1::ListNamespacesResponse + command.query['projectId'] = project_id unless project_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Updates the information about the specified namespace. Only the namespace + # visibility can be updated. + # @param [String] namespace_name + # Resource name of this namespace. Namespaces names have the format: + # namespaces/namespace. + # @param [Google::Apis::ProximitybeaconV1beta1::Namespace] namespace_object + # @param [String] project_id + # The project id of the namespace to update. If the project id is not + # specified then the project making the request is used. The project id + # must match the project that owns the beacon. + # Optional. + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ProximitybeaconV1beta1::Namespace] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProximitybeaconV1beta1::Namespace] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_namespace(namespace_name, namespace_object = nil, project_id: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:put, 'v1beta1/{+namespaceName}', options) + command.request_representation = Google::Apis::ProximitybeaconV1beta1::Namespace::Representation + command.request_object = namespace_object + command.response_representation = Google::Apis::ProximitybeaconV1beta1::Namespace::Representation + command.response_class = Google::Apis::ProximitybeaconV1beta1::Namespace + command.params['namespaceName'] = namespace_name unless namespace_name.nil? + command.query['projectId'] = project_id unless project_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end protected def apply_command_defaults(command) - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['key'] = key unless key.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? end end end diff --git a/generated/google/apis/pubsub_v1.rb b/generated/google/apis/pubsub_v1.rb index 8281dc628..23c58c173 100644 --- a/generated/google/apis/pubsub_v1.rb +++ b/generated/google/apis/pubsub_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/pubsub/docs module PubsubV1 VERSION = 'V1' - REVISION = '20170418' + REVISION = '20170502' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/pubsub_v1/classes.rb b/generated/google/apis/pubsub_v1/classes.rb index 231318881..5351963c5 100644 --- a/generated/google/apis/pubsub_v1/classes.rb +++ b/generated/google/apis/pubsub_v1/classes.rb @@ -22,6 +22,184 @@ module Google module Apis module PubsubV1 + # Request for the ModifyAckDeadline method. + class ModifyAckDeadlineRequest + include Google::Apis::Core::Hashable + + # List of acknowledgment IDs. + # Corresponds to the JSON property `ackIds` + # @return [Array] + attr_accessor :ack_ids + + # The new ack deadline with respect to the time this request was sent to + # the Pub/Sub system. For example, if the value is 10, the new + # ack deadline will expire 10 seconds after the `ModifyAckDeadline` call + # was made. Specifying zero may immediately make the message available for + # another pull request. + # The minimum deadline you can specify is 0 seconds. + # The maximum deadline you can specify is 600 seconds (10 minutes). + # Corresponds to the JSON property `ackDeadlineSeconds` + # @return [Fixnum] + attr_accessor :ack_deadline_seconds + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @ack_ids = args[:ack_ids] if args.key?(:ack_ids) + @ack_deadline_seconds = args[:ack_deadline_seconds] if args.key?(:ack_deadline_seconds) + 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). + # Corresponds to the JSON property `policy` + # @return [Google::Apis::PubsubV1::Policy] + attr_accessor :policy + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @policy = args[:policy] if args.key?(:policy) + end + end + + # A message data and its attributes. The message payload must not be empty; + # it must contain either a non-empty data field, or at least one attribute. + class Message + include Google::Apis::Core::Hashable + + # Optional attributes for this message. + # Corresponds to the JSON property `attributes` + # @return [Hash] + attr_accessor :attributes + + # ID of this message, assigned by the server when the message is published. + # Guaranteed to be unique within the topic. This value may be read by a + # subscriber that receives a `PubsubMessage` via a `Pull` call or a push + # delivery. It must not be populated by the publisher in a `Publish` call. + # Corresponds to the JSON property `messageId` + # @return [String] + attr_accessor :message_id + + # The time at which the message was published, populated by the server when + # it receives the `Publish` call. It must not be populated by the + # publisher in a `Publish` call. + # Corresponds to the JSON property `publishTime` + # @return [String] + attr_accessor :publish_time + + # The message payload. + # Corresponds to the JSON property `data` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :data + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @attributes = args[:attributes] if args.key?(:attributes) + @message_id = args[:message_id] if args.key?(:message_id) + @publish_time = args[:publish_time] if args.key?(:publish_time) + @data = args[:data] if args.key?(:data) + end + end + + # Request for the ModifyPushConfig method. + class ModifyPushConfigRequest + include Google::Apis::Core::Hashable + + # Configuration for a push delivery endpoint. + # Corresponds to the JSON property `pushConfig` + # @return [Google::Apis::PubsubV1::PushConfig] + attr_accessor :push_config + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @push_config = args[:push_config] if args.key?(:push_config) + 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] + 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 + # Request for the Acknowledge method. class AcknowledgeRequest include Google::Apis::Core::Hashable @@ -494,184 +672,6 @@ module Google @bindings = args[:bindings] if args.key?(:bindings) end end - - # Request for the ModifyAckDeadline method. - class ModifyAckDeadlineRequest - include Google::Apis::Core::Hashable - - # The new ack deadline with respect to the time this request was sent to - # the Pub/Sub system. For example, if the value is 10, the new - # ack deadline will expire 10 seconds after the `ModifyAckDeadline` call - # was made. Specifying zero may immediately make the message available for - # another pull request. - # The minimum deadline you can specify is 0 seconds. - # The maximum deadline you can specify is 600 seconds (10 minutes). - # Corresponds to the JSON property `ackDeadlineSeconds` - # @return [Fixnum] - attr_accessor :ack_deadline_seconds - - # List of acknowledgment IDs. - # Corresponds to the JSON property `ackIds` - # @return [Array] - attr_accessor :ack_ids - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @ack_deadline_seconds = args[:ack_deadline_seconds] if args.key?(:ack_deadline_seconds) - @ack_ids = args[:ack_ids] if args.key?(:ack_ids) - 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). - # Corresponds to the JSON property `policy` - # @return [Google::Apis::PubsubV1::Policy] - attr_accessor :policy - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @policy = args[:policy] if args.key?(:policy) - end - end - - # A message data and its attributes. The message payload must not be empty; - # it must contain either a non-empty data field, or at least one attribute. - class Message - include Google::Apis::Core::Hashable - - # Optional attributes for this message. - # Corresponds to the JSON property `attributes` - # @return [Hash] - attr_accessor :attributes - - # ID of this message, assigned by the server when the message is published. - # Guaranteed to be unique within the topic. This value may be read by a - # subscriber that receives a `PubsubMessage` via a `Pull` call or a push - # delivery. It must not be populated by the publisher in a `Publish` call. - # Corresponds to the JSON property `messageId` - # @return [String] - attr_accessor :message_id - - # The time at which the message was published, populated by the server when - # it receives the `Publish` call. It must not be populated by the - # publisher in a `Publish` call. - # Corresponds to the JSON property `publishTime` - # @return [String] - attr_accessor :publish_time - - # The message payload. - # Corresponds to the JSON property `data` - # NOTE: Values are automatically base64 encoded/decoded in the client library. - # @return [String] - attr_accessor :data - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @attributes = args[:attributes] if args.key?(:attributes) - @message_id = args[:message_id] if args.key?(:message_id) - @publish_time = args[:publish_time] if args.key?(:publish_time) - @data = args[:data] if args.key?(:data) - end - end - - # Request for the ModifyPushConfig method. - class ModifyPushConfigRequest - include Google::Apis::Core::Hashable - - # Configuration for a push delivery endpoint. - # Corresponds to the JSON property `pushConfig` - # @return [Google::Apis::PubsubV1::PushConfig] - attr_accessor :push_config - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @push_config = args[:push_config] if args.key?(:push_config) - 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] - 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 end end end diff --git a/generated/google/apis/pubsub_v1/representations.rb b/generated/google/apis/pubsub_v1/representations.rb index 88b023def..f00abb0ba 100644 --- a/generated/google/apis/pubsub_v1/representations.rb +++ b/generated/google/apis/pubsub_v1/representations.rb @@ -22,6 +22,36 @@ module Google module Apis module PubsubV1 + class ModifyAckDeadlineRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SetIamPolicyRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Message + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ModifyPushConfigRequest + 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 AcknowledgeRequest class Representation < Google::Apis::Core::JsonRepresentation; end @@ -119,33 +149,45 @@ module Google end class ModifyAckDeadlineRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :ack_ids, as: 'ackIds' + property :ack_deadline_seconds, as: 'ackDeadlineSeconds' + end end class SetIamPolicyRequest - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :policy, as: 'policy', class: Google::Apis::PubsubV1::Policy, decorator: Google::Apis::PubsubV1::Policy::Representation - include Google::Apis::Core::JsonObjectSupport + end end class Message - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + hash :attributes, as: 'attributes' + property :message_id, as: 'messageId' + property :publish_time, as: 'publishTime' + property :data, :base64 => true, as: 'data' + end end class ModifyPushConfigRequest - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :push_config, as: 'pushConfig', class: Google::Apis::PubsubV1::PushConfig, decorator: Google::Apis::PubsubV1::PushConfig::Representation - include Google::Apis::Core::JsonObjectSupport + end end class Binding - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :members, as: 'members' + property :role, as: 'role' + end end class AcknowledgeRequest @@ -276,48 +318,6 @@ module Google end end - - class ModifyAckDeadlineRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :ack_deadline_seconds, as: 'ackDeadlineSeconds' - collection :ack_ids, as: 'ackIds' - end - end - - class SetIamPolicyRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :policy, as: 'policy', class: Google::Apis::PubsubV1::Policy, decorator: Google::Apis::PubsubV1::Policy::Representation - - end - end - - class Message - # @private - class Representation < Google::Apis::Core::JsonRepresentation - hash :attributes, as: 'attributes' - property :message_id, as: 'messageId' - property :publish_time, as: 'publishTime' - property :data, :base64 => true, as: 'data' - end - end - - class ModifyPushConfigRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :push_config, as: 'pushConfig', class: Google::Apis::PubsubV1::PushConfig, decorator: Google::Apis::PubsubV1::PushConfig::Representation - - end - end - - class Binding - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :members, as: 'members' - property :role, as: 'role' - end - end end end end diff --git a/generated/google/apis/pubsub_v1/service.rb b/generated/google/apis/pubsub_v1/service.rb index 3b2751957..ee1bc6550 100644 --- a/generated/google/apis/pubsub_v1/service.rb +++ b/generated/google/apis/pubsub_v1/service.rb @@ -47,6 +47,331 @@ module Google @batch_path = 'batch' end + # Gets the configuration of a topic. + # @param [String] topic + # The name of the topic to get. + # Format is `projects/`project`/topics/`topic``. + # @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::PubsubV1::Topic] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::PubsubV1::Topic] + # + # @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_topic(topic, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+topic}', options) + command.response_representation = Google::Apis::PubsubV1::Topic::Representation + command.response_class = Google::Apis::PubsubV1::Topic + command.params['topic'] = topic unless topic.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic + # does not exist. The message payload must not be empty; it must contain + # either a non-empty data field, or at least one attribute. + # @param [String] topic + # The messages in the request will be published on this topic. + # Format is `projects/`project`/topics/`topic``. + # @param [Google::Apis::PubsubV1::PublishRequest] publish_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::PubsubV1::PublishResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::PubsubV1::PublishResponse] + # + # @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 publish_topic(topic, publish_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+topic}:publish', options) + command.request_representation = Google::Apis::PubsubV1::PublishRequest::Representation + command.request_object = publish_request_object + command.response_representation = Google::Apis::PubsubV1::PublishResponse::Representation + command.response_class = Google::Apis::PubsubV1::PublishResponse + command.params['topic'] = topic unless topic.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Returns permissions that a caller has on the specified resource. + # If the resource does not exist, this will return an empty set of + # permissions, not a NOT_FOUND error. + # Note: This operation is designed to be used for building permission-aware + # UIs and command-line tools, not for authorization checking. This operation + # may "fail open" without warning. + # @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::PubsubV1::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::PubsubV1::TestIamPermissionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::PubsubV1::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_topic_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::PubsubV1::TestIamPermissionsRequest::Representation + command.request_object = test_iam_permissions_request_object + command.response_representation = Google::Apis::PubsubV1::TestIamPermissionsResponse::Representation + command.response_class = Google::Apis::PubsubV1::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 + + # Deletes the topic with the given name. Returns `NOT_FOUND` if the topic + # does not exist. After a topic is deleted, a new topic may be created with + # the same name; this is an entirely new topic with none of the old + # configuration or subscriptions. Existing subscriptions to this topic are + # not deleted, but their `topic` field is set to `_deleted-topic_`. + # @param [String] topic + # Name of the topic to delete. + # Format is `projects/`project`/topics/`topic``. + # @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::PubsubV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::PubsubV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_topic(topic, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/{+topic}', options) + command.response_representation = Google::Apis::PubsubV1::Empty::Representation + command.response_class = Google::Apis::PubsubV1::Empty + command.params['topic'] = topic unless topic.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 matching topics. + # @param [String] project + # The name of the cloud project that topics belong to. + # Format is `projects/`project``. + # @param [Fixnum] page_size + # Maximum number of topics to return. + # @param [String] page_token + # The value returned by the last `ListTopicsResponse`; indicates that this is + # a continuation of a prior `ListTopics` call, and that the system should + # return the next page of data. + # @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::PubsubV1::ListTopicsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::PubsubV1::ListTopicsResponse] + # + # @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_topics(project, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+project}/topics', options) + command.response_representation = Google::Apis::PubsubV1::ListTopicsResponse::Representation + command.response_class = Google::Apis::PubsubV1::ListTopicsResponse + command.params['project'] = project unless project.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates the given topic with the given name. + # @param [String] name + # The name of the topic. It must have the format + # `"projects/`project`/topics/`topic`"`. ``topic`` must start with a letter, + # and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), + # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent + # signs (`%`). It must be between 3 and 255 characters in length, and it + # must not start with `"goog"`. + # @param [Google::Apis::PubsubV1::Topic] topic_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::PubsubV1::Topic] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::PubsubV1::Topic] + # + # @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_topic(name, topic_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:put, 'v1/{+name}', options) + command.request_representation = Google::Apis::PubsubV1::Topic::Representation + command.request_object = topic_object + command.response_representation = Google::Apis::PubsubV1::Topic::Representation + command.response_class = Google::Apis::PubsubV1::Topic + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Sets the access control policy on the specified resource. Replaces any + # existing policy. + # @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::PubsubV1::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::PubsubV1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::PubsubV1::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_topic_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::PubsubV1::SetIamPolicyRequest::Representation + command.request_object = set_iam_policy_request_object + command.response_representation = Google::Apis::PubsubV1::Policy::Representation + command.response_class = Google::Apis::PubsubV1::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 + + # Gets the access control policy for a resource. + # Returns an empty policy if the resource exists and does not have a policy + # set. + # @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::PubsubV1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::PubsubV1::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_project_topic_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::PubsubV1::Policy::Representation + command.response_class = Google::Apis::PubsubV1::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 name of the subscriptions for this topic. + # @param [String] topic + # The name of the topic that subscriptions are attached to. + # Format is `projects/`project`/topics/`topic``. + # @param [String] page_token + # The value returned by the last `ListTopicSubscriptionsResponse`; indicates + # that this is a continuation of a prior `ListTopicSubscriptions` call, and + # that the system should return the next page of data. + # @param [Fixnum] page_size + # Maximum number of subscription names to return. + # @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::PubsubV1::ListTopicSubscriptionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::PubsubV1::ListTopicSubscriptionsResponse] + # + # @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_topic_subscriptions(topic, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+topic}/subscriptions', options) + command.response_representation = Google::Apis::PubsubV1::ListTopicSubscriptionsResponse::Representation + command.response_class = Google::Apis::PubsubV1::ListTopicSubscriptionsResponse + command.params['topic'] = topic unless topic.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Returns permissions that a caller has on the specified resource. # If the resource does not exist, this will return an empty set of # permissions, not a NOT_FOUND error. @@ -235,41 +560,6 @@ module Google execute_or_queue_command(command, &block) end - # Sets the access control policy on the specified resource. Replaces any - # existing policy. - # @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::PubsubV1::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::PubsubV1::Policy] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PubsubV1::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_subscription_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::PubsubV1::SetIamPolicyRequest::Representation - command.request_object = set_iam_policy_request_object - command.response_representation = Google::Apis::PubsubV1::Policy::Representation - command.response_class = Google::Apis::PubsubV1::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 - # Creates a subscription to a given topic. # If the subscription already exists, returns `ALREADY_EXISTS`. # If the corresponding topic doesn't exist, returns `NOT_FOUND`. @@ -316,6 +606,41 @@ module Google execute_or_queue_command(command, &block) end + # Sets the access control policy on the specified resource. Replaces any + # existing policy. + # @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::PubsubV1::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::PubsubV1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::PubsubV1::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_subscription_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::PubsubV1::SetIamPolicyRequest::Representation + command.request_object = set_iam_policy_request_object + command.response_representation = Google::Apis::PubsubV1::Policy::Representation + command.response_class = Google::Apis::PubsubV1::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 + # Acknowledges the messages associated with the `ack_ids` in the # `AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages # from the subscription. @@ -457,41 +782,6 @@ module Google execute_or_queue_command(command, &block) end - # Sets the access control policy on the specified resource. Replaces any - # existing policy. - # @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::PubsubV1::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::PubsubV1::Policy] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PubsubV1::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_snapshot_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::PubsubV1::SetIamPolicyRequest::Representation - command.request_object = set_iam_policy_request_object - command.response_representation = Google::Apis::PubsubV1::Policy::Representation - command.response_class = Google::Apis::PubsubV1::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 - # Returns permissions that a caller has on the specified resource. # If the resource does not exist, this will return an empty set of # permissions, not a NOT_FOUND error. @@ -564,219 +854,6 @@ module Google execute_or_queue_command(command, &block) end - # Gets the access control policy for a resource. - # Returns an empty policy if the resource exists and does not have a policy - # set. - # @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::PubsubV1::Policy] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PubsubV1::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_project_topic_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::PubsubV1::Policy::Representation - command.response_class = Google::Apis::PubsubV1::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 - - # Gets the configuration of a topic. - # @param [String] topic - # The name of the topic to get. - # Format is `projects/`project`/topics/`topic``. - # @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::PubsubV1::Topic] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PubsubV1::Topic] - # - # @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_topic(topic, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/{+topic}', options) - command.response_representation = Google::Apis::PubsubV1::Topic::Representation - command.response_class = Google::Apis::PubsubV1::Topic - command.params['topic'] = topic unless topic.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic - # does not exist. The message payload must not be empty; it must contain - # either a non-empty data field, or at least one attribute. - # @param [String] topic - # The messages in the request will be published on this topic. - # Format is `projects/`project`/topics/`topic``. - # @param [Google::Apis::PubsubV1::PublishRequest] publish_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::PubsubV1::PublishResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PubsubV1::PublishResponse] - # - # @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 publish_topic(topic, publish_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+topic}:publish', options) - command.request_representation = Google::Apis::PubsubV1::PublishRequest::Representation - command.request_object = publish_request_object - command.response_representation = Google::Apis::PubsubV1::PublishResponse::Representation - command.response_class = Google::Apis::PubsubV1::PublishResponse - command.params['topic'] = topic unless topic.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Returns permissions that a caller has on the specified resource. - # If the resource does not exist, this will return an empty set of - # permissions, not a NOT_FOUND error. - # Note: This operation is designed to be used for building permission-aware - # UIs and command-line tools, not for authorization checking. This operation - # may "fail open" without warning. - # @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::PubsubV1::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::PubsubV1::TestIamPermissionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PubsubV1::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_topic_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::PubsubV1::TestIamPermissionsRequest::Representation - command.request_object = test_iam_permissions_request_object - command.response_representation = Google::Apis::PubsubV1::TestIamPermissionsResponse::Representation - command.response_class = Google::Apis::PubsubV1::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 - - # Deletes the topic with the given name. Returns `NOT_FOUND` if the topic - # does not exist. After a topic is deleted, a new topic may be created with - # the same name; this is an entirely new topic with none of the old - # configuration or subscriptions. Existing subscriptions to this topic are - # not deleted, but their `topic` field is set to `_deleted-topic_`. - # @param [String] topic - # Name of the topic to delete. - # Format is `projects/`project`/topics/`topic``. - # @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::PubsubV1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PubsubV1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_topic(topic, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1/{+topic}', options) - command.response_representation = Google::Apis::PubsubV1::Empty::Representation - command.response_class = Google::Apis::PubsubV1::Empty - command.params['topic'] = topic unless topic.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 matching topics. - # @param [String] project - # The name of the cloud project that topics belong to. - # Format is `projects/`project``. - # @param [String] page_token - # The value returned by the last `ListTopicsResponse`; indicates that this is - # a continuation of a prior `ListTopics` call, and that the system should - # return the next page of data. - # @param [Fixnum] page_size - # Maximum number of topics to return. - # @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::PubsubV1::ListTopicsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PubsubV1::ListTopicsResponse] - # - # @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_topics(project, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/{+project}/topics', options) - command.response_representation = Google::Apis::PubsubV1::ListTopicsResponse::Representation - command.response_class = Google::Apis::PubsubV1::ListTopicsResponse - command.params['project'] = project unless project.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['pageSize'] = page_size unless page_size.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 on the specified resource. Replaces any # existing policy. # @param [String] resource @@ -800,7 +877,7 @@ 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 set_topic_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def set_snapshot_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::PubsubV1::SetIamPolicyRequest::Representation command.request_object = set_iam_policy_request_object @@ -811,83 +888,6 @@ module Google command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end - - # Creates the given topic with the given name. - # @param [String] name - # The name of the topic. It must have the format - # `"projects/`project`/topics/`topic`"`. ``topic`` must start with a letter, - # and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), - # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent - # signs (`%`). It must be between 3 and 255 characters in length, and it - # must not start with `"goog"`. - # @param [Google::Apis::PubsubV1::Topic] topic_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::PubsubV1::Topic] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PubsubV1::Topic] - # - # @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_topic(name, topic_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:put, 'v1/{+name}', options) - command.request_representation = Google::Apis::PubsubV1::Topic::Representation - command.request_object = topic_object - command.response_representation = Google::Apis::PubsubV1::Topic::Representation - command.response_class = Google::Apis::PubsubV1::Topic - command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Lists the name of the subscriptions for this topic. - # @param [String] topic - # The name of the topic that subscriptions are attached to. - # Format is `projects/`project`/topics/`topic``. - # @param [String] page_token - # The value returned by the last `ListTopicSubscriptionsResponse`; indicates - # that this is a continuation of a prior `ListTopicSubscriptions` call, and - # that the system should return the next page of data. - # @param [Fixnum] page_size - # Maximum number of subscription names to return. - # @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::PubsubV1::ListTopicSubscriptionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PubsubV1::ListTopicSubscriptionsResponse] - # - # @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_topic_subscriptions(topic, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/{+topic}/subscriptions', options) - command.response_representation = Google::Apis::PubsubV1::ListTopicSubscriptionsResponse::Representation - command.response_class = Google::Apis::PubsubV1::ListTopicSubscriptionsResponse - command.params['topic'] = topic unless topic.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end protected diff --git a/generated/google/apis/runtimeconfig_v1.rb b/generated/google/apis/runtimeconfig_v1.rb index c87089d9f..cadd221d8 100644 --- a/generated/google/apis/runtimeconfig_v1.rb +++ b/generated/google/apis/runtimeconfig_v1.rb @@ -28,7 +28,7 @@ module Google # @see https://cloud.google.com/deployment-manager/runtime-configurator/ module RuntimeconfigV1 VERSION = 'V1' - REVISION = '20170429' + REVISION = '20170522' # Manage your Google Cloud Platform services' runtime configuration AUTH_CLOUDRUNTIMECONFIG = 'https://www.googleapis.com/auth/cloudruntimeconfig' diff --git a/generated/google/apis/runtimeconfig_v1/classes.rb b/generated/google/apis/runtimeconfig_v1/classes.rb index 5e785be62..a3c4ae4af 100644 --- a/generated/google/apis/runtimeconfig_v1/classes.rb +++ b/generated/google/apis/runtimeconfig_v1/classes.rb @@ -49,7 +49,7 @@ module Google # error message is needed, put the localized message in the error details or # localize it in the client. The optional error details may contain arbitrary # information about the error. There is a predefined set of error detail types - # in the package `google.rpc` which can be used for common error conditions. + # in the package `google.rpc` that can be used for common error conditions. # # Language mapping # The `Status` message is the logical representation of the error model, but it # is not necessarily the actual wire format. When the `Status` message is @@ -65,7 +65,7 @@ module Google # it may embed the `Status` in the normal response to indicate the partial # errors. # - Workflow errors. A typical workflow has multiple steps. Each step may - # have a `Status` message for error reporting purpose. + # have a `Status` message for error reporting. # - Batch operations. If a client uses batch request and batch response, the # `Status` message should be used directly inside batch response, one for # each error sub-response. @@ -77,6 +77,12 @@ module Google class Status include Google::Apis::Core::Hashable + # A list of messages that carry the error details. There will be a + # common set of message types for APIs to use. + # Corresponds to the JSON property `details` + # @return [Array>] + attr_accessor :details + # The status code, which should be an enum value of google.rpc.Code. # Corresponds to the JSON property `code` # @return [Fixnum] @@ -89,21 +95,15 @@ module Google # @return [String] attr_accessor :message - # A list of messages that carry the error details. There will be a - # common set of message types for APIs to use. - # Corresponds to the JSON property `details` - # @return [Array>] - attr_accessor :details - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @details = args[:details] if args.key?(:details) @code = args[:code] if args.key?(:code) @message = args[:message] if args.key?(:message) - @details = args[:details] if args.key?(:details) end end @@ -137,14 +137,6 @@ module Google class Operation include Google::Apis::Core::Hashable - # If the value is `false`, it means the operation is still in progress. - # If true, the operation is completed, and either `error` or `response` is - # available. - # Corresponds to the JSON property `done` - # @return [Boolean] - attr_accessor :done - alias_method :done?, :done - # The normal response of the operation in case of success. If the original # method returns no data on success, such as `Delete`, the response is # `google.protobuf.Empty`. If the original method is standard @@ -178,7 +170,7 @@ module Google # error message is needed, put the localized message in the error details or # localize it in the client. The optional error details may contain arbitrary # information about the error. There is a predefined set of error detail types - # in the package `google.rpc` which can be used for common error conditions. + # in the package `google.rpc` that can be used for common error conditions. # # Language mapping # The `Status` message is the logical representation of the error model, but it # is not necessarily the actual wire format. When the `Status` message is @@ -194,7 +186,7 @@ module Google # it may embed the `Status` in the normal response to indicate the partial # errors. # - Workflow errors. A typical workflow has multiple steps. Each step may - # have a `Status` message for error reporting purpose. + # have a `Status` message for error reporting. # - Batch operations. If a client uses batch request and batch response, the # `Status` message should be used directly inside batch response, one for # each error sub-response. @@ -215,17 +207,25 @@ module Google # @return [Hash] attr_accessor :metadata + # If the value is `false`, it means the operation is still in progress. + # If true, the operation is completed, and either `error` or `response` is + # available. + # Corresponds to the JSON property `done` + # @return [Boolean] + attr_accessor :done + alias_method :done?, :done + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @done = args[:done] if args.key?(:done) @response = args[:response] if args.key?(:response) @name = args[:name] if args.key?(:name) @error = args[:error] if args.key?(:error) @metadata = args[:metadata] if args.key?(:metadata) + @done = args[:done] if args.key?(:done) end end diff --git a/generated/google/apis/runtimeconfig_v1/representations.rb b/generated/google/apis/runtimeconfig_v1/representations.rb index 708a38191..34e712b87 100644 --- a/generated/google/apis/runtimeconfig_v1/representations.rb +++ b/generated/google/apis/runtimeconfig_v1/representations.rb @@ -61,9 +61,9 @@ module Google class Status # @private class Representation < Google::Apis::Core::JsonRepresentation + collection :details, as: 'details' property :code, as: 'code' property :message, as: 'message' - collection :details, as: 'details' end end @@ -79,12 +79,12 @@ module Google class Operation # @private class Representation < Google::Apis::Core::JsonRepresentation - property :done, as: 'done' hash :response, as: 'response' property :name, as: 'name' property :error, as: 'error', class: Google::Apis::RuntimeconfigV1::Status, decorator: Google::Apis::RuntimeconfigV1::Status::Representation hash :metadata, as: 'metadata' + property :done, as: 'done' end end diff --git a/generated/google/apis/runtimeconfig_v1/service.rb b/generated/google/apis/runtimeconfig_v1/service.rb index ea98da615..043149aef 100644 --- a/generated/google/apis/runtimeconfig_v1/service.rb +++ b/generated/google/apis/runtimeconfig_v1/service.rb @@ -127,16 +127,21 @@ module Google # Lists operations that match the specified filter in the request. If the # server doesn't support this method, it returns `UNIMPLEMENTED`. - # NOTE: the `name` binding below allows API services to override the binding - # to use different resource name schemes, such as `users/*/operations`. + # NOTE: the `name` binding allows API services to override the binding + # to use different resource name schemes, such as `users/*/operations`. To + # override the binding, API services can add a binding such as + # `"/v1/`name=users/*`/operations"` to their service configuration. + # For backwards compatibility, the default name includes the operations + # collection id, however overriding users must ensure the name binding + # is the parent resource, without the operations collection id. # @param [String] name - # The name of the operation collection. + # The name of the operation's parent resource. + # @param [Fixnum] page_size + # The standard list page size. # @param [String] filter # The standard list filter. # @param [String] page_token # The standard list page token. - # @param [Fixnum] page_size - # The standard list page size. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -154,14 +159,14 @@ 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_operations(name, filter: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_operations(name, page_size: nil, filter: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', options) command.response_representation = Google::Apis::RuntimeconfigV1::ListOperationsResponse::Representation command.response_class = Google::Apis::RuntimeconfigV1::ListOperationsResponse command.params['name'] = name unless name.nil? + command.query['pageSize'] = page_size unless page_size.nil? command.query['filter'] = filter unless filter.nil? command.query['pageToken'] = page_token unless page_token.nil? - command.query['pageSize'] = page_size unless page_size.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) diff --git a/generated/google/apis/script_v1.rb b/generated/google/apis/script_v1.rb index 86405d5bb..b90eb9c75 100644 --- a/generated/google/apis/script_v1.rb +++ b/generated/google/apis/script_v1.rb @@ -25,22 +25,7 @@ module Google # @see https://developers.google.com/apps-script/execution/rest/v1/scripts/run module ScriptV1 VERSION = 'V1' - REVISION = '20170503' - - # View and manage your Google Groups - AUTH_GROUPS = 'https://www.googleapis.com/auth/groups' - - # View and manage forms that this application has been installed in - AUTH_FORMS_CURRENTONLY = 'https://www.googleapis.com/auth/forms.currentonly' - - # View and manage the files in your Google Drive - AUTH_DRIVE = 'https://www.googleapis.com/auth/drive' - - # View and manage the provisioning of users on your domain - AUTH_ADMIN_DIRECTORY_USER = 'https://www.googleapis.com/auth/admin.directory.user' - - # View and manage the provisioning of groups on your domain - AUTH_ADMIN_DIRECTORY_GROUP = 'https://www.googleapis.com/auth/admin.directory.group' + REVISION = '20170522' # View and manage your spreadsheets in Google Drive AUTH_SPREADSHEETS = 'https://www.googleapis.com/auth/spreadsheets' @@ -48,6 +33,12 @@ module Google # Read, send, delete, and manage your email AUTH_SCOPE = 'https://mail.google.com/' + # View and manage the provisioning of groups on your domain + AUTH_ADMIN_DIRECTORY_GROUP = 'https://www.googleapis.com/auth/admin.directory.group' + + # View and manage the provisioning of users on your domain + AUTH_ADMIN_DIRECTORY_USER = 'https://www.googleapis.com/auth/admin.directory.user' + # View and manage your forms in Google Drive AUTH_FORMS = 'https://www.googleapis.com/auth/forms' @@ -59,6 +50,15 @@ module Google # Manage your calendars CALENDAR_FEEDS = 'https://www.google.com/calendar/feeds' + + # View and manage your Google Groups + AUTH_GROUPS = 'https://www.googleapis.com/auth/groups' + + # View and manage forms that this application has been installed in + AUTH_FORMS_CURRENTONLY = 'https://www.googleapis.com/auth/forms.currentonly' + + # View and manage the files in your Google Drive + AUTH_DRIVE = 'https://www.googleapis.com/auth/drive' end end end diff --git a/generated/google/apis/script_v1/classes.rb b/generated/google/apis/script_v1/classes.rb index d396feae0..e29a6aacd 100644 --- a/generated/google/apis/script_v1/classes.rb +++ b/generated/google/apis/script_v1/classes.rb @@ -22,11 +22,109 @@ module Google module Apis module ScriptV1 + # If a `run` call succeeds but the script function (or Apps Script itself) + # throws an exception, the response body's `error` field will contain this ` + # Status` object. + class Status + include Google::Apis::Core::Hashable + + # An array that contains a single `ExecutionError` object that provides + # information about the nature of the error. + # Corresponds to the JSON property `details` + # @return [Array>] + attr_accessor :details + + # The status code. For this API, this value will always be 3, corresponding to + # an INVALID_ARGUMENT error. + # Corresponds to the JSON property `code` + # @return [Fixnum] + attr_accessor :code + + # A developer-facing error message, which is in English. Any user-facing error + # message is localized and sent in the [`google.rpc.Status.details`](google.rpc. + # Status.details) field, or localized by the client. + # Corresponds to the JSON property `message` + # @return [String] + attr_accessor :message + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @details = args[:details] if args.key?(:details) + @code = args[:code] if args.key?(:code) + @message = args[:message] if args.key?(:message) + end + end + + # A request to run the function in a script. The script is identified by the + # specified `script_id`. Executing a function on a script returns results + # based on the implementation of the script. + class ExecutionRequest + include Google::Apis::Core::Hashable + + # For Android add-ons only. An ID that represents the user's current session + # in the Android app for Google Docs or Sheets, included as extra data in the + # [`Intent`](https://developer.android.com/guide/components/intents-filters.html) + # that launches the add-on. When an Android add-on is run with a session + # state, it gains the privileges of a + # [bound](https://developers.google.com/apps-script/guides/bound) script — + # that is, it can access information like the user's current cursor position + # (in Docs) or selected cell (in Sheets). To retrieve the state, call + # `Intent.getStringExtra("com.google.android.apps.docs.addons.SessionState")`. + # Optional. + # Corresponds to the JSON property `sessionState` + # @return [String] + attr_accessor :session_state + + # The name of the function to execute in the given script. The name does not + # include parentheses or parameters. + # Corresponds to the JSON property `function` + # @return [String] + attr_accessor :function + + # If `true` and the user is an owner of the script, the script runs at the + # most recently saved version rather than the version deployed for use with + # the Execution API. Optional; default is `false`. + # Corresponds to the JSON property `devMode` + # @return [Boolean] + attr_accessor :dev_mode + alias_method :dev_mode?, :dev_mode + + # The parameters to be passed to the function being executed. The object type + # for each parameter should match the expected type in Apps Script. + # Parameters cannot be Apps Script-specific object types (such as a + # `Document` or a `Calendar`); they can only be primitive types such as + # `string`, `number`, `array`, `object`, or `boolean`. Optional. + # Corresponds to the JSON property `parameters` + # @return [Array] + attr_accessor :parameters + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @session_state = args[:session_state] if args.key?(:session_state) + @function = args[:function] if args.key?(:function) + @dev_mode = args[:dev_mode] if args.key?(:dev_mode) + @parameters = args[:parameters] if args.key?(:parameters) + end + end + # A request to retrieve the results from a collection of requests, # specified by the operation resource names. class JoinAsyncRequest include Google::Apis::Core::Hashable + # Timeout for information retrieval in milliseconds. + # Corresponds to the JSON property `timeout` + # @return [String] + attr_accessor :timeout + # The script id which specifies the script which all processes in the names # field must be from. # Corresponds to the JSON property `scriptId` @@ -39,20 +137,15 @@ module Google # @return [Array] attr_accessor :names - # Timeout for information retrieval in milliseconds. - # Corresponds to the JSON property `timeout` - # @return [String] - attr_accessor :timeout - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @timeout = args[:timeout] if args.key?(:timeout) @script_id = args[:script_id] if args.key?(:script_id) @names = args[:names] if args.key?(:names) - @timeout = args[:timeout] if args.key?(:timeout) end end @@ -101,6 +194,12 @@ module Google class Operation include Google::Apis::Core::Hashable + # This field is not used. + # Corresponds to the JSON property `done` + # @return [Boolean] + attr_accessor :done + alias_method :done?, :done + # If the script function returns successfully, this field will contain an ` # ExecutionResponse` object with the function's return value as the object's ` # result` field. @@ -125,23 +224,17 @@ module Google # @return [Hash] attr_accessor :metadata - # This field is not used. - # Corresponds to the JSON property `done` - # @return [Boolean] - attr_accessor :done - alias_method :done?, :done - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @done = args[:done] if args.key?(:done) @response = args[:response] if args.key?(:response) @name = args[:name] if args.key?(:name) @error = args[:error] if args.key?(:error) @metadata = args[:metadata] if args.key?(:metadata) - @done = args[:done] if args.key?(:done) end end @@ -201,12 +294,6 @@ module Google class ExecutionError include Google::Apis::Core::Hashable - # An array of objects that provide a stack trace through the script to show - # where the execution failed, with the deepest call first. - # Corresponds to the JSON property `scriptStackTraceElements` - # @return [Array] - attr_accessor :script_stack_trace_elements - # The error type, for example `TypeError` or `ReferenceError`. If the error # type is unavailable, this field is not included. # Corresponds to the JSON property `errorType` @@ -219,108 +306,21 @@ module Google # @return [String] attr_accessor :error_message + # An array of objects that provide a stack trace through the script to show + # where the execution failed, with the deepest call first. + # Corresponds to the JSON property `scriptStackTraceElements` + # @return [Array] + attr_accessor :script_stack_trace_elements + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @script_stack_trace_elements = args[:script_stack_trace_elements] if args.key?(:script_stack_trace_elements) @error_type = args[:error_type] if args.key?(:error_type) @error_message = args[:error_message] if args.key?(:error_message) - end - end - - # If a `run` call succeeds but the script function (or Apps Script itself) - # throws an exception, the response body's `error` field will contain this ` - # Status` object. - class Status - include Google::Apis::Core::Hashable - - # A developer-facing error message, which is in English. Any user-facing error - # message is localized and sent in the [`google.rpc.Status.details`](google.rpc. - # Status.details) field, or localized by the client. - # Corresponds to the JSON property `message` - # @return [String] - attr_accessor :message - - # An array that contains a single `ExecutionError` object that provides - # information about the nature of the error. - # Corresponds to the JSON property `details` - # @return [Array>] - attr_accessor :details - - # The status code. For this API, this value will always be 3, corresponding to - # an INVALID_ARGUMENT error. - # Corresponds to the JSON property `code` - # @return [Fixnum] - attr_accessor :code - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @message = args[:message] if args.key?(:message) - @details = args[:details] if args.key?(:details) - @code = args[:code] if args.key?(:code) - end - end - - # A request to run the function in a script. The script is identified by the - # specified `script_id`. Executing a function on a script returns results - # based on the implementation of the script. - class ExecutionRequest - include Google::Apis::Core::Hashable - - # The name of the function to execute in the given script. The name does not - # include parentheses or parameters. - # Corresponds to the JSON property `function` - # @return [String] - attr_accessor :function - - # If `true` and the user is an owner of the script, the script runs at the - # most recently saved version rather than the version deployed for use with - # the Execution API. Optional; default is `false`. - # Corresponds to the JSON property `devMode` - # @return [Boolean] - attr_accessor :dev_mode - alias_method :dev_mode?, :dev_mode - - # The parameters to be passed to the function being executed. The object type - # for each parameter should match the expected type in Apps Script. - # Parameters cannot be Apps Script-specific object types (such as a - # `Document` or a `Calendar`); they can only be primitive types such as - # `string`, `number`, `array`, `object`, or `boolean`. Optional. - # Corresponds to the JSON property `parameters` - # @return [Array] - attr_accessor :parameters - - # For Android add-ons only. An ID that represents the user's current session - # in the Android app for Google Docs or Sheets, included as extra data in the - # [`Intent`](https://developer.android.com/guide/components/intents-filters.html) - # that launches the add-on. When an Android add-on is run with a session - # state, it gains the privileges of a - # [bound](https://developers.google.com/apps-script/guides/bound) script — - # that is, it can access information like the user's current cursor position - # (in Docs) or selected cell (in Sheets). To retrieve the state, call - # `Intent.getStringExtra("com.google.android.apps.docs.addons.SessionState")`. - # Optional. - # Corresponds to the JSON property `sessionState` - # @return [String] - attr_accessor :session_state - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @function = args[:function] if args.key?(:function) - @dev_mode = args[:dev_mode] if args.key?(:dev_mode) - @parameters = args[:parameters] if args.key?(:parameters) - @session_state = args[:session_state] if args.key?(:session_state) + @script_stack_trace_elements = args[:script_stack_trace_elements] if args.key?(:script_stack_trace_elements) end end end diff --git a/generated/google/apis/script_v1/representations.rb b/generated/google/apis/script_v1/representations.rb index cc8e43b3a..8b9f4fe1b 100644 --- a/generated/google/apis/script_v1/representations.rb +++ b/generated/google/apis/script_v1/representations.rb @@ -22,6 +22,18 @@ module Google module Apis module ScriptV1 + class Status + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ExecutionRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class JoinAsyncRequest class Representation < Google::Apis::Core::JsonRepresentation; end @@ -59,23 +71,30 @@ module Google end class Status - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :details, as: 'details' + property :code, as: 'code' + property :message, as: 'message' + end end class ExecutionRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :session_state, as: 'sessionState' + property :function, as: 'function' + property :dev_mode, as: 'devMode' + collection :parameters, as: 'parameters' + end end class JoinAsyncRequest # @private class Representation < Google::Apis::Core::JsonRepresentation + property :timeout, as: 'timeout' property :script_id, as: 'scriptId' collection :names, as: 'names' - property :timeout, as: 'timeout' end end @@ -89,12 +108,12 @@ module Google class Operation # @private class Representation < Google::Apis::Core::JsonRepresentation + property :done, as: 'done' hash :response, as: 'response' property :name, as: 'name' property :error, as: 'error', class: Google::Apis::ScriptV1::Status, decorator: Google::Apis::ScriptV1::Status::Representation hash :metadata, as: 'metadata' - property :done, as: 'done' end end @@ -117,29 +136,10 @@ module Google class ExecutionError # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :script_stack_trace_elements, as: 'scriptStackTraceElements', class: Google::Apis::ScriptV1::ScriptStackTraceElement, decorator: Google::Apis::ScriptV1::ScriptStackTraceElement::Representation - property :error_type, as: 'errorType' property :error_message, as: 'errorMessage' - end - end + collection :script_stack_trace_elements, as: 'scriptStackTraceElements', class: Google::Apis::ScriptV1::ScriptStackTraceElement, decorator: Google::Apis::ScriptV1::ScriptStackTraceElement::Representation - class Status - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :message, as: 'message' - collection :details, as: 'details' - property :code, as: 'code' - end - end - - class ExecutionRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :function, as: 'function' - property :dev_mode, as: 'devMode' - collection :parameters, as: 'parameters' - property :session_state, as: 'sessionState' end end end diff --git a/generated/google/apis/script_v1/service.rb b/generated/google/apis/script_v1/service.rb index 4c9f7d998..009d3434b 100644 --- a/generated/google/apis/script_v1/service.rb +++ b/generated/google/apis/script_v1/service.rb @@ -59,11 +59,11 @@ module Google # The project key of the script to be executed. To find the project key, open # the project in the script editor and select **File > Project properties**. # @param [Google::Apis::ScriptV1::ExecutionRequest] execution_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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -76,15 +76,15 @@ 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 run_script(script_id, execution_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def run_script(script_id, execution_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/scripts/{scriptId}:run', options) command.request_representation = Google::Apis::ScriptV1::ExecutionRequest::Representation command.request_object = execution_request_object command.response_representation = Google::Apis::ScriptV1::Operation::Representation command.response_class = Google::Apis::ScriptV1::Operation command.params['scriptId'] = script_id unless script_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end diff --git a/generated/google/apis/searchconsole_v1.rb b/generated/google/apis/searchconsole_v1.rb index 296549eba..a222aea24 100644 --- a/generated/google/apis/searchconsole_v1.rb +++ b/generated/google/apis/searchconsole_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/webmaster-tools/search-console-api/ module SearchconsoleV1 VERSION = 'V1' - REVISION = '20170502' + REVISION = '20170523' end end end diff --git a/generated/google/apis/searchconsole_v1/classes.rb b/generated/google/apis/searchconsole_v1/classes.rb index 0faf635ea..34b1221b5 100644 --- a/generated/google/apis/searchconsole_v1/classes.rb +++ b/generated/google/apis/searchconsole_v1/classes.rb @@ -22,84 +22,6 @@ module Google module Apis module SearchconsoleV1 - # Final state of the test, including error details if necessary. - class TestStatus - include Google::Apis::Core::Hashable - - # Status of the test. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # Error details if applicable. - # Corresponds to the JSON property `details` - # @return [String] - attr_accessor :details - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @status = args[:status] if args.key?(:status) - @details = args[:details] if args.key?(:details) - end - end - - # Describe image data. - class Image - include Google::Apis::Core::Hashable - - # The mime-type of the image data. - # Corresponds to the JSON property `mimeType` - # @return [String] - attr_accessor :mime_type - - # Image data in format determined by the mime type. Currently, the format - # will always be "image/png", but this might change in the future. - # Corresponds to the JSON property `data` - # NOTE: Values are automatically base64 encoded/decoded in the client library. - # @return [String] - attr_accessor :data - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @mime_type = args[:mime_type] if args.key?(:mime_type) - @data = args[:data] if args.key?(:data) - end - end - - # Mobile-friendly test request. - class RunMobileFriendlyTestRequest - include Google::Apis::Core::Hashable - - # URL for inspection. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - # Whether or not screenshot is requested. Default is false. - # Corresponds to the JSON property `requestScreenshot` - # @return [Boolean] - attr_accessor :request_screenshot - alias_method :request_screenshot?, :request_screenshot - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @url = args[:url] if args.key?(:url) - @request_screenshot = args[:request_screenshot] if args.key?(:request_screenshot) - end - end - # Mobile-friendly issue. class MobileFriendlyIssue include Google::Apis::Core::Hashable @@ -139,16 +61,16 @@ module Google # @return [Google::Apis::SearchconsoleV1::Image] attr_accessor :screenshot - # Final state of the test, including error details if necessary. - # Corresponds to the JSON property `testStatus` - # @return [Google::Apis::SearchconsoleV1::TestStatus] - attr_accessor :test_status - # Information about embedded resources issues. # Corresponds to the JSON property `resourceIssues` # @return [Array] attr_accessor :resource_issues + # Final state of the test, including error details if necessary. + # Corresponds to the JSON property `testStatus` + # @return [Google::Apis::SearchconsoleV1::TestStatus] + attr_accessor :test_status + def initialize(**args) update!(**args) end @@ -158,8 +80,8 @@ module Google @mobile_friendliness = args[:mobile_friendliness] if args.key?(:mobile_friendliness) @mobile_friendly_issues = args[:mobile_friendly_issues] if args.key?(:mobile_friendly_issues) @screenshot = args[:screenshot] if args.key?(:screenshot) - @test_status = args[:test_status] if args.key?(:test_status) @resource_issues = args[:resource_issues] if args.key?(:resource_issues) + @test_status = args[:test_status] if args.key?(:test_status) end end @@ -200,6 +122,84 @@ module Google @url = args[:url] if args.key?(:url) end end + + # Final state of the test, including error details if necessary. + class TestStatus + include Google::Apis::Core::Hashable + + # Status of the test. + # Corresponds to the JSON property `status` + # @return [String] + attr_accessor :status + + # Error details if applicable. + # Corresponds to the JSON property `details` + # @return [String] + attr_accessor :details + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @status = args[:status] if args.key?(:status) + @details = args[:details] if args.key?(:details) + end + end + + # Describe image data. + class Image + include Google::Apis::Core::Hashable + + # Image data in format determined by the mime type. Currently, the format + # will always be "image/png", but this might change in the future. + # Corresponds to the JSON property `data` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :data + + # The mime-type of the image data. + # Corresponds to the JSON property `mimeType` + # @return [String] + attr_accessor :mime_type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @data = args[:data] if args.key?(:data) + @mime_type = args[:mime_type] if args.key?(:mime_type) + end + end + + # Mobile-friendly test request. + class RunMobileFriendlyTestRequest + include Google::Apis::Core::Hashable + + # URL for inspection. + # Corresponds to the JSON property `url` + # @return [String] + attr_accessor :url + + # Whether or not screenshot is requested. Default is false. + # Corresponds to the JSON property `requestScreenshot` + # @return [Boolean] + attr_accessor :request_screenshot + alias_method :request_screenshot?, :request_screenshot + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @url = args[:url] if args.key?(:url) + @request_screenshot = args[:request_screenshot] if args.key?(:request_screenshot) + end + end end end end diff --git a/generated/google/apis/searchconsole_v1/representations.rb b/generated/google/apis/searchconsole_v1/representations.rb index 1a87012f1..6dcf50a7a 100644 --- a/generated/google/apis/searchconsole_v1/representations.rb +++ b/generated/google/apis/searchconsole_v1/representations.rb @@ -22,24 +22,6 @@ module Google module Apis module SearchconsoleV1 - class TestStatus - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Image - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class RunMobileFriendlyTestRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class MobileFriendlyIssue class Representation < Google::Apis::Core::JsonRepresentation; end @@ -65,27 +47,21 @@ module Google end class TestStatus - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :status, as: 'status' - property :details, as: 'details' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class Image - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :mime_type, as: 'mimeType' - property :data, :base64 => true, as: 'data' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class RunMobileFriendlyTestRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :url, as: 'url' - property :request_screenshot, as: 'requestScreenshot' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class MobileFriendlyIssue @@ -103,10 +79,10 @@ module Google property :screenshot, as: 'screenshot', class: Google::Apis::SearchconsoleV1::Image, decorator: Google::Apis::SearchconsoleV1::Image::Representation - property :test_status, as: 'testStatus', class: Google::Apis::SearchconsoleV1::TestStatus, decorator: Google::Apis::SearchconsoleV1::TestStatus::Representation - collection :resource_issues, as: 'resourceIssues', class: Google::Apis::SearchconsoleV1::ResourceIssue, decorator: Google::Apis::SearchconsoleV1::ResourceIssue::Representation + property :test_status, as: 'testStatus', class: Google::Apis::SearchconsoleV1::TestStatus, decorator: Google::Apis::SearchconsoleV1::TestStatus::Representation + end end @@ -124,6 +100,30 @@ module Google property :url, as: 'url' end end + + class TestStatus + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :status, as: 'status' + property :details, as: 'details' + end + end + + class Image + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :data, :base64 => true, as: 'data' + property :mime_type, as: 'mimeType' + end + end + + class RunMobileFriendlyTestRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :url, as: 'url' + property :request_screenshot, as: 'requestScreenshot' + end + end end end end diff --git a/generated/google/apis/searchconsole_v1/service.rb b/generated/google/apis/searchconsole_v1/service.rb index 1b377472d..c1f536f2f 100644 --- a/generated/google/apis/searchconsole_v1/service.rb +++ b/generated/google/apis/searchconsole_v1/service.rb @@ -32,16 +32,16 @@ module Google # # @see https://developers.google.com/webmaster-tools/search-console-api/ class SearchConsoleService < Google::Apis::Core::BaseService - # @return [String] - # API key. Your API key identifies your project and provides you with API access, - # quota, and reports. Required unless you provide an OAuth 2.0 token. - attr_accessor :key - # @return [String] # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. attr_accessor :quota_user + # @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 + def initialize super('https://searchconsole.googleapis.com/', '') @batch_path = 'batch' @@ -80,8 +80,8 @@ module Google protected def apply_command_defaults(command) - command.query['key'] = key unless key.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['key'] = key unless key.nil? end end end diff --git a/generated/google/apis/servicecontrol_v1.rb b/generated/google/apis/servicecontrol_v1.rb index c43e699b3..9a898cf53 100644 --- a/generated/google/apis/servicecontrol_v1.rb +++ b/generated/google/apis/servicecontrol_v1.rb @@ -26,13 +26,13 @@ module Google # @see https://cloud.google.com/service-control/ module ServicecontrolV1 VERSION = 'V1' - REVISION = '20170422' - - # View and manage your data across Google Cloud Platform services - AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' + REVISION = '20170520' # Manage your Google Service Control data AUTH_SERVICECONTROL = 'https://www.googleapis.com/auth/servicecontrol' + + # View and manage your data across Google Cloud Platform services + AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' end end end diff --git a/generated/google/apis/servicecontrol_v1/classes.rb b/generated/google/apis/servicecontrol_v1/classes.rb index c332b0577..264923127 100644 --- a/generated/google/apis/servicecontrol_v1/classes.rb +++ b/generated/google/apis/servicecontrol_v1/classes.rb @@ -22,17 +22,450 @@ module Google module Apis module ServicecontrolV1 + # Response message for the AllocateQuota method. + class AllocateQuotaResponse + include Google::Apis::Core::Hashable + + # The same operation_id value used in the AllocateQuotaRequest. Used for + # logging and diagnostics purposes. + # Corresponds to the JSON property `operationId` + # @return [String] + attr_accessor :operation_id + + # ID of the actual config used to process the request. + # Corresponds to the JSON property `serviceConfigId` + # @return [String] + attr_accessor :service_config_id + + # Indicates the decision of the allocate. + # Corresponds to the JSON property `allocateErrors` + # @return [Array] + attr_accessor :allocate_errors + + # Quota metrics to indicate the result of allocation. Depending on the + # request, one or more of the following metrics will be included: + # 1. For rate quota, per quota group or per quota metric incremental usage + # will be specified using the following delta metric: + # "serviceruntime.googleapis.com/api/consumer/quota_used_count" + # 2. For allocation quota, per quota metric total usage will be specified + # using the following gauge metric: + # "serviceruntime.googleapis.com/allocation/consumer/quota_used_count" + # 3. For both rate quota and allocation quota, the quota limit reached + # condition will be specified using the following boolean metric: + # "serviceruntime.googleapis.com/quota/exceeded" + # 4. For allocation quota, value for each quota limit associated with + # the metrics will be specified using the following gauge metric: + # "serviceruntime.googleapis.com/quota/limit" + # Corresponds to the JSON property `quotaMetrics` + # @return [Array] + attr_accessor :quota_metrics + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @operation_id = args[:operation_id] if args.key?(:operation_id) + @service_config_id = args[:service_config_id] if args.key?(:service_config_id) + @allocate_errors = args[:allocate_errors] if args.key?(:allocate_errors) + @quota_metrics = args[:quota_metrics] if args.key?(:quota_metrics) + end + end + + # Request message for the ReleaseQuota method. + class ReleaseQuotaRequest + include Google::Apis::Core::Hashable + + # Specifies which version of service configuration should be used to process + # the request. If unspecified or no matching version can be found, the latest + # one will be used. + # Corresponds to the JSON property `serviceConfigId` + # @return [String] + attr_accessor :service_config_id + + # Represents information regarding a quota operation. + # Corresponds to the JSON property `releaseOperation` + # @return [Google::Apis::ServicecontrolV1::QuotaOperation] + attr_accessor :release_operation + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @service_config_id = args[:service_config_id] if args.key?(:service_config_id) + @release_operation = args[:release_operation] if args.key?(:release_operation) + end + end + + # + class QuotaError + include Google::Apis::Core::Hashable + + # Subject to whom this error applies. See the specific enum for more details + # on this field. For example, "clientip:" or + # "project:". + # Corresponds to the JSON property `subject` + # @return [String] + attr_accessor :subject + + # Free-form text that provides details on the cause of the error. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # Error code. + # Corresponds to the JSON property `code` + # @return [String] + attr_accessor :code + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @subject = args[:subject] if args.key?(:subject) + @description = args[:description] if args.key?(:description) + @code = args[:code] if args.key?(:code) + end + end + + # Metadata about the request. + class RequestMetadata + include Google::Apis::Core::Hashable + + # The user agent of the caller. + # This information is not authenticated and should be treated accordingly. + # For example: + # + `google-api-python-client/1.4.0`: + # The request was made by the Google API client for Python. + # + `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`: + # The request was made by the Google Cloud SDK CLI (gcloud). + # + `AppEngine-Google; (+http://code.google.com/appengine; appid: s~my-project` + # : + # The request was made from the `my-project` App Engine app. + # NOLINT + # Corresponds to the JSON property `callerSuppliedUserAgent` + # @return [String] + attr_accessor :caller_supplied_user_agent + + # The IP address of the caller. + # Corresponds to the JSON property `callerIp` + # @return [String] + attr_accessor :caller_ip + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @caller_supplied_user_agent = args[:caller_supplied_user_agent] if args.key?(:caller_supplied_user_agent) + @caller_ip = args[:caller_ip] if args.key?(:caller_ip) + end + end + + # + class CheckInfo + include Google::Apis::Core::Hashable + + # A list of fields and label keys that are ignored by the server. + # The client doesn't need to send them for following requests to improve + # performance and allow better aggregation. + # Corresponds to the JSON property `unusedArguments` + # @return [Array] + attr_accessor :unused_arguments + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @unused_arguments = args[:unused_arguments] if args.key?(:unused_arguments) + end + end + + # Response message for the ReleaseQuota method. + class ReleaseQuotaResponse + include Google::Apis::Core::Hashable + + # ID of the actual config used to process the request. + # Corresponds to the JSON property `serviceConfigId` + # @return [String] + attr_accessor :service_config_id + + # Indicates the decision of the release. + # Corresponds to the JSON property `releaseErrors` + # @return [Array] + attr_accessor :release_errors + + # Quota metrics to indicate the result of release. Depending on the + # request, one or more of the following metrics will be included: + # 1. For rate quota, per quota group or per quota metric released amount + # will be specified using the following delta metric: + # "serviceruntime.googleapis.com/api/consumer/quota_refund_count" + # 2. For allocation quota, per quota metric total usage will be specified + # using the following gauge metric: + # "serviceruntime.googleapis.com/allocation/consumer/quota_used_count" + # 3. For allocation quota, value for each quota limit associated with + # the metrics will be specified using the following gauge metric: + # "serviceruntime.googleapis.com/quota/limit" + # Corresponds to the JSON property `quotaMetrics` + # @return [Array] + attr_accessor :quota_metrics + + # The same operation_id value used in the ReleaseQuotaRequest. Used for + # logging and diagnostics purposes. + # Corresponds to the JSON property `operationId` + # @return [String] + attr_accessor :operation_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @service_config_id = args[:service_config_id] if args.key?(:service_config_id) + @release_errors = args[:release_errors] if args.key?(:release_errors) + @quota_metrics = args[:quota_metrics] if args.key?(:quota_metrics) + @operation_id = args[:operation_id] if args.key?(:operation_id) + end + end + + # Request message for the AllocateQuota method. + class AllocateQuotaRequest + include Google::Apis::Core::Hashable + + # Specifies which version of service configuration should be used to process + # the request. If unspecified or no matching version can be found, the latest + # one will be used. + # Corresponds to the JSON property `serviceConfigId` + # @return [String] + attr_accessor :service_config_id + + # Represents information regarding a quota operation. + # Corresponds to the JSON property `allocateOperation` + # @return [Google::Apis::ServicecontrolV1::QuotaOperation] + attr_accessor :allocate_operation + + # Allocation mode for this operation. + # Deprecated: use QuotaMode inside the QuotaOperation. + # Corresponds to the JSON property `allocationMode` + # @return [String] + attr_accessor :allocation_mode + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @service_config_id = args[:service_config_id] if args.key?(:service_config_id) + @allocate_operation = args[:allocate_operation] if args.key?(:allocate_operation) + @allocation_mode = args[:allocation_mode] if args.key?(:allocation_mode) + end + end + + # Represents a set of metric values in the same metric. + # Each metric value in the set should have a unique combination of start time, + # end time, and label values. + class MetricValueSet + include Google::Apis::Core::Hashable + + # The metric name defined in the service configuration. + # Corresponds to the JSON property `metricName` + # @return [String] + attr_accessor :metric_name + + # The values in this metric. + # Corresponds to the JSON property `metricValues` + # @return [Array] + attr_accessor :metric_values + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @metric_name = args[:metric_name] if args.key?(:metric_name) + @metric_values = args[:metric_values] if args.key?(:metric_values) + end + end + + # Represents the processing error of one `Operation` in the request. + class ReportError + include Google::Apis::Core::Hashable + + # The Operation.operation_id value from the request. + # Corresponds to the JSON property `operationId` + # @return [String] + attr_accessor :operation_id + + # The `Status` type defines a logical error model that is suitable for different + # programming environments, including REST APIs and RPC APIs. It is used by + # [gRPC](https://github.com/grpc). The error model is designed to be: + # - Simple to use and understand for most users + # - Flexible enough to meet unexpected needs + # # Overview + # The `Status` message contains three pieces of data: error code, error message, + # and error details. The error code should be an enum value of + # google.rpc.Code, but it may accept additional error codes if needed. The + # error message should be a developer-facing English message that helps + # developers *understand* and *resolve* the error. If a localized user-facing + # error message is needed, put the localized message in the error details or + # localize it in the client. The optional error details may contain arbitrary + # information about the error. There is a predefined set of error detail types + # in the package `google.rpc` that can be used for common error conditions. + # # Language mapping + # The `Status` message is the logical representation of the error model, but it + # is not necessarily the actual wire format. When the `Status` message is + # exposed in different client libraries and different wire protocols, it can be + # mapped differently. For example, it will likely be mapped to some exceptions + # in Java, but more likely mapped to some error codes in C. + # # Other uses + # The error model and the `Status` message can be used in a variety of + # environments, either with or without APIs, to provide a + # consistent developer experience across different environments. + # Example uses of this error model include: + # - Partial errors. If a service needs to return partial errors to the client, + # it may embed the `Status` in the normal response to indicate the partial + # errors. + # - Workflow errors. A typical workflow has multiple steps. Each step may + # have a `Status` message for error reporting. + # - Batch operations. If a client uses batch request and batch response, the + # `Status` message should be used directly inside batch response, one for + # each error sub-response. + # - Asynchronous operations. If an API call embeds asynchronous operation + # results in its response, the status of those operations should be + # represented directly using the `Status` message. + # - Logging. If some API errors are stored in logs, the message `Status` could + # be used directly after any stripping needed for security/privacy reasons. + # Corresponds to the JSON property `status` + # @return [Google::Apis::ServicecontrolV1::Status] + attr_accessor :status + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @operation_id = args[:operation_id] if args.key?(:operation_id) + @status = args[:status] if args.key?(:status) + end + end + + # + class StartReconciliationRequest + include Google::Apis::Core::Hashable + + # Represents information regarding a quota operation. + # Corresponds to the JSON property `reconciliationOperation` + # @return [Google::Apis::ServicecontrolV1::QuotaOperation] + attr_accessor :reconciliation_operation + + # Specifies which version of service configuration should be used to process + # the request. If unspecified or no matching version can be found, the latest + # one will be used. + # Corresponds to the JSON property `serviceConfigId` + # @return [String] + attr_accessor :service_config_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @reconciliation_operation = args[:reconciliation_operation] if args.key?(:reconciliation_operation) + @service_config_id = args[:service_config_id] if args.key?(:service_config_id) + end + end + + # Defines the errors to be returned in + # google.api.servicecontrol.v1.CheckResponse.check_errors. + class CheckError + include Google::Apis::Core::Hashable + + # Free-form text providing details on the error cause of the error. + # Corresponds to the JSON property `detail` + # @return [String] + attr_accessor :detail + + # The error code. + # Corresponds to the JSON property `code` + # @return [String] + attr_accessor :code + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @detail = args[:detail] if args.key?(:detail) + @code = args[:code] if args.key?(:code) + end + end + + # Contains the quota information for a quota check response. + class QuotaInfo + include Google::Apis::Core::Hashable + + # Map of quota group name to the actual number of tokens consumed. If the + # quota check was not successful, then this will not be populated due to no + # quota consumption. + # Deprecated: Use quota_metrics to get per quota group usage. + # Corresponds to the JSON property `quotaConsumed` + # @return [Hash] + attr_accessor :quota_consumed + + # Quota metrics to indicate the usage. Depending on the check request, one or + # more of the following metrics will be included: + # 1. For rate quota, per quota group or per quota metric incremental usage + # will be specified using the following delta metric: + # "serviceruntime.googleapis.com/api/consumer/quota_used_count" + # 2. For allocation quota, per quota metric total usage will be specified + # using the following gauge metric: + # "serviceruntime.googleapis.com/allocation/consumer/quota_used_count" + # 3. For both rate quota and allocation quota, the quota limit reached + # condition will be specified using the following boolean metric: + # "serviceruntime.googleapis.com/quota/exceeded" + # Corresponds to the JSON property `quotaMetrics` + # @return [Array] + attr_accessor :quota_metrics + + # Quota Metrics that have exceeded quota limits. + # For QuotaGroup-based quota, this is QuotaGroup.name + # For QuotaLimit-based quota, this is QuotaLimit.name + # See: google.api.Quota + # Deprecated: Use quota_metrics to get per quota group limit exceeded status. + # Corresponds to the JSON property `limitExceeded` + # @return [Array] + attr_accessor :limit_exceeded + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @quota_consumed = args[:quota_consumed] if args.key?(:quota_consumed) + @quota_metrics = args[:quota_metrics] if args.key?(:quota_metrics) + @limit_exceeded = args[:limit_exceeded] if args.key?(:limit_exceeded) + end + end + # Request message for the Check method. class CheckRequest include Google::Apis::Core::Hashable - # Indicates if service activation check should be skipped for this request. - # Default behavior is to perform the check and apply relevant quota. - # Corresponds to the JSON property `skipActivationCheck` - # @return [Boolean] - attr_accessor :skip_activation_check - alias_method :skip_activation_check?, :skip_activation_check - # Represents information regarding an operation. # Corresponds to the JSON property `operation` # @return [Google::Apis::ServicecontrolV1::Operation] @@ -52,16 +485,23 @@ module Google # @return [String] attr_accessor :service_config_id + # Indicates if service activation check should be skipped for this request. + # Default behavior is to perform the check and apply relevant quota. + # Corresponds to the JSON property `skipActivationCheck` + # @return [Boolean] + attr_accessor :skip_activation_check + alias_method :skip_activation_check?, :skip_activation_check + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @skip_activation_check = args[:skip_activation_check] if args.key?(:skip_activation_check) @operation = args[:operation] if args.key?(:operation) @request_project_settings = args[:request_project_settings] if args.key?(:request_project_settings) @service_config_id = args[:service_config_id] if args.key?(:service_config_id) + @skip_activation_check = args[:skip_activation_check] if args.key?(:skip_activation_check) end end @@ -69,21 +509,6 @@ module Google class QuotaOperation include Google::Apis::Core::Hashable - # Quota mode for this operation. - # Corresponds to the JSON property `quotaMode` - # @return [String] - attr_accessor :quota_mode - - # Fully qualified name of the API method for which this quota operation is - # requested. This name is used for matching quota rules or metric rules and - # billing status rules defined in service configuration. This field is not - # required if the quota operation is performed on non-API resources. - # Example of an RPC method name: - # google.example.library.v1.LibraryService.CreateShelf - # Corresponds to the JSON property `methodName` - # @return [String] - attr_accessor :method_name - # Represents information about this operation. Each MetricValueSet # corresponds to a metric defined in the service configuration. # The data type used in the MetricValueSet must agree with @@ -123,18 +548,33 @@ module Google # @return [String] attr_accessor :operation_id + # Fully qualified name of the API method for which this quota operation is + # requested. This name is used for matching quota rules or metric rules and + # billing status rules defined in service configuration. This field is not + # required if the quota operation is performed on non-API resources. + # Example of an RPC method name: + # google.example.library.v1.LibraryService.CreateShelf + # Corresponds to the JSON property `methodName` + # @return [String] + attr_accessor :method_name + + # Quota mode for this operation. + # Corresponds to the JSON property `quotaMode` + # @return [String] + attr_accessor :quota_mode + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @quota_mode = args[:quota_mode] if args.key?(:quota_mode) - @method_name = args[:method_name] if args.key?(:method_name) @quota_metrics = args[:quota_metrics] if args.key?(:quota_metrics) @labels = args[:labels] if args.key?(:labels) @consumer_id = args[:consumer_id] if args.key?(:consumer_id) @operation_id = args[:operation_id] if args.key?(:operation_id) + @method_name = args[:method_name] if args.key?(:method_name) + @quota_mode = args[:quota_mode] if args.key?(:quota_mode) end end @@ -190,58 +630,15 @@ module Google end end - # Response message for the Report method. - class ReportResponse - include Google::Apis::Core::Hashable - - # Quota usage for each quota release `Operation` request. - # Fully or partially failed quota release request may or may not be present - # in `report_quota_info`. For example, a failed quota release request will - # have the current quota usage info when precise quota library returns the - # info. A deadline exceeded quota request will not have quota usage info. - # If there is no quota release request, report_quota_info will be empty. - # Corresponds to the JSON property `reportInfos` - # @return [Array] - attr_accessor :report_infos - - # The actual config id used to process the request. - # Corresponds to the JSON property `serviceConfigId` - # @return [String] - attr_accessor :service_config_id - - # Partial failures, one for each `Operation` in the request that failed - # processing. There are three possible combinations of the RPC status: - # 1. The combination of a successful RPC status and an empty `report_errors` - # list indicates a complete success where all `Operations` in the - # request are processed successfully. - # 2. The combination of a successful RPC status and a non-empty - # `report_errors` list indicates a partial success where some - # `Operations` in the request succeeded. Each - # `Operation` that failed processing has a corresponding item - # in this list. - # 3. A failed RPC status indicates a general non-deterministic failure. - # When this happens, it's impossible to know which of the - # 'Operations' in the request succeeded or failed. - # Corresponds to the JSON property `reportErrors` - # @return [Array] - attr_accessor :report_errors - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @report_infos = args[:report_infos] if args.key?(:report_infos) - @service_config_id = args[:service_config_id] if args.key?(:service_config_id) - @report_errors = args[:report_errors] if args.key?(:report_errors) - end - end - # Represents information regarding an operation. class Operation include Google::Apis::Core::Hashable + # Represents the properties needed for quota operations. + # Corresponds to the JSON property `quotaProperties` + # @return [Google::Apis::ServicecontrolV1::QuotaProperties] + attr_accessor :quota_properties + # Identity of the consumer who is using the service. # This field should be filled in for the operations initiated by a # consumer, but not for service-initiated operations that are @@ -339,17 +736,13 @@ module Google # @return [Array] attr_accessor :metric_value_sets - # Represents the properties needed for quota operations. - # Corresponds to the JSON property `quotaProperties` - # @return [Google::Apis::ServicecontrolV1::QuotaProperties] - attr_accessor :quota_properties - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @quota_properties = args[:quota_properties] if args.key?(:quota_properties) @consumer_id = args[:consumer_id] if args.key?(:consumer_id) @operation_id = args[:operation_id] if args.key?(:operation_id) @operation_name = args[:operation_name] if args.key?(:operation_name) @@ -361,7 +754,54 @@ module Google @log_entries = args[:log_entries] if args.key?(:log_entries) @user_labels = args[:user_labels] if args.key?(:user_labels) @metric_value_sets = args[:metric_value_sets] if args.key?(:metric_value_sets) - @quota_properties = args[:quota_properties] if args.key?(:quota_properties) + end + end + + # Response message for the Report method. + class ReportResponse + include Google::Apis::Core::Hashable + + # Partial failures, one for each `Operation` in the request that failed + # processing. There are three possible combinations of the RPC status: + # 1. The combination of a successful RPC status and an empty `report_errors` + # list indicates a complete success where all `Operations` in the + # request are processed successfully. + # 2. The combination of a successful RPC status and a non-empty + # `report_errors` list indicates a partial success where some + # `Operations` in the request succeeded. Each + # `Operation` that failed processing has a corresponding item + # in this list. + # 3. A failed RPC status indicates a general non-deterministic failure. + # When this happens, it's impossible to know which of the + # 'Operations' in the request succeeded or failed. + # Corresponds to the JSON property `reportErrors` + # @return [Array] + attr_accessor :report_errors + + # Quota usage for each quota release `Operation` request. + # Fully or partially failed quota release request may or may not be present + # in `report_quota_info`. For example, a failed quota release request will + # have the current quota usage info when precise quota library returns the + # info. A deadline exceeded quota request will not have quota usage info. + # If there is no quota release request, report_quota_info will be empty. + # Corresponds to the JSON property `reportInfos` + # @return [Array] + attr_accessor :report_infos + + # The actual config id used to process the request. + # Corresponds to the JSON property `serviceConfigId` + # @return [String] + attr_accessor :service_config_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @report_errors = args[:report_errors] if args.key?(:report_errors) + @report_infos = args[:report_infos] if args.key?(:report_infos) + @service_config_id = args[:service_config_id] if args.key?(:service_config_id) end end @@ -426,7 +866,7 @@ module Google # error message is needed, put the localized message in the error details or # localize it in the client. The optional error details may contain arbitrary # information about the error. There is a predefined set of error detail types - # in the package `google.rpc` which can be used for common error conditions. + # in the package `google.rpc` that can be used for common error conditions. # # Language mapping # The `Status` message is the logical representation of the error model, but it # is not necessarily the actual wire format. When the `Status` message is @@ -442,7 +882,7 @@ module Google # it may embed the `Status` in the normal response to indicate the partial # errors. # - Workflow errors. A typical workflow has multiple steps. Each step may - # have a `Status` message for error reporting purpose. + # have a `Status` message for error reporting. # - Batch operations. If a client uses batch request and batch response, the # `Status` message should be used directly inside batch response, one for # each error sub-response. @@ -519,84 +959,63 @@ module Google end end - # An individual log entry. - class LogEntry - include Google::Apis::Core::Hashable - - # A set of user-defined (key, value) data that provides additional - # information about the log entry. - # Corresponds to the JSON property `labels` - # @return [Hash] - attr_accessor :labels - - # The severity of the log entry. The default value is - # `LogSeverity.DEFAULT`. - # Corresponds to the JSON property `severity` - # @return [String] - attr_accessor :severity - - # A unique ID for the log entry used for deduplication. If omitted, - # the implementation will generate one based on operation_id. - # Corresponds to the JSON property `insertId` - # @return [String] - attr_accessor :insert_id - - # Required. The log to which this log entry belongs. Examples: `"syslog"`, - # `"book_log"`. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The log entry payload, represented as a structure that - # is expressed as a JSON object. - # Corresponds to the JSON property `structPayload` - # @return [Hash] - attr_accessor :struct_payload - - # The log entry payload, represented as a Unicode string (UTF-8). - # Corresponds to the JSON property `textPayload` - # @return [String] - attr_accessor :text_payload - - # The log entry payload, represented as a protocol buffer that is - # expressed as a JSON object. You can only pass `protoPayload` - # values that belong to a set of approved types. - # Corresponds to the JSON property `protoPayload` - # @return [Hash] - attr_accessor :proto_payload - - # The time the event described by the log entry occurred. If - # omitted, defaults to operation start time. - # Corresponds to the JSON property `timestamp` - # @return [String] - attr_accessor :timestamp - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @labels = args[:labels] if args.key?(:labels) - @severity = args[:severity] if args.key?(:severity) - @insert_id = args[:insert_id] if args.key?(:insert_id) - @name = args[:name] if args.key?(:name) - @struct_payload = args[:struct_payload] if args.key?(:struct_payload) - @text_payload = args[:text_payload] if args.key?(:text_payload) - @proto_payload = args[:proto_payload] if args.key?(:proto_payload) - @timestamp = args[:timestamp] if args.key?(:timestamp) - end - end - # Common audit log format for Google Cloud Platform API operations. class AuditLog include Google::Apis::Core::Hashable - # The name of the API service performing the operation. For example, - # `"datastore.googleapis.com"`. - # Corresponds to the JSON property `serviceName` - # @return [String] - attr_accessor :service_name + # The number of items returned from a List or Query API method, + # if applicable. + # Corresponds to the JSON property `numResponseItems` + # @return [Fixnum] + attr_accessor :num_response_items + + # The `Status` type defines a logical error model that is suitable for different + # programming environments, including REST APIs and RPC APIs. It is used by + # [gRPC](https://github.com/grpc). The error model is designed to be: + # - Simple to use and understand for most users + # - Flexible enough to meet unexpected needs + # # Overview + # The `Status` message contains three pieces of data: error code, error message, + # and error details. The error code should be an enum value of + # google.rpc.Code, but it may accept additional error codes if needed. The + # error message should be a developer-facing English message that helps + # developers *understand* and *resolve* the error. If a localized user-facing + # error message is needed, put the localized message in the error details or + # localize it in the client. The optional error details may contain arbitrary + # information about the error. There is a predefined set of error detail types + # in the package `google.rpc` that can be used for common error conditions. + # # Language mapping + # The `Status` message is the logical representation of the error model, but it + # is not necessarily the actual wire format. When the `Status` message is + # exposed in different client libraries and different wire protocols, it can be + # mapped differently. For example, it will likely be mapped to some exceptions + # in Java, but more likely mapped to some error codes in C. + # # Other uses + # The error model and the `Status` message can be used in a variety of + # environments, either with or without APIs, to provide a + # consistent developer experience across different environments. + # Example uses of this error model include: + # - Partial errors. If a service needs to return partial errors to the client, + # it may embed the `Status` in the normal response to indicate the partial + # errors. + # - Workflow errors. A typical workflow has multiple steps. Each step may + # have a `Status` message for error reporting. + # - Batch operations. If a client uses batch request and batch response, the + # `Status` message should be used directly inside batch response, one for + # each error sub-response. + # - Asynchronous operations. If an API call embeds asynchronous operation + # results in its response, the status of those operations should be + # represented directly using the `Status` message. + # - Logging. If some API errors are stored in logs, the message `Status` could + # be used directly after any stripping needed for security/privacy reasons. + # Corresponds to the JSON property `status` + # @return [Google::Apis::ServicecontrolV1::Status] + attr_accessor :status + + # Authentication information for the operation. + # Corresponds to the JSON property `authenticationInfo` + # @return [Google::Apis::ServicecontrolV1::AuthenticationInfo] + attr_accessor :authentication_info # The operation response. This may not include all response elements, # such as those that are too large, privacy-sensitive, or duplicated @@ -608,6 +1027,12 @@ module Google # @return [Hash] attr_accessor :response + # The name of the API service performing the operation. For example, + # `"datastore.googleapis.com"`. + # Corresponds to the JSON property `serviceName` + # @return [String] + attr_accessor :service_name + # The name of the service method or operation. # For API calls, this should be the name of the API method. # For example, @@ -654,59 +1079,77 @@ module Google # @return [Hash] attr_accessor :service_data - # The number of items returned from a List or Query API method, - # if applicable. - # Corresponds to the JSON property `numResponseItems` - # @return [Fixnum] - attr_accessor :num_response_items + def initialize(**args) + update!(**args) + end - # The `Status` type defines a logical error model that is suitable for different - # programming environments, including REST APIs and RPC APIs. It is used by - # [gRPC](https://github.com/grpc). The error model is designed to be: - # - Simple to use and understand for most users - # - Flexible enough to meet unexpected needs - # # Overview - # The `Status` message contains three pieces of data: error code, error message, - # and error details. The error code should be an enum value of - # google.rpc.Code, but it may accept additional error codes if needed. The - # error message should be a developer-facing English message that helps - # developers *understand* and *resolve* the error. If a localized user-facing - # error message is needed, put the localized message in the error details or - # localize it in the client. The optional error details may contain arbitrary - # information about the error. There is a predefined set of error detail types - # in the package `google.rpc` which can be used for common error conditions. - # # Language mapping - # The `Status` message is the logical representation of the error model, but it - # is not necessarily the actual wire format. When the `Status` message is - # exposed in different client libraries and different wire protocols, it can be - # mapped differently. For example, it will likely be mapped to some exceptions - # in Java, but more likely mapped to some error codes in C. - # # Other uses - # The error model and the `Status` message can be used in a variety of - # environments, either with or without APIs, to provide a - # consistent developer experience across different environments. - # Example uses of this error model include: - # - Partial errors. If a service needs to return partial errors to the client, - # it may embed the `Status` in the normal response to indicate the partial - # errors. - # - Workflow errors. A typical workflow has multiple steps. Each step may - # have a `Status` message for error reporting purpose. - # - Batch operations. If a client uses batch request and batch response, the - # `Status` message should be used directly inside batch response, one for - # each error sub-response. - # - Asynchronous operations. If an API call embeds asynchronous operation - # results in its response, the status of those operations should be - # represented directly using the `Status` message. - # - Logging. If some API errors are stored in logs, the message `Status` could - # be used directly after any stripping needed for security/privacy reasons. - # Corresponds to the JSON property `status` - # @return [Google::Apis::ServicecontrolV1::Status] - attr_accessor :status + # Update properties of this object + def update!(**args) + @num_response_items = args[:num_response_items] if args.key?(:num_response_items) + @status = args[:status] if args.key?(:status) + @authentication_info = args[:authentication_info] if args.key?(:authentication_info) + @response = args[:response] if args.key?(:response) + @service_name = args[:service_name] if args.key?(:service_name) + @method_name = args[:method_name] if args.key?(:method_name) + @authorization_info = args[:authorization_info] if args.key?(:authorization_info) + @resource_name = args[:resource_name] if args.key?(:resource_name) + @request = args[:request] if args.key?(:request) + @request_metadata = args[:request_metadata] if args.key?(:request_metadata) + @service_data = args[:service_data] if args.key?(:service_data) + end + end - # Authentication information for the operation. - # Corresponds to the JSON property `authenticationInfo` - # @return [Google::Apis::ServicecontrolV1::AuthenticationInfo] - attr_accessor :authentication_info + # An individual log entry. + class LogEntry + include Google::Apis::Core::Hashable + + # The time the event described by the log entry occurred. If + # omitted, defaults to operation start time. + # Corresponds to the JSON property `timestamp` + # @return [String] + attr_accessor :timestamp + + # A set of user-defined (key, value) data that provides additional + # information about the log entry. + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # The severity of the log entry. The default value is + # `LogSeverity.DEFAULT`. + # Corresponds to the JSON property `severity` + # @return [String] + attr_accessor :severity + + # A unique ID for the log entry used for deduplication. If omitted, + # the implementation will generate one based on operation_id. + # Corresponds to the JSON property `insertId` + # @return [String] + attr_accessor :insert_id + + # Required. The log to which this log entry belongs. Examples: `"syslog"`, + # `"book_log"`. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The log entry payload, represented as a structure that + # is expressed as a JSON object. + # Corresponds to the JSON property `structPayload` + # @return [Hash] + attr_accessor :struct_payload + + # The log entry payload, represented as a Unicode string (UTF-8). + # Corresponds to the JSON property `textPayload` + # @return [String] + attr_accessor :text_payload + + # The log entry payload, represented as a protocol buffer that is + # expressed as a JSON object. You can only pass `protoPayload` + # values that belong to a set of approved types. + # Corresponds to the JSON property `protoPayload` + # @return [Hash] + attr_accessor :proto_payload def initialize(**args) update!(**args) @@ -714,17 +1157,14 @@ module Google # Update properties of this object def update!(**args) - @service_name = args[:service_name] if args.key?(:service_name) - @response = args[:response] if args.key?(:response) - @method_name = args[:method_name] if args.key?(:method_name) - @authorization_info = args[:authorization_info] if args.key?(:authorization_info) - @resource_name = args[:resource_name] if args.key?(:resource_name) - @request = args[:request] if args.key?(:request) - @request_metadata = args[:request_metadata] if args.key?(:request_metadata) - @service_data = args[:service_data] if args.key?(:service_data) - @num_response_items = args[:num_response_items] if args.key?(:num_response_items) - @status = args[:status] if args.key?(:status) - @authentication_info = args[:authentication_info] if args.key?(:authentication_info) + @timestamp = args[:timestamp] if args.key?(:timestamp) + @labels = args[:labels] if args.key?(:labels) + @severity = args[:severity] if args.key?(:severity) + @insert_id = args[:insert_id] if args.key?(:insert_id) + @name = args[:name] if args.key?(:name) + @struct_payload = args[:struct_payload] if args.key?(:struct_payload) + @text_payload = args[:text_payload] if args.key?(:text_payload) + @proto_payload = args[:proto_payload] if args.key?(:proto_payload) end end @@ -732,6 +1172,18 @@ module Google class MetricValue include Google::Apis::Core::Hashable + # A boolean value. + # Corresponds to the JSON property `boolValue` + # @return [Boolean] + attr_accessor :bool_value + alias_method :bool_value?, :bool_value + + # The end of the time period over which this metric value's measurement + # applies. + # Corresponds to the JSON property `endTime` + # @return [String] + attr_accessor :end_time + # The start of the time period over which this metric value's measurement # applies. The time period has different semantics for different metric # types (cumulative, delta, and gauge). See the metric definition @@ -745,6 +1197,11 @@ module Google # @return [Google::Apis::ServicecontrolV1::Money] attr_accessor :money_value + # A text string value. + # Corresponds to the JSON property `stringValue` + # @return [String] + attr_accessor :string_value + # The labels describing the metric value. # See comments on google.api.servicecontrol.v1.Operation.labels for # the overriding relationship. @@ -752,11 +1209,6 @@ module Google # @return [Hash] attr_accessor :labels - # A text string value. - # Corresponds to the JSON property `stringValue` - # @return [String] - attr_accessor :string_value - # A double precision floating point value. # Corresponds to the JSON property `doubleValue` # @return [Float] @@ -778,17 +1230,48 @@ module Google # @return [Google::Apis::ServicecontrolV1::Distribution] attr_accessor :distribution_value - # A boolean value. - # Corresponds to the JSON property `boolValue` - # @return [Boolean] - attr_accessor :bool_value - alias_method :bool_value?, :bool_value + def initialize(**args) + update!(**args) + end - # The end of the time period over which this metric value's measurement - # applies. - # Corresponds to the JSON property `endTime` + # Update properties of this object + def update!(**args) + @bool_value = args[:bool_value] if args.key?(:bool_value) + @end_time = args[:end_time] if args.key?(:end_time) + @start_time = args[:start_time] if args.key?(:start_time) + @money_value = args[:money_value] if args.key?(:money_value) + @string_value = args[:string_value] if args.key?(:string_value) + @labels = args[:labels] if args.key?(:labels) + @double_value = args[:double_value] if args.key?(:double_value) + @int64_value = args[:int64_value] if args.key?(:int64_value) + @distribution_value = args[:distribution_value] if args.key?(:distribution_value) + end + end + + # Represents an amount of money with its currency type. + class Money + include Google::Apis::Core::Hashable + + # The 3-letter currency code defined in ISO 4217. + # Corresponds to the JSON property `currencyCode` # @return [String] - attr_accessor :end_time + attr_accessor :currency_code + + # Number of nano (10^-9) units of the amount. + # The value must be between -999,999,999 and +999,999,999 inclusive. + # If `units` is positive, `nanos` must be positive or zero. + # If `units` is zero, `nanos` can be positive, zero, or negative. + # If `units` is negative, `nanos` must be negative or zero. + # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. + # Corresponds to the JSON property `nanos` + # @return [Fixnum] + attr_accessor :nanos + + # The whole units of the amount. + # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. + # Corresponds to the JSON property `units` + # @return [Fixnum] + attr_accessor :units def initialize(**args) update!(**args) @@ -796,15 +1279,9 @@ module Google # Update properties of this object def update!(**args) - @start_time = args[:start_time] if args.key?(:start_time) - @money_value = args[:money_value] if args.key?(:money_value) - @labels = args[:labels] if args.key?(:labels) - @string_value = args[:string_value] if args.key?(:string_value) - @double_value = args[:double_value] if args.key?(:double_value) - @int64_value = args[:int64_value] if args.key?(:int64_value) - @distribution_value = args[:distribution_value] if args.key?(:distribution_value) - @bool_value = args[:bool_value] if args.key?(:bool_value) - @end_time = args[:end_time] if args.key?(:end_time) + @currency_code = args[:currency_code] if args.key?(:currency_code) + @nanos = args[:nanos] if args.key?(:nanos) + @units = args[:units] if args.key?(:units) end end @@ -862,43 +1339,6 @@ module Google end end - # Represents an amount of money with its currency type. - class Money - include Google::Apis::Core::Hashable - - # The 3-letter currency code defined in ISO 4217. - # Corresponds to the JSON property `currencyCode` - # @return [String] - attr_accessor :currency_code - - # Number of nano (10^-9) units of the amount. - # The value must be between -999,999,999 and +999,999,999 inclusive. - # If `units` is positive, `nanos` must be positive or zero. - # If `units` is zero, `nanos` can be positive, zero, or negative. - # If `units` is negative, `nanos` must be negative or zero. - # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. - # Corresponds to the JSON property `nanos` - # @return [Fixnum] - attr_accessor :nanos - - # The whole units of the amount. - # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. - # Corresponds to the JSON property `units` - # @return [Fixnum] - attr_accessor :units - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @currency_code = args[:currency_code] if args.key?(:currency_code) - @nanos = args[:nanos] if args.key?(:nanos) - @units = args[:units] if args.key?(:units) - end - end - # Describing buckets with arbitrary user-provided width. class ExplicitBuckets include Google::Apis::Core::Hashable @@ -940,10 +1380,15 @@ module Google class Distribution include Google::Apis::Core::Hashable - # The total number of samples in the distribution. Must be >= 0. - # Corresponds to the JSON property `count` - # @return [Fixnum] - attr_accessor :count + # Describing buckets with constant width. + # Corresponds to the JSON property `linearBuckets` + # @return [Google::Apis::ServicecontrolV1::LinearBuckets] + attr_accessor :linear_buckets + + # The minimum of the population of values. Ignored if `count` is zero. + # Corresponds to the JSON property `minimum` + # @return [Float] + attr_accessor :minimum # The arithmetic mean of the samples in the distribution. If `count` is # zero then this field must be zero. @@ -951,6 +1396,11 @@ module Google # @return [Float] attr_accessor :mean + # The total number of samples in the distribution. Must be >= 0. + # Corresponds to the JSON property `count` + # @return [Fixnum] + attr_accessor :count + # The number of samples in each histogram bucket. `bucket_counts` are # optional. If present, they must sum to the `count` value. # The buckets are defined below in `bucket_option`. There are N buckets. @@ -987,31 +1437,21 @@ module Google # @return [Google::Apis::ServicecontrolV1::ExponentialBuckets] attr_accessor :exponential_buckets - # Describing buckets with constant width. - # Corresponds to the JSON property `linearBuckets` - # @return [Google::Apis::ServicecontrolV1::LinearBuckets] - attr_accessor :linear_buckets - - # The minimum of the population of values. Ignored if `count` is zero. - # Corresponds to the JSON property `minimum` - # @return [Float] - attr_accessor :minimum - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @count = args[:count] if args.key?(:count) + @linear_buckets = args[:linear_buckets] if args.key?(:linear_buckets) + @minimum = args[:minimum] if args.key?(:minimum) @mean = args[:mean] if args.key?(:mean) + @count = args[:count] if args.key?(:count) @bucket_counts = args[:bucket_counts] if args.key?(:bucket_counts) @explicit_buckets = args[:explicit_buckets] if args.key?(:explicit_buckets) @maximum = args[:maximum] if args.key?(:maximum) @sum_of_squared_deviation = args[:sum_of_squared_deviation] if args.key?(:sum_of_squared_deviation) @exponential_buckets = args[:exponential_buckets] if args.key?(:exponential_buckets) - @linear_buckets = args[:linear_buckets] if args.key?(:linear_buckets) - @minimum = args[:minimum] if args.key?(:minimum) end end @@ -1019,6 +1459,14 @@ module Google class ExponentialBuckets include Google::Apis::Core::Hashable + # The i'th exponential bucket covers the interval + # [scale * growth_factor^(i-1), scale * growth_factor^i) + # where i ranges from 1 to num_finite_buckets inclusive. + # Must be larger than 1.0. + # Corresponds to the JSON property `growthFactor` + # @return [Float] + attr_accessor :growth_factor + # The i'th exponential bucket covers the interval # [scale * growth_factor^(i-1), scale * growth_factor^i) # where i ranges from 1 to num_finite_buckets inclusive. @@ -1034,23 +1482,15 @@ module Google # @return [Fixnum] attr_accessor :num_finite_buckets - # The i'th exponential bucket covers the interval - # [scale * growth_factor^(i-1), scale * growth_factor^i) - # where i ranges from 1 to num_finite_buckets inclusive. - # Must be larger than 1.0. - # Corresponds to the JSON property `growthFactor` - # @return [Float] - attr_accessor :growth_factor - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @growth_factor = args[:growth_factor] if args.key?(:growth_factor) @scale = args[:scale] if args.key?(:scale) @num_finite_buckets = args[:num_finite_buckets] if args.key?(:num_finite_buckets) - @growth_factor = args[:growth_factor] if args.key?(:growth_factor) end end @@ -1092,17 +1532,6 @@ module Google class StartReconciliationResponse include Google::Apis::Core::Hashable - # The same operation_id value used in the StartReconciliationRequest. Used - # for logging and diagnostics purposes. - # Corresponds to the JSON property `operationId` - # @return [String] - attr_accessor :operation_id - - # Indicates the decision of the reconciliation start. - # Corresponds to the JSON property `reconciliationErrors` - # @return [Array] - attr_accessor :reconciliation_errors - # ID of the actual config used to process the request. # Corresponds to the JSON property `serviceConfigId` # @return [String] @@ -1120,16 +1549,27 @@ module Google # @return [Array] attr_accessor :quota_metrics + # The same operation_id value used in the StartReconciliationRequest. Used + # for logging and diagnostics purposes. + # Corresponds to the JSON property `operationId` + # @return [String] + attr_accessor :operation_id + + # Indicates the decision of the reconciliation start. + # Corresponds to the JSON property `reconciliationErrors` + # @return [Array] + attr_accessor :reconciliation_errors + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @operation_id = args[:operation_id] if args.key?(:operation_id) - @reconciliation_errors = args[:reconciliation_errors] if args.key?(:reconciliation_errors) @service_config_id = args[:service_config_id] if args.key?(:service_config_id) @quota_metrics = args[:quota_metrics] if args.key?(:quota_metrics) + @operation_id = args[:operation_id] if args.key?(:operation_id) + @reconciliation_errors = args[:reconciliation_errors] if args.key?(:reconciliation_errors) end end @@ -1137,11 +1577,6 @@ module Google class QuotaProperties include Google::Apis::Core::Hashable - # Quota mode for this operation. - # Corresponds to the JSON property `quotaMode` - # @return [String] - attr_accessor :quota_mode - # LimitType IDs that should be used for checking quota. Key in this map # should be a valid LimitType string, and the value is the ID to be used. For # example, an entry will cause all user quota limits to use 123 @@ -1157,14 +1592,19 @@ module Google # @return [Hash] attr_accessor :limit_by_ids + # Quota mode for this operation. + # Corresponds to the JSON property `quotaMode` + # @return [String] + attr_accessor :quota_mode + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @quota_mode = args[:quota_mode] if args.key?(:quota_mode) @limit_by_ids = args[:limit_by_ids] if args.key?(:limit_by_ids) + @quota_mode = args[:quota_mode] if args.key?(:quota_mode) end end @@ -1172,6 +1612,13 @@ module Google class LinearBuckets include Google::Apis::Core::Hashable + # The number of finite buckets. With the underflow and overflow buckets, + # the total number of buckets is `num_finite_buckets` + 2. + # See comments on `bucket_options` for details. + # Corresponds to the JSON property `numFiniteBuckets` + # @return [Fixnum] + attr_accessor :num_finite_buckets + # The i'th linear bucket covers the interval # [offset + (i-1) * width, offset + i * width) # where i ranges from 1 to num_finite_buckets, inclusive. @@ -1187,22 +1634,15 @@ module Google # @return [Float] attr_accessor :offset - # The number of finite buckets. With the underflow and overflow buckets, - # the total number of buckets is `num_finite_buckets` + 2. - # See comments on `bucket_options` for details. - # Corresponds to the JSON property `numFiniteBuckets` - # @return [Fixnum] - attr_accessor :num_finite_buckets - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @num_finite_buckets = args[:num_finite_buckets] if args.key?(:num_finite_buckets) @width = args[:width] if args.key?(:width) @offset = args[:offset] if args.key?(:offset) - @num_finite_buckets = args[:num_finite_buckets] if args.key?(:num_finite_buckets) end end @@ -1210,464 +1650,25 @@ module Google class AuthenticationInfo include Google::Apis::Core::Hashable + # The email address of the authenticated user making the request. + # Corresponds to the JSON property `principalEmail` + # @return [String] + attr_accessor :principal_email + # The authority selector specified by the requestor, if any. # It is not guaranteed that the principal was allowed to use this authority. # Corresponds to the JSON property `authoritySelector` # @return [String] attr_accessor :authority_selector - # The email address of the authenticated user making the request. - # Corresponds to the JSON property `principalEmail` - # @return [String] - attr_accessor :principal_email - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @authority_selector = args[:authority_selector] if args.key?(:authority_selector) @principal_email = args[:principal_email] if args.key?(:principal_email) - end - end - - # Response message for the AllocateQuota method. - class AllocateQuotaResponse - include Google::Apis::Core::Hashable - - # The same operation_id value used in the AllocateQuotaRequest. Used for - # logging and diagnostics purposes. - # Corresponds to the JSON property `operationId` - # @return [String] - attr_accessor :operation_id - - # ID of the actual config used to process the request. - # Corresponds to the JSON property `serviceConfigId` - # @return [String] - attr_accessor :service_config_id - - # Indicates the decision of the allocate. - # Corresponds to the JSON property `allocateErrors` - # @return [Array] - attr_accessor :allocate_errors - - # Quota metrics to indicate the result of allocation. Depending on the - # request, one or more of the following metrics will be included: - # 1. For rate quota, per quota group or per quota metric incremental usage - # will be specified using the following delta metric: - # "serviceruntime.googleapis.com/api/consumer/quota_used_count" - # 2. For allocation quota, per quota metric total usage will be specified - # using the following gauge metric: - # "serviceruntime.googleapis.com/allocation/consumer/quota_used_count" - # 3. For both rate quota and allocation quota, the quota limit reached - # condition will be specified using the following boolean metric: - # "serviceruntime.googleapis.com/quota/exceeded" - # 4. For allocation quota, value for each quota limit associated with - # the metrics will be specified using the following gauge metric: - # "serviceruntime.googleapis.com/quota/limit" - # Corresponds to the JSON property `quotaMetrics` - # @return [Array] - attr_accessor :quota_metrics - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @operation_id = args[:operation_id] if args.key?(:operation_id) - @service_config_id = args[:service_config_id] if args.key?(:service_config_id) - @allocate_errors = args[:allocate_errors] if args.key?(:allocate_errors) - @quota_metrics = args[:quota_metrics] if args.key?(:quota_metrics) - end - end - - # Request message for the ReleaseQuota method. - class ReleaseQuotaRequest - include Google::Apis::Core::Hashable - - # Specifies which version of service configuration should be used to process - # the request. If unspecified or no matching version can be found, the latest - # one will be used. - # Corresponds to the JSON property `serviceConfigId` - # @return [String] - attr_accessor :service_config_id - - # Represents information regarding a quota operation. - # Corresponds to the JSON property `releaseOperation` - # @return [Google::Apis::ServicecontrolV1::QuotaOperation] - attr_accessor :release_operation - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @service_config_id = args[:service_config_id] if args.key?(:service_config_id) - @release_operation = args[:release_operation] if args.key?(:release_operation) - end - end - - # Metadata about the request. - class RequestMetadata - include Google::Apis::Core::Hashable - - # The user agent of the caller. - # This information is not authenticated and should be treated accordingly. - # For example: - # + `google-api-python-client/1.4.0`: - # The request was made by the Google API client for Python. - # + `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`: - # The request was made by the Google Cloud SDK CLI (gcloud). - # + `AppEngine-Google; (+http://code.google.com/appengine; appid: s~my-project` - # : - # The request was made from the `my-project` App Engine app. - # Corresponds to the JSON property `callerSuppliedUserAgent` - # @return [String] - attr_accessor :caller_supplied_user_agent - - # The IP address of the caller. - # Corresponds to the JSON property `callerIp` - # @return [String] - attr_accessor :caller_ip - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @caller_supplied_user_agent = args[:caller_supplied_user_agent] if args.key?(:caller_supplied_user_agent) - @caller_ip = args[:caller_ip] if args.key?(:caller_ip) - end - end - - # - class QuotaError - include Google::Apis::Core::Hashable - - # Subject to whom this error applies. See the specific enum for more details - # on this field. For example, "clientip:" or - # "project:". - # Corresponds to the JSON property `subject` - # @return [String] - attr_accessor :subject - - # Free-form text that provides details on the cause of the error. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Error code. - # Corresponds to the JSON property `code` - # @return [String] - attr_accessor :code - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @subject = args[:subject] if args.key?(:subject) - @description = args[:description] if args.key?(:description) - @code = args[:code] if args.key?(:code) - end - end - - # - class CheckInfo - include Google::Apis::Core::Hashable - - # A list of fields and label keys that are ignored by the server. - # The client doesn't need to send them for following requests to improve - # performance and allow better aggregation. - # Corresponds to the JSON property `unusedArguments` - # @return [Array] - attr_accessor :unused_arguments - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @unused_arguments = args[:unused_arguments] if args.key?(:unused_arguments) - end - end - - # Response message for the ReleaseQuota method. - class ReleaseQuotaResponse - include Google::Apis::Core::Hashable - - # Indicates the decision of the release. - # Corresponds to the JSON property `releaseErrors` - # @return [Array] - attr_accessor :release_errors - - # Quota metrics to indicate the result of release. Depending on the - # request, one or more of the following metrics will be included: - # 1. For rate quota, per quota group or per quota metric released amount - # will be specified using the following delta metric: - # "serviceruntime.googleapis.com/api/consumer/quota_refund_count" - # 2. For allocation quota, per quota metric total usage will be specified - # using the following gauge metric: - # "serviceruntime.googleapis.com/allocation/consumer/quota_used_count" - # 3. For allocation quota, value for each quota limit associated with - # the metrics will be specified using the following gauge metric: - # "serviceruntime.googleapis.com/quota/limit" - # Corresponds to the JSON property `quotaMetrics` - # @return [Array] - attr_accessor :quota_metrics - - # The same operation_id value used in the ReleaseQuotaRequest. Used for - # logging and diagnostics purposes. - # Corresponds to the JSON property `operationId` - # @return [String] - attr_accessor :operation_id - - # ID of the actual config used to process the request. - # Corresponds to the JSON property `serviceConfigId` - # @return [String] - attr_accessor :service_config_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @release_errors = args[:release_errors] if args.key?(:release_errors) - @quota_metrics = args[:quota_metrics] if args.key?(:quota_metrics) - @operation_id = args[:operation_id] if args.key?(:operation_id) - @service_config_id = args[:service_config_id] if args.key?(:service_config_id) - end - end - - # Request message for the AllocateQuota method. - class AllocateQuotaRequest - include Google::Apis::Core::Hashable - - # Represents information regarding a quota operation. - # Corresponds to the JSON property `allocateOperation` - # @return [Google::Apis::ServicecontrolV1::QuotaOperation] - attr_accessor :allocate_operation - - # Allocation mode for this operation. - # Deprecated: use QuotaMode inside the QuotaOperation. - # Corresponds to the JSON property `allocationMode` - # @return [String] - attr_accessor :allocation_mode - - # Specifies which version of service configuration should be used to process - # the request. If unspecified or no matching version can be found, the latest - # one will be used. - # Corresponds to the JSON property `serviceConfigId` - # @return [String] - attr_accessor :service_config_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @allocate_operation = args[:allocate_operation] if args.key?(:allocate_operation) - @allocation_mode = args[:allocation_mode] if args.key?(:allocation_mode) - @service_config_id = args[:service_config_id] if args.key?(:service_config_id) - end - end - - # Represents a set of metric values in the same metric. - # Each metric value in the set should have a unique combination of start time, - # end time, and label values. - class MetricValueSet - include Google::Apis::Core::Hashable - - # The metric name defined in the service configuration. - # Corresponds to the JSON property `metricName` - # @return [String] - attr_accessor :metric_name - - # The values in this metric. - # Corresponds to the JSON property `metricValues` - # @return [Array] - attr_accessor :metric_values - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @metric_name = args[:metric_name] if args.key?(:metric_name) - @metric_values = args[:metric_values] if args.key?(:metric_values) - end - end - - # Represents the processing error of one `Operation` in the request. - class ReportError - include Google::Apis::Core::Hashable - - # The Operation.operation_id value from the request. - # Corresponds to the JSON property `operationId` - # @return [String] - attr_accessor :operation_id - - # The `Status` type defines a logical error model that is suitable for different - # programming environments, including REST APIs and RPC APIs. It is used by - # [gRPC](https://github.com/grpc). The error model is designed to be: - # - Simple to use and understand for most users - # - Flexible enough to meet unexpected needs - # # Overview - # The `Status` message contains three pieces of data: error code, error message, - # and error details. The error code should be an enum value of - # google.rpc.Code, but it may accept additional error codes if needed. The - # error message should be a developer-facing English message that helps - # developers *understand* and *resolve* the error. If a localized user-facing - # error message is needed, put the localized message in the error details or - # localize it in the client. The optional error details may contain arbitrary - # information about the error. There is a predefined set of error detail types - # in the package `google.rpc` which can be used for common error conditions. - # # Language mapping - # The `Status` message is the logical representation of the error model, but it - # is not necessarily the actual wire format. When the `Status` message is - # exposed in different client libraries and different wire protocols, it can be - # mapped differently. For example, it will likely be mapped to some exceptions - # in Java, but more likely mapped to some error codes in C. - # # Other uses - # The error model and the `Status` message can be used in a variety of - # environments, either with or without APIs, to provide a - # consistent developer experience across different environments. - # Example uses of this error model include: - # - Partial errors. If a service needs to return partial errors to the client, - # it may embed the `Status` in the normal response to indicate the partial - # errors. - # - Workflow errors. A typical workflow has multiple steps. Each step may - # have a `Status` message for error reporting purpose. - # - Batch operations. If a client uses batch request and batch response, the - # `Status` message should be used directly inside batch response, one for - # each error sub-response. - # - Asynchronous operations. If an API call embeds asynchronous operation - # results in its response, the status of those operations should be - # represented directly using the `Status` message. - # - Logging. If some API errors are stored in logs, the message `Status` could - # be used directly after any stripping needed for security/privacy reasons. - # Corresponds to the JSON property `status` - # @return [Google::Apis::ServicecontrolV1::Status] - attr_accessor :status - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @operation_id = args[:operation_id] if args.key?(:operation_id) - @status = args[:status] if args.key?(:status) - end - end - - # Defines the errors to be returned in - # google.api.servicecontrol.v1.CheckResponse.check_errors. - class CheckError - include Google::Apis::Core::Hashable - - # The error code. - # Corresponds to the JSON property `code` - # @return [String] - attr_accessor :code - - # Free-form text providing details on the error cause of the error. - # Corresponds to the JSON property `detail` - # @return [String] - attr_accessor :detail - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @code = args[:code] if args.key?(:code) - @detail = args[:detail] if args.key?(:detail) - end - end - - # - class StartReconciliationRequest - include Google::Apis::Core::Hashable - - # Represents information regarding a quota operation. - # Corresponds to the JSON property `reconciliationOperation` - # @return [Google::Apis::ServicecontrolV1::QuotaOperation] - attr_accessor :reconciliation_operation - - # Specifies which version of service configuration should be used to process - # the request. If unspecified or no matching version can be found, the latest - # one will be used. - # Corresponds to the JSON property `serviceConfigId` - # @return [String] - attr_accessor :service_config_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @reconciliation_operation = args[:reconciliation_operation] if args.key?(:reconciliation_operation) - @service_config_id = args[:service_config_id] if args.key?(:service_config_id) - end - end - - # Contains the quota information for a quota check response. - class QuotaInfo - include Google::Apis::Core::Hashable - - # Quota Metrics that have exceeded quota limits. - # For QuotaGroup-based quota, this is QuotaGroup.name - # For QuotaLimit-based quota, this is QuotaLimit.name - # See: google.api.Quota - # Deprecated: Use quota_metrics to get per quota group limit exceeded status. - # Corresponds to the JSON property `limitExceeded` - # @return [Array] - attr_accessor :limit_exceeded - - # Map of quota group name to the actual number of tokens consumed. If the - # quota check was not successful, then this will not be populated due to no - # quota consumption. - # Deprecated: Use quota_metrics to get per quota group usage. - # Corresponds to the JSON property `quotaConsumed` - # @return [Hash] - attr_accessor :quota_consumed - - # Quota metrics to indicate the usage. Depending on the check request, one or - # more of the following metrics will be included: - # 1. For rate quota, per quota group or per quota metric incremental usage - # will be specified using the following delta metric: - # "serviceruntime.googleapis.com/api/consumer/quota_used_count" - # 2. For allocation quota, per quota metric total usage will be specified - # using the following gauge metric: - # "serviceruntime.googleapis.com/allocation/consumer/quota_used_count" - # 3. For both rate quota and allocation quota, the quota limit reached - # condition will be specified using the following boolean metric: - # "serviceruntime.googleapis.com/quota/exceeded" - # Corresponds to the JSON property `quotaMetrics` - # @return [Array] - attr_accessor :quota_metrics - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @limit_exceeded = args[:limit_exceeded] if args.key?(:limit_exceeded) - @quota_consumed = args[:quota_consumed] if args.key?(:quota_consumed) - @quota_metrics = args[:quota_metrics] if args.key?(:quota_metrics) + @authority_selector = args[:authority_selector] if args.key?(:authority_selector) end end end diff --git a/generated/google/apis/servicecontrol_v1/representations.rb b/generated/google/apis/servicecontrol_v1/representations.rb index 9c048a993..602370a7e 100644 --- a/generated/google/apis/servicecontrol_v1/representations.rb +++ b/generated/google/apis/servicecontrol_v1/representations.rb @@ -22,6 +22,78 @@ module Google module Apis module ServicecontrolV1 + class AllocateQuotaResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ReleaseQuotaRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class QuotaError + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class RequestMetadata + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CheckInfo + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ReleaseQuotaResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AllocateQuotaRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class MetricValueSet + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ReportError + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class StartReconciliationRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CheckError + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class QuotaInfo + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class CheckRequest class Representation < Google::Apis::Core::JsonRepresentation; end @@ -46,13 +118,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class ReportResponse + class Operation class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class Operation + class ReportResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -76,13 +148,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class LogEntry + class AuditLog class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class AuditLog + class LogEntry class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -94,13 +166,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class EndReconciliationResponse + class Money class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class Money + class EndReconciliationResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -155,98 +227,138 @@ module Google end class AllocateQuotaResponse - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :operation_id, as: 'operationId' + property :service_config_id, as: 'serviceConfigId' + collection :allocate_errors, as: 'allocateErrors', class: Google::Apis::ServicecontrolV1::QuotaError, decorator: Google::Apis::ServicecontrolV1::QuotaError::Representation - include Google::Apis::Core::JsonObjectSupport + collection :quota_metrics, as: 'quotaMetrics', class: Google::Apis::ServicecontrolV1::MetricValueSet, decorator: Google::Apis::ServicecontrolV1::MetricValueSet::Representation + + end end class ReleaseQuotaRequest - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :service_config_id, as: 'serviceConfigId' + property :release_operation, as: 'releaseOperation', class: Google::Apis::ServicecontrolV1::QuotaOperation, decorator: Google::Apis::ServicecontrolV1::QuotaOperation::Representation - include Google::Apis::Core::JsonObjectSupport - end - - class RequestMetadata - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + end end class QuotaError - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :subject, as: 'subject' + property :description, as: 'description' + property :code, as: 'code' + end + end - include Google::Apis::Core::JsonObjectSupport + class RequestMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :caller_supplied_user_agent, as: 'callerSuppliedUserAgent' + property :caller_ip, as: 'callerIp' + end end class CheckInfo - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :unused_arguments, as: 'unusedArguments' + end end class ReleaseQuotaResponse - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :service_config_id, as: 'serviceConfigId' + collection :release_errors, as: 'releaseErrors', class: Google::Apis::ServicecontrolV1::QuotaError, decorator: Google::Apis::ServicecontrolV1::QuotaError::Representation - include Google::Apis::Core::JsonObjectSupport + collection :quota_metrics, as: 'quotaMetrics', class: Google::Apis::ServicecontrolV1::MetricValueSet, decorator: Google::Apis::ServicecontrolV1::MetricValueSet::Representation + + property :operation_id, as: 'operationId' + end end class AllocateQuotaRequest - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :service_config_id, as: 'serviceConfigId' + property :allocate_operation, as: 'allocateOperation', class: Google::Apis::ServicecontrolV1::QuotaOperation, decorator: Google::Apis::ServicecontrolV1::QuotaOperation::Representation - include Google::Apis::Core::JsonObjectSupport + property :allocation_mode, as: 'allocationMode' + end end class MetricValueSet - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :metric_name, as: 'metricName' + collection :metric_values, as: 'metricValues', class: Google::Apis::ServicecontrolV1::MetricValue, decorator: Google::Apis::ServicecontrolV1::MetricValue::Representation - include Google::Apis::Core::JsonObjectSupport + end end class ReportError - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :operation_id, as: 'operationId' + property :status, as: 'status', class: Google::Apis::ServicecontrolV1::Status, decorator: Google::Apis::ServicecontrolV1::Status::Representation - include Google::Apis::Core::JsonObjectSupport - end - - class CheckError - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + end end class StartReconciliationRequest - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :reconciliation_operation, as: 'reconciliationOperation', class: Google::Apis::ServicecontrolV1::QuotaOperation, decorator: Google::Apis::ServicecontrolV1::QuotaOperation::Representation - include Google::Apis::Core::JsonObjectSupport + property :service_config_id, as: 'serviceConfigId' + end + end + + class CheckError + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :detail, as: 'detail' + property :code, as: 'code' + end end class QuotaInfo - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + hash :quota_consumed, as: 'quotaConsumed' + collection :quota_metrics, as: 'quotaMetrics', class: Google::Apis::ServicecontrolV1::MetricValueSet, decorator: Google::Apis::ServicecontrolV1::MetricValueSet::Representation - include Google::Apis::Core::JsonObjectSupport + collection :limit_exceeded, as: 'limitExceeded' + end end class CheckRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :skip_activation_check, as: 'skipActivationCheck' property :operation, as: 'operation', class: Google::Apis::ServicecontrolV1::Operation, decorator: Google::Apis::ServicecontrolV1::Operation::Representation property :request_project_settings, as: 'requestProjectSettings' property :service_config_id, as: 'serviceConfigId' + property :skip_activation_check, as: 'skipActivationCheck' end end class QuotaOperation # @private class Representation < Google::Apis::Core::JsonRepresentation - property :quota_mode, as: 'quotaMode' - property :method_name, as: 'methodName' collection :quota_metrics, as: 'quotaMetrics', class: Google::Apis::ServicecontrolV1::MetricValueSet, decorator: Google::Apis::ServicecontrolV1::MetricValueSet::Representation hash :labels, as: 'labels' property :consumer_id, as: 'consumerId' property :operation_id, as: 'operationId' + property :method_name, as: 'methodName' + property :quota_mode, as: 'quotaMode' end end @@ -268,20 +380,11 @@ module Google end end - class ReportResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :report_infos, as: 'reportInfos', class: Google::Apis::ServicecontrolV1::ReportInfo, decorator: Google::Apis::ServicecontrolV1::ReportInfo::Representation - - property :service_config_id, as: 'serviceConfigId' - collection :report_errors, as: 'reportErrors', class: Google::Apis::ServicecontrolV1::ReportError, decorator: Google::Apis::ServicecontrolV1::ReportError::Representation - - end - end - class Operation # @private class Representation < Google::Apis::Core::JsonRepresentation + property :quota_properties, as: 'quotaProperties', class: Google::Apis::ServicecontrolV1::QuotaProperties, decorator: Google::Apis::ServicecontrolV1::QuotaProperties::Representation + property :consumer_id, as: 'consumerId' property :operation_id, as: 'operationId' property :operation_name, as: 'operationName' @@ -295,8 +398,17 @@ module Google hash :user_labels, as: 'userLabels' collection :metric_value_sets, as: 'metricValueSets', class: Google::Apis::ServicecontrolV1::MetricValueSet, decorator: Google::Apis::ServicecontrolV1::MetricValueSet::Representation - property :quota_properties, as: 'quotaProperties', class: Google::Apis::ServicecontrolV1::QuotaProperties, decorator: Google::Apis::ServicecontrolV1::QuotaProperties::Representation + end + end + class ReportResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :report_errors, as: 'reportErrors', class: Google::Apis::ServicecontrolV1::ReportError, decorator: Google::Apis::ServicecontrolV1::ReportError::Representation + + collection :report_infos, as: 'reportInfos', class: Google::Apis::ServicecontrolV1::ReportInfo, decorator: Google::Apis::ServicecontrolV1::ReportInfo::Representation + + property :service_config_id, as: 'serviceConfigId' end end @@ -332,25 +444,16 @@ module Google end end - class LogEntry - # @private - class Representation < Google::Apis::Core::JsonRepresentation - hash :labels, as: 'labels' - property :severity, as: 'severity' - property :insert_id, as: 'insertId' - property :name, as: 'name' - hash :struct_payload, as: 'structPayload' - property :text_payload, as: 'textPayload' - hash :proto_payload, as: 'protoPayload' - property :timestamp, as: 'timestamp' - end - end - class AuditLog # @private class Representation < Google::Apis::Core::JsonRepresentation - property :service_name, as: 'serviceName' + property :num_response_items, :numeric_string => true, as: 'numResponseItems' + property :status, as: 'status', class: Google::Apis::ServicecontrolV1::Status, decorator: Google::Apis::ServicecontrolV1::Status::Representation + + property :authentication_info, as: 'authenticationInfo', class: Google::Apis::ServicecontrolV1::AuthenticationInfo, decorator: Google::Apis::ServicecontrolV1::AuthenticationInfo::Representation + hash :response, as: 'response' + property :service_name, as: 'serviceName' property :method_name, as: 'methodName' collection :authorization_info, as: 'authorizationInfo', class: Google::Apis::ServicecontrolV1::AuthorizationInfo, decorator: Google::Apis::ServicecontrolV1::AuthorizationInfo::Representation @@ -359,28 +462,46 @@ module Google property :request_metadata, as: 'requestMetadata', class: Google::Apis::ServicecontrolV1::RequestMetadata, decorator: Google::Apis::ServicecontrolV1::RequestMetadata::Representation hash :service_data, as: 'serviceData' - property :num_response_items, :numeric_string => true, as: 'numResponseItems' - property :status, as: 'status', class: Google::Apis::ServicecontrolV1::Status, decorator: Google::Apis::ServicecontrolV1::Status::Representation - - property :authentication_info, as: 'authenticationInfo', class: Google::Apis::ServicecontrolV1::AuthenticationInfo, decorator: Google::Apis::ServicecontrolV1::AuthenticationInfo::Representation + end + end + class LogEntry + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :timestamp, as: 'timestamp' + hash :labels, as: 'labels' + property :severity, as: 'severity' + property :insert_id, as: 'insertId' + property :name, as: 'name' + hash :struct_payload, as: 'structPayload' + property :text_payload, as: 'textPayload' + hash :proto_payload, as: 'protoPayload' end end class MetricValue # @private class Representation < Google::Apis::Core::JsonRepresentation + property :bool_value, as: 'boolValue' + property :end_time, as: 'endTime' property :start_time, as: 'startTime' property :money_value, as: 'moneyValue', class: Google::Apis::ServicecontrolV1::Money, decorator: Google::Apis::ServicecontrolV1::Money::Representation - hash :labels, as: 'labels' property :string_value, as: 'stringValue' + hash :labels, as: 'labels' property :double_value, as: 'doubleValue' property :int64_value, :numeric_string => true, as: 'int64Value' property :distribution_value, as: 'distributionValue', class: Google::Apis::ServicecontrolV1::Distribution, decorator: Google::Apis::ServicecontrolV1::Distribution::Representation - property :bool_value, as: 'boolValue' - property :end_time, as: 'endTime' + end + end + + class Money + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :currency_code, as: 'currencyCode' + property :nanos, as: 'nanos' + property :units, :numeric_string => true, as: 'units' end end @@ -396,15 +517,6 @@ module Google end end - class Money - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :currency_code, as: 'currencyCode' - property :nanos, as: 'nanos' - property :units, :numeric_string => true, as: 'units' - end - end - class ExplicitBuckets # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -415,8 +527,11 @@ module Google class Distribution # @private class Representation < Google::Apis::Core::JsonRepresentation - property :count, :numeric_string => true, as: 'count' + property :linear_buckets, as: 'linearBuckets', class: Google::Apis::ServicecontrolV1::LinearBuckets, decorator: Google::Apis::ServicecontrolV1::LinearBuckets::Representation + + property :minimum, as: 'minimum' property :mean, as: 'mean' + property :count, :numeric_string => true, as: 'count' collection :bucket_counts, as: 'bucketCounts' property :explicit_buckets, as: 'explicitBuckets', class: Google::Apis::ServicecontrolV1::ExplicitBuckets, decorator: Google::Apis::ServicecontrolV1::ExplicitBuckets::Representation @@ -424,18 +539,15 @@ module Google property :sum_of_squared_deviation, as: 'sumOfSquaredDeviation' property :exponential_buckets, as: 'exponentialBuckets', class: Google::Apis::ServicecontrolV1::ExponentialBuckets, decorator: Google::Apis::ServicecontrolV1::ExponentialBuckets::Representation - property :linear_buckets, as: 'linearBuckets', class: Google::Apis::ServicecontrolV1::LinearBuckets, decorator: Google::Apis::ServicecontrolV1::LinearBuckets::Representation - - property :minimum, as: 'minimum' end end class ExponentialBuckets # @private class Representation < Google::Apis::Core::JsonRepresentation + property :growth_factor, as: 'growthFactor' property :scale, as: 'scale' property :num_finite_buckets, as: 'numFiniteBuckets' - property :growth_factor, as: 'growthFactor' end end @@ -451,149 +563,37 @@ module Google class StartReconciliationResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - property :operation_id, as: 'operationId' - collection :reconciliation_errors, as: 'reconciliationErrors', class: Google::Apis::ServicecontrolV1::QuotaError, decorator: Google::Apis::ServicecontrolV1::QuotaError::Representation - property :service_config_id, as: 'serviceConfigId' collection :quota_metrics, as: 'quotaMetrics', class: Google::Apis::ServicecontrolV1::MetricValueSet, decorator: Google::Apis::ServicecontrolV1::MetricValueSet::Representation + property :operation_id, as: 'operationId' + collection :reconciliation_errors, as: 'reconciliationErrors', class: Google::Apis::ServicecontrolV1::QuotaError, decorator: Google::Apis::ServicecontrolV1::QuotaError::Representation + end end class QuotaProperties # @private class Representation < Google::Apis::Core::JsonRepresentation - property :quota_mode, as: 'quotaMode' hash :limit_by_ids, as: 'limitByIds' + property :quota_mode, as: 'quotaMode' end end class LinearBuckets # @private class Representation < Google::Apis::Core::JsonRepresentation + property :num_finite_buckets, as: 'numFiniteBuckets' property :width, as: 'width' property :offset, as: 'offset' - property :num_finite_buckets, as: 'numFiniteBuckets' end end class AuthenticationInfo # @private class Representation < Google::Apis::Core::JsonRepresentation - property :authority_selector, as: 'authoritySelector' property :principal_email, as: 'principalEmail' - end - end - - class AllocateQuotaResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :operation_id, as: 'operationId' - property :service_config_id, as: 'serviceConfigId' - collection :allocate_errors, as: 'allocateErrors', class: Google::Apis::ServicecontrolV1::QuotaError, decorator: Google::Apis::ServicecontrolV1::QuotaError::Representation - - collection :quota_metrics, as: 'quotaMetrics', class: Google::Apis::ServicecontrolV1::MetricValueSet, decorator: Google::Apis::ServicecontrolV1::MetricValueSet::Representation - - end - end - - class ReleaseQuotaRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :service_config_id, as: 'serviceConfigId' - property :release_operation, as: 'releaseOperation', class: Google::Apis::ServicecontrolV1::QuotaOperation, decorator: Google::Apis::ServicecontrolV1::QuotaOperation::Representation - - end - end - - class RequestMetadata - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :caller_supplied_user_agent, as: 'callerSuppliedUserAgent' - property :caller_ip, as: 'callerIp' - end - end - - class QuotaError - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :subject, as: 'subject' - property :description, as: 'description' - property :code, as: 'code' - end - end - - class CheckInfo - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :unused_arguments, as: 'unusedArguments' - end - end - - class ReleaseQuotaResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :release_errors, as: 'releaseErrors', class: Google::Apis::ServicecontrolV1::QuotaError, decorator: Google::Apis::ServicecontrolV1::QuotaError::Representation - - collection :quota_metrics, as: 'quotaMetrics', class: Google::Apis::ServicecontrolV1::MetricValueSet, decorator: Google::Apis::ServicecontrolV1::MetricValueSet::Representation - - property :operation_id, as: 'operationId' - property :service_config_id, as: 'serviceConfigId' - end - end - - class AllocateQuotaRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :allocate_operation, as: 'allocateOperation', class: Google::Apis::ServicecontrolV1::QuotaOperation, decorator: Google::Apis::ServicecontrolV1::QuotaOperation::Representation - - property :allocation_mode, as: 'allocationMode' - property :service_config_id, as: 'serviceConfigId' - end - end - - class MetricValueSet - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :metric_name, as: 'metricName' - collection :metric_values, as: 'metricValues', class: Google::Apis::ServicecontrolV1::MetricValue, decorator: Google::Apis::ServicecontrolV1::MetricValue::Representation - - end - end - - class ReportError - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :operation_id, as: 'operationId' - property :status, as: 'status', class: Google::Apis::ServicecontrolV1::Status, decorator: Google::Apis::ServicecontrolV1::Status::Representation - - end - end - - class CheckError - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :code, as: 'code' - property :detail, as: 'detail' - end - end - - class StartReconciliationRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :reconciliation_operation, as: 'reconciliationOperation', class: Google::Apis::ServicecontrolV1::QuotaOperation, decorator: Google::Apis::ServicecontrolV1::QuotaOperation::Representation - - property :service_config_id, as: 'serviceConfigId' - end - end - - class QuotaInfo - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :limit_exceeded, as: 'limitExceeded' - hash :quota_consumed, as: 'quotaConsumed' - collection :quota_metrics, as: 'quotaMetrics', class: Google::Apis::ServicecontrolV1::MetricValueSet, decorator: Google::Apis::ServicecontrolV1::MetricValueSet::Representation - + property :authority_selector, as: 'authoritySelector' end end end diff --git a/generated/google/apis/servicecontrol_v1/service.rb b/generated/google/apis/servicecontrol_v1/service.rb index 5a26f3732..eb80495d4 100644 --- a/generated/google/apis/servicecontrol_v1/service.rb +++ b/generated/google/apis/servicecontrol_v1/service.rb @@ -48,63 +48,6 @@ module Google @batch_path = 'batch' end - # Unlike rate quota, allocation quota does not get refilled periodically. - # So, it is possible that the quota usage as seen by the service differs from - # what the One Platform considers the usage is. This is expected to happen - # only rarely, but over time this can accumulate. Services can invoke - # StartReconciliation and EndReconciliation to correct this usage drift, as - # described below: - # 1. Service sends StartReconciliation with a timestamp in future for each - # metric that needs to be reconciled. The timestamp being in future allows - # to account for in-flight AllocateQuota and ReleaseQuota requests for the - # same metric. - # 2. One Platform records this timestamp and starts tracking subsequent - # AllocateQuota and ReleaseQuota requests until EndReconciliation is - # called. - # 3. At or after the time specified in the StartReconciliation, service - # sends EndReconciliation with the usage that needs to be reconciled to. - # 4. One Platform adjusts its own record of usage for that metric to the - # value specified in EndReconciliation by taking in to account any - # allocation or release between StartReconciliation and EndReconciliation. - # Signals the quota controller that the service wants to perform a usage - # reconciliation as specified in the request. - # This method requires the `servicemanagement.services.quota` - # permission on the specified service. For more information, see - # [Google Cloud IAM](https://cloud.google.com/iam). - # @param [String] service_name - # Name of the service as specified in the service configuration. For example, - # `"pubsub.googleapis.com"`. - # See google.api.Service for the definition of a service name. - # @param [Google::Apis::ServicecontrolV1::StartReconciliationRequest] start_reconciliation_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::ServicecontrolV1::StartReconciliationResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ServicecontrolV1::StartReconciliationResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def start_service_reconciliation(service_name, start_reconciliation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/services/{serviceName}:startReconciliation', options) - command.request_representation = Google::Apis::ServicecontrolV1::StartReconciliationRequest::Representation - command.request_object = start_reconciliation_request_object - command.response_representation = Google::Apis::ServicecontrolV1::StartReconciliationResponse::Representation - command.response_class = Google::Apis::ServicecontrolV1::StartReconciliationResponse - command.params['serviceName'] = service_name unless service_name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - # Checks an operation with Google Service Control to decide whether # the given operation should proceed. It should be called before the # operation is executed. @@ -325,6 +268,63 @@ module Google command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end + + # Unlike rate quota, allocation quota does not get refilled periodically. + # So, it is possible that the quota usage as seen by the service differs from + # what the One Platform considers the usage is. This is expected to happen + # only rarely, but over time this can accumulate. Services can invoke + # StartReconciliation and EndReconciliation to correct this usage drift, as + # described below: + # 1. Service sends StartReconciliation with a timestamp in future for each + # metric that needs to be reconciled. The timestamp being in future allows + # to account for in-flight AllocateQuota and ReleaseQuota requests for the + # same metric. + # 2. One Platform records this timestamp and starts tracking subsequent + # AllocateQuota and ReleaseQuota requests until EndReconciliation is + # called. + # 3. At or after the time specified in the StartReconciliation, service + # sends EndReconciliation with the usage that needs to be reconciled to. + # 4. One Platform adjusts its own record of usage for that metric to the + # value specified in EndReconciliation by taking in to account any + # allocation or release between StartReconciliation and EndReconciliation. + # Signals the quota controller that the service wants to perform a usage + # reconciliation as specified in the request. + # This method requires the `servicemanagement.services.quota` + # permission on the specified service. For more information, see + # [Google Cloud IAM](https://cloud.google.com/iam). + # @param [String] service_name + # Name of the service as specified in the service configuration. For example, + # `"pubsub.googleapis.com"`. + # See google.api.Service for the definition of a service name. + # @param [Google::Apis::ServicecontrolV1::StartReconciliationRequest] start_reconciliation_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::ServicecontrolV1::StartReconciliationResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ServicecontrolV1::StartReconciliationResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def start_service_reconciliation(service_name, start_reconciliation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/services/{serviceName}:startReconciliation', options) + command.request_representation = Google::Apis::ServicecontrolV1::StartReconciliationRequest::Representation + command.request_object = start_reconciliation_request_object + command.response_representation = Google::Apis::ServicecontrolV1::StartReconciliationResponse::Representation + command.response_class = Google::Apis::ServicecontrolV1::StartReconciliationResponse + command.params['serviceName'] = service_name unless service_name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end protected diff --git a/generated/google/apis/servicemanagement_v1.rb b/generated/google/apis/servicemanagement_v1.rb index 477e6dbd4..22e75934d 100644 --- a/generated/google/apis/servicemanagement_v1.rb +++ b/generated/google/apis/servicemanagement_v1.rb @@ -27,10 +27,7 @@ module Google # @see https://cloud.google.com/service-management/ module ServicemanagementV1 VERSION = 'V1' - REVISION = '20170428' - - # Manage your Google API service configuration - AUTH_SERVICE_MANAGEMENT = 'https://www.googleapis.com/auth/service.management' + REVISION = '20170519' # View your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM_READ_ONLY = 'https://www.googleapis.com/auth/cloud-platform.read-only' @@ -40,6 +37,9 @@ module Google # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' + + # Manage your Google API service configuration + AUTH_SERVICE_MANAGEMENT = 'https://www.googleapis.com/auth/service.management' end end end diff --git a/generated/google/apis/servicemanagement_v1/classes.rb b/generated/google/apis/servicemanagement_v1/classes.rb index 47943f54d..4cf58f09f 100644 --- a/generated/google/apis/servicemanagement_v1/classes.rb +++ b/generated/google/apis/servicemanagement_v1/classes.rb @@ -22,552 +22,18 @@ module Google module Apis module ServicemanagementV1 - # `QuotaLimit` defines a specific limit that applies over a specified duration - # for a limit type. There can be at most one limit for a duration and limit - # type combination defined within a `QuotaGroup`. - class QuotaLimit - include Google::Apis::Core::Hashable - - # Duration of this limit in textual notation. Example: "100s", "24h", "1d". - # For duration longer than a day, only multiple of days is supported. We - # support only "100s" and "1d" for now. Additional support will be added in - # the future. "0" indicates indefinite duration. - # Used by group-based quotas only. - # Corresponds to the JSON property `duration` - # @return [String] - attr_accessor :duration - - # Free tier value displayed in the Developers Console for this limit. - # The free tier is the number of tokens that will be subtracted from the - # billed amount when billing is enabled. - # This field can only be set on a limit with duration "1d", in a billable - # group; it is invalid on any other limit. If this field is not set, it - # defaults to 0, indicating that there is no free tier for this service. - # Used by group-based quotas only. - # Corresponds to the JSON property `freeTier` - # @return [Fixnum] - attr_accessor :free_tier - - # Default number of tokens that can be consumed during the specified - # duration. This is the number of tokens assigned when a client - # application developer activates the service for his/her project. - # Specifying a value of 0 will block all requests. This can be used if you - # are provisioning quota to selected consumers and blocking others. - # Similarly, a value of -1 will indicate an unlimited quota. No other - # negative values are allowed. - # Used by group-based quotas only. - # Corresponds to the JSON property `defaultLimit` - # @return [Fixnum] - attr_accessor :default_limit - - # Optional. User-visible, extended description for this quota limit. - # Should be used only when more context is needed to understand this limit - # than provided by the limit's display name (see: `display_name`). - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # User-visible display name for this limit. - # Optional. If not set, the UI will provide a default display name based on - # the quota configuration. This field can be used to override the default - # display name generated from the configuration. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # The name of the metric this quota limit applies to. The quota limits with - # the same metric will be checked together during runtime. The metric must be - # defined within the service config. - # Used by metric-based quotas only. - # Corresponds to the JSON property `metric` - # @return [String] - attr_accessor :metric - - # Tiered limit values. Also allows for regional or zone overrides for these - # values if "/`region`" or "/`zone`" is specified in the unit field. - # Currently supported tiers from low to high: - # VERY_LOW, LOW, STANDARD, HIGH, VERY_HIGH - # To apply different limit values for users according to their tiers, specify - # the values for the tiers you want to differentiate. For example: - # `LOW:100, STANDARD:500, HIGH:1000, VERY_HIGH:5000` - # The limit value for each tier is optional except for the tier STANDARD. - # The limit value for an unspecified tier falls to the value of its next - # tier towards tier STANDARD. For the above example, the limit value for tier - # STANDARD is 500. - # To apply the same limit value for all users, just specify limit value for - # tier STANDARD. For example: `STANDARD:500`. - # To apply a regional overide for a tier, add a map entry with key - # "/", where is a region name. Similarly, for a zone - # override, add a map entry with key "/`zone`". - # Further, a wildcard can be used at the end of a zone name in order to - # specify zone level overrides. For example: - # LOW: 10, STANDARD: 50, HIGH: 100, - # LOW/us-central1: 20, STANDARD/us-central1: 60, HIGH/us-central1: 200, - # LOW/us-central1-*: 10, STANDARD/us-central1-*: 20, HIGH/us-central1-*: 80 - # The regional overrides tier set for each region must be the same as - # the tier set for default limit values. Same rule applies for zone overrides - # tier as well. - # Used by metric-based quotas only. - # Corresponds to the JSON property `values` - # @return [Hash] - attr_accessor :values - - # Specify the unit of the quota limit. It uses the same syntax as - # Metric.unit. The supported unit kinds are determined by the quota - # backend system. - # The [Google Service Control](https://cloud.google.com/service-control) - # supports the following unit components: - # * One of the time intevals: - # * "/min" for quota every minute. - # * "/d" for quota every 24 hours, starting 00:00 US Pacific Time. - # * Otherwise the quota won't be reset by time, such as storage limit. - # * One and only one of the granted containers: - # * "/`organization`" quota for an organization. - # * "/`project`" quota for a project. - # * "/`folder`" quota for a folder. - # * "/`resource`" quota for a universal resource. - # * Zero or more quota segmentation dimension. Not all combos are valid. - # * "/`region`" quota for every region. Not to be used with time intervals. - # * Otherwise the resources granted on the target is not segmented. - # * "/`zone`" quota for every zone. Not to be used with time intervals. - # * Otherwise the resources granted on the target is not segmented. - # * "/`resource`" quota for a resource associated with a project or org. - # Here are some examples: - # * "1/min/`project`" for quota per minute per project. - # * "1/min/`user`" for quota per minute per user. - # * "1/min/`organization`" for quota per minute per organization. - # Note: the order of unit components is insignificant. - # The "1" at the beginning is required to follow the metric unit syntax. - # Used by metric-based quotas only. - # Corresponds to the JSON property `unit` - # @return [String] - attr_accessor :unit - - # Maximum number of tokens that can be consumed during the specified - # duration. Client application developers can override the default limit up - # to this maximum. If specified, this value cannot be set to a value less - # than the default limit. If not specified, it is set to the default limit. - # To allow clients to apply overrides with no upper bound, set this to -1, - # indicating unlimited maximum quota. - # Used by group-based quotas only. - # Corresponds to the JSON property `maxLimit` - # @return [Fixnum] - attr_accessor :max_limit - - # Name of the quota limit. The name is used to refer to the limit when - # overriding the default limit on per-consumer basis. - # For group-based quota limits, the name must be unique within the quota - # group. If a name is not provided, it will be generated from the limit_by - # and duration fields. - # For metric-based quota limits, the name must be provided, and it must be - # unique within the service. The name can only include alphanumeric - # characters as well as '-'. - # The maximum length of the limit name is 64 characters. - # The name of a limit is used as a unique identifier for this limit. - # Therefore, once a limit has been put into use, its name should be - # immutable. You can use the display_name field to provide a user-friendly - # name for the limit. The display name can be evolved over time without - # affecting the identity of the limit. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @duration = args[:duration] if args.key?(:duration) - @free_tier = args[:free_tier] if args.key?(:free_tier) - @default_limit = args[:default_limit] if args.key?(:default_limit) - @description = args[:description] if args.key?(:description) - @display_name = args[:display_name] if args.key?(:display_name) - @metric = args[:metric] if args.key?(:metric) - @values = args[:values] if args.key?(:values) - @unit = args[:unit] if args.key?(:unit) - @max_limit = args[:max_limit] if args.key?(:max_limit) - @name = args[:name] if args.key?(:name) - end - end - - # Method represents a method of an api. - class MethodProp - include Google::Apis::Core::Hashable - - # The URL of the output message type. - # Corresponds to the JSON property `responseTypeUrl` - # @return [String] - attr_accessor :response_type_url - - # Any metadata attached to the method. - # Corresponds to the JSON property `options` - # @return [Array] - attr_accessor :options - - # If true, the response is streamed. - # Corresponds to the JSON property `responseStreaming` - # @return [Boolean] - attr_accessor :response_streaming - alias_method :response_streaming?, :response_streaming - - # The simple name of this method. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # A URL of the input message type. - # Corresponds to the JSON property `requestTypeUrl` - # @return [String] - attr_accessor :request_type_url - - # If true, the request is streamed. - # Corresponds to the JSON property `requestStreaming` - # @return [Boolean] - attr_accessor :request_streaming - alias_method :request_streaming?, :request_streaming - - # The source syntax of this method. - # Corresponds to the JSON property `syntax` - # @return [String] - attr_accessor :syntax - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @response_type_url = args[:response_type_url] if args.key?(:response_type_url) - @options = args[:options] if args.key?(:options) - @response_streaming = args[:response_streaming] if args.key?(:response_streaming) - @name = args[:name] if args.key?(:name) - @request_type_url = args[:request_type_url] if args.key?(:request_type_url) - @request_streaming = args[:request_streaming] if args.key?(:request_streaming) - @syntax = args[:syntax] if args.key?(:syntax) - end - end - - # Represents a service configuration with its name and id. - class ConfigRef - include Google::Apis::Core::Hashable - - # Resource name of a service config. It must have the following - # format: "services/`service name`/configs/`config id`". - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @name = args[:name] if args.key?(:name) - end - end - - # Response message for ListServiceRollouts method. - class ListServiceRolloutsResponse - include Google::Apis::Core::Hashable - - # The list of rollout resources. - # Corresponds to the JSON property `rollouts` - # @return [Array] - attr_accessor :rollouts - - # The token of the next page of results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @rollouts = args[:rollouts] if args.key?(:rollouts) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # Declares an API to be included in this API. The including API must - # redeclare all the methods from the included API, but documentation - # and options are inherited as follows: - # - If after comment and whitespace stripping, the documentation - # string of the redeclared method is empty, it will be inherited - # from the original method. - # - Each annotation belonging to the service config (http, - # visibility) which is not set in the redeclared method will be - # inherited. - # - If an http annotation is inherited, the path pattern will be - # modified as follows. Any version prefix will be replaced by the - # version of the including API plus the root path if specified. - # Example of a simple mixin: - # package google.acl.v1; - # service AccessControl ` - # // Get the underlying ACL object. - # rpc GetAcl(GetAclRequest) returns (Acl) ` - # option (google.api.http).get = "/v1/`resource=**`:getAcl"; - # ` - # ` - # package google.storage.v2; - # service Storage ` - # // rpc GetAcl(GetAclRequest) returns (Acl); - # // Get a data record. - # rpc GetData(GetDataRequest) returns (Data) ` - # option (google.api.http).get = "/v2/`resource=**`"; - # ` - # ` - # Example of a mixin configuration: - # apis: - # - name: google.storage.v2.Storage - # mixins: - # - name: google.acl.v1.AccessControl - # The mixin construct implies that all methods in `AccessControl` are - # also declared with same name and request/response types in - # `Storage`. A documentation generator or annotation processor will - # see the effective `Storage.GetAcl` method after inherting - # documentation and annotations as follows: - # service Storage ` - # // Get the underlying ACL object. - # rpc GetAcl(GetAclRequest) returns (Acl) ` - # option (google.api.http).get = "/v2/`resource=**`:getAcl"; - # ` - # ... - # ` - # Note how the version in the path pattern changed from `v1` to `v2`. - # If the `root` field in the mixin is specified, it should be a - # relative path under which inherited HTTP paths are placed. Example: - # apis: - # - name: google.storage.v2.Storage - # mixins: - # - name: google.acl.v1.AccessControl - # root: acls - # This implies the following inherited HTTP annotation: - # service Storage ` - # // Get the underlying ACL object. - # rpc GetAcl(GetAclRequest) returns (Acl) ` - # option (google.api.http).get = "/v2/acls/`resource=**`:getAcl"; - # ` - # ... - # ` - class Mixin - include Google::Apis::Core::Hashable - - # The fully qualified name of the API which is included. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # If non-empty specifies a path under which inherited HTTP paths - # are rooted. - # Corresponds to the JSON property `root` - # @return [String] - attr_accessor :root - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @name = args[:name] if args.key?(:name) - @root = args[:root] if args.key?(:root) - end - end - - # The metadata associated with a long running operation resource. - class FlowOperationMetadata - include Google::Apis::Core::Hashable - - # The state of the operation with respect to cancellation. - # Corresponds to the JSON property `cancelState` - # @return [String] - attr_accessor :cancel_state - - # Deadline for the flow to complete, to prevent orphaned Operations. - # If the flow has not completed by this time, it may be terminated by - # the engine, or force-failed by Operation lookup. - # Note that this is not a hard deadline after which the Flow will - # definitely be failed, rather it is a deadline after which it is reasonable - # to suspect a problem and other parts of the system may kill operation - # to ensure we don't have orphans. - # see also: go/prevent-orphaned-operations - # Corresponds to the JSON property `deadline` - # @return [String] - attr_accessor :deadline - - # The start time of the operation. - # Corresponds to the JSON property `startTime` - # @return [String] - attr_accessor :start_time - - # The name of the top-level flow corresponding to this operation. - # Must be equal to the "name" field for a FlowName enum. - # Corresponds to the JSON property `flowName` - # @return [String] - attr_accessor :flow_name - - # The full name of the resources that this flow is directly associated with. - # Corresponds to the JSON property `resourceNames` - # @return [Array] - attr_accessor :resource_names - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @cancel_state = args[:cancel_state] if args.key?(:cancel_state) - @deadline = args[:deadline] if args.key?(:deadline) - @start_time = args[:start_time] if args.key?(:start_time) - @flow_name = args[:flow_name] if args.key?(:flow_name) - @resource_names = args[:resource_names] if args.key?(:resource_names) - end - end - - # Customize service error responses. For example, list any service - # specific protobuf types that can appear in error detail lists of - # error responses. - # Example: - # custom_error: - # types: - # - google.foo.v1.CustomError - # - google.foo.v1.AnotherError - class CustomError - include Google::Apis::Core::Hashable - - # The list of custom error detail types, e.g. 'google.foo.v1.CustomError'. - # Corresponds to the JSON property `types` - # @return [Array] - attr_accessor :types - - # The list of custom error rules that apply to individual API messages. - # **NOTE:** All service configuration rules follow "last one wins" order. - # Corresponds to the JSON property `rules` - # @return [Array] - attr_accessor :rules - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @types = args[:types] if args.key?(:types) - @rules = args[:rules] if args.key?(:rules) - end - end - - # Options for counters - class CounterOptions - include Google::Apis::Core::Hashable - - # The metric to update. - # Corresponds to the JSON property `metric` - # @return [String] - attr_accessor :metric - - # The field value to attribute. - # Corresponds to the JSON property `field` - # @return [String] - attr_accessor :field - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @metric = args[:metric] if args.key?(:metric) - @field = args[:field] if args.key?(:field) - end - end - - # Defines the HTTP configuration for a service. It contains a list of - # HttpRule, each specifying the mapping of an RPC method - # to one or more HTTP REST API methods. - class Http - include Google::Apis::Core::Hashable - - # When set to true, URL path parmeters will be fully URI-decoded except in - # cases of single segment matches in reserved expansion, where "%2F" will be - # left encoded. - # The default behavior is to not decode RFC 6570 reserved characters in multi - # segment matches. - # Corresponds to the JSON property `fullyDecodeReservedExpansion` - # @return [Boolean] - attr_accessor :fully_decode_reserved_expansion - alias_method :fully_decode_reserved_expansion?, :fully_decode_reserved_expansion - - # A list of HTTP configuration rules that apply to individual API methods. - # **NOTE:** All service configuration rules follow "last one wins" order. - # Corresponds to the JSON property `rules` - # @return [Array] - attr_accessor :rules - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @fully_decode_reserved_expansion = args[:fully_decode_reserved_expansion] if args.key?(:fully_decode_reserved_expansion) - @rules = args[:rules] if args.key?(:rules) - end - end - - # Source information used to create a Service Config - class SourceInfo - include Google::Apis::Core::Hashable - - # All files used during config generation. - # Corresponds to the JSON property `sourceFiles` - # @return [Array>] - attr_accessor :source_files - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @source_files = args[:source_files] if args.key?(:source_files) - end - end - - # Selects and configures the service controller used by the service. The - # service controller handles features like abuse, quota, billing, logging, - # monitoring, etc. - class Control - include Google::Apis::Core::Hashable - - # The service control environment to use. If empty, no control plane - # feature (like quota and billing) will be enabled. - # Corresponds to the JSON property `environment` - # @return [String] - attr_accessor :environment - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @environment = args[:environment] if args.key?(:environment) - end - end - # Define a parameter's name and location. The parameter may be passed as either # an HTTP header or a URL query parameter, and if both are passed the behavior # is implementation-dependent. class SystemParameter include Google::Apis::Core::Hashable + # Define the HTTP header name to use for the parameter. It is case + # insensitive. + # Corresponds to the JSON property `httpHeader` + # @return [String] + attr_accessor :http_header + # Define the name of the parameter, such as "api_key" . It is case sensitive. # Corresponds to the JSON property `name` # @return [String] @@ -579,21 +45,15 @@ module Google # @return [String] attr_accessor :url_query_parameter - # Define the HTTP header name to use for the parameter. It is case - # insensitive. - # Corresponds to the JSON property `httpHeader` - # @return [String] - attr_accessor :http_header - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @http_header = args[:http_header] if args.key?(:http_header) @name = args[:name] if args.key?(:name) @url_query_parameter = args[:url_query_parameter] if args.key?(:url_query_parameter) - @http_header = args[:http_header] if args.key?(:http_header) end end @@ -601,27 +61,6 @@ module Google class Field include Google::Apis::Core::Hashable - # The string value of the default value of this field. Proto2 syntax only. - # Corresponds to the JSON property `defaultValue` - # @return [String] - attr_accessor :default_value - - # The field name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The field type URL, without the scheme, for message or enumeration - # types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`. - # Corresponds to the JSON property `typeUrl` - # @return [String] - attr_accessor :type_url - - # The field number. - # Corresponds to the JSON property `number` - # @return [Fixnum] - attr_accessor :number - # The field type. # Corresponds to the JSON property `kind` # @return [String] @@ -654,22 +93,43 @@ module Google # @return [String] attr_accessor :cardinality + # The string value of the default value of this field. Proto2 syntax only. + # Corresponds to the JSON property `defaultValue` + # @return [String] + attr_accessor :default_value + + # The field name. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The field type URL, without the scheme, for message or enumeration + # types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`. + # Corresponds to the JSON property `typeUrl` + # @return [String] + attr_accessor :type_url + + # The field number. + # Corresponds to the JSON property `number` + # @return [Fixnum] + attr_accessor :number + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @default_value = args[:default_value] if args.key?(:default_value) - @name = args[:name] if args.key?(:name) - @type_url = args[:type_url] if args.key?(:type_url) - @number = args[:number] if args.key?(:number) @kind = args[:kind] if args.key?(:kind) @json_name = args[:json_name] if args.key?(:json_name) @options = args[:options] if args.key?(:options) @oneof_index = args[:oneof_index] if args.key?(:oneof_index) @packed = args[:packed] if args.key?(:packed) @cardinality = args[:cardinality] if args.key?(:cardinality) + @default_value = args[:default_value] if args.key?(:default_value) + @name = args[:name] if args.key?(:name) + @type_url = args[:type_url] if args.key?(:type_url) + @number = args[:number] if args.key?(:number) end end @@ -711,14 +171,6 @@ module Google class Monitoring include Google::Apis::Core::Hashable - # Monitoring configurations for sending metrics to the consumer project. - # There can be multiple consumer destinations, each one must have a - # different monitored resource type. A metric can be used in at most - # one consumer destination. - # Corresponds to the JSON property `consumerDestinations` - # @return [Array] - attr_accessor :consumer_destinations - # Monitoring configurations for sending metrics to the producer project. # There can be multiple producer destinations, each one must have a # different monitored resource type. A metric can be used in at most @@ -727,14 +179,22 @@ module Google # @return [Array] attr_accessor :producer_destinations + # Monitoring configurations for sending metrics to the consumer project. + # There can be multiple consumer destinations, each one must have a + # different monitored resource type. A metric can be used in at most + # one consumer destination. + # Corresponds to the JSON property `consumerDestinations` + # @return [Array] + attr_accessor :consumer_destinations + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @consumer_destinations = args[:consumer_destinations] if args.key?(:consumer_destinations) @producer_destinations = args[:producer_destinations] if args.key?(:producer_destinations) + @consumer_destinations = args[:consumer_destinations] if args.key?(:consumer_destinations) end end @@ -764,16 +224,6 @@ module Google class Enum include Google::Apis::Core::Hashable - # Enum type name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Enum value definitions. - # Corresponds to the JSON property `enumvalue` - # @return [Array] - attr_accessor :enumvalue - # Protocol buffer options. # Corresponds to the JSON property `options` # @return [Array] @@ -790,17 +240,89 @@ module Google # @return [String] attr_accessor :syntax + # Enum type name. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Enum value definitions. + # Corresponds to the JSON property `enumvalue` + # @return [Array] + attr_accessor :enumvalue + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @name = args[:name] if args.key?(:name) - @enumvalue = args[:enumvalue] if args.key?(:enumvalue) @options = args[:options] if args.key?(:options) @source_context = args[:source_context] if args.key?(:source_context) @syntax = args[:syntax] if args.key?(:syntax) + @name = args[:name] if args.key?(:name) + @enumvalue = args[:enumvalue] if args.key?(:enumvalue) + end + end + + # A description of a label. + class LabelDescriptor + include Google::Apis::Core::Hashable + + # The type of data that can be assigned to the label. + # Corresponds to the JSON property `valueType` + # @return [String] + attr_accessor :value_type + + # The label key. + # Corresponds to the JSON property `key` + # @return [String] + attr_accessor :key + + # A human-readable description for the label. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @value_type = args[:value_type] if args.key?(:value_type) + @key = args[:key] if args.key?(:key) + @description = args[:description] if args.key?(:description) + end + end + + # Represents a diagnostic message (error or warning) + class Diagnostic + include Google::Apis::Core::Hashable + + # Message describing the error or warning. + # Corresponds to the JSON property `message` + # @return [String] + attr_accessor :message + + # File name and line number of the error or warning. + # Corresponds to the JSON property `location` + # @return [String] + attr_accessor :location + + # The kind of diagnostic information provided. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @message = args[:message] if args.key?(:message) + @location = args[:location] if args.key?(:location) + @kind = args[:kind] if args.key?(:kind) end end @@ -829,24 +351,40 @@ module Google end end - # A description of a label. - class LabelDescriptor + # A protocol buffer message type. + class Type include Google::Apis::Core::Hashable - # A human-readable description for the label. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description + # The list of fields. + # Corresponds to the JSON property `fields` + # @return [Array] + attr_accessor :fields - # The type of data that can be assigned to the label. - # Corresponds to the JSON property `valueType` + # The fully qualified message name. + # Corresponds to the JSON property `name` # @return [String] - attr_accessor :value_type + attr_accessor :name - # The label key. - # Corresponds to the JSON property `key` + # The list of types appearing in `oneof` definitions in this type. + # Corresponds to the JSON property `oneofs` + # @return [Array] + attr_accessor :oneofs + + # The source syntax. + # Corresponds to the JSON property `syntax` # @return [String] - attr_accessor :key + attr_accessor :syntax + + # `SourceContext` represents information about the source of a + # protobuf element, like the file in which it is defined. + # Corresponds to the JSON property `sourceContext` + # @return [Google::Apis::ServicemanagementV1::SourceContext] + attr_accessor :source_context + + # The protocol buffer options. + # Corresponds to the JSON property `options` + # @return [Array] + attr_accessor :options def initialize(**args) update!(**args) @@ -854,40 +392,12 @@ module Google # Update properties of this object def update!(**args) - @description = args[:description] if args.key?(:description) - @value_type = args[:value_type] if args.key?(:value_type) - @key = args[:key] if args.key?(:key) - end - end - - # Represents a diagnostic message (error or warning) - class Diagnostic - include Google::Apis::Core::Hashable - - # The kind of diagnostic information provided. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Message describing the error or warning. - # Corresponds to the JSON property `message` - # @return [String] - attr_accessor :message - - # File name and line number of the error or warning. - # Corresponds to the JSON property `location` - # @return [String] - attr_accessor :location - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] if args.key?(:kind) - @message = args[:message] if args.key?(:message) - @location = args[:location] if args.key?(:location) + @fields = args[:fields] if args.key?(:fields) + @name = args[:name] if args.key?(:name) + @oneofs = args[:oneofs] if args.key?(:oneofs) + @syntax = args[:syntax] if args.key?(:syntax) + @source_context = args[:source_context] if args.key?(:source_context) + @options = args[:options] if args.key?(:options) end end @@ -931,40 +441,19 @@ module Google end end - # A protocol buffer message type. - class Type + # Response message for ListServiceConfigs method. + class ListServiceConfigsResponse include Google::Apis::Core::Hashable - # The protocol buffer options. - # Corresponds to the JSON property `options` - # @return [Array] - attr_accessor :options + # The list of service configuration resources. + # Corresponds to the JSON property `serviceConfigs` + # @return [Array] + attr_accessor :service_configs - # The list of fields. - # Corresponds to the JSON property `fields` - # @return [Array] - attr_accessor :fields - - # The fully qualified message name. - # Corresponds to the JSON property `name` + # The token of the next page of results. + # Corresponds to the JSON property `nextPageToken` # @return [String] - attr_accessor :name - - # The list of types appearing in `oneof` definitions in this type. - # Corresponds to the JSON property `oneofs` - # @return [Array] - attr_accessor :oneofs - - # `SourceContext` represents information about the source of a - # protobuf element, like the file in which it is defined. - # Corresponds to the JSON property `sourceContext` - # @return [Google::Apis::ServicemanagementV1::SourceContext] - attr_accessor :source_context - - # The source syntax. - # Corresponds to the JSON property `syntax` - # @return [String] - attr_accessor :syntax + attr_accessor :next_page_token def initialize(**args) update!(**args) @@ -972,12 +461,8 @@ module Google # Update properties of this object def update!(**args) - @options = args[:options] if args.key?(:options) - @fields = args[:fields] if args.key?(:fields) - @name = args[:name] if args.key?(:name) - @oneofs = args[:oneofs] if args.key?(:oneofs) - @source_context = args[:source_context] if args.key?(:source_context) - @syntax = args[:syntax] if args.key?(:syntax) + @service_configs = args[:service_configs] if args.key?(:service_configs) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) end end @@ -1007,19 +492,15 @@ module Google end end - # Response message for ListServiceConfigs method. - class ListServiceConfigsResponse + # `Backend` defines the backend configuration for a service. + class Backend include Google::Apis::Core::Hashable - # The list of service configuration resources. - # Corresponds to the JSON property `serviceConfigs` - # @return [Array] - attr_accessor :service_configs - - # The token of the next page of results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token + # A list of API backend rules that apply to individual API methods. + # **NOTE:** All service configuration rules follow "last one wins" order. + # Corresponds to the JSON property `rules` + # @return [Array] + attr_accessor :rules def initialize(**args) update!(**args) @@ -1027,8 +508,7 @@ module Google # Update properties of this object def update!(**args) - @service_configs = args[:service_configs] if args.key?(:service_configs) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @rules = args[:rules] if args.key?(:rules) end end @@ -1082,6 +562,11 @@ module Google class AuditConfig include Google::Apis::Core::Hashable + # + # Corresponds to the JSON property `exemptedMembers` + # @return [Array] + 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. @@ -1095,40 +580,15 @@ module Google # @return [Array] attr_accessor :audit_log_configs - # - # Corresponds to the JSON property `exemptedMembers` - # @return [Array] - attr_accessor :exempted_members - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @exempted_members = args[:exempted_members] if args.key?(:exempted_members) @service = args[:service] if args.key?(:service) @audit_log_configs = args[:audit_log_configs] if args.key?(:audit_log_configs) - @exempted_members = args[:exempted_members] if args.key?(:exempted_members) - end - end - - # `Backend` defines the backend configuration for a service. - class Backend - include Google::Apis::Core::Hashable - - # A list of API backend rules that apply to individual API methods. - # **NOTE:** All service configuration rules follow "last one wins" order. - # Corresponds to the JSON property `rules` - # @return [Array] - attr_accessor :rules - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @rules = args[:rules] if args.key?(:rules) end end @@ -1261,12 +721,18 @@ module Google class CloudAuditOptions include Google::Apis::Core::Hashable + # The log_name to populate in the Cloud Audit Record. + # Corresponds to the JSON property `logName` + # @return [String] + attr_accessor :log_name + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @log_name = args[:log_name] if args.key?(:log_name) end end @@ -1297,6 +763,22 @@ module Google class MetricDescriptor include Google::Apis::Core::Hashable + # The metric type, including its DNS name prefix. The type is not + # URL-encoded. All user-defined custom metric types have the DNS name + # `custom.googleapis.com`. Metric types should use a natural hierarchical + # grouping. For example: + # "custom.googleapis.com/invoice/paid/amount" + # "appengine.googleapis.com/http/server/response_latencies" + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # Whether the measurement is an integer, a floating-point number, etc. + # Some combinations of `metric_kind` and `value_type` might not be supported. + # Corresponds to the JSON property `valueType` + # @return [String] + attr_accessor :value_type + # Whether the metric records instantaneous values, changes to a value, etc. # Some combinations of `metric_kind` and `value_type` might not be supported. # Corresponds to the JSON property `metricKind` @@ -1390,36 +872,20 @@ module Google # @return [String] attr_accessor :name - # The metric type, including its DNS name prefix. The type is not - # URL-encoded. All user-defined custom metric types have the DNS name - # `custom.googleapis.com`. Metric types should use a natural hierarchical - # grouping. For example: - # "custom.googleapis.com/invoice/paid/amount" - # "appengine.googleapis.com/http/server/response_latencies" - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Whether the measurement is an integer, a floating-point number, etc. - # Some combinations of `metric_kind` and `value_type` might not be supported. - # Corresponds to the JSON property `valueType` - # @return [String] - attr_accessor :value_type - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @type = args[:type] if args.key?(:type) + @value_type = args[:value_type] if args.key?(:value_type) @metric_kind = args[:metric_kind] if args.key?(:metric_kind) @display_name = args[:display_name] if args.key?(:display_name) @description = args[:description] if args.key?(:description) @unit = args[:unit] if args.key?(:unit) @labels = args[:labels] if args.key?(:labels) @name = args[:name] if args.key?(:name) - @type = args[:type] if args.key?(:type) - @value_type = args[:value_type] if args.key?(:value_type) end end @@ -1471,18 +937,12 @@ module Google attr_accessor :features # The list of APIs served by this endpoint. + # If no APIs are specified this translates to "all APIs" exported by the + # service, as defined in the top-level service configuration. # Corresponds to the JSON property `apis` # @return [Array] attr_accessor :apis - # DEPRECATED: This field is no longer supported. Instead of using aliases, - # please specify multiple google.api.Endpoint for each of the intented - # alias. - # Additional names that this endpoint will be hosted on. - # Corresponds to the JSON property `aliases` - # @return [Array] - attr_accessor :aliases - # Allowing # [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka # cross-domain traffic, would allow the backends served from this endpoint to @@ -1494,10 +954,13 @@ module Google attr_accessor :allow_cors alias_method :allow_cors?, :allow_cors - # The canonical name of this endpoint. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name + # DEPRECATED: This field is no longer supported. Instead of using aliases, + # please specify multiple google.api.Endpoint for each of the intented + # alias. + # Additional names that this endpoint will be hosted on. + # Corresponds to the JSON property `aliases` + # @return [Array] + attr_accessor :aliases # The specification of an Internet routable address of API frontend that will # handle requests to this [API Endpoint](https://cloud.google.com/apis/design/ @@ -1508,6 +971,11 @@ module Google # @return [String] attr_accessor :target + # The canonical name of this endpoint. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + def initialize(**args) update!(**args) end @@ -1516,10 +984,10 @@ module Google def update!(**args) @features = args[:features] if args.key?(:features) @apis = args[:apis] if args.key?(:apis) - @aliases = args[:aliases] if args.key?(:aliases) @allow_cors = args[:allow_cors] if args.key?(:allow_cors) - @name = args[:name] if args.key?(:name) + @aliases = args[:aliases] if args.key?(:aliases) @target = args[:target] if args.key?(:target) + @name = args[:name] if args.key?(:name) end end @@ -1559,17 +1027,43 @@ module Google 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] + 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 + + # Request message for `GetIamPolicy` method. + class GetIamPolicyRequest + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + # Configuration controlling usage of a service. class Usage include Google::Apis::Core::Hashable - # Requirements that must be satisfied before a consumer project can use the - # service. Each requirement is of the form /; - # for example 'serviceusage.googleapis.com/billing-enabled'. - # Corresponds to the JSON property `requirements` - # @return [Array] - attr_accessor :requirements - # The full resource name of a channel used for sending notifications to the # service producer. # Google Service Management currently only supports @@ -1587,48 +1081,22 @@ module Google # @return [Array] attr_accessor :rules + # Requirements that must be satisfied before a consumer project can use the + # service. Each requirement is of the form /; + # for example 'serviceusage.googleapis.com/billing-enabled'. + # Corresponds to the JSON property `requirements` + # @return [Array] + attr_accessor :requirements + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @requirements = args[:requirements] if args.key?(:requirements) @producer_notification_channel = args[:producer_notification_channel] if args.key?(:producer_notification_channel) @rules = args[:rules] if args.key?(:rules) - end - end - - # Request message for `GetIamPolicy` method. - class GetIamPolicyRequest - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - 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] - attr_accessor :permissions - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @permissions = args[:permissions] if args.key?(:permissions) + @requirements = args[:requirements] if args.key?(:requirements) end end @@ -1668,6 +1136,24 @@ module Google class Rule include Google::Apis::Core::Hashable + # If one or more 'not_in' clauses are specified, the rule matches + # if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries. + # The format for in and not_in entries is the same as for members in a + # Binding (see google/iam/v1/policy.proto). + # Corresponds to the JSON property `notIn` + # @return [Array] + attr_accessor :not_in + + # Human-readable description of the rule. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # Additional restrictions that must be met + # Corresponds to the JSON property `conditions` + # @return [Array] + attr_accessor :conditions + # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries # that match the LOG action. # Corresponds to the JSON property `logConfig` @@ -1692,37 +1178,19 @@ module Google # @return [String] attr_accessor :action - # If one or more 'not_in' clauses are specified, the rule matches - # if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries. - # The format for in and not_in entries is the same as for members in a - # Binding (see google/iam/v1/policy.proto). - # Corresponds to the JSON property `notIn` - # @return [Array] - attr_accessor :not_in - - # Human-readable description of the rule. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Additional restrictions that must be met - # Corresponds to the JSON property `conditions` - # @return [Array] - attr_accessor :conditions - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @not_in = args[:not_in] if args.key?(:not_in) + @description = args[:description] if args.key?(:description) + @conditions = args[:conditions] if args.key?(:conditions) @log_config = args[:log_config] if args.key?(:log_config) @in = args[:in] if args.key?(:in) @permissions = args[:permissions] if args.key?(:permissions) @action = args[:action] if args.key?(:action) - @not_in = args[:not_in] if args.key?(:not_in) - @description = args[:description] if args.key?(:description) - @conditions = args[:conditions] if args.key?(:conditions) end end @@ -1767,13 +1235,6 @@ module Google class LogDescriptor include Google::Apis::Core::Hashable - # The set of labels that are available to describe a specific log entry. - # Runtime requests that contain labels not specified here are - # considered invalid. - # Corresponds to the JSON property `labels` - # @return [Array] - attr_accessor :labels - # The name of the log. It must be less than 512 characters long and can # include the following characters: upper- and lower-case alphanumeric # characters [A-Za-z0-9], and punctuation characters including @@ -1794,16 +1255,23 @@ module Google # @return [String] attr_accessor :display_name + # The set of labels that are available to describe a specific log entry. + # Runtime requests that contain labels not specified here are + # considered invalid. + # Corresponds to the JSON property `labels` + # @return [Array] + attr_accessor :labels + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @labels = args[:labels] if args.key?(:labels) @name = args[:name] if args.key?(:name) @description = args[:description] if args.key?(:description) @display_name = args[:display_name] if args.key?(:display_name) + @labels = args[:labels] if args.key?(:labels) end end @@ -1811,6 +1279,11 @@ module Google class ConfigFile include Google::Apis::Core::Hashable + # The type of configuration file this represents. + # Corresponds to the JSON property `fileType` + # @return [String] + attr_accessor :file_type + # The bytes that constitute the file. # Corresponds to the JSON property `fileContents` # NOTE: Values are automatically base64 encoded/decoded in the client library. @@ -1822,48 +1295,15 @@ module Google # @return [String] attr_accessor :file_path - # The type of configuration file this represents. - # Corresponds to the JSON property `fileType` - # @return [String] - attr_accessor :file_type - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @file_type = args[:file_type] if args.key?(:file_type) @file_contents = args[:file_contents] if args.key?(:file_contents) @file_path = args[:file_path] if args.key?(:file_path) - @file_type = args[:file_type] if args.key?(:file_type) - end - end - - # A custom error rule. - class CustomErrorRule - include Google::Apis::Core::Hashable - - # Mark this message as possible payload in error response. Otherwise, - # objects of this type will be filtered when they appear in error payload. - # Corresponds to the JSON property `isErrorType` - # @return [Boolean] - attr_accessor :is_error_type - alias_method :is_error_type?, :is_error_type - - # Selects messages to which this rule applies. - # Refer to selector for syntax details. - # Corresponds to the JSON property `selector` - # @return [String] - attr_accessor :selector - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @is_error_type = args[:is_error_type] if args.key?(:is_error_type) - @selector = args[:selector] if args.key?(:selector) end end @@ -1878,13 +1318,6 @@ module Google class MonitoredResourceDescriptor include Google::Apis::Core::Hashable - # Required. A set of labels used to describe instances of this monitored - # resource type. For example, an individual Google Cloud SQL database is - # identified by values for the labels `"database_id"` and `"zone"`. - # Corresponds to the JSON property `labels` - # @return [Array] - attr_accessor :labels - # Optional. The resource name of the monitored resource descriptor: # `"projects/`project_id`/monitoredResourceDescriptors/`type`"` where # `type` is the value of the `type` field in this object and @@ -1916,17 +1349,111 @@ module Google # @return [String] attr_accessor :type + # Required. A set of labels used to describe instances of this monitored + # resource type. For example, an individual Google Cloud SQL database is + # identified by values for the labels `"database_id"` and `"zone"`. + # Corresponds to the JSON property `labels` + # @return [Array] + attr_accessor :labels + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @labels = args[:labels] if args.key?(:labels) @name = args[:name] if args.key?(:name) @display_name = args[:display_name] if args.key?(:display_name) @description = args[:description] if args.key?(:description) @type = args[:type] if args.key?(:type) + @labels = args[:labels] if args.key?(:labels) + end + end + + # A custom error rule. + class CustomErrorRule + include Google::Apis::Core::Hashable + + # Mark this message as possible payload in error response. Otherwise, + # objects of this type will be filtered when they appear in error payload. + # Corresponds to the JSON property `isErrorType` + # @return [Boolean] + attr_accessor :is_error_type + alias_method :is_error_type?, :is_error_type + + # Selects messages to which this rule applies. + # Refer to selector for syntax details. + # Corresponds to the JSON property `selector` + # @return [String] + attr_accessor :selector + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @is_error_type = args[:is_error_type] if args.key?(:is_error_type) + @selector = args[:selector] if args.key?(:selector) + end + end + + # Defines the Media configuration for a service in case of a download. + # Use this only for Scotty Requests. Do not use this for media support using + # Bytestream, add instead [][google.bytestream.RestByteStream] as an API to + # your configuration for Bytestream methods. + class MediaDownload + include Google::Apis::Core::Hashable + + # DO NOT USE FIELDS BELOW THIS LINE UNTIL THIS WARNING IS REMOVED. + # Specify name of the download service if one is used for download. + # Corresponds to the JSON property `downloadService` + # @return [String] + attr_accessor :download_service + + # A boolean that determines whether a notification for the completion of a + # download should be sent to the backend. + # Corresponds to the JSON property `completeNotification` + # @return [Boolean] + attr_accessor :complete_notification + alias_method :complete_notification?, :complete_notification + + # Whether download is enabled. + # Corresponds to the JSON property `enabled` + # @return [Boolean] + attr_accessor :enabled + alias_method :enabled?, :enabled + + # Name of the Scotty dropzone to use for the current API. + # Corresponds to the JSON property `dropzone` + # @return [String] + attr_accessor :dropzone + + # Optional maximum acceptable size for direct download. + # The size is specified in bytes. + # Corresponds to the JSON property `maxDirectDownloadSize` + # @return [Fixnum] + attr_accessor :max_direct_download_size + + # A boolean that determines if direct download from ESF should be used for + # download of this media. + # Corresponds to the JSON property `useDirectDownload` + # @return [Boolean] + attr_accessor :use_direct_download + alias_method :use_direct_download?, :use_direct_download + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @download_service = args[:download_service] if args.key?(:download_service) + @complete_notification = args[:complete_notification] if args.key?(:complete_notification) + @enabled = args[:enabled] if args.key?(:enabled) + @dropzone = args[:dropzone] if args.key?(:dropzone) + @max_direct_download_size = args[:max_direct_download_size] if args.key?(:max_direct_download_size) + @use_direct_download = args[:use_direct_download] if args.key?(:use_direct_download) end end @@ -1951,35 +1478,6 @@ module Google end end - # Use this only for Scotty Requests. Do not use this for media support using - # Bytestream, add instead [][google.bytestream.RestByteStream] as an API to - # your configuration for Bytestream methods. - class MediaDownload - include Google::Apis::Core::Hashable - - # Whether download is enabled. - # Corresponds to the JSON property `enabled` - # @return [Boolean] - attr_accessor :enabled - alias_method :enabled?, :enabled - - # DO NOT USE THIS FIELD UNTIL THIS WARNING IS REMOVED. - # Specify name of the download service if one is used for download. - # Corresponds to the JSON property `downloadService` - # @return [String] - attr_accessor :download_service - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @enabled = args[:enabled] if args.key?(:enabled) - @download_service = args[:download_service] if args.key?(:download_service) - end - end - # Change report associated with a particular service configuration. # It contains a list of ConfigChanges based on the comparison between # two service configurations. @@ -2069,23 +1567,61 @@ module Google end end + # Defines the Media configuration for a service in case of an upload. # Use this only for Scotty Requests. Do not use this for media support using # Bytestream, add instead [][google.bytestream.RestByteStream] as an API to # your configuration for Bytestream methods. class MediaUpload include Google::Apis::Core::Hashable + # DO NOT USE FIELDS BELOW THIS LINE UNTIL THIS WARNING IS REMOVED. + # Specify name of the upload service if one is used for upload. + # Corresponds to the JSON property `uploadService` + # @return [String] + attr_accessor :upload_service + + # An array of mimetype patterns. Esf will only accept uploads that match one + # of the given patterns. + # Corresponds to the JSON property `mimeTypes` + # @return [Array] + attr_accessor :mime_types + + # Optional maximum acceptable size for an upload. + # The size is specified in bytes. + # Corresponds to the JSON property `maxSize` + # @return [Fixnum] + attr_accessor :max_size + + # A boolean that determines whether a notification for the completion of an + # upload should be sent to the backend. These notifications will not be seen + # by the client and will not consume quota. + # Corresponds to the JSON property `completeNotification` + # @return [Boolean] + attr_accessor :complete_notification + alias_method :complete_notification?, :complete_notification + + # Whether to receive a notification for progress changes of media upload. + # Corresponds to the JSON property `progressNotification` + # @return [Boolean] + attr_accessor :progress_notification + alias_method :progress_notification?, :progress_notification + # Whether upload is enabled. # Corresponds to the JSON property `enabled` # @return [Boolean] attr_accessor :enabled alias_method :enabled?, :enabled - # DO NOT USE THIS FIELD UNTIL THIS WARNING IS REMOVED. - # Specify name of the upload service if one is used for upload. - # Corresponds to the JSON property `uploadService` + # Name of the Scotty dropzone to use for the current API. + # Corresponds to the JSON property `dropzone` # @return [String] - attr_accessor :upload_service + attr_accessor :dropzone + + # Whether to receive a notification on the start of media upload. + # Corresponds to the JSON property `startNotification` + # @return [Boolean] + attr_accessor :start_notification + alias_method :start_notification?, :start_notification def initialize(**args) update!(**args) @@ -2093,8 +1629,14 @@ module Google # Update properties of this object def update!(**args) - @enabled = args[:enabled] if args.key?(:enabled) @upload_service = args[:upload_service] if args.key?(:upload_service) + @mime_types = args[:mime_types] if args.key?(:mime_types) + @max_size = args[:max_size] if args.key?(:max_size) + @complete_notification = args[:complete_notification] if args.key?(:complete_notification) + @progress_notification = args[:progress_notification] if args.key?(:progress_notification) + @enabled = args[:enabled] if args.key?(:enabled) + @dropzone = args[:dropzone] if args.key?(:dropzone) + @start_notification = args[:start_notification] if args.key?(:start_notification) end end @@ -2124,25 +1666,25 @@ module Google class ManagedService include Google::Apis::Core::Hashable + # ID of the project that produces and owns this service. + # Corresponds to the JSON property `producerProjectId` + # @return [String] + attr_accessor :producer_project_id + # The name of the service. See the [overview](/service-management/overview) # for naming requirements. # Corresponds to the JSON property `serviceName` # @return [String] attr_accessor :service_name - # ID of the project that produces and owns this service. - # Corresponds to the JSON property `producerProjectId` - # @return [String] - attr_accessor :producer_project_id - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @service_name = args[:service_name] if args.key?(:service_name) @producer_project_id = args[:producer_project_id] if args.key?(:producer_project_id) + @service_name = args[:service_name] if args.key?(:service_name) end end @@ -2191,49 +1733,6 @@ module Google end end - # User-defined authentication requirements, including support for - # [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web- - # token-32). - class AuthRequirement - include Google::Apis::Core::Hashable - - # NOTE: This will be deprecated soon, once AuthProvider.audiences is - # implemented and accepted in all the runtime components. - # The list of JWT - # [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32# - # section-4.1.3). - # that are allowed to access. A JWT containing any of these audiences will - # be accepted. When this setting is absent, only JWTs with audience - # "https://Service_name/API_name" - # will be accepted. For example, if no audiences are in the setting, - # LibraryService API will only accept JWTs with the following audience - # "https://library-example.googleapis.com/google.example.library.v1. - # LibraryService". - # Example: - # audiences: bookstore_android.apps.googleusercontent.com, - # bookstore_web.apps.googleusercontent.com - # Corresponds to the JSON property `audiences` - # @return [String] - attr_accessor :audiences - - # id from authentication provider. - # Example: - # provider_id: bookstore_auth - # Corresponds to the JSON property `providerId` - # @return [String] - attr_accessor :provider_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @audiences = args[:audiences] if args.key?(:audiences) - @provider_id = args[:provider_id] if args.key?(:provider_id) - end - end - # Strategy that specifies how Google Service Control should select # different # versions of service configurations based on traffic percentage. @@ -2279,40 +1778,37 @@ module Google end end - # A condition to be met. - class Condition + # User-defined authentication requirements, including support for + # [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web- + # token-32). + class AuthRequirement include Google::Apis::Core::Hashable - # An operator to apply the subject with. - # Corresponds to the JSON property `op` + # NOTE: This will be deprecated soon, once AuthProvider.audiences is + # implemented and accepted in all the runtime components. + # The list of JWT + # [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32# + # section-4.1.3). + # that are allowed to access. A JWT containing any of these audiences will + # be accepted. When this setting is absent, only JWTs with audience + # "https://Service_name/API_name" + # will be accepted. For example, if no audiences are in the setting, + # LibraryService API will only accept JWTs with the following audience + # "https://library-example.googleapis.com/google.example.library.v1. + # LibraryService". + # Example: + # audiences: bookstore_android.apps.googleusercontent.com, + # bookstore_web.apps.googleusercontent.com + # Corresponds to the JSON property `audiences` # @return [String] - attr_accessor :op + attr_accessor :audiences - # Trusted attributes discharged by the service. - # Corresponds to the JSON property `svc` + # id from authentication provider. + # Example: + # provider_id: bookstore_auth + # Corresponds to the JSON property `providerId` # @return [String] - attr_accessor :svc - - # DEPRECATED. Use 'values' instead. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - # Trusted attributes supplied by any service that owns resources and uses - # the IAM system for access control. - # Corresponds to the JSON property `sys` - # @return [String] - attr_accessor :sys - - # Trusted attributes supplied by the IAM system. - # Corresponds to the JSON property `iam` - # @return [String] - attr_accessor :iam - - # The objects of the condition. This is mutually exclusive with 'value'. - # Corresponds to the JSON property `values` - # @return [Array] - attr_accessor :values + attr_accessor :provider_id def initialize(**args) update!(**args) @@ -2320,12 +1816,8 @@ module Google # Update properties of this object def update!(**args) - @op = args[:op] if args.key?(:op) - @svc = args[:svc] if args.key?(:svc) - @value = args[:value] if args.key?(:value) - @sys = args[:sys] if args.key?(:sys) - @iam = args[:iam] if args.key?(:iam) - @values = args[:values] if args.key?(:values) + @audiences = args[:audiences] if args.key?(:audiences) + @provider_id = args[:provider_id] if args.key?(:provider_id) end end @@ -2385,6 +1877,12 @@ module Google class Documentation include Google::Apis::Core::Hashable + # A short summary of what the service does. Can only be provided by + # plain text. + # Corresponds to the JSON property `summary` + # @return [String] + attr_accessor :summary + # The URL to the root of documentation. # Corresponds to the JSON property `documentationRootUrl` # @return [String] @@ -2418,11 +1916,54 @@ module Google # @return [Array] attr_accessor :pages - # A short summary of what the service does. Can only be provided by - # plain text. - # Corresponds to the JSON property `summary` + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @summary = args[:summary] if args.key?(:summary) + @documentation_root_url = args[:documentation_root_url] if args.key?(:documentation_root_url) + @rules = args[:rules] if args.key?(:rules) + @overview = args[:overview] if args.key?(:overview) + @pages = args[:pages] if args.key?(:pages) + end + end + + # A condition to be met. + class Condition + include Google::Apis::Core::Hashable + + # Trusted attributes supplied by any service that owns resources and uses + # the IAM system for access control. + # Corresponds to the JSON property `sys` # @return [String] - attr_accessor :summary + attr_accessor :sys + + # DEPRECATED. Use 'values' instead. + # Corresponds to the JSON property `value` + # @return [String] + attr_accessor :value + + # Trusted attributes supplied by the IAM system. + # Corresponds to the JSON property `iam` + # @return [String] + attr_accessor :iam + + # The objects of the condition. This is mutually exclusive with 'value'. + # Corresponds to the JSON property `values` + # @return [Array] + attr_accessor :values + + # An operator to apply the subject with. + # Corresponds to the JSON property `op` + # @return [String] + attr_accessor :op + + # Trusted attributes discharged by the service. + # Corresponds to the JSON property `svc` + # @return [String] + attr_accessor :svc def initialize(**args) update!(**args) @@ -2430,11 +1971,12 @@ module Google # Update properties of this object def update!(**args) - @documentation_root_url = args[:documentation_root_url] if args.key?(:documentation_root_url) - @rules = args[:rules] if args.key?(:rules) - @overview = args[:overview] if args.key?(:overview) - @pages = args[:pages] if args.key?(:pages) - @summary = args[:summary] if args.key?(:summary) + @sys = args[:sys] if args.key?(:sys) + @value = args[:value] if args.key?(:value) + @iam = args[:iam] if args.key?(:iam) + @values = args[:values] if args.key?(:values) + @op = args[:op] if args.key?(:op) + @svc = args[:svc] if args.key?(:svc) end end @@ -2458,6 +2000,11 @@ module Google class AuditLogConfig include Google::Apis::Core::Hashable + # The log type that this config enables. + # Corresponds to the JSON property `logType` + # @return [String] + attr_accessor :log_type + # Specifies the identities that do not cause logging for this type of # permission. # Follows the same format of Binding.members. @@ -2465,19 +2012,14 @@ module Google # @return [Array] 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) + @exempted_members = args[:exempted_members] if args.key?(:exempted_members) end end @@ -2510,46 +2052,6 @@ module Google end end - # A backend rule provides configuration for an individual API element. - class BackendRule - include Google::Apis::Core::Hashable - - # Minimum deadline in seconds needed for this method. Calls having deadline - # value lower than this will be rejected. - # Corresponds to the JSON property `minDeadline` - # @return [Float] - attr_accessor :min_deadline - - # The address of the API backend. - # Corresponds to the JSON property `address` - # @return [String] - attr_accessor :address - - # Selects the methods to which this rule applies. - # Refer to selector for syntax details. - # Corresponds to the JSON property `selector` - # @return [String] - attr_accessor :selector - - # The number of seconds to wait for a response from a request. The - # default depends on the deployment context. - # Corresponds to the JSON property `deadline` - # @return [Float] - attr_accessor :deadline - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @min_deadline = args[:min_deadline] if args.key?(:min_deadline) - @address = args[:address] if args.key?(:address) - @selector = args[:selector] if args.key?(:selector) - @deadline = args[:deadline] if args.key?(:deadline) - end - end - # Authentication rules for the service. # By default, if a method has any authentication requirements, every request # must include a valid credential matching one of the requirements. @@ -2560,6 +2062,28 @@ module Google class AuthenticationRule include Google::Apis::Core::Hashable + # Requirements for additional authentication providers. + # Corresponds to the JSON property `requirements` + # @return [Array] + attr_accessor :requirements + + # Selects the methods to which this rule applies. + # Refer to selector for syntax details. + # Corresponds to the JSON property `selector` + # @return [String] + attr_accessor :selector + + # Whether to allow requests without a credential. The credential can be + # an OAuth token, Google cookies (first-party auth) or EndUserCreds. + # For requests without credentials, if the service control environment is + # specified, each incoming request **must** be associated with a service + # consumer. This can be done by passing an API key that belongs to a consumer + # project. + # Corresponds to the JSON property `allowWithoutCredential` + # @return [Boolean] + attr_accessor :allow_without_credential + alias_method :allow_without_credential?, :allow_without_credential + # OAuth scopes are a way to define data and permissions on data. For example, # there are scopes defined for "Read-only access to Google Calendar" and # "Access to Cloud Platform". Users can consent to a scope for an application, @@ -2583,10 +2107,28 @@ module Google # @return [Google::Apis::ServicemanagementV1::CustomAuthRequirements] attr_accessor :custom_auth - # Requirements for additional authentication providers. - # Corresponds to the JSON property `requirements` - # @return [Array] - attr_accessor :requirements + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @requirements = args[:requirements] if args.key?(:requirements) + @selector = args[:selector] if args.key?(:selector) + @allow_without_credential = args[:allow_without_credential] if args.key?(:allow_without_credential) + @oauth = args[:oauth] if args.key?(:oauth) + @custom_auth = args[:custom_auth] if args.key?(:custom_auth) + end + end + + # A backend rule provides configuration for an individual API element. + class BackendRule + include Google::Apis::Core::Hashable + + # The address of the API backend. + # Corresponds to the JSON property `address` + # @return [String] + attr_accessor :address # Selects the methods to which this rule applies. # Refer to selector for syntax details. @@ -2594,16 +2136,17 @@ module Google # @return [String] attr_accessor :selector - # Whether to allow requests without a credential. The credential can be - # an OAuth token, Google cookies (first-party auth) or EndUserCreds. - # For requests without credentials, if the service control environment is - # specified, each incoming request **must** be associated with a service - # consumer. This can be done by passing an API key that belongs to a consumer - # project. - # Corresponds to the JSON property `allowWithoutCredential` - # @return [Boolean] - attr_accessor :allow_without_credential - alias_method :allow_without_credential?, :allow_without_credential + # The number of seconds to wait for a response from a request. The + # default depends on the deployment context. + # Corresponds to the JSON property `deadline` + # @return [Float] + attr_accessor :deadline + + # Minimum deadline in seconds needed for this method. Calls having deadline + # value lower than this will be rejected. + # Corresponds to the JSON property `minDeadline` + # @return [Float] + attr_accessor :min_deadline def initialize(**args) update!(**args) @@ -2611,11 +2154,10 @@ module Google # Update properties of this object def update!(**args) - @oauth = args[:oauth] if args.key?(:oauth) - @custom_auth = args[:custom_auth] if args.key?(:custom_auth) - @requirements = args[:requirements] if args.key?(:requirements) + @address = args[:address] if args.key?(:address) @selector = args[:selector] if args.key?(:selector) - @allow_without_credential = args[:allow_without_credential] if args.key?(:allow_without_credential) + @deadline = args[:deadline] if args.key?(:deadline) + @min_deadline = args[:min_deadline] if args.key?(:min_deadline) end end @@ -2737,10 +2279,16 @@ module Google class Api include Google::Apis::Core::Hashable - # The source syntax of the service. - # Corresponds to the JSON property `syntax` + # The methods of this api, in unspecified order. + # Corresponds to the JSON property `methods` + # @return [Array] + attr_accessor :methods_prop + + # The fully qualified name of this api, including package name + # followed by the api's simple name. + # Corresponds to the JSON property `name` # @return [String] - attr_accessor :syntax + attr_accessor :name # `SourceContext` represents information about the source of a # protobuf element, like the file in which it is defined. @@ -2748,6 +2296,11 @@ module Google # @return [Google::Apis::ServicemanagementV1::SourceContext] attr_accessor :source_context + # The source syntax of the service. + # Corresponds to the JSON property `syntax` + # @return [String] + attr_accessor :syntax + # A version string for this api. If specified, must have the form # `major-version.minor-version`, as in `1.10`. If the minor version # is omitted, it defaults to zero. If the entire version field is @@ -2780,30 +2333,19 @@ module Google # @return [Array] attr_accessor :options - # The methods of this api, in unspecified order. - # Corresponds to the JSON property `methods` - # @return [Array] - attr_accessor :methods_prop - - # The fully qualified name of this api, including package name - # followed by the api's simple name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @syntax = args[:syntax] if args.key?(:syntax) + @methods_prop = args[:methods_prop] if args.key?(:methods_prop) + @name = args[:name] if args.key?(:name) @source_context = args[:source_context] if args.key?(:source_context) + @syntax = args[:syntax] if args.key?(:syntax) @version = args[:version] if args.key?(:version) @mixins = args[:mixins] if args.key?(:mixins) @options = args[:options] if args.key?(:options) - @methods_prop = args[:methods_prop] if args.key?(:methods_prop) - @name = args[:name] if args.key?(:name) end end @@ -2895,6 +2437,25 @@ module Google class Operation include Google::Apis::Core::Hashable + # The normal response of the operation in case of success. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # Corresponds to the JSON property `response` + # @return [Hash] + attr_accessor :response + + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should have the format of `operations/some/unique/name`. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + # The `Status` type defines a logical error model that is suitable for different # programming environments, including REST APIs and RPC APIs. It is used by # [gRPC](https://github.com/grpc). The error model is designed to be: @@ -2909,7 +2470,7 @@ module Google # error message is needed, put the localized message in the error details or # localize it in the client. The optional error details may contain arbitrary # information about the error. There is a predefined set of error detail types - # in the package `google.rpc` which can be used for common error conditions. + # in the package `google.rpc` that can be used for common error conditions. # # Language mapping # The `Status` message is the logical representation of the error model, but it # is not necessarily the actual wire format. When the `Status` message is @@ -2925,7 +2486,7 @@ module Google # it may embed the `Status` in the normal response to indicate the partial # errors. # - Workflow errors. A typical workflow has multiple steps. Each step may - # have a `Status` message for error reporting purpose. + # have a `Status` message for error reporting. # - Batch operations. If a client uses batch request and batch response, the # `Status` message should be used directly inside batch response, one for # each error sub-response. @@ -2954,36 +2515,17 @@ module Google attr_accessor :done alias_method :done?, :done - # The normal response of the operation in case of success. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # Corresponds to the JSON property `response` - # @return [Hash] - attr_accessor :response - - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should have the format of `operations/some/unique/name`. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @response = args[:response] if args.key?(:response) + @name = args[:name] if args.key?(:name) @error = args[:error] if args.key?(:error) @metadata = args[:metadata] if args.key?(:metadata) @done = args[:done] if args.key?(:done) - @response = args[:response] if args.key?(:response) - @name = args[:name] if args.key?(:name) end end @@ -3049,7 +2591,7 @@ module Google # error message is needed, put the localized message in the error details or # localize it in the client. The optional error details may contain arbitrary # information about the error. There is a predefined set of error detail types - # in the package `google.rpc` which can be used for common error conditions. + # in the package `google.rpc` that can be used for common error conditions. # # Language mapping # The `Status` message is the logical representation of the error model, but it # is not necessarily the actual wire format. When the `Status` message is @@ -3065,7 +2607,7 @@ module Google # it may embed the `Status` in the normal response to indicate the partial # errors. # - Workflow errors. A typical workflow has multiple steps. Each step may - # have a `Status` message for error reporting purpose. + # have a `Status` message for error reporting. # - Batch operations. If a client uses batch request and batch response, the # `Status` message should be used directly inside batch response, one for # each error sub-response. @@ -3077,6 +2619,12 @@ module Google class Status include Google::Apis::Core::Hashable + # A list of messages that carry the error details. There will be a + # common set of message types for APIs to use. + # Corresponds to the JSON property `details` + # @return [Array>] + attr_accessor :details + # The status code, which should be an enum value of google.rpc.Code. # Corresponds to the JSON property `code` # @return [Fixnum] @@ -3089,21 +2637,15 @@ module Google # @return [String] attr_accessor :message - # A list of messages that carry the error details. There will be a - # common set of message types for APIs to use. - # Corresponds to the JSON property `details` - # @return [Array>] - attr_accessor :details - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @details = args[:details] if args.key?(:details) @code = args[:code] if args.key?(:code) @message = args[:message] if args.key?(:message) - @details = args[:details] if args.key?(:details) end end @@ -3153,22 +2695,6 @@ module Google class AuthProvider include Google::Apis::Core::Hashable - # The unique identifier of the auth provider. It will be referred to by - # `AuthRequirement.provider_id`. - # Example: "bookstore_auth". - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies the principal that issued the JWT. See - # https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1 - # Usually a URL or an email address. - # Example: https://securetoken.google.com - # Example: 1234567-compute@developer.gserviceaccount.com - # Corresponds to the JSON property `issuer` - # @return [String] - attr_accessor :issuer - # URL of the provider's public key set to validate signature of the JWT. See # [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html# # ProviderMetadata). @@ -3201,16 +2727,63 @@ module Google # @return [String] attr_accessor :audiences + # The unique identifier of the auth provider. It will be referred to by + # `AuthRequirement.provider_id`. + # Example: "bookstore_auth". + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # Identifies the principal that issued the JWT. See + # https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1 + # Usually a URL or an email address. + # Example: https://securetoken.google.com + # Example: 1234567-compute@developer.gserviceaccount.com + # Corresponds to the JSON property `issuer` + # @return [String] + attr_accessor :issuer + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @id = args[:id] if args.key?(:id) - @issuer = args[:issuer] if args.key?(:issuer) @jwks_uri = args[:jwks_uri] if args.key?(:jwks_uri) @audiences = args[:audiences] if args.key?(:audiences) + @id = args[:id] if args.key?(:id) + @issuer = args[:issuer] if args.key?(:issuer) + end + end + + # Enum value definition. + class EnumValue + include Google::Apis::Core::Hashable + + # Enum value name. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Protocol buffer options. + # Corresponds to the JSON property `options` + # @return [Array] + attr_accessor :options + + # Enum value number. + # Corresponds to the JSON property `number` + # @return [Fixnum] + attr_accessor :number + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @name = args[:name] if args.key?(:name) + @options = args[:options] if args.key?(:options) + @number = args[:number] if args.key?(:number) end end @@ -3238,209 +2811,6 @@ module Google class Service include Google::Apis::Core::Hashable - # A unique ID for a specific instance of this message, typically assigned - # by the client for tracking purpose. If empty, the server may choose to - # generate one instead. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Configuration controlling usage of a service. - # Corresponds to the JSON property `usage` - # @return [Google::Apis::ServicemanagementV1::Usage] - attr_accessor :usage - - # Defines the metrics used by this service. - # Corresponds to the JSON property `metrics` - # @return [Array] - attr_accessor :metrics - - # `Authentication` defines the authentication configuration for an API. - # Example for an API targeted for external use: - # name: calendar.googleapis.com - # authentication: - # providers: - # - id: google_calendar_auth - # jwks_uri: https://www.googleapis.com/oauth2/v1/certs - # issuer: https://securetoken.google.com - # rules: - # - selector: "*" - # requirements: - # provider_id: google_calendar_auth - # Corresponds to the JSON property `authentication` - # @return [Google::Apis::ServicemanagementV1::Authentication] - attr_accessor :authentication - - # Experimental service configuration. These configuration options can - # only be used by whitelisted users. - # Corresponds to the JSON property `experimental` - # @return [Google::Apis::ServicemanagementV1::Experimental] - attr_accessor :experimental - - # Selects and configures the service controller used by the service. The - # service controller handles features like abuse, quota, billing, logging, - # monitoring, etc. - # Corresponds to the JSON property `control` - # @return [Google::Apis::ServicemanagementV1::Control] - attr_accessor :control - - # The version of the service configuration. The config version may - # influence interpretation of the configuration, for example, to - # determine defaults. This is documented together with applicable - # options. The current default for the config version itself is `3`. - # Corresponds to the JSON property `configVersion` - # @return [Fixnum] - attr_accessor :config_version - - # Monitoring configuration of the service. - # The example below shows how to configure monitored resources and metrics - # for monitoring. In the example, a monitored resource and two metrics are - # defined. The `library.googleapis.com/book/returned_count` metric is sent - # to both producer and consumer projects, whereas the - # `library.googleapis.com/book/overdue_count` metric is only sent to the - # consumer project. - # monitored_resources: - # - type: library.googleapis.com/branch - # labels: - # - key: /city - # description: The city where the library branch is located in. - # - key: /name - # description: The name of the branch. - # metrics: - # - name: library.googleapis.com/book/returned_count - # metric_kind: DELTA - # value_type: INT64 - # labels: - # - key: /customer_id - # - name: library.googleapis.com/book/overdue_count - # metric_kind: GAUGE - # value_type: INT64 - # labels: - # - key: /customer_id - # monitoring: - # producer_destinations: - # - monitored_resource: library.googleapis.com/branch - # metrics: - # - library.googleapis.com/book/returned_count - # consumer_destinations: - # - monitored_resource: library.googleapis.com/branch - # metrics: - # - library.googleapis.com/book/returned_count - # - library.googleapis.com/book/overdue_count - # Corresponds to the JSON property `monitoring` - # @return [Google::Apis::ServicemanagementV1::Monitoring] - attr_accessor :monitoring - - # A list of all proto message types included in this API service. - # It serves similar purpose as [google.api.Service.types], except that - # these types are not needed by user-defined APIs. Therefore, they will not - # show up in the generated discovery doc. This field should only be used - # to define system APIs in ESF. - # Corresponds to the JSON property `systemTypes` - # @return [Array] - attr_accessor :system_types - - # The id of the Google developer project that owns the service. - # Members of this project can manage the service configuration, - # manage consumption of the service, etc. - # Corresponds to the JSON property `producerProjectId` - # @return [String] - attr_accessor :producer_project_id - - # `Visibility` defines restrictions for the visibility of service - # elements. Restrictions are specified using visibility labels - # (e.g., TRUSTED_TESTER) that are elsewhere linked to users and projects. - # Users and projects can have access to more than one visibility label. The - # effective visibility for multiple labels is the union of each label's - # elements, plus any unrestricted elements. - # If an element and its parents have no restrictions, visibility is - # unconditionally granted. - # Example: - # visibility: - # rules: - # - selector: google.calendar.Calendar.EnhancedSearch - # restriction: TRUSTED_TESTER - # - selector: google.calendar.Calendar.Delegate - # restriction: GOOGLE_INTERNAL - # Here, all methods are publicly visible except for the restricted methods - # EnhancedSearch and Delegate. - # Corresponds to the JSON property `visibility` - # @return [Google::Apis::ServicemanagementV1::Visibility] - attr_accessor :visibility - - # Quota configuration helps to achieve fairness and budgeting in service - # usage. - # The quota configuration works this way: - # - The service configuration defines a set of metrics. - # - For API calls, the quota.metric_rules maps methods to metrics with - # corresponding costs. - # - The quota.limits defines limits on the metrics, which will be used for - # quota checks at runtime. - # An example quota configuration in yaml format: - # quota: - # - name: apiWriteQpsPerProject - # metric: library.googleapis.com/write_calls - # unit: "1/min/`project`" # rate limit for consumer projects - # values: - # STANDARD: 10000 - # # The metric rules bind all methods to the read_calls metric, - # # except for the UpdateBook and DeleteBook methods. These two methods - # # are mapped to the write_calls metric, with the UpdateBook method - # # consuming at twice rate as the DeleteBook method. - # metric_rules: - # - selector: "*" - # metric_costs: - # library.googleapis.com/read_calls: 1 - # - selector: google.example.library.v1.LibraryService.UpdateBook - # metric_costs: - # library.googleapis.com/write_calls: 2 - # - selector: google.example.library.v1.LibraryService.DeleteBook - # metric_costs: - # library.googleapis.com/write_calls: 1 - # Corresponding Metric definition: - # metrics: - # - name: library.googleapis.com/read_calls - # display_name: Read requests - # metric_kind: DELTA - # value_type: INT64 - # - name: library.googleapis.com/write_calls - # display_name: Write requests - # metric_kind: DELTA - # value_type: INT64 - # Corresponds to the JSON property `quota` - # @return [Google::Apis::ServicemanagementV1::Quota] - attr_accessor :quota - - # The DNS address at which this service is available, - # e.g. `calendar.googleapis.com`. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Customize service error responses. For example, list any service - # specific protobuf types that can appear in error detail lists of - # error responses. - # Example: - # custom_error: - # types: - # - google.foo.v1.CustomError - # - google.foo.v1.AnotherError - # Corresponds to the JSON property `customError` - # @return [Google::Apis::ServicemanagementV1::CustomError] - attr_accessor :custom_error - - # The product title associated with this service. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # Configuration for network endpoints. If this is empty, then an endpoint - # with the same name as the service is automatically generated to service all - # defined APIs. - # Corresponds to the JSON property `endpoints` - # @return [Array] - attr_accessor :endpoints - # Defines the logs used by this service. # Corresponds to the JSON property `logs` # @return [Array] @@ -3613,28 +2983,215 @@ module Google # @return [Google::Apis::ServicemanagementV1::Context] attr_accessor :context + # A unique ID for a specific instance of this message, typically assigned + # by the client for tracking purpose. If empty, the server may choose to + # generate one instead. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # Configuration controlling usage of a service. + # Corresponds to the JSON property `usage` + # @return [Google::Apis::ServicemanagementV1::Usage] + attr_accessor :usage + + # Defines the metrics used by this service. + # Corresponds to the JSON property `metrics` + # @return [Array] + attr_accessor :metrics + + # `Authentication` defines the authentication configuration for an API. + # Example for an API targeted for external use: + # name: calendar.googleapis.com + # authentication: + # providers: + # - id: google_calendar_auth + # jwks_uri: https://www.googleapis.com/oauth2/v1/certs + # issuer: https://securetoken.google.com + # rules: + # - selector: "*" + # requirements: + # provider_id: google_calendar_auth + # Corresponds to the JSON property `authentication` + # @return [Google::Apis::ServicemanagementV1::Authentication] + attr_accessor :authentication + + # Experimental service configuration. These configuration options can + # only be used by whitelisted users. + # Corresponds to the JSON property `experimental` + # @return [Google::Apis::ServicemanagementV1::Experimental] + attr_accessor :experimental + + # Selects and configures the service controller used by the service. The + # service controller handles features like abuse, quota, billing, logging, + # monitoring, etc. + # Corresponds to the JSON property `control` + # @return [Google::Apis::ServicemanagementV1::Control] + attr_accessor :control + + # The version of the service configuration. The config version may + # influence interpretation of the configuration, for example, to + # determine defaults. This is documented together with applicable + # options. The current default for the config version itself is `3`. + # Corresponds to the JSON property `configVersion` + # @return [Fixnum] + attr_accessor :config_version + + # Monitoring configuration of the service. + # The example below shows how to configure monitored resources and metrics + # for monitoring. In the example, a monitored resource and two metrics are + # defined. The `library.googleapis.com/book/returned_count` metric is sent + # to both producer and consumer projects, whereas the + # `library.googleapis.com/book/overdue_count` metric is only sent to the + # consumer project. + # monitored_resources: + # - type: library.googleapis.com/branch + # labels: + # - key: /city + # description: The city where the library branch is located in. + # - key: /name + # description: The name of the branch. + # metrics: + # - name: library.googleapis.com/book/returned_count + # metric_kind: DELTA + # value_type: INT64 + # labels: + # - key: /customer_id + # - name: library.googleapis.com/book/overdue_count + # metric_kind: GAUGE + # value_type: INT64 + # labels: + # - key: /customer_id + # monitoring: + # producer_destinations: + # - monitored_resource: library.googleapis.com/branch + # metrics: + # - library.googleapis.com/book/returned_count + # consumer_destinations: + # - monitored_resource: library.googleapis.com/branch + # metrics: + # - library.googleapis.com/book/returned_count + # - library.googleapis.com/book/overdue_count + # Corresponds to the JSON property `monitoring` + # @return [Google::Apis::ServicemanagementV1::Monitoring] + attr_accessor :monitoring + + # The id of the Google developer project that owns the service. + # Members of this project can manage the service configuration, + # manage consumption of the service, etc. + # Corresponds to the JSON property `producerProjectId` + # @return [String] + attr_accessor :producer_project_id + + # A list of all proto message types included in this API service. + # It serves similar purpose as [google.api.Service.types], except that + # these types are not needed by user-defined APIs. Therefore, they will not + # show up in the generated discovery doc. This field should only be used + # to define system APIs in ESF. + # Corresponds to the JSON property `systemTypes` + # @return [Array] + attr_accessor :system_types + + # `Visibility` defines restrictions for the visibility of service + # elements. Restrictions are specified using visibility labels + # (e.g., TRUSTED_TESTER) that are elsewhere linked to users and projects. + # Users and projects can have access to more than one visibility label. The + # effective visibility for multiple labels is the union of each label's + # elements, plus any unrestricted elements. + # If an element and its parents have no restrictions, visibility is + # unconditionally granted. + # Example: + # visibility: + # rules: + # - selector: google.calendar.Calendar.EnhancedSearch + # restriction: TRUSTED_TESTER + # - selector: google.calendar.Calendar.Delegate + # restriction: GOOGLE_INTERNAL + # Here, all methods are publicly visible except for the restricted methods + # EnhancedSearch and Delegate. + # Corresponds to the JSON property `visibility` + # @return [Google::Apis::ServicemanagementV1::Visibility] + attr_accessor :visibility + + # Quota configuration helps to achieve fairness and budgeting in service + # usage. + # The quota configuration works this way: + # - The service configuration defines a set of metrics. + # - For API calls, the quota.metric_rules maps methods to metrics with + # corresponding costs. + # - The quota.limits defines limits on the metrics, which will be used for + # quota checks at runtime. + # An example quota configuration in yaml format: + # quota: + # - name: apiWriteQpsPerProject + # metric: library.googleapis.com/write_calls + # unit: "1/min/`project`" # rate limit for consumer projects + # values: + # STANDARD: 10000 + # # The metric rules bind all methods to the read_calls metric, + # # except for the UpdateBook and DeleteBook methods. These two methods + # # are mapped to the write_calls metric, with the UpdateBook method + # # consuming at twice rate as the DeleteBook method. + # metric_rules: + # - selector: "*" + # metric_costs: + # library.googleapis.com/read_calls: 1 + # - selector: google.example.library.v1.LibraryService.UpdateBook + # metric_costs: + # library.googleapis.com/write_calls: 2 + # - selector: google.example.library.v1.LibraryService.DeleteBook + # metric_costs: + # library.googleapis.com/write_calls: 1 + # Corresponding Metric definition: + # metrics: + # - name: library.googleapis.com/read_calls + # display_name: Read requests + # metric_kind: DELTA + # value_type: INT64 + # - name: library.googleapis.com/write_calls + # display_name: Write requests + # metric_kind: DELTA + # value_type: INT64 + # Corresponds to the JSON property `quota` + # @return [Google::Apis::ServicemanagementV1::Quota] + attr_accessor :quota + + # The DNS address at which this service is available, + # e.g. `calendar.googleapis.com`. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Customize service error responses. For example, list any service + # specific protobuf types that can appear in error detail lists of + # error responses. + # Example: + # custom_error: + # types: + # - google.foo.v1.CustomError + # - google.foo.v1.AnotherError + # Corresponds to the JSON property `customError` + # @return [Google::Apis::ServicemanagementV1::CustomError] + attr_accessor :custom_error + + # The product title associated with this service. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + # Configuration for network endpoints. If this is empty, then an endpoint + # with the same name as the service is automatically generated to service all + # defined APIs. + # Corresponds to the JSON property `endpoints` + # @return [Array] + attr_accessor :endpoints + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @id = args[:id] if args.key?(:id) - @usage = args[:usage] if args.key?(:usage) - @metrics = args[:metrics] if args.key?(:metrics) - @authentication = args[:authentication] if args.key?(:authentication) - @experimental = args[:experimental] if args.key?(:experimental) - @control = args[:control] if args.key?(:control) - @config_version = args[:config_version] if args.key?(:config_version) - @monitoring = args[:monitoring] if args.key?(:monitoring) - @system_types = args[:system_types] if args.key?(:system_types) - @producer_project_id = args[:producer_project_id] if args.key?(:producer_project_id) - @visibility = args[:visibility] if args.key?(:visibility) - @quota = args[:quota] if args.key?(:quota) - @name = args[:name] if args.key?(:name) - @custom_error = args[:custom_error] if args.key?(:custom_error) - @title = args[:title] if args.key?(:title) - @endpoints = args[:endpoints] if args.key?(:endpoints) @logs = args[:logs] if args.key?(:logs) @apis = args[:apis] if args.key?(:apis) @types = args[:types] if args.key?(:types) @@ -3647,37 +3204,22 @@ module Google @monitored_resources = args[:monitored_resources] if args.key?(:monitored_resources) @enums = args[:enums] if args.key?(:enums) @context = args[:context] if args.key?(:context) - end - end - - # Enum value definition. - class EnumValue - include Google::Apis::Core::Hashable - - # Enum value name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Protocol buffer options. - # Corresponds to the JSON property `options` - # @return [Array] - attr_accessor :options - - # Enum value number. - # Corresponds to the JSON property `number` - # @return [Fixnum] - attr_accessor :number - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) + @id = args[:id] if args.key?(:id) + @usage = args[:usage] if args.key?(:usage) + @metrics = args[:metrics] if args.key?(:metrics) + @authentication = args[:authentication] if args.key?(:authentication) + @experimental = args[:experimental] if args.key?(:experimental) + @control = args[:control] if args.key?(:control) + @config_version = args[:config_version] if args.key?(:config_version) + @monitoring = args[:monitoring] if args.key?(:monitoring) + @producer_project_id = args[:producer_project_id] if args.key?(:producer_project_id) + @system_types = args[:system_types] if args.key?(:system_types) + @visibility = args[:visibility] if args.key?(:visibility) + @quota = args[:quota] if args.key?(:quota) @name = args[:name] if args.key?(:name) - @options = args[:options] if args.key?(:options) - @number = args[:number] if args.key?(:number) + @custom_error = args[:custom_error] if args.key?(:custom_error) + @title = args[:title] if args.key?(:title) + @endpoints = args[:endpoints] if args.key?(:endpoints) end end @@ -3706,6 +3248,31 @@ module Google end end + # A custom pattern is used for defining custom HTTP verb. + class CustomHttpPattern + include Google::Apis::Core::Hashable + + # The name of this custom HTTP verb. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # The path matched by this custom verb. + # Corresponds to the JSON property `path` + # @return [String] + attr_accessor :path + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @kind = args[:kind] if args.key?(:kind) + @path = args[:path] if args.key?(:path) + end + end + # The metadata associated with a long running operation resource. class OperationMetadata include Google::Apis::Core::Hashable @@ -3744,36 +3311,18 @@ module Google end end - # A custom pattern is used for defining custom HTTP verb. - class CustomHttpPattern - include Google::Apis::Core::Hashable - - # The name of this custom HTTP verb. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The path matched by this custom verb. - # Corresponds to the JSON property `path` - # @return [String] - attr_accessor :path - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] if args.key?(:kind) - @path = args[:path] if args.key?(:path) - end - end - # Define a system parameter rule mapping system parameter definitions to # methods. class SystemParameterRule include Google::Apis::Core::Hashable + # Selects the methods to which this rule applies. Use '*' to indicate all + # methods in all APIs. + # Refer to selector for syntax details. + # Corresponds to the JSON property `selector` + # @return [String] + attr_accessor :selector + # Define parameters. Multiple names may be defined for a parameter. # For a given method call, only one of them should be used. If multiple # names are used the behavior is implementation-dependent. @@ -3783,21 +3332,14 @@ module Google # @return [Array] attr_accessor :parameters - # Selects the methods to which this rule applies. Use '*' to indicate all - # methods in all APIs. - # Refer to selector for syntax details. - # Corresponds to the JSON property `selector` - # @return [String] - attr_accessor :selector - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @parameters = args[:parameters] if args.key?(:parameters) @selector = args[:selector] if args.key?(:selector) + @parameters = args[:parameters] if args.key?(:parameters) end end @@ -3845,6 +3387,11 @@ module Google # Any fields in the request message which are not bound by the path # pattern automatically become (optional) HTTP query # parameters. Assume the following definition of the request message: + # service Messaging ` + # rpc GetMessage(GetMessageRequest) returns (Message) ` + # option (google.api.http).get = "/v1/messages/`message_id`"; + # ` + # ` # message GetMessageRequest ` # message SubMessage ` # string subfield = 1; @@ -3973,6 +3520,7 @@ module Google class HttpRule include Google::Apis::Core::Hashable + # Defines the Media configuration for a service in case of a download. # Use this only for Scotty Requests. Do not use this for media support using # Bytestream, add instead [][google.bytestream.RestByteStream] as an API to # your configuration for Bytestream methods. @@ -3985,6 +3533,23 @@ module Google # @return [String] attr_accessor :post + # Optional. The rest method name is by default derived from the URL + # pattern. If specified, this field overrides the default method name. + # Example: + # rpc CreateResource(CreateResourceRequest) + # returns (CreateResourceResponse) ` + # option (google.api.http) = ` + # post: "/v1/resources", + # body: "resource", + # rest_method_name: "insert" + # `; + # ` + # This method has the automatically derived rest method name "create", but + # for backwards compatability with apiary, it is specified as insert. + # Corresponds to the JSON property `restMethodName` + # @return [String] + attr_accessor :rest_method_name + # Additional HTTP bindings for the selector. Nested bindings must # not contain an `additional_bindings` field themselves (that is, # the nesting may only be one level deep). @@ -4001,6 +3566,25 @@ module Google # @return [String] attr_accessor :response_body + # Optional. The REST collection name is by default derived from the URL + # pattern. If specified, this field overrides the default collection name. + # Example: + # rpc AddressesAggregatedList(AddressesAggregatedListRequest) + # returns (AddressesAggregatedListResponse) ` + # option (google.api.http) = ` + # get: "/v1/projects/`project_id`/aggregated/addresses" + # rest_collection: "projects.addresses" + # `; + # ` + # This method has the automatically derived collection name + # "projects.aggregated". Because, semantically, this rpc is actually an + # operation on the "projects.addresses" collection, the `rest_collection` + # field is configured to override the derived collection name. + # Corresponds to the JSON property `restCollection` + # @return [String] + attr_accessor :rest_collection + + # Defines the Media configuration for a service in case of an upload. # Use this only for Scotty Requests. Do not use this for media support using # Bytestream, add instead [][google.bytestream.RestByteStream] as an API to # your configuration for Bytestream methods. @@ -4055,8 +3639,10 @@ module Google def update!(**args) @media_download = args[:media_download] if args.key?(:media_download) @post = args[:post] if args.key?(:post) + @rest_method_name = args[:rest_method_name] if args.key?(:rest_method_name) @additional_bindings = args[:additional_bindings] if args.key?(:additional_bindings) @response_body = args[:response_body] if args.key?(:response_body) + @rest_collection = args[:rest_collection] if args.key?(:rest_collection) @media_upload = args[:media_upload] if args.key?(:media_upload) @selector = args[:selector] if args.key?(:selector) @custom = args[:custom] if args.key?(:custom) @@ -4169,64 +3755,6 @@ module Google end end - # Output generated from semantically comparing two versions of a service - # configuration. - # Includes detailed information about a field that have changed with - # applicable advice about potential consequences for the change, such as - # backwards-incompatibility. - class ConfigChange - include Google::Apis::Core::Hashable - - # Object hierarchy path to the change, with levels separated by a '.' - # character. For repeated fields, an applicable unique identifier field is - # used for the index (usually selector, name, or id). For maps, the term - # 'key' is used. If the field has no unique identifier, the numeric index - # is used. - # Examples: - # - visibility.rules[selector=="google.LibraryService.CreateBook"].restriction - # - quota.metric_rules[selector=="google"].metric_costs[key=="reads"].value - # - logging.producer_destinations[0] - # Corresponds to the JSON property `element` - # @return [String] - attr_accessor :element - - # Value of the changed object in the old Service configuration, - # in JSON format. This field will not be populated if ChangeType == ADDED. - # Corresponds to the JSON property `oldValue` - # @return [String] - attr_accessor :old_value - - # Collection of advice provided for this change, useful for determining the - # possible impact of this change. - # Corresponds to the JSON property `advices` - # @return [Array] - attr_accessor :advices - - # Value of the changed object in the new Service configuration, - # in JSON format. This field will not be populated if ChangeType == REMOVED. - # Corresponds to the JSON property `newValue` - # @return [String] - attr_accessor :new_value - - # The type for this change, either ADDED, REMOVED, or MODIFIED. - # Corresponds to the JSON property `changeType` - # @return [String] - attr_accessor :change_type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @element = args[:element] if args.key?(:element) - @old_value = args[:old_value] if args.key?(:old_value) - @advices = args[:advices] if args.key?(:advices) - @new_value = args[:new_value] if args.key?(:new_value) - @change_type = args[:change_type] if args.key?(:change_type) - end - end - # ### System parameter configuration # A system parameter is a special kind of parameter defined by the API # system, not by an individual API. It is typically mapped to an HTTP header @@ -4271,12 +3799,87 @@ module Google end end + # Output generated from semantically comparing two versions of a service + # configuration. + # Includes detailed information about a field that have changed with + # applicable advice about potential consequences for the change, such as + # backwards-incompatibility. + class ConfigChange + include Google::Apis::Core::Hashable + + # Value of the changed object in the new Service configuration, + # in JSON format. This field will not be populated if ChangeType == REMOVED. + # Corresponds to the JSON property `newValue` + # @return [String] + attr_accessor :new_value + + # The type for this change, either ADDED, REMOVED, or MODIFIED. + # Corresponds to the JSON property `changeType` + # @return [String] + attr_accessor :change_type + + # Object hierarchy path to the change, with levels separated by a '.' + # character. For repeated fields, an applicable unique identifier field is + # used for the index (usually selector, name, or id). For maps, the term + # 'key' is used. If the field has no unique identifier, the numeric index + # is used. + # Examples: + # - visibility.rules[selector=="google.LibraryService.CreateBook"].restriction + # - quota.metric_rules[selector=="google"].metric_costs[key=="reads"].value + # - logging.producer_destinations[0] + # Corresponds to the JSON property `element` + # @return [String] + attr_accessor :element + + # Value of the changed object in the old Service configuration, + # in JSON format. This field will not be populated if ChangeType == ADDED. + # Corresponds to the JSON property `oldValue` + # @return [String] + attr_accessor :old_value + + # Collection of advice provided for this change, useful for determining the + # possible impact of this change. + # Corresponds to the JSON property `advices` + # @return [Array] + attr_accessor :advices + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @new_value = args[:new_value] if args.key?(:new_value) + @change_type = args[:change_type] if args.key?(:change_type) + @element = args[:element] if args.key?(:element) + @old_value = args[:old_value] if args.key?(:old_value) + @advices = args[:advices] if args.key?(:advices) + end + end + # A rollout resource that defines how service configuration versions are pushed # to control plane systems. Typically, you create a new version of the # service config, and then create a Rollout to push the service config. class Rollout include Google::Apis::Core::Hashable + # Optional unique identifier of this Rollout. Only lower case letters, digits + # and '-' are allowed. + # If not specified by client, the server will generate one. The generated id + # will have the form of , where "date" is the create + # date in ISO 8601 format. "revision number" is a monotonically increasing + # positive number that is reset every day for each service. + # An example of the generated rollout_id is '2016-02-16r1' + # Corresponds to the JSON property `rolloutId` + # @return [String] + attr_accessor :rollout_id + + # Strategy used to delete a service. This strategy is a placeholder only + # used by the system generated rollout to delete a service. + # Corresponds to the JSON property `deleteServiceStrategy` + # @return [Google::Apis::ServicemanagementV1::DeleteServiceStrategy] + attr_accessor :delete_service_strategy + # Creation time of the rollout. Readonly. # Corresponds to the JSON property `createTime` # @return [String] @@ -4294,6 +3897,11 @@ module Google # @return [String] attr_accessor :service_name + # The user who created the Rollout. Readonly. + # Corresponds to the JSON property `createdBy` + # @return [String] + attr_accessor :created_by + # Strategy that specifies how Google Service Control should select # different # versions of service configurations based on traffic percentage. @@ -4323,41 +3931,19 @@ module Google # @return [Google::Apis::ServicemanagementV1::TrafficPercentStrategy] attr_accessor :traffic_percent_strategy - # The user who created the Rollout. Readonly. - # Corresponds to the JSON property `createdBy` - # @return [String] - attr_accessor :created_by - - # Optional unique identifier of this Rollout. Only lower case letters, digits - # and '-' are allowed. - # If not specified by client, the server will generate one. The generated id - # will have the form of , where "date" is the create - # date in ISO 8601 format. "revision number" is a monotonically increasing - # positive number that is reset every day for each service. - # An example of the generated rollout_id is '2016-02-16r1' - # Corresponds to the JSON property `rolloutId` - # @return [String] - attr_accessor :rollout_id - - # Strategy used to delete a service. This strategy is a placeholder only - # used by the system generated rollout to delete a service. - # Corresponds to the JSON property `deleteServiceStrategy` - # @return [Google::Apis::ServicemanagementV1::DeleteServiceStrategy] - attr_accessor :delete_service_strategy - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @rollout_id = args[:rollout_id] if args.key?(:rollout_id) + @delete_service_strategy = args[:delete_service_strategy] if args.key?(:delete_service_strategy) @create_time = args[:create_time] if args.key?(:create_time) @status = args[:status] if args.key?(:status) @service_name = args[:service_name] if args.key?(:service_name) - @traffic_percent_strategy = args[:traffic_percent_strategy] if args.key?(:traffic_percent_strategy) @created_by = args[:created_by] if args.key?(:created_by) - @rollout_id = args[:rollout_id] if args.key?(:rollout_id) - @delete_service_strategy = args[:delete_service_strategy] if args.key?(:delete_service_strategy) + @traffic_percent_strategy = args[:traffic_percent_strategy] if args.key?(:traffic_percent_strategy) end end @@ -4464,15 +4050,6 @@ module Google class SetIamPolicyRequest include Google::Apis::Core::Hashable - # 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 - # 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 @@ -4503,14 +4080,48 @@ module Google # @return [Google::Apis::ServicemanagementV1::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) - @update_mask = args[:update_mask] if args.key?(:update_mask) @policy = args[:policy] if args.key?(:policy) + @update_mask = args[:update_mask] if args.key?(:update_mask) + end + end + + # Represents the status of one operation step. + class Step + include Google::Apis::Core::Hashable + + # The status code. + # Corresponds to the JSON property `status` + # @return [String] + attr_accessor :status + + # The short description of the step. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @status = args[:status] if args.key?(:status) + @description = args[:description] if args.key?(:description) end end @@ -4528,31 +4139,6 @@ module Google end end - # Represents the status of one operation step. - class Step - include Google::Apis::Core::Hashable - - # The short description of the step. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # The status code. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @description = args[:description] if args.key?(:description) - @status = args[:status] if args.key?(:status) - end - end - # Configuration of a specific logging destination (the producer project # or the consumer project). class LoggingDestination @@ -4645,14 +4231,6 @@ module Google class Logging include Google::Apis::Core::Hashable - # Logging configurations for sending logs to the consumer project. - # There can be multiple consumer destinations, each one must have a - # different monitored resource type. A log can be used in at most - # one consumer destination. - # Corresponds to the JSON property `consumerDestinations` - # @return [Array] - attr_accessor :consumer_destinations - # Logging configurations for sending logs to the producer project. # There can be multiple producer destinations, each one must have a # different monitored resource type. A log can be used in at most @@ -4661,14 +4239,562 @@ module Google # @return [Array] attr_accessor :producer_destinations + # Logging configurations for sending logs to the consumer project. + # There can be multiple consumer destinations, each one must have a + # different monitored resource type. A log can be used in at most + # one consumer destination. + # Corresponds to the JSON property `consumerDestinations` + # @return [Array] + attr_accessor :consumer_destinations + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @consumer_destinations = args[:consumer_destinations] if args.key?(:consumer_destinations) @producer_destinations = args[:producer_destinations] if args.key?(:producer_destinations) + @consumer_destinations = args[:consumer_destinations] if args.key?(:consumer_destinations) + end + end + + # Method represents a method of an api. + class MethodProp + include Google::Apis::Core::Hashable + + # If true, the request is streamed. + # Corresponds to the JSON property `requestStreaming` + # @return [Boolean] + attr_accessor :request_streaming + alias_method :request_streaming?, :request_streaming + + # The source syntax of this method. + # Corresponds to the JSON property `syntax` + # @return [String] + attr_accessor :syntax + + # The URL of the output message type. + # Corresponds to the JSON property `responseTypeUrl` + # @return [String] + attr_accessor :response_type_url + + # Any metadata attached to the method. + # Corresponds to the JSON property `options` + # @return [Array] + attr_accessor :options + + # If true, the response is streamed. + # Corresponds to the JSON property `responseStreaming` + # @return [Boolean] + attr_accessor :response_streaming + alias_method :response_streaming?, :response_streaming + + # The simple name of this method. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # A URL of the input message type. + # Corresponds to the JSON property `requestTypeUrl` + # @return [String] + attr_accessor :request_type_url + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @request_streaming = args[:request_streaming] if args.key?(:request_streaming) + @syntax = args[:syntax] if args.key?(:syntax) + @response_type_url = args[:response_type_url] if args.key?(:response_type_url) + @options = args[:options] if args.key?(:options) + @response_streaming = args[:response_streaming] if args.key?(:response_streaming) + @name = args[:name] if args.key?(:name) + @request_type_url = args[:request_type_url] if args.key?(:request_type_url) + end + end + + # `QuotaLimit` defines a specific limit that applies over a specified duration + # for a limit type. There can be at most one limit for a duration and limit + # type combination defined within a `QuotaGroup`. + class QuotaLimit + include Google::Apis::Core::Hashable + + # Free tier value displayed in the Developers Console for this limit. + # The free tier is the number of tokens that will be subtracted from the + # billed amount when billing is enabled. + # This field can only be set on a limit with duration "1d", in a billable + # group; it is invalid on any other limit. If this field is not set, it + # defaults to 0, indicating that there is no free tier for this service. + # Used by group-based quotas only. + # Corresponds to the JSON property `freeTier` + # @return [Fixnum] + attr_accessor :free_tier + + # Duration of this limit in textual notation. Example: "100s", "24h", "1d". + # For duration longer than a day, only multiple of days is supported. We + # support only "100s" and "1d" for now. Additional support will be added in + # the future. "0" indicates indefinite duration. + # Used by group-based quotas only. + # Corresponds to the JSON property `duration` + # @return [String] + attr_accessor :duration + + # Default number of tokens that can be consumed during the specified + # duration. This is the number of tokens assigned when a client + # application developer activates the service for his/her project. + # Specifying a value of 0 will block all requests. This can be used if you + # are provisioning quota to selected consumers and blocking others. + # Similarly, a value of -1 will indicate an unlimited quota. No other + # negative values are allowed. + # Used by group-based quotas only. + # Corresponds to the JSON property `defaultLimit` + # @return [Fixnum] + attr_accessor :default_limit + + # User-visible display name for this limit. + # Optional. If not set, the UI will provide a default display name based on + # the quota configuration. This field can be used to override the default + # display name generated from the configuration. + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # The name of the metric this quota limit applies to. The quota limits with + # the same metric will be checked together during runtime. The metric must be + # defined within the service config. + # Used by metric-based quotas only. + # Corresponds to the JSON property `metric` + # @return [String] + attr_accessor :metric + + # Optional. User-visible, extended description for this quota limit. + # Should be used only when more context is needed to understand this limit + # than provided by the limit's display name (see: `display_name`). + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # Tiered limit values. Also allows for regional or zone overrides for these + # values if "/`region`" or "/`zone`" is specified in the unit field. + # Currently supported tiers from low to high: + # VERY_LOW, LOW, STANDARD, HIGH, VERY_HIGH + # To apply different limit values for users according to their tiers, specify + # the values for the tiers you want to differentiate. For example: + # `LOW:100, STANDARD:500, HIGH:1000, VERY_HIGH:5000` + # The limit value for each tier is optional except for the tier STANDARD. + # The limit value for an unspecified tier falls to the value of its next + # tier towards tier STANDARD. For the above example, the limit value for tier + # STANDARD is 500. + # To apply the same limit value for all users, just specify limit value for + # tier STANDARD. For example: `STANDARD:500`. + # To apply a regional overide for a tier, add a map entry with key + # "/", where is a region name. Similarly, for a zone + # override, add a map entry with key "/`zone`". + # Further, a wildcard can be used at the end of a zone name in order to + # specify zone level overrides. For example: + # LOW: 10, STANDARD: 50, HIGH: 100, + # LOW/us-central1: 20, STANDARD/us-central1: 60, HIGH/us-central1: 200, + # LOW/us-central1-*: 10, STANDARD/us-central1-*: 20, HIGH/us-central1-*: 80 + # The regional overrides tier set for each region must be the same as + # the tier set for default limit values. Same rule applies for zone overrides + # tier as well. + # Used by metric-based quotas only. + # Corresponds to the JSON property `values` + # @return [Hash] + attr_accessor :values + + # Specify the unit of the quota limit. It uses the same syntax as + # Metric.unit. The supported unit kinds are determined by the quota + # backend system. + # The [Google Service Control](https://cloud.google.com/service-control) + # supports the following unit components: + # * One of the time intevals: + # * "/min" for quota every minute. + # * "/d" for quota every 24 hours, starting 00:00 US Pacific Time. + # * Otherwise the quota won't be reset by time, such as storage limit. + # * One and only one of the granted containers: + # * "/`organization`" quota for an organization. + # * "/`project`" quota for a project. + # * "/`folder`" quota for a folder. + # * "/`resource`" quota for a universal resource. + # * Zero or more quota segmentation dimension. Not all combos are valid. + # * "/`region`" quota for every region. Not to be used with time intervals. + # * Otherwise the resources granted on the target is not segmented. + # * "/`zone`" quota for every zone. Not to be used with time intervals. + # * Otherwise the resources granted on the target is not segmented. + # * "/`resource`" quota for a resource associated with a project or org. + # Here are some examples: + # * "1/min/`project`" for quota per minute per project. + # * "1/min/`user`" for quota per minute per user. + # * "1/min/`organization`" for quota per minute per organization. + # Note: the order of unit components is insignificant. + # The "1" at the beginning is required to follow the metric unit syntax. + # Used by metric-based quotas only. + # Corresponds to the JSON property `unit` + # @return [String] + attr_accessor :unit + + # Maximum number of tokens that can be consumed during the specified + # duration. Client application developers can override the default limit up + # to this maximum. If specified, this value cannot be set to a value less + # than the default limit. If not specified, it is set to the default limit. + # To allow clients to apply overrides with no upper bound, set this to -1, + # indicating unlimited maximum quota. + # Used by group-based quotas only. + # Corresponds to the JSON property `maxLimit` + # @return [Fixnum] + attr_accessor :max_limit + + # Name of the quota limit. The name is used to refer to the limit when + # overriding the default limit on per-consumer basis. + # For group-based quota limits, the name must be unique within the quota + # group. If a name is not provided, it will be generated from the limit_by + # and duration fields. + # For metric-based quota limits, the name must be provided, and it must be + # unique within the service. The name can only include alphanumeric + # characters as well as '-'. + # The maximum length of the limit name is 64 characters. + # The name of a limit is used as a unique identifier for this limit. + # Therefore, once a limit has been put into use, its name should be + # immutable. You can use the display_name field to provide a user-friendly + # name for the limit. The display name can be evolved over time without + # affecting the identity of the limit. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @free_tier = args[:free_tier] if args.key?(:free_tier) + @duration = args[:duration] if args.key?(:duration) + @default_limit = args[:default_limit] if args.key?(:default_limit) + @display_name = args[:display_name] if args.key?(:display_name) + @metric = args[:metric] if args.key?(:metric) + @description = args[:description] if args.key?(:description) + @values = args[:values] if args.key?(:values) + @unit = args[:unit] if args.key?(:unit) + @max_limit = args[:max_limit] if args.key?(:max_limit) + @name = args[:name] if args.key?(:name) + end + end + + # Represents a service configuration with its name and id. + class ConfigRef + include Google::Apis::Core::Hashable + + # Resource name of a service config. It must have the following + # format: "services/`service name`/configs/`config id`". + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @name = args[:name] if args.key?(:name) + end + end + + # Response message for ListServiceRollouts method. + class ListServiceRolloutsResponse + include Google::Apis::Core::Hashable + + # The token of the next page of results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The list of rollout resources. + # Corresponds to the JSON property `rollouts` + # @return [Array] + attr_accessor :rollouts + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @rollouts = args[:rollouts] if args.key?(:rollouts) + end + end + + # Declares an API to be included in this API. The including API must + # redeclare all the methods from the included API, but documentation + # and options are inherited as follows: + # - If after comment and whitespace stripping, the documentation + # string of the redeclared method is empty, it will be inherited + # from the original method. + # - Each annotation belonging to the service config (http, + # visibility) which is not set in the redeclared method will be + # inherited. + # - If an http annotation is inherited, the path pattern will be + # modified as follows. Any version prefix will be replaced by the + # version of the including API plus the root path if specified. + # Example of a simple mixin: + # package google.acl.v1; + # service AccessControl ` + # // Get the underlying ACL object. + # rpc GetAcl(GetAclRequest) returns (Acl) ` + # option (google.api.http).get = "/v1/`resource=**`:getAcl"; + # ` + # ` + # package google.storage.v2; + # service Storage ` + # // rpc GetAcl(GetAclRequest) returns (Acl); + # // Get a data record. + # rpc GetData(GetDataRequest) returns (Data) ` + # option (google.api.http).get = "/v2/`resource=**`"; + # ` + # ` + # Example of a mixin configuration: + # apis: + # - name: google.storage.v2.Storage + # mixins: + # - name: google.acl.v1.AccessControl + # The mixin construct implies that all methods in `AccessControl` are + # also declared with same name and request/response types in + # `Storage`. A documentation generator or annotation processor will + # see the effective `Storage.GetAcl` method after inherting + # documentation and annotations as follows: + # service Storage ` + # // Get the underlying ACL object. + # rpc GetAcl(GetAclRequest) returns (Acl) ` + # option (google.api.http).get = "/v2/`resource=**`:getAcl"; + # ` + # ... + # ` + # Note how the version in the path pattern changed from `v1` to `v2`. + # If the `root` field in the mixin is specified, it should be a + # relative path under which inherited HTTP paths are placed. Example: + # apis: + # - name: google.storage.v2.Storage + # mixins: + # - name: google.acl.v1.AccessControl + # root: acls + # This implies the following inherited HTTP annotation: + # service Storage ` + # // Get the underlying ACL object. + # rpc GetAcl(GetAclRequest) returns (Acl) ` + # option (google.api.http).get = "/v2/acls/`resource=**`:getAcl"; + # ` + # ... + # ` + class Mixin + include Google::Apis::Core::Hashable + + # If non-empty specifies a path under which inherited HTTP paths + # are rooted. + # Corresponds to the JSON property `root` + # @return [String] + attr_accessor :root + + # The fully qualified name of the API which is included. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @root = args[:root] if args.key?(:root) + @name = args[:name] if args.key?(:name) + end + end + + # The metadata associated with a long running operation resource. + class FlowOperationMetadata + include Google::Apis::Core::Hashable + + # The name of the top-level flow corresponding to this operation. + # Must be equal to the "name" field for a FlowName enum. + # Corresponds to the JSON property `flowName` + # @return [String] + attr_accessor :flow_name + + # The full name of the resources that this flow is directly associated with. + # Corresponds to the JSON property `resourceNames` + # @return [Array] + attr_accessor :resource_names + + # The state of the operation with respect to cancellation. + # Corresponds to the JSON property `cancelState` + # @return [String] + attr_accessor :cancel_state + + # Deadline for the flow to complete, to prevent orphaned Operations. + # If the flow has not completed by this time, it may be terminated by + # the engine, or force-failed by Operation lookup. + # Note that this is not a hard deadline after which the Flow will + # definitely be failed, rather it is a deadline after which it is reasonable + # to suspect a problem and other parts of the system may kill operation + # to ensure we don't have orphans. + # see also: go/prevent-orphaned-operations + # Corresponds to the JSON property `deadline` + # @return [String] + attr_accessor :deadline + + # The start time of the operation. + # Corresponds to the JSON property `startTime` + # @return [String] + attr_accessor :start_time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @flow_name = args[:flow_name] if args.key?(:flow_name) + @resource_names = args[:resource_names] if args.key?(:resource_names) + @cancel_state = args[:cancel_state] if args.key?(:cancel_state) + @deadline = args[:deadline] if args.key?(:deadline) + @start_time = args[:start_time] if args.key?(:start_time) + end + end + + # Customize service error responses. For example, list any service + # specific protobuf types that can appear in error detail lists of + # error responses. + # Example: + # custom_error: + # types: + # - google.foo.v1.CustomError + # - google.foo.v1.AnotherError + class CustomError + include Google::Apis::Core::Hashable + + # The list of custom error rules that apply to individual API messages. + # **NOTE:** All service configuration rules follow "last one wins" order. + # Corresponds to the JSON property `rules` + # @return [Array] + attr_accessor :rules + + # The list of custom error detail types, e.g. 'google.foo.v1.CustomError'. + # Corresponds to the JSON property `types` + # @return [Array] + attr_accessor :types + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @rules = args[:rules] if args.key?(:rules) + @types = args[:types] if args.key?(:types) + end + end + + # Options for counters + class CounterOptions + include Google::Apis::Core::Hashable + + # The metric to update. + # Corresponds to the JSON property `metric` + # @return [String] + attr_accessor :metric + + # The field value to attribute. + # Corresponds to the JSON property `field` + # @return [String] + attr_accessor :field + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @metric = args[:metric] if args.key?(:metric) + @field = args[:field] if args.key?(:field) + end + end + + # Defines the HTTP configuration for a service. It contains a list of + # HttpRule, each specifying the mapping of an RPC method + # to one or more HTTP REST API methods. + class Http + include Google::Apis::Core::Hashable + + # A list of HTTP configuration rules that apply to individual API methods. + # **NOTE:** All service configuration rules follow "last one wins" order. + # Corresponds to the JSON property `rules` + # @return [Array] + attr_accessor :rules + + # When set to true, URL path parmeters will be fully URI-decoded except in + # cases of single segment matches in reserved expansion, where "%2F" will be + # left encoded. + # The default behavior is to not decode RFC 6570 reserved characters in multi + # segment matches. + # Corresponds to the JSON property `fullyDecodeReservedExpansion` + # @return [Boolean] + attr_accessor :fully_decode_reserved_expansion + alias_method :fully_decode_reserved_expansion?, :fully_decode_reserved_expansion + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @rules = args[:rules] if args.key?(:rules) + @fully_decode_reserved_expansion = args[:fully_decode_reserved_expansion] if args.key?(:fully_decode_reserved_expansion) + end + end + + # Source information used to create a Service Config + class SourceInfo + include Google::Apis::Core::Hashable + + # All files used during config generation. + # Corresponds to the JSON property `sourceFiles` + # @return [Array>] + attr_accessor :source_files + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @source_files = args[:source_files] if args.key?(:source_files) + end + end + + # Selects and configures the service controller used by the service. The + # service controller handles features like abuse, quota, billing, logging, + # monitoring, etc. + class Control + include Google::Apis::Core::Hashable + + # The service control environment to use. If empty, no control plane + # feature (like quota and billing) will be enabled. + # Corresponds to the JSON property `environment` + # @return [String] + attr_accessor :environment + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @environment = args[:environment] if args.key?(:environment) end end end diff --git a/generated/google/apis/servicemanagement_v1/representations.rb b/generated/google/apis/servicemanagement_v1/representations.rb index 4635dc6a6..ef523489f 100644 --- a/generated/google/apis/servicemanagement_v1/representations.rb +++ b/generated/google/apis/servicemanagement_v1/representations.rb @@ -22,72 +22,6 @@ module Google module Apis module ServicemanagementV1 - class QuotaLimit - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class MethodProp - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ConfigRef - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListServiceRolloutsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Mixin - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class FlowOperationMetadata - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CustomError - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CounterOptions - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Http - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SourceInfo - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Control - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class SystemParameter class Representation < Google::Apis::Core::JsonRepresentation; end @@ -118,12 +52,6 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class EnableServiceRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class LabelDescriptor class Representation < Google::Apis::Core::JsonRepresentation; end @@ -136,7 +64,7 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class GenerateConfigReportResponse + class EnableServiceRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -148,7 +76,7 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class Experimental + class GenerateConfigReportResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -160,7 +88,7 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class AuditConfig + class Experimental class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -172,6 +100,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class AuditConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class SubmitConfigSourceRequest class Representation < Google::Apis::Core::JsonRepresentation; end @@ -232,7 +166,7 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class Usage + class TestIamPermissionsResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -244,7 +178,7 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class TestIamPermissionsResponse + class Usage class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -280,19 +214,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class CustomErrorRule - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class MonitoredResourceDescriptor class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class CustomAuthRequirements + class CustomErrorRule class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -304,6 +232,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class CustomAuthRequirements + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class ChangeReport class Representation < Google::Apis::Core::JsonRepresentation; end @@ -346,19 +280,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class AuthRequirement - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class TrafficPercentStrategy class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class Condition + class AuthRequirement class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -370,6 +298,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class Condition + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class AuditLogConfig class Representation < Google::Apis::Core::JsonRepresentation; end @@ -382,13 +316,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class BackendRule + class AuthenticationRule class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class AuthenticationRule + class BackendRule class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -460,13 +394,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class Service + class EnumValue class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class EnumValue + class Service class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -478,13 +412,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class OperationMetadata + class CustomHttpPattern class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class CustomHttpPattern + class OperationMetadata class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -520,13 +454,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class ConfigChange + class SystemParameters class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class SystemParameters + class ConfigChange class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -556,13 +490,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class DeleteServiceStrategy + class Step class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class Step + class DeleteServiceStrategy class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -586,127 +520,84 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class QuotaLimit - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :duration, as: 'duration' - property :free_tier, :numeric_string => true, as: 'freeTier' - property :default_limit, :numeric_string => true, as: 'defaultLimit' - property :description, as: 'description' - property :display_name, as: 'displayName' - property :metric, as: 'metric' - hash :values, as: 'values' - property :unit, as: 'unit' - property :max_limit, :numeric_string => true, as: 'maxLimit' - property :name, as: 'name' - end + class MethodProp + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end - class MethodProp - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :response_type_url, as: 'responseTypeUrl' - collection :options, as: 'options', class: Google::Apis::ServicemanagementV1::Option, decorator: Google::Apis::ServicemanagementV1::Option::Representation + class QuotaLimit + class Representation < Google::Apis::Core::JsonRepresentation; end - property :response_streaming, as: 'responseStreaming' - property :name, as: 'name' - property :request_type_url, as: 'requestTypeUrl' - property :request_streaming, as: 'requestStreaming' - property :syntax, as: 'syntax' - end + include Google::Apis::Core::JsonObjectSupport end class ConfigRef - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ListServiceRolloutsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :rollouts, as: 'rollouts', class: Google::Apis::ServicemanagementV1::Rollout, decorator: Google::Apis::ServicemanagementV1::Rollout::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :next_page_token, as: 'nextPageToken' - end + include Google::Apis::Core::JsonObjectSupport end class Mixin - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - property :root, as: 'root' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class FlowOperationMetadata - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :cancel_state, as: 'cancelState' - property :deadline, as: 'deadline' - property :start_time, as: 'startTime' - property :flow_name, as: 'flowName' - collection :resource_names, as: 'resourceNames' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class CustomError - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :types, as: 'types' - collection :rules, as: 'rules', class: Google::Apis::ServicemanagementV1::CustomErrorRule, decorator: Google::Apis::ServicemanagementV1::CustomErrorRule::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class CounterOptions - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :metric, as: 'metric' - property :field, as: 'field' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class Http - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :fully_decode_reserved_expansion, as: 'fullyDecodeReservedExpansion' - collection :rules, as: 'rules', class: Google::Apis::ServicemanagementV1::HttpRule, decorator: Google::Apis::ServicemanagementV1::HttpRule::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class SourceInfo - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :source_files, as: 'sourceFiles' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class Control - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :environment, as: 'environment' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class SystemParameter # @private class Representation < Google::Apis::Core::JsonRepresentation + property :http_header, as: 'httpHeader' property :name, as: 'name' property :url_query_parameter, as: 'urlQueryParameter' - property :http_header, as: 'httpHeader' end end class Field # @private class Representation < Google::Apis::Core::JsonRepresentation - property :default_value, as: 'defaultValue' - property :name, as: 'name' - property :type_url, as: 'typeUrl' - property :number, as: 'number' property :kind, as: 'kind' property :json_name, as: 'jsonName' collection :options, as: 'options', class: Google::Apis::ServicemanagementV1::Option, decorator: Google::Apis::ServicemanagementV1::Option::Representation @@ -714,16 +605,20 @@ module Google property :oneof_index, as: 'oneofIndex' property :packed, as: 'packed' property :cardinality, as: 'cardinality' + property :default_value, as: 'defaultValue' + property :name, as: 'name' + property :type_url, as: 'typeUrl' + property :number, as: 'number' end end class Monitoring # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :consumer_destinations, as: 'consumerDestinations', class: Google::Apis::ServicemanagementV1::MonitoringDestination, decorator: Google::Apis::ServicemanagementV1::MonitoringDestination::Representation - collection :producer_destinations, as: 'producerDestinations', class: Google::Apis::ServicemanagementV1::MonitoringDestination, decorator: Google::Apis::ServicemanagementV1::MonitoringDestination::Representation + collection :consumer_destinations, as: 'consumerDestinations', class: Google::Apis::ServicemanagementV1::MonitoringDestination, decorator: Google::Apis::ServicemanagementV1::MonitoringDestination::Representation + end end @@ -737,14 +632,32 @@ module Google class Enum # @private class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - collection :enumvalue, as: 'enumvalue', class: Google::Apis::ServicemanagementV1::EnumValue, decorator: Google::Apis::ServicemanagementV1::EnumValue::Representation - collection :options, as: 'options', class: Google::Apis::ServicemanagementV1::Option, decorator: Google::Apis::ServicemanagementV1::Option::Representation property :source_context, as: 'sourceContext', class: Google::Apis::ServicemanagementV1::SourceContext, decorator: Google::Apis::ServicemanagementV1::SourceContext::Representation property :syntax, as: 'syntax' + property :name, as: 'name' + collection :enumvalue, as: 'enumvalue', class: Google::Apis::ServicemanagementV1::EnumValue, decorator: Google::Apis::ServicemanagementV1::EnumValue::Representation + + end + end + + class LabelDescriptor + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :value_type, as: 'valueType' + property :key, as: 'key' + property :description, as: 'description' + end + end + + class Diagnostic + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :message, as: 'message' + property :location, as: 'location' + property :kind, as: 'kind' end end @@ -755,21 +668,18 @@ module Google end end - class LabelDescriptor + class Type # @private class Representation < Google::Apis::Core::JsonRepresentation - property :description, as: 'description' - property :value_type, as: 'valueType' - property :key, as: 'key' - end - end + collection :fields, as: 'fields', class: Google::Apis::ServicemanagementV1::Field, decorator: Google::Apis::ServicemanagementV1::Field::Representation + + property :name, as: 'name' + collection :oneofs, as: 'oneofs' + property :syntax, as: 'syntax' + property :source_context, as: 'sourceContext', class: Google::Apis::ServicemanagementV1::SourceContext, decorator: Google::Apis::ServicemanagementV1::SourceContext::Representation + + collection :options, as: 'options', class: Google::Apis::ServicemanagementV1::Option, decorator: Google::Apis::ServicemanagementV1::Option::Representation - class Diagnostic - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :message, as: 'message' - property :location, as: 'location' end end @@ -785,18 +695,12 @@ module Google end end - class Type + class ListServiceConfigsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :options, as: 'options', class: Google::Apis::ServicemanagementV1::Option, decorator: Google::Apis::ServicemanagementV1::Option::Representation + collection :service_configs, as: 'serviceConfigs', class: Google::Apis::ServicemanagementV1::Service, decorator: Google::Apis::ServicemanagementV1::Service::Representation - collection :fields, as: 'fields', class: Google::Apis::ServicemanagementV1::Field, decorator: Google::Apis::ServicemanagementV1::Field::Representation - - property :name, as: 'name' - collection :oneofs, as: 'oneofs' - property :source_context, as: 'sourceContext', class: Google::Apis::ServicemanagementV1::SourceContext, decorator: Google::Apis::ServicemanagementV1::SourceContext::Representation - - property :syntax, as: 'syntax' + property :next_page_token, as: 'nextPageToken' end end @@ -808,30 +712,21 @@ module Google end end - class ListServiceConfigsResponse + class Backend # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :service_configs, as: 'serviceConfigs', class: Google::Apis::ServicemanagementV1::Service, decorator: Google::Apis::ServicemanagementV1::Service::Representation + collection :rules, as: 'rules', class: Google::Apis::ServicemanagementV1::BackendRule, decorator: Google::Apis::ServicemanagementV1::BackendRule::Representation - property :next_page_token, as: 'nextPageToken' end end class AuditConfig # @private class Representation < Google::Apis::Core::JsonRepresentation + collection :exempted_members, as: 'exemptedMembers' property :service, as: 'service' collection :audit_log_configs, as: 'auditLogConfigs', class: Google::Apis::ServicemanagementV1::AuditLogConfig, decorator: Google::Apis::ServicemanagementV1::AuditLogConfig::Representation - collection :exempted_members, as: 'exemptedMembers' - end - end - - class Backend - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :rules, as: 'rules', class: Google::Apis::ServicemanagementV1::BackendRule, decorator: Google::Apis::ServicemanagementV1::BackendRule::Representation - end end @@ -872,6 +767,7 @@ module Google class CloudAuditOptions # @private class Representation < Google::Apis::Core::JsonRepresentation + property :log_name, as: 'logName' end end @@ -885,6 +781,8 @@ module Google class MetricDescriptor # @private class Representation < Google::Apis::Core::JsonRepresentation + property :type, as: 'type' + property :value_type, as: 'valueType' property :metric_kind, as: 'metricKind' property :display_name, as: 'displayName' property :description, as: 'description' @@ -892,8 +790,6 @@ module Google collection :labels, as: 'labels', class: Google::Apis::ServicemanagementV1::LabelDescriptor, decorator: Google::Apis::ServicemanagementV1::LabelDescriptor::Representation property :name, as: 'name' - property :type, as: 'type' - property :value_type, as: 'valueType' end end @@ -911,10 +807,10 @@ module Google class Representation < Google::Apis::Core::JsonRepresentation collection :features, as: 'features' collection :apis, as: 'apis' - collection :aliases, as: 'aliases' property :allow_cors, as: 'allowCors' - property :name, as: 'name' + collection :aliases, as: 'aliases' property :target, as: 'target' + property :name, as: 'name' end end @@ -925,13 +821,10 @@ module Google end end - class Usage + class TestIamPermissionsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :requirements, as: 'requirements' - property :producer_notification_channel, as: 'producerNotificationChannel' - collection :rules, as: 'rules', class: Google::Apis::ServicemanagementV1::UsageRule, decorator: Google::Apis::ServicemanagementV1::UsageRule::Representation - + collection :permissions, as: 'permissions' end end @@ -941,10 +834,13 @@ module Google end end - class TestIamPermissionsResponse + class Usage # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :permissions, as: 'permissions' + property :producer_notification_channel, as: 'producerNotificationChannel' + collection :rules, as: 'rules', class: Google::Apis::ServicemanagementV1::UsageRule, decorator: Google::Apis::ServicemanagementV1::UsageRule::Representation + + collection :requirements, as: 'requirements' end end @@ -959,15 +855,15 @@ module Google class Rule # @private class Representation < Google::Apis::Core::JsonRepresentation + collection :not_in, as: 'notIn' + property :description, as: 'description' + collection :conditions, as: 'conditions', class: Google::Apis::ServicemanagementV1::Condition, decorator: Google::Apis::ServicemanagementV1::Condition::Representation + collection :log_config, as: 'logConfig', class: Google::Apis::ServicemanagementV1::LogConfig, decorator: Google::Apis::ServicemanagementV1::LogConfig::Representation collection :in, as: 'in' collection :permissions, as: 'permissions' property :action, as: 'action' - collection :not_in, as: 'notIn' - property :description, as: 'description' - collection :conditions, as: 'conditions', class: Google::Apis::ServicemanagementV1::Condition, decorator: Google::Apis::ServicemanagementV1::Condition::Representation - end end @@ -986,20 +882,32 @@ module Google class LogDescriptor # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :labels, as: 'labels', class: Google::Apis::ServicemanagementV1::LabelDescriptor, decorator: Google::Apis::ServicemanagementV1::LabelDescriptor::Representation - property :name, as: 'name' property :description, as: 'description' property :display_name, as: 'displayName' + collection :labels, as: 'labels', class: Google::Apis::ServicemanagementV1::LabelDescriptor, decorator: Google::Apis::ServicemanagementV1::LabelDescriptor::Representation + end end class ConfigFile # @private class Representation < Google::Apis::Core::JsonRepresentation + property :file_type, as: 'fileType' property :file_contents, :base64 => true, as: 'fileContents' property :file_path, as: 'filePath' - property :file_type, as: 'fileType' + end + end + + class MonitoredResourceDescriptor + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :name, as: 'name' + property :display_name, as: 'displayName' + property :description, as: 'description' + property :type, as: 'type' + collection :labels, as: 'labels', class: Google::Apis::ServicemanagementV1::LabelDescriptor, decorator: Google::Apis::ServicemanagementV1::LabelDescriptor::Representation + end end @@ -1011,15 +919,15 @@ module Google end end - class MonitoredResourceDescriptor + class MediaDownload # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :labels, as: 'labels', class: Google::Apis::ServicemanagementV1::LabelDescriptor, decorator: Google::Apis::ServicemanagementV1::LabelDescriptor::Representation - - property :name, as: 'name' - property :display_name, as: 'displayName' - property :description, as: 'description' - property :type, as: 'type' + property :download_service, as: 'downloadService' + property :complete_notification, as: 'completeNotification' + property :enabled, as: 'enabled' + property :dropzone, as: 'dropzone' + property :max_direct_download_size, :numeric_string => true, as: 'maxDirectDownloadSize' + property :use_direct_download, as: 'useDirectDownload' end end @@ -1030,14 +938,6 @@ module Google end end - class MediaDownload - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :enabled, as: 'enabled' - property :download_service, as: 'downloadService' - end - end - class ChangeReport # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1064,8 +964,14 @@ module Google class MediaUpload # @private class Representation < Google::Apis::Core::JsonRepresentation - property :enabled, as: 'enabled' property :upload_service, as: 'uploadService' + collection :mime_types, as: 'mimeTypes' + property :max_size, :numeric_string => true, as: 'maxSize' + property :complete_notification, as: 'completeNotification' + property :progress_notification, as: 'progressNotification' + property :enabled, as: 'enabled' + property :dropzone, as: 'dropzone' + property :start_notification, as: 'startNotification' end end @@ -1079,8 +985,8 @@ module Google class ManagedService # @private class Representation < Google::Apis::Core::JsonRepresentation - property :service_name, as: 'serviceName' property :producer_project_id, as: 'producerProjectId' + property :service_name, as: 'serviceName' end end @@ -1092,6 +998,13 @@ module Google end end + class TrafficPercentStrategy + # @private + class Representation < Google::Apis::Core::JsonRepresentation + hash :percentages, as: 'percentages' + end + end + class AuthRequirement # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1100,43 +1013,36 @@ module Google end end - class TrafficPercentStrategy - # @private - class Representation < Google::Apis::Core::JsonRepresentation - hash :percentages, as: 'percentages' - end - end - - class Condition - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :op, as: 'op' - property :svc, as: 'svc' - property :value, as: 'value' - property :sys, as: 'sys' - property :iam, as: 'iam' - collection :values, as: 'values' - end - end - class Documentation # @private class Representation < Google::Apis::Core::JsonRepresentation + property :summary, as: 'summary' property :documentation_root_url, as: 'documentationRootUrl' collection :rules, as: 'rules', class: Google::Apis::ServicemanagementV1::DocumentationRule, decorator: Google::Apis::ServicemanagementV1::DocumentationRule::Representation property :overview, as: 'overview' collection :pages, as: 'pages', class: Google::Apis::ServicemanagementV1::Page, decorator: Google::Apis::ServicemanagementV1::Page::Representation - property :summary, as: 'summary' + end + end + + class Condition + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :sys, as: 'sys' + property :value, as: 'value' + property :iam, as: 'iam' + collection :values, as: 'values' + property :op, as: 'op' + property :svc, as: 'svc' end end class AuditLogConfig # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :exempted_members, as: 'exemptedMembers' property :log_type, as: 'logType' + collection :exempted_members, as: 'exemptedMembers' end end @@ -1149,27 +1055,27 @@ module Google end end - class BackendRule - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :min_deadline, as: 'minDeadline' - property :address, as: 'address' - property :selector, as: 'selector' - property :deadline, as: 'deadline' - end - end - class AuthenticationRule # @private class Representation < Google::Apis::Core::JsonRepresentation - property :oauth, as: 'oauth', class: Google::Apis::ServicemanagementV1::OAuthRequirements, decorator: Google::Apis::ServicemanagementV1::OAuthRequirements::Representation - - property :custom_auth, as: 'customAuth', class: Google::Apis::ServicemanagementV1::CustomAuthRequirements, decorator: Google::Apis::ServicemanagementV1::CustomAuthRequirements::Representation - collection :requirements, as: 'requirements', class: Google::Apis::ServicemanagementV1::AuthRequirement, decorator: Google::Apis::ServicemanagementV1::AuthRequirement::Representation property :selector, as: 'selector' property :allow_without_credential, as: 'allowWithoutCredential' + property :oauth, as: 'oauth', class: Google::Apis::ServicemanagementV1::OAuthRequirements, decorator: Google::Apis::ServicemanagementV1::OAuthRequirements::Representation + + property :custom_auth, as: 'customAuth', class: Google::Apis::ServicemanagementV1::CustomAuthRequirements, decorator: Google::Apis::ServicemanagementV1::CustomAuthRequirements::Representation + + end + end + + class BackendRule + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :address, as: 'address' + property :selector, as: 'selector' + property :deadline, as: 'deadline' + property :min_deadline, as: 'minDeadline' end end @@ -1199,17 +1105,17 @@ module Google class Api # @private class Representation < Google::Apis::Core::JsonRepresentation - property :syntax, as: 'syntax' + collection :methods_prop, as: 'methods', class: Google::Apis::ServicemanagementV1::MethodProp, decorator: Google::Apis::ServicemanagementV1::MethodProp::Representation + + property :name, as: 'name' property :source_context, as: 'sourceContext', class: Google::Apis::ServicemanagementV1::SourceContext, decorator: Google::Apis::ServicemanagementV1::SourceContext::Representation + property :syntax, as: 'syntax' property :version, as: 'version' collection :mixins, as: 'mixins', class: Google::Apis::ServicemanagementV1::Mixin, decorator: Google::Apis::ServicemanagementV1::Mixin::Representation collection :options, as: 'options', class: Google::Apis::ServicemanagementV1::Option, decorator: Google::Apis::ServicemanagementV1::Option::Representation - collection :methods_prop, as: 'methods', class: Google::Apis::ServicemanagementV1::MethodProp, decorator: Google::Apis::ServicemanagementV1::MethodProp::Representation - - property :name, as: 'name' end end @@ -1240,12 +1146,12 @@ module Google class Operation # @private class Representation < Google::Apis::Core::JsonRepresentation + hash :response, as: 'response' + property :name, as: 'name' property :error, as: 'error', class: Google::Apis::ServicemanagementV1::Status, decorator: Google::Apis::ServicemanagementV1::Status::Representation hash :metadata, as: 'metadata' property :done, as: 'done' - hash :response, as: 'response' - property :name, as: 'name' end end @@ -1262,9 +1168,9 @@ module Google class Status # @private class Representation < Google::Apis::Core::JsonRepresentation + collection :details, as: 'details' property :code, as: 'code' property :message, as: 'message' - collection :details, as: 'details' end end @@ -1279,43 +1185,26 @@ module Google class AuthProvider # @private class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :issuer, as: 'issuer' property :jwks_uri, as: 'jwksUri' property :audiences, as: 'audiences' + property :id, as: 'id' + property :issuer, as: 'issuer' + end + end + + class EnumValue + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :name, as: 'name' + collection :options, as: 'options', class: Google::Apis::ServicemanagementV1::Option, decorator: Google::Apis::ServicemanagementV1::Option::Representation + + property :number, as: 'number' end end class Service # @private class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :usage, as: 'usage', class: Google::Apis::ServicemanagementV1::Usage, decorator: Google::Apis::ServicemanagementV1::Usage::Representation - - collection :metrics, as: 'metrics', class: Google::Apis::ServicemanagementV1::MetricDescriptor, decorator: Google::Apis::ServicemanagementV1::MetricDescriptor::Representation - - property :authentication, as: 'authentication', class: Google::Apis::ServicemanagementV1::Authentication, decorator: Google::Apis::ServicemanagementV1::Authentication::Representation - - property :experimental, as: 'experimental', class: Google::Apis::ServicemanagementV1::Experimental, decorator: Google::Apis::ServicemanagementV1::Experimental::Representation - - property :control, as: 'control', class: Google::Apis::ServicemanagementV1::Control, decorator: Google::Apis::ServicemanagementV1::Control::Representation - - property :config_version, as: 'configVersion' - property :monitoring, as: 'monitoring', class: Google::Apis::ServicemanagementV1::Monitoring, decorator: Google::Apis::ServicemanagementV1::Monitoring::Representation - - collection :system_types, as: 'systemTypes', class: Google::Apis::ServicemanagementV1::Type, decorator: Google::Apis::ServicemanagementV1::Type::Representation - - property :producer_project_id, as: 'producerProjectId' - property :visibility, as: 'visibility', class: Google::Apis::ServicemanagementV1::Visibility, decorator: Google::Apis::ServicemanagementV1::Visibility::Representation - - property :quota, as: 'quota', class: Google::Apis::ServicemanagementV1::Quota, decorator: Google::Apis::ServicemanagementV1::Quota::Representation - - property :name, as: 'name' - property :custom_error, as: 'customError', class: Google::Apis::ServicemanagementV1::CustomError, decorator: Google::Apis::ServicemanagementV1::CustomError::Representation - - property :title, as: 'title' - collection :endpoints, as: 'endpoints', class: Google::Apis::ServicemanagementV1::Endpoint, decorator: Google::Apis::ServicemanagementV1::Endpoint::Representation - collection :logs, as: 'logs', class: Google::Apis::ServicemanagementV1::LogDescriptor, decorator: Google::Apis::ServicemanagementV1::LogDescriptor::Representation collection :apis, as: 'apis', class: Google::Apis::ServicemanagementV1::Api, decorator: Google::Apis::ServicemanagementV1::Api::Representation @@ -1340,16 +1229,33 @@ module Google property :context, as: 'context', class: Google::Apis::ServicemanagementV1::Context, decorator: Google::Apis::ServicemanagementV1::Context::Representation - end - end + property :id, as: 'id' + property :usage, as: 'usage', class: Google::Apis::ServicemanagementV1::Usage, decorator: Google::Apis::ServicemanagementV1::Usage::Representation + + collection :metrics, as: 'metrics', class: Google::Apis::ServicemanagementV1::MetricDescriptor, decorator: Google::Apis::ServicemanagementV1::MetricDescriptor::Representation + + property :authentication, as: 'authentication', class: Google::Apis::ServicemanagementV1::Authentication, decorator: Google::Apis::ServicemanagementV1::Authentication::Representation + + property :experimental, as: 'experimental', class: Google::Apis::ServicemanagementV1::Experimental, decorator: Google::Apis::ServicemanagementV1::Experimental::Representation + + property :control, as: 'control', class: Google::Apis::ServicemanagementV1::Control, decorator: Google::Apis::ServicemanagementV1::Control::Representation + + property :config_version, as: 'configVersion' + property :monitoring, as: 'monitoring', class: Google::Apis::ServicemanagementV1::Monitoring, decorator: Google::Apis::ServicemanagementV1::Monitoring::Representation + + property :producer_project_id, as: 'producerProjectId' + collection :system_types, as: 'systemTypes', class: Google::Apis::ServicemanagementV1::Type, decorator: Google::Apis::ServicemanagementV1::Type::Representation + + property :visibility, as: 'visibility', class: Google::Apis::ServicemanagementV1::Visibility, decorator: Google::Apis::ServicemanagementV1::Visibility::Representation + + property :quota, as: 'quota', class: Google::Apis::ServicemanagementV1::Quota, decorator: Google::Apis::ServicemanagementV1::Quota::Representation - class EnumValue - # @private - class Representation < Google::Apis::Core::JsonRepresentation property :name, as: 'name' - collection :options, as: 'options', class: Google::Apis::ServicemanagementV1::Option, decorator: Google::Apis::ServicemanagementV1::Option::Representation + property :custom_error, as: 'customError', class: Google::Apis::ServicemanagementV1::CustomError, decorator: Google::Apis::ServicemanagementV1::CustomError::Representation + + property :title, as: 'title' + collection :endpoints, as: 'endpoints', class: Google::Apis::ServicemanagementV1::Endpoint, decorator: Google::Apis::ServicemanagementV1::Endpoint::Representation - property :number, as: 'number' end end @@ -1362,6 +1268,14 @@ module Google end end + class CustomHttpPattern + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :kind, as: 'kind' + property :path, as: 'path' + end + end + class OperationMetadata # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1373,20 +1287,12 @@ module Google end end - class CustomHttpPattern - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :path, as: 'path' - end - end - class SystemParameterRule # @private class Representation < Google::Apis::Core::JsonRepresentation + property :selector, as: 'selector' collection :parameters, as: 'parameters', class: Google::Apis::ServicemanagementV1::SystemParameter, decorator: Google::Apis::ServicemanagementV1::SystemParameter::Representation - property :selector, as: 'selector' end end @@ -1396,9 +1302,11 @@ module Google property :media_download, as: 'mediaDownload', class: Google::Apis::ServicemanagementV1::MediaDownload, decorator: Google::Apis::ServicemanagementV1::MediaDownload::Representation property :post, as: 'post' + property :rest_method_name, as: 'restMethodName' collection :additional_bindings, as: 'additionalBindings', class: Google::Apis::ServicemanagementV1::HttpRule, decorator: Google::Apis::ServicemanagementV1::HttpRule::Representation property :response_body, as: 'responseBody' + property :rest_collection, as: 'restCollection' property :media_upload, as: 'mediaUpload', class: Google::Apis::ServicemanagementV1::MediaUpload, decorator: Google::Apis::ServicemanagementV1::MediaUpload::Representation property :selector, as: 'selector' @@ -1436,18 +1344,6 @@ module Google end end - class ConfigChange - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :element, as: 'element' - property :old_value, as: 'oldValue' - collection :advices, as: 'advices', class: Google::Apis::ServicemanagementV1::Advice, decorator: Google::Apis::ServicemanagementV1::Advice::Representation - - property :new_value, as: 'newValue' - property :change_type, as: 'changeType' - end - end - class SystemParameters # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1456,17 +1352,29 @@ module Google end end + class ConfigChange + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :new_value, as: 'newValue' + property :change_type, as: 'changeType' + property :element, as: 'element' + property :old_value, as: 'oldValue' + collection :advices, as: 'advices', class: Google::Apis::ServicemanagementV1::Advice, decorator: Google::Apis::ServicemanagementV1::Advice::Representation + + end + end + class Rollout # @private class Representation < Google::Apis::Core::JsonRepresentation + property :rollout_id, as: 'rolloutId' + property :delete_service_strategy, as: 'deleteServiceStrategy', class: Google::Apis::ServicemanagementV1::DeleteServiceStrategy, decorator: Google::Apis::ServicemanagementV1::DeleteServiceStrategy::Representation + property :create_time, as: 'createTime' property :status, as: 'status' property :service_name, as: 'serviceName' - property :traffic_percent_strategy, as: 'trafficPercentStrategy', class: Google::Apis::ServicemanagementV1::TrafficPercentStrategy, decorator: Google::Apis::ServicemanagementV1::TrafficPercentStrategy::Representation - property :created_by, as: 'createdBy' - property :rollout_id, as: 'rolloutId' - property :delete_service_strategy, as: 'deleteServiceStrategy', class: Google::Apis::ServicemanagementV1::DeleteServiceStrategy, decorator: Google::Apis::ServicemanagementV1::DeleteServiceStrategy::Representation + property :traffic_percent_strategy, as: 'trafficPercentStrategy', class: Google::Apis::ServicemanagementV1::TrafficPercentStrategy, decorator: Google::Apis::ServicemanagementV1::TrafficPercentStrategy::Representation end end @@ -1492,23 +1400,23 @@ module Google class SetIamPolicyRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :update_mask, as: 'updateMask' property :policy, as: 'policy', class: Google::Apis::ServicemanagementV1::Policy, decorator: Google::Apis::ServicemanagementV1::Policy::Representation - end - end - - class DeleteServiceStrategy - # @private - class Representation < Google::Apis::Core::JsonRepresentation + property :update_mask, as: 'updateMask' end end class Step # @private class Representation < Google::Apis::Core::JsonRepresentation - property :description, as: 'description' property :status, as: 'status' + property :description, as: 'description' + end + end + + class DeleteServiceStrategy + # @private + class Representation < Google::Apis::Core::JsonRepresentation end end @@ -1531,10 +1439,115 @@ module Google class Logging # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :consumer_destinations, as: 'consumerDestinations', class: Google::Apis::ServicemanagementV1::LoggingDestination, decorator: Google::Apis::ServicemanagementV1::LoggingDestination::Representation - collection :producer_destinations, as: 'producerDestinations', class: Google::Apis::ServicemanagementV1::LoggingDestination, decorator: Google::Apis::ServicemanagementV1::LoggingDestination::Representation + collection :consumer_destinations, as: 'consumerDestinations', class: Google::Apis::ServicemanagementV1::LoggingDestination, decorator: Google::Apis::ServicemanagementV1::LoggingDestination::Representation + + end + end + + class MethodProp + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :request_streaming, as: 'requestStreaming' + property :syntax, as: 'syntax' + property :response_type_url, as: 'responseTypeUrl' + collection :options, as: 'options', class: Google::Apis::ServicemanagementV1::Option, decorator: Google::Apis::ServicemanagementV1::Option::Representation + + property :response_streaming, as: 'responseStreaming' + property :name, as: 'name' + property :request_type_url, as: 'requestTypeUrl' + end + end + + class QuotaLimit + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :free_tier, :numeric_string => true, as: 'freeTier' + property :duration, as: 'duration' + property :default_limit, :numeric_string => true, as: 'defaultLimit' + property :display_name, as: 'displayName' + property :metric, as: 'metric' + property :description, as: 'description' + hash :values, as: 'values' + property :unit, as: 'unit' + property :max_limit, :numeric_string => true, as: 'maxLimit' + property :name, as: 'name' + end + end + + class ConfigRef + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :name, as: 'name' + end + end + + class ListServiceRolloutsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :rollouts, as: 'rollouts', class: Google::Apis::ServicemanagementV1::Rollout, decorator: Google::Apis::ServicemanagementV1::Rollout::Representation + + end + end + + class Mixin + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :root, as: 'root' + property :name, as: 'name' + end + end + + class FlowOperationMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :flow_name, as: 'flowName' + collection :resource_names, as: 'resourceNames' + property :cancel_state, as: 'cancelState' + property :deadline, as: 'deadline' + property :start_time, as: 'startTime' + end + end + + class CustomError + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :rules, as: 'rules', class: Google::Apis::ServicemanagementV1::CustomErrorRule, decorator: Google::Apis::ServicemanagementV1::CustomErrorRule::Representation + + collection :types, as: 'types' + end + end + + class CounterOptions + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :metric, as: 'metric' + property :field, as: 'field' + end + end + + class Http + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :rules, as: 'rules', class: Google::Apis::ServicemanagementV1::HttpRule, decorator: Google::Apis::ServicemanagementV1::HttpRule::Representation + + property :fully_decode_reserved_expansion, as: 'fullyDecodeReservedExpansion' + end + end + + class SourceInfo + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :source_files, as: 'sourceFiles' + end + end + + class Control + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :environment, as: 'environment' end end end diff --git a/generated/google/apis/servicemanagement_v1/service.rb b/generated/google/apis/servicemanagement_v1/service.rb index d704d9869..04a16f162 100644 --- a/generated/google/apis/servicemanagement_v1/service.rb +++ b/generated/google/apis/servicemanagement_v1/service.rb @@ -50,13 +50,6 @@ module Google end # Lists service operations that match the specified filter in the request. - # @param [String] name - # Not used. - # @param [String] page_token - # The standard list page token. - # @param [Fixnum] page_size - # The maximum number of operations to return. If unspecified, defaults to - # 50. The maximum value is 100. # @param [String] filter # A string for filtering Operations. # The following filter fields are supported: @@ -75,11 +68,18 @@ module Google # * `serviceName=`some-service`.googleapis.com AND status=done` # * `serviceName=`some-service`.googleapis.com AND (status=done OR startTime>=" # 2017-02-01")` - # @param [String] fields - # Selector specifying which fields to include in a partial response. + # @param [String] name + # Not used. + # @param [String] page_token + # The standard list page token. + # @param [Fixnum] page_size + # The maximum number of operations to return. If unspecified, defaults to + # 50. The maximum value is 100. # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -92,16 +92,16 @@ 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_operations(name: nil, page_token: nil, page_size: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_operations(filter: nil, name: nil, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/operations', options) command.response_representation = Google::Apis::ServicemanagementV1::ListOperationsResponse::Representation command.response_class = Google::Apis::ServicemanagementV1::ListOperationsResponse + command.query['filter'] = filter unless filter.nil? command.query['name'] = name unless name.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? - command.query['filter'] = filter unless filter.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -110,11 +110,11 @@ module Google # service. # @param [String] name # The name of the operation resource. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -127,123 +127,13 @@ 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 get_operation(name, fields: nil, quota_user: nil, options: nil, &block) + def get_operation(name, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', options) command.response_representation = Google::Apis::ServicemanagementV1::Operation::Representation command.response_class = Google::Apis::ServicemanagementV1::Operation command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Generates and returns a report (errors, warnings and changes from - # existing configurations) associated with - # GenerateConfigReportRequest.new_value - # If GenerateConfigReportRequest.old_value is specified, - # GenerateConfigReportRequest will contain a single ChangeReport based on the - # comparison between GenerateConfigReportRequest.new_value and - # GenerateConfigReportRequest.old_value. - # If GenerateConfigReportRequest.old_value is not specified, this method - # will compare GenerateConfigReportRequest.new_value with the last pushed - # service configuration. - # @param [Google::Apis::ServicemanagementV1::GenerateConfigReportRequest] generate_config_report_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::ServicemanagementV1::GenerateConfigReportResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ServicemanagementV1::GenerateConfigReportResponse] - # - # @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 generate_service_config_report(generate_config_report_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/services:generateConfigReport', options) - command.request_representation = Google::Apis::ServicemanagementV1::GenerateConfigReportRequest::Representation - command.request_object = generate_config_report_request_object - command.response_representation = Google::Apis::ServicemanagementV1::GenerateConfigReportResponse::Representation - command.response_class = Google::Apis::ServicemanagementV1::GenerateConfigReportResponse command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets a managed service. Authentication is required unless the service is - # public. - # @param [String] service_name - # The name of the service. See the `ServiceManager` overview for naming - # requirements. For example: `example.googleapis.com`. - # @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::ServicemanagementV1::ManagedService] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ServicemanagementV1::ManagedService] - # - # @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_service(service_name, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/services/{serviceName}', options) - command.response_representation = Google::Apis::ServicemanagementV1::ManagedService::Representation - command.response_class = Google::Apis::ServicemanagementV1::ManagedService - command.params['serviceName'] = service_name unless service_name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Returns permissions that a caller has on the specified resource. - # If the resource does not exist, this will return an empty set of - # permissions, not a NOT_FOUND error. - # Note: This operation is designed to be used for building permission-aware - # UIs and command-line tools, not for authorization checking. This operation - # may "fail open" without warning. - # @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::ServicemanagementV1::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::ServicemanagementV1::TestIamPermissionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ServicemanagementV1::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_service_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::ServicemanagementV1::TestIamPermissionsRequest::Representation - command.request_object = test_iam_permissions_request_object - command.response_representation = Google::Apis::ServicemanagementV1::TestIamPermissionsResponse::Representation - command.response_class = Google::Apis::ServicemanagementV1::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 @@ -256,11 +146,11 @@ module Google # @param [String] view # Specifies which parts of the Service Config should be returned in the # response. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -273,15 +163,15 @@ 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 get_service_configuration(service_name, config_id: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block) + def get_service_configuration(service_name, config_id: nil, view: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/services/{serviceName}/config', options) command.response_representation = Google::Apis::ServicemanagementV1::Service::Representation command.response_class = Google::Apis::ServicemanagementV1::Service command.params['serviceName'] = service_name unless service_name.nil? command.query['configId'] = config_id unless config_id.nil? command.query['view'] = view unless view.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -293,11 +183,11 @@ module Google # @param [String] service_name # The name of the service. See the [overview](/service-management/overview) # for naming requirements. For example: `example.googleapis.com`. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -310,13 +200,13 @@ 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 delete_service(service_name, fields: nil, quota_user: nil, options: nil, &block) + def delete_service(service_name, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/services/{serviceName}', options) command.response_representation = Google::Apis::ServicemanagementV1::Operation::Representation command.response_class = Google::Apis::ServicemanagementV1::Operation command.params['serviceName'] = service_name unless service_name.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -329,11 +219,11 @@ module Google # Name of the service to enable. Specifying an unknown service name will # cause the request to fail. # @param [Google::Apis::ServicemanagementV1::EnableServiceRequest] enable_service_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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -346,15 +236,15 @@ 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 enable_service(service_name, enable_service_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def enable_service(service_name, enable_service_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/services/{serviceName}:enable', options) command.request_representation = Google::Apis::ServicemanagementV1::EnableServiceRequest::Representation command.request_object = enable_service_request_object command.response_representation = Google::Apis::ServicemanagementV1::Operation::Representation command.response_class = Google::Apis::ServicemanagementV1::Operation command.params['serviceName'] = service_name unless service_name.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -364,11 +254,11 @@ module Google # REQUIRED: The resource for which the policy is being specified. # See the operation documentation for the appropriate value for this field. # @param [Google::Apis::ServicemanagementV1::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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -381,15 +271,15 @@ 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 set_service_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def set_service_iam_policy(resource, set_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options) command.request_representation = Google::Apis::ServicemanagementV1::SetIamPolicyRequest::Representation command.request_object = set_iam_policy_request_object command.response_representation = Google::Apis::ServicemanagementV1::Policy::Representation command.response_class = Google::Apis::ServicemanagementV1::Policy command.params['resource'] = resource unless resource.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -401,11 +291,11 @@ module Google # Name of the service to disable. Specifying an unknown service name # will cause the request to fail. # @param [Google::Apis::ServicemanagementV1::DisableServiceRequest] disable_service_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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -418,15 +308,15 @@ 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 disable_service(service_name, disable_service_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def disable_service(service_name, disable_service_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/services/{serviceName}:disable', options) command.request_representation = Google::Apis::ServicemanagementV1::DisableServiceRequest::Representation command.request_object = disable_service_request_object command.response_representation = Google::Apis::ServicemanagementV1::Operation::Representation command.response_class = Google::Apis::ServicemanagementV1::Operation command.params['serviceName'] = service_name unless service_name.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -437,11 +327,11 @@ module Google # REQUIRED: The resource for which the policy is being requested. # See the operation documentation for the appropriate value for this field. # @param [Google::Apis::ServicemanagementV1::GetIamPolicyRequest] get_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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -454,15 +344,15 @@ 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 get_service_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def get_service_iam_policy(resource, get_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options) command.request_representation = Google::Apis::ServicemanagementV1::GetIamPolicyRequest::Representation command.request_object = get_iam_policy_request_object command.response_representation = Google::Apis::ServicemanagementV1::Policy::Representation command.response_class = Google::Apis::ServicemanagementV1::Policy command.params['resource'] = resource unless resource.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -474,11 +364,11 @@ module Google # @param [String] service_name # The name of the service. See the [overview](/service-management/overview) # for naming requirements. For example: `example.googleapis.com`. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -491,13 +381,13 @@ 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 undelete_service(service_name, fields: nil, quota_user: nil, options: nil, &block) + def undelete_service(service_name, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/services/{serviceName}:undelete', options) command.response_representation = Google::Apis::ServicemanagementV1::Operation::Representation command.response_class = Google::Apis::ServicemanagementV1::Operation command.params['serviceName'] = service_name unless service_name.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -520,11 +410,11 @@ module Google # Requested size of the next page of data. # @param [String] producer_project_id # Include services produced by the specified project. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -537,7 +427,7 @@ 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_services(consumer_id: nil, page_token: nil, page_size: nil, producer_project_id: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_services(consumer_id: nil, page_token: nil, page_size: nil, producer_project_id: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/services', options) command.response_representation = Google::Apis::ServicemanagementV1::ListServicesResponse::Representation command.response_class = Google::Apis::ServicemanagementV1::ListServicesResponse @@ -545,8 +435,8 @@ module Google command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['producerProjectId'] = producer_project_id unless producer_project_id.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -554,11 +444,11 @@ module Google # Please note one producer project can own no more than 20 services. # Operation # @param [Google::Apis::ServicemanagementV1::ManagedService] managed_service_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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -571,14 +461,124 @@ 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 create_service(managed_service_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def create_service(managed_service_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/services', options) command.request_representation = Google::Apis::ServicemanagementV1::ManagedService::Representation command.request_object = managed_service_object command.response_representation = Google::Apis::ServicemanagementV1::Operation::Representation command.response_class = Google::Apis::ServicemanagementV1::Operation - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Generates and returns a report (errors, warnings and changes from + # existing configurations) associated with + # GenerateConfigReportRequest.new_value + # If GenerateConfigReportRequest.old_value is specified, + # GenerateConfigReportRequest will contain a single ChangeReport based on the + # comparison between GenerateConfigReportRequest.new_value and + # GenerateConfigReportRequest.old_value. + # If GenerateConfigReportRequest.old_value is not specified, this method + # will compare GenerateConfigReportRequest.new_value with the last pushed + # service configuration. + # @param [Google::Apis::ServicemanagementV1::GenerateConfigReportRequest] generate_config_report_request_object + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ServicemanagementV1::GenerateConfigReportResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ServicemanagementV1::GenerateConfigReportResponse] + # + # @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 generate_service_config_report(generate_config_report_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/services:generateConfigReport', options) + command.request_representation = Google::Apis::ServicemanagementV1::GenerateConfigReportRequest::Representation + command.request_object = generate_config_report_request_object + command.response_representation = Google::Apis::ServicemanagementV1::GenerateConfigReportResponse::Representation + command.response_class = Google::Apis::ServicemanagementV1::GenerateConfigReportResponse + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Gets a managed service. Authentication is required unless the service is + # public. + # @param [String] service_name + # The name of the service. See the `ServiceManager` overview for naming + # requirements. For example: `example.googleapis.com`. + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ServicemanagementV1::ManagedService] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ServicemanagementV1::ManagedService] + # + # @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_service(service_name, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/services/{serviceName}', options) + command.response_representation = Google::Apis::ServicemanagementV1::ManagedService::Representation + command.response_class = Google::Apis::ServicemanagementV1::ManagedService + command.params['serviceName'] = service_name unless service_name.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Returns permissions that a caller has on the specified resource. + # If the resource does not exist, this will return an empty set of + # permissions, not a NOT_FOUND error. + # Note: This operation is designed to be used for building permission-aware + # UIs and command-line tools, not for authorization checking. This operation + # may "fail open" without warning. + # @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::ServicemanagementV1::TestIamPermissionsRequest] test_iam_permissions_request_object + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ServicemanagementV1::TestIamPermissionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ServicemanagementV1::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_service_iam_permissions(resource, test_iam_permissions_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options) + command.request_representation = Google::Apis::ServicemanagementV1::TestIamPermissionsRequest::Representation + command.request_object = test_iam_permissions_request_object + command.response_representation = Google::Apis::ServicemanagementV1::TestIamPermissionsResponse::Representation + command.response_class = Google::Apis::ServicemanagementV1::TestIamPermissionsResponse + command.params['resource'] = resource unless resource.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -591,11 +591,11 @@ module Google # The token of the page to retrieve. # @param [Fixnum] page_size # The max number of items to include in the response list. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -608,15 +608,15 @@ 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_service_configs(service_name, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_service_configs(service_name, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/services/{serviceName}/configs', options) command.response_representation = Google::Apis::ServicemanagementV1::ListServiceConfigsResponse::Representation command.response_class = Google::Apis::ServicemanagementV1::ListServiceConfigsResponse command.params['serviceName'] = service_name unless service_name.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -629,11 +629,11 @@ module Google # @param [String] view # Specifies which parts of the Service Config should be returned in the # response. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -646,15 +646,15 @@ 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 get_service_config(service_name, config_id, view: nil, fields: nil, quota_user: nil, options: nil, &block) + def get_service_config(service_name, config_id, view: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/services/{serviceName}/configs/{configId}', options) command.response_representation = Google::Apis::ServicemanagementV1::Service::Representation command.response_class = Google::Apis::ServicemanagementV1::Service command.params['serviceName'] = service_name unless service_name.nil? command.params['configId'] = config_id unless config_id.nil? command.query['view'] = view unless view.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -666,11 +666,11 @@ module Google # The name of the service. See the [overview](/service-management/overview) # for naming requirements. For example: `example.googleapis.com`. # @param [Google::Apis::ServicemanagementV1::Service] service_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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -683,15 +683,15 @@ 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 create_service_config(service_name, service_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def create_service_config(service_name, service_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/services/{serviceName}/configs', options) command.request_representation = Google::Apis::ServicemanagementV1::Service::Representation command.request_object = service_object command.response_representation = Google::Apis::ServicemanagementV1::Service::Representation command.response_class = Google::Apis::ServicemanagementV1::Service command.params['serviceName'] = service_name unless service_name.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -707,11 +707,11 @@ module Google # The name of the service. See the [overview](/service-management/overview) # for naming requirements. For example: `example.googleapis.com`. # @param [Google::Apis::ServicemanagementV1::SubmitConfigSourceRequest] submit_config_source_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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -724,51 +724,15 @@ 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 submit_config_source(service_name, submit_config_source_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def submit_config_source(service_name, submit_config_source_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/services/{serviceName}/configs:submit', options) command.request_representation = Google::Apis::ServicemanagementV1::SubmitConfigSourceRequest::Representation command.request_object = submit_config_source_request_object command.response_representation = Google::Apis::ServicemanagementV1::Operation::Representation command.response_class = Google::Apis::ServicemanagementV1::Operation command.params['serviceName'] = service_name unless service_name.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets the access control policy for a resource. - # Returns an empty policy if the resource exists and does not have a policy - # set. - # @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 [Google::Apis::ServicemanagementV1::GetIamPolicyRequest] get_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::ServicemanagementV1::Policy] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ServicemanagementV1::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_consumer_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options) - command.request_representation = Google::Apis::ServicemanagementV1::GetIamPolicyRequest::Representation - command.request_object = get_iam_policy_request_object - command.response_representation = Google::Apis::ServicemanagementV1::Policy::Representation - command.response_class = Google::Apis::ServicemanagementV1::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 @@ -778,11 +742,11 @@ module Google # REQUIRED: The resource for which the policy is being specified. # See the operation documentation for the appropriate value for this field. # @param [Google::Apis::ServicemanagementV1::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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -795,15 +759,15 @@ 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 set_consumer_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def set_consumer_iam_policy(resource, set_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options) command.request_representation = Google::Apis::ServicemanagementV1::SetIamPolicyRequest::Representation command.request_object = set_iam_policy_request_object command.response_representation = Google::Apis::ServicemanagementV1::Policy::Representation command.response_class = Google::Apis::ServicemanagementV1::Policy command.params['resource'] = resource unless resource.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -817,11 +781,11 @@ module Google # 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::ServicemanagementV1::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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -834,15 +798,133 @@ 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 test_consumer_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def test_consumer_iam_permissions(resource, test_iam_permissions_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options) command.request_representation = Google::Apis::ServicemanagementV1::TestIamPermissionsRequest::Representation command.request_object = test_iam_permissions_request_object command.response_representation = Google::Apis::ServicemanagementV1::TestIamPermissionsResponse::Representation command.response_class = Google::Apis::ServicemanagementV1::TestIamPermissionsResponse command.params['resource'] = resource unless resource.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Gets the access control policy for a resource. + # Returns an empty policy if the resource exists and does not have a policy + # set. + # @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 [Google::Apis::ServicemanagementV1::GetIamPolicyRequest] get_iam_policy_request_object + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ServicemanagementV1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ServicemanagementV1::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_consumer_iam_policy(resource, get_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options) + command.request_representation = Google::Apis::ServicemanagementV1::GetIamPolicyRequest::Representation + command.request_object = get_iam_policy_request_object + command.response_representation = Google::Apis::ServicemanagementV1::Policy::Representation + command.response_class = Google::Apis::ServicemanagementV1::Policy + command.params['resource'] = resource unless resource.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Lists the history of the service configuration rollouts for a managed + # service, from the newest to the oldest. + # @param [String] service_name + # The name of the service. See the [overview](/service-management/overview) + # for naming requirements. For example: `example.googleapis.com`. + # @param [String] filter + # Use `filter` to return subset of rollouts. + # The following filters are supported: + # -- To limit the results to only those in + # [status](google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS', + # use filter='status=SUCCESS' + # -- To limit the results to those in + # [status](google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED' + # or 'FAILED', use filter='status=CANCELLED OR status=FAILED' + # @param [String] page_token + # The token of the page to retrieve. + # @param [Fixnum] page_size + # The max number of items to include in the response list. + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ServicemanagementV1::ListServiceRolloutsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ServicemanagementV1::ListServiceRolloutsResponse] + # + # @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_service_rollouts(service_name, filter: nil, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/services/{serviceName}/rollouts', options) + command.response_representation = Google::Apis::ServicemanagementV1::ListServiceRolloutsResponse::Representation + command.response_class = Google::Apis::ServicemanagementV1::ListServiceRolloutsResponse + command.params['serviceName'] = service_name unless service_name.nil? + command.query['filter'] = filter unless filter.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Gets a service configuration rollout. + # @param [String] service_name + # The name of the service. See the [overview](/service-management/overview) + # for naming requirements. For example: `example.googleapis.com`. + # @param [String] rollout_id + # The id of the rollout resource. + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ServicemanagementV1::Rollout] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ServicemanagementV1::Rollout] + # + # @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_service_rollout(service_name, rollout_id, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/services/{serviceName}/rollouts/{rolloutId}', options) + command.response_representation = Google::Apis::ServicemanagementV1::Rollout::Representation + command.response_class = Google::Apis::ServicemanagementV1::Rollout + command.params['serviceName'] = service_name unless service_name.nil? + command.params['rolloutId'] = rollout_id unless rollout_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -858,11 +940,11 @@ module Google # The name of the service. See the [overview](/service-management/overview) # for naming requirements. For example: `example.googleapis.com`. # @param [Google::Apis::ServicemanagementV1::Rollout] rollout_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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -875,87 +957,15 @@ 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 create_service_rollout(service_name, rollout_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def create_service_rollout(service_name, rollout_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/services/{serviceName}/rollouts', options) command.request_representation = Google::Apis::ServicemanagementV1::Rollout::Representation command.request_object = rollout_object command.response_representation = Google::Apis::ServicemanagementV1::Operation::Representation command.response_class = Google::Apis::ServicemanagementV1::Operation command.params['serviceName'] = service_name unless service_name.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Lists the history of the service configuration rollouts for a managed - # service, from the newest to the oldest. - # @param [String] service_name - # The name of the service. See the [overview](/service-management/overview) - # for naming requirements. For example: `example.googleapis.com`. - # @param [String] page_token - # The token of the page to retrieve. - # @param [Fixnum] page_size - # The max number of items to include in the response list. - # @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::ServicemanagementV1::ListServiceRolloutsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ServicemanagementV1::ListServiceRolloutsResponse] - # - # @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_service_rollouts(service_name, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/services/{serviceName}/rollouts', options) - command.response_representation = Google::Apis::ServicemanagementV1::ListServiceRolloutsResponse::Representation - command.response_class = Google::Apis::ServicemanagementV1::ListServiceRolloutsResponse - command.params['serviceName'] = service_name unless service_name.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['pageSize'] = page_size unless page_size.nil? command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets a service configuration rollout. - # @param [String] service_name - # The name of the service. See the [overview](/service-management/overview) - # for naming requirements. For example: `example.googleapis.com`. - # @param [String] rollout_id - # The id of the rollout resource. - # @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::ServicemanagementV1::Rollout] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ServicemanagementV1::Rollout] - # - # @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_service_rollout(service_name, rollout_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/services/{serviceName}/rollouts/{rolloutId}', options) - command.response_representation = Google::Apis::ServicemanagementV1::Rollout::Representation - command.response_class = Google::Apis::ServicemanagementV1::Rollout - command.params['serviceName'] = service_name unless service_name.nil? - command.params['rolloutId'] = rollout_id unless rollout_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end diff --git a/generated/google/apis/serviceuser_v1.rb b/generated/google/apis/serviceuser_v1.rb index a179fd14d..bf3386c38 100644 --- a/generated/google/apis/serviceuser_v1.rb +++ b/generated/google/apis/serviceuser_v1.rb @@ -27,7 +27,7 @@ module Google # @see https://cloud.google.com/service-management/ module ServiceuserV1 VERSION = 'V1' - REVISION = '20170428' + REVISION = '20170519' # View your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM_READ_ONLY = 'https://www.googleapis.com/auth/cloud-platform.read-only' diff --git a/generated/google/apis/serviceuser_v1/classes.rb b/generated/google/apis/serviceuser_v1/classes.rb index ce7a20139..cb589ad27 100644 --- a/generated/google/apis/serviceuser_v1/classes.rb +++ b/generated/google/apis/serviceuser_v1/classes.rb @@ -22,1737 +22,6 @@ module Google module Apis module ServiceuserV1 - # Response message for SearchServices method. - class SearchServicesResponse - include Google::Apis::Core::Hashable - - # Services available publicly or available to the authenticated caller. - # Corresponds to the JSON property `services` - # @return [Array] - attr_accessor :services - - # Token that can be passed to `ListAvailableServices` to resume a paginated - # query. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @services = args[:services] if args.key?(:services) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # Use this only for Scotty Requests. Do not use this for media support using - # Bytestream, add instead [][google.bytestream.RestByteStream] as an API to - # your configuration for Bytestream methods. - class MediaUpload - include Google::Apis::Core::Hashable - - # DO NOT USE THIS FIELD UNTIL THIS WARNING IS REMOVED. - # Specify name of the upload service if one is used for upload. - # Corresponds to the JSON property `uploadService` - # @return [String] - attr_accessor :upload_service - - # Whether upload is enabled. - # Corresponds to the JSON property `enabled` - # @return [Boolean] - attr_accessor :enabled - alias_method :enabled?, :enabled - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @upload_service = args[:upload_service] if args.key?(:upload_service) - @enabled = args[:enabled] if args.key?(:enabled) - end - end - - # Usage configuration rules for the service. - # NOTE: Under development. - # Use this rule to configure unregistered calls for the service. Unregistered - # calls are calls that do not contain consumer project identity. - # (Example: calls that do not contain an API key). - # By default, API methods do not allow unregistered calls, and each method call - # must be identified by a consumer project identity. Use this rule to - # allow/disallow unregistered calls. - # Example of an API that wants to allow unregistered calls for entire service. - # usage: - # rules: - # - selector: "*" - # allow_unregistered_calls: true - # Example of a method that wants to allow unregistered calls. - # usage: - # rules: - # - selector: "google.example.library.v1.LibraryService.CreateBook" - # allow_unregistered_calls: true - class UsageRule - include Google::Apis::Core::Hashable - - # True, if the method allows unregistered calls; false otherwise. - # Corresponds to the JSON property `allowUnregisteredCalls` - # @return [Boolean] - attr_accessor :allow_unregistered_calls - alias_method :allow_unregistered_calls?, :allow_unregistered_calls - - # Selects the methods to which this rule applies. Use '*' to indicate all - # methods in all APIs. - # Refer to selector for syntax details. - # Corresponds to the JSON property `selector` - # @return [String] - attr_accessor :selector - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @allow_unregistered_calls = args[:allow_unregistered_calls] if args.key?(:allow_unregistered_calls) - @selector = args[:selector] if args.key?(:selector) - end - end - - # User-defined authentication requirements, including support for - # [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web- - # token-32). - class AuthRequirement - include Google::Apis::Core::Hashable - - # id from authentication provider. - # Example: - # provider_id: bookstore_auth - # Corresponds to the JSON property `providerId` - # @return [String] - attr_accessor :provider_id - - # NOTE: This will be deprecated soon, once AuthProvider.audiences is - # implemented and accepted in all the runtime components. - # The list of JWT - # [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32# - # section-4.1.3). - # that are allowed to access. A JWT containing any of these audiences will - # be accepted. When this setting is absent, only JWTs with audience - # "https://Service_name/API_name" - # will be accepted. For example, if no audiences are in the setting, - # LibraryService API will only accept JWTs with the following audience - # "https://library-example.googleapis.com/google.example.library.v1. - # LibraryService". - # Example: - # audiences: bookstore_android.apps.googleusercontent.com, - # bookstore_web.apps.googleusercontent.com - # Corresponds to the JSON property `audiences` - # @return [String] - attr_accessor :audiences - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @provider_id = args[:provider_id] if args.key?(:provider_id) - @audiences = args[:audiences] if args.key?(:audiences) - end - end - - # `Documentation` provides the information for describing a service. - # Example: - #
documentation:
-      # summary: >
-      # The Google Calendar API gives access
-      # to most calendar features.
-      # pages:
-      # - name: Overview
-      # content: (== include google/foo/overview.md ==)
-      # - name: Tutorial
-      # content: (== include google/foo/tutorial.md ==)
-      # subpages;
-      # - name: Java
-      # content: (== include google/foo/tutorial_java.md ==)
-      # rules:
-      # - selector: google.calendar.Calendar.Get
-      # description: >
-      # ...
-      # - selector: google.calendar.Calendar.Put
-      # description: >
-      # ...
-      # 
- # Documentation is provided in markdown syntax. In addition to - # standard markdown features, definition lists, tables and fenced - # code blocks are supported. Section headers can be provided and are - # interpreted relative to the section nesting of the context where - # a documentation fragment is embedded. - # Documentation from the IDL is merged with documentation defined - # via the config at normalization time, where documentation provided - # by config rules overrides IDL provided. - # A number of constructs specific to the API platform are supported - # in documentation text. - # In order to reference a proto element, the following - # notation can be used: - #
[fully.qualified.proto.name][]
- # To override the display text used for the link, this can be used: - #
[display text][fully.qualified.proto.name]
- # Text can be excluded from doc using the following notation: - #
(-- internal comment --)
- # Comments can be made conditional using a visibility label. The below - # text will be only rendered if the `BETA` label is available: - #
(--BETA: comment for BETA users --)
- # A few directives are available in documentation. Note that - # directives must appear on a single line to be properly - # identified. The `include` directive includes a markdown file from - # an external source: - #
(== include path/to/file ==)
- # The `resource_for` directive marks a message to be the resource of - # a collection in REST view. If it is not specified, tools attempt - # to infer the resource from the operations in a collection: - #
(== resource_for v1.shelves.books ==)
- # The directive `suppress_warning` does not directly affect documentation - # and is documented together with service config validation. - class Documentation - include Google::Apis::Core::Hashable - - # A list of documentation rules that apply to individual API elements. - # **NOTE:** All service configuration rules follow "last one wins" order. - # Corresponds to the JSON property `rules` - # @return [Array] - attr_accessor :rules - - # Declares a single overview page. For example: - #
documentation:
-        # summary: ...
-        # overview: (== include overview.md ==)
-        # 
- # This is a shortcut for the following declaration (using pages style): - #
documentation:
-        # summary: ...
-        # pages:
-        # - name: Overview
-        # content: (== include overview.md ==)
-        # 
- # Note: you cannot specify both `overview` field and `pages` field. - # Corresponds to the JSON property `overview` - # @return [String] - attr_accessor :overview - - # The top level pages for the documentation set. - # Corresponds to the JSON property `pages` - # @return [Array] - attr_accessor :pages - - # A short summary of what the service does. Can only be provided by - # plain text. - # Corresponds to the JSON property `summary` - # @return [String] - attr_accessor :summary - - # The URL to the root of documentation. - # Corresponds to the JSON property `documentationRootUrl` - # @return [String] - attr_accessor :documentation_root_url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @rules = args[:rules] if args.key?(:rules) - @overview = args[:overview] if args.key?(:overview) - @pages = args[:pages] if args.key?(:pages) - @summary = args[:summary] if args.key?(:summary) - @documentation_root_url = args[:documentation_root_url] if args.key?(:documentation_root_url) - end - end - - # Authentication rules for the service. - # By default, if a method has any authentication requirements, every request - # must include a valid credential matching one of the requirements. - # It's an error to include more than one kind of credential in a single - # request. - # If a method doesn't have any auth requirements, request credentials will be - # ignored. - class AuthenticationRule - include Google::Apis::Core::Hashable - - # Requirements for additional authentication providers. - # Corresponds to the JSON property `requirements` - # @return [Array] - attr_accessor :requirements - - # Selects the methods to which this rule applies. - # Refer to selector for syntax details. - # Corresponds to the JSON property `selector` - # @return [String] - attr_accessor :selector - - # Whether to allow requests without a credential. The credential can be - # an OAuth token, Google cookies (first-party auth) or EndUserCreds. - # For requests without credentials, if the service control environment is - # specified, each incoming request **must** be associated with a service - # consumer. This can be done by passing an API key that belongs to a consumer - # project. - # Corresponds to the JSON property `allowWithoutCredential` - # @return [Boolean] - attr_accessor :allow_without_credential - alias_method :allow_without_credential?, :allow_without_credential - - # OAuth scopes are a way to define data and permissions on data. For example, - # there are scopes defined for "Read-only access to Google Calendar" and - # "Access to Cloud Platform". Users can consent to a scope for an application, - # giving it permission to access that data on their behalf. - # OAuth scope specifications should be fairly coarse grained; a user will need - # to see and understand the text description of what your scope means. - # In most cases: use one or at most two OAuth scopes for an entire family of - # products. If your product has multiple APIs, you should probably be sharing - # the OAuth scope across all of those APIs. - # When you need finer grained OAuth consent screens: talk with your product - # management about how developers will use them in practice. - # Please note that even though each of the canonical scopes is enough for a - # request to be accepted and passed to the backend, a request can still fail - # due to the backend requiring additional scopes or permissions. - # Corresponds to the JSON property `oauth` - # @return [Google::Apis::ServiceuserV1::OAuthRequirements] - attr_accessor :oauth - - # Configuration for a custom authentication provider. - # Corresponds to the JSON property `customAuth` - # @return [Google::Apis::ServiceuserV1::CustomAuthRequirements] - attr_accessor :custom_auth - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @requirements = args[:requirements] if args.key?(:requirements) - @selector = args[:selector] if args.key?(:selector) - @allow_without_credential = args[:allow_without_credential] if args.key?(:allow_without_credential) - @oauth = args[:oauth] if args.key?(:oauth) - @custom_auth = args[:custom_auth] if args.key?(:custom_auth) - end - end - - # A backend rule provides configuration for an individual API element. - class BackendRule - include Google::Apis::Core::Hashable - - # Selects the methods to which this rule applies. - # Refer to selector for syntax details. - # Corresponds to the JSON property `selector` - # @return [String] - attr_accessor :selector - - # The number of seconds to wait for a response from a request. The - # default depends on the deployment context. - # Corresponds to the JSON property `deadline` - # @return [Float] - attr_accessor :deadline - - # Minimum deadline in seconds needed for this method. Calls having deadline - # value lower than this will be rejected. - # Corresponds to the JSON property `minDeadline` - # @return [Float] - attr_accessor :min_deadline - - # The address of the API backend. - # Corresponds to the JSON property `address` - # @return [String] - attr_accessor :address - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @selector = args[:selector] if args.key?(:selector) - @deadline = args[:deadline] if args.key?(:deadline) - @min_deadline = args[:min_deadline] if args.key?(:min_deadline) - @address = args[:address] if args.key?(:address) - end - end - - # Api is a light-weight descriptor for a protocol buffer service. - class Api - include Google::Apis::Core::Hashable - - # A version string for this api. If specified, must have the form - # `major-version.minor-version`, as in `1.10`. If the minor version - # is omitted, it defaults to zero. If the entire version field is - # empty, the major version is derived from the package name, as - # outlined below. If the field is not empty, the version in the - # package name will be verified to be consistent with what is - # provided here. - # The versioning schema uses [semantic - # versioning](http://semver.org) where the major version number - # indicates a breaking change and the minor version an additive, - # non-breaking change. Both version numbers are signals to users - # what to expect from different versions, and should be carefully - # chosen based on the product plan. - # The major version is also reflected in the package name of the - # API, which must end in `v`, as in - # `google.feature.v1`. For major versions 0 and 1, the suffix can - # be omitted. Zero major versions must only be used for - # experimental, none-GA apis. - # Corresponds to the JSON property `version` - # @return [String] - attr_accessor :version - - # Included APIs. See Mixin. - # Corresponds to the JSON property `mixins` - # @return [Array] - attr_accessor :mixins - - # Any metadata attached to the API. - # Corresponds to the JSON property `options` - # @return [Array] - attr_accessor :options - - # The methods of this api, in unspecified order. - # Corresponds to the JSON property `methods` - # @return [Array] - attr_accessor :methods_prop - - # The fully qualified name of this api, including package name - # followed by the api's simple name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The source syntax of the service. - # Corresponds to the JSON property `syntax` - # @return [String] - attr_accessor :syntax - - # `SourceContext` represents information about the source of a - # protobuf element, like the file in which it is defined. - # Corresponds to the JSON property `sourceContext` - # @return [Google::Apis::ServiceuserV1::SourceContext] - attr_accessor :source_context - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @version = args[:version] if args.key?(:version) - @mixins = args[:mixins] if args.key?(:mixins) - @options = args[:options] if args.key?(:options) - @methods_prop = args[:methods_prop] if args.key?(:methods_prop) - @name = args[:name] if args.key?(:name) - @syntax = args[:syntax] if args.key?(:syntax) - @source_context = args[:source_context] if args.key?(:source_context) - end - end - - # Bind API methods to metrics. Binding a method to a metric causes that - # metric's configured quota, billing, and monitoring behaviors to apply to the - # method call. - # Used by metric-based quotas only. - class MetricRule - include Google::Apis::Core::Hashable - - # Selects the methods to which this rule applies. - # Refer to selector for syntax details. - # Corresponds to the JSON property `selector` - # @return [String] - attr_accessor :selector - - # Metrics to update when the selected methods are called, and the associated - # cost applied to each metric. - # The key of the map is the metric name, and the values are the amount - # increased for the metric against which the quota limits are defined. - # The value must not be negative. - # Corresponds to the JSON property `metricCosts` - # @return [Hash] - attr_accessor :metric_costs - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @selector = args[:selector] if args.key?(:selector) - @metric_costs = args[:metric_costs] if args.key?(:metric_costs) - end - end - - # `Authentication` defines the authentication configuration for an API. - # Example for an API targeted for external use: - # name: calendar.googleapis.com - # authentication: - # providers: - # - id: google_calendar_auth - # jwks_uri: https://www.googleapis.com/oauth2/v1/certs - # issuer: https://securetoken.google.com - # rules: - # - selector: "*" - # requirements: - # provider_id: google_calendar_auth - class Authentication - include Google::Apis::Core::Hashable - - # A list of authentication rules that apply to individual API methods. - # **NOTE:** All service configuration rules follow "last one wins" order. - # Corresponds to the JSON property `rules` - # @return [Array] - attr_accessor :rules - - # Defines a set of authentication providers that a service supports. - # Corresponds to the JSON property `providers` - # @return [Array] - attr_accessor :providers - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @rules = args[:rules] if args.key?(:rules) - @providers = args[:providers] if args.key?(:providers) - end - end - - # This resource represents a long-running operation that is the result of a - # network API call. - class Operation - include Google::Apis::Core::Hashable - - # The normal response of the operation in case of success. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # Corresponds to the JSON property `response` - # @return [Hash] - attr_accessor :response - - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should have the format of `operations/some/unique/name`. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The `Status` type defines a logical error model that is suitable for different - # programming environments, including REST APIs and RPC APIs. It is used by - # [gRPC](https://github.com/grpc). The error model is designed to be: - # - Simple to use and understand for most users - # - Flexible enough to meet unexpected needs - # # Overview - # The `Status` message contains three pieces of data: error code, error message, - # and error details. The error code should be an enum value of - # google.rpc.Code, but it may accept additional error codes if needed. The - # error message should be a developer-facing English message that helps - # developers *understand* and *resolve* the error. If a localized user-facing - # error message is needed, put the localized message in the error details or - # localize it in the client. The optional error details may contain arbitrary - # information about the error. There is a predefined set of error detail types - # in the package `google.rpc` which can be used for common error conditions. - # # Language mapping - # The `Status` message is the logical representation of the error model, but it - # is not necessarily the actual wire format. When the `Status` message is - # exposed in different client libraries and different wire protocols, it can be - # mapped differently. For example, it will likely be mapped to some exceptions - # in Java, but more likely mapped to some error codes in C. - # # Other uses - # The error model and the `Status` message can be used in a variety of - # environments, either with or without APIs, to provide a - # consistent developer experience across different environments. - # Example uses of this error model include: - # - Partial errors. If a service needs to return partial errors to the client, - # it may embed the `Status` in the normal response to indicate the partial - # errors. - # - Workflow errors. A typical workflow has multiple steps. Each step may - # have a `Status` message for error reporting purpose. - # - Batch operations. If a client uses batch request and batch response, the - # `Status` message should be used directly inside batch response, one for - # each error sub-response. - # - Asynchronous operations. If an API call embeds asynchronous operation - # results in its response, the status of those operations should be - # represented directly using the `Status` message. - # - Logging. If some API errors are stored in logs, the message `Status` could - # be used directly after any stripping needed for security/privacy reasons. - # Corresponds to the JSON property `error` - # @return [Google::Apis::ServiceuserV1::Status] - attr_accessor :error - - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # Corresponds to the JSON property `metadata` - # @return [Hash] - attr_accessor :metadata - - # If the value is `false`, it means the operation is still in progress. - # If true, the operation is completed, and either `error` or `response` is - # available. - # Corresponds to the JSON property `done` - # @return [Boolean] - attr_accessor :done - alias_method :done?, :done - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @response = args[:response] if args.key?(:response) - @name = args[:name] if args.key?(:name) - @error = args[:error] if args.key?(:error) - @metadata = args[:metadata] if args.key?(:metadata) - @done = args[:done] if args.key?(:done) - end - end - - # Represents a documentation page. A page can contain subpages to represent - # nested documentation set structure. - class Page - include Google::Apis::Core::Hashable - - # Subpages of this page. The order of subpages specified here will be - # honored in the generated docset. - # Corresponds to the JSON property `subpages` - # @return [Array] - attr_accessor :subpages - - # The name of the page. It will be used as an identity of the page to - # generate URI of the page, text of the link to this page in navigation, - # etc. The full page name (start from the root page name to this page - # concatenated with `.`) can be used as reference to the page in your - # documentation. For example: - #
pages:
-        # - name: Tutorial
-        # content: (== include tutorial.md ==)
-        # subpages:
-        # - name: Java
-        # content: (== include tutorial_java.md ==)
-        # 
- # You can reference `Java` page using Markdown reference link syntax: - # `Java`. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The Markdown content of the page. You can use (== include `path` ==&# - # 41; - # to include content from a Markdown file. - # Corresponds to the JSON property `content` - # @return [String] - attr_accessor :content - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @subpages = args[:subpages] if args.key?(:subpages) - @name = args[:name] if args.key?(:name) - @content = args[:content] if args.key?(:content) - end - end - - # The `Status` type defines a logical error model that is suitable for different - # programming environments, including REST APIs and RPC APIs. It is used by - # [gRPC](https://github.com/grpc). The error model is designed to be: - # - Simple to use and understand for most users - # - Flexible enough to meet unexpected needs - # # Overview - # The `Status` message contains three pieces of data: error code, error message, - # and error details. The error code should be an enum value of - # google.rpc.Code, but it may accept additional error codes if needed. The - # error message should be a developer-facing English message that helps - # developers *understand* and *resolve* the error. If a localized user-facing - # error message is needed, put the localized message in the error details or - # localize it in the client. The optional error details may contain arbitrary - # information about the error. There is a predefined set of error detail types - # in the package `google.rpc` which can be used for common error conditions. - # # Language mapping - # The `Status` message is the logical representation of the error model, but it - # is not necessarily the actual wire format. When the `Status` message is - # exposed in different client libraries and different wire protocols, it can be - # mapped differently. For example, it will likely be mapped to some exceptions - # in Java, but more likely mapped to some error codes in C. - # # Other uses - # The error model and the `Status` message can be used in a variety of - # environments, either with or without APIs, to provide a - # consistent developer experience across different environments. - # Example uses of this error model include: - # - Partial errors. If a service needs to return partial errors to the client, - # it may embed the `Status` in the normal response to indicate the partial - # errors. - # - Workflow errors. A typical workflow has multiple steps. Each step may - # have a `Status` message for error reporting purpose. - # - Batch operations. If a client uses batch request and batch response, the - # `Status` message should be used directly inside batch response, one for - # each error sub-response. - # - Asynchronous operations. If an API call embeds asynchronous operation - # results in its response, the status of those operations should be - # represented directly using the `Status` message. - # - Logging. If some API errors are stored in logs, the message `Status` could - # be used directly after any stripping needed for security/privacy reasons. - class Status - include Google::Apis::Core::Hashable - - # The status code, which should be an enum value of google.rpc.Code. - # Corresponds to the JSON property `code` - # @return [Fixnum] - attr_accessor :code - - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # google.rpc.Status.details field, or localized by the client. - # Corresponds to the JSON property `message` - # @return [String] - attr_accessor :message - - # A list of messages that carry the error details. There will be a - # common set of message types for APIs to use. - # Corresponds to the JSON property `details` - # @return [Array>] - attr_accessor :details - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @code = args[:code] if args.key?(:code) - @message = args[:message] if args.key?(:message) - @details = args[:details] if args.key?(:details) - end - end - - # Configuration for an anthentication provider, including support for - # [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web- - # token-32). - class AuthProvider - include Google::Apis::Core::Hashable - - # URL of the provider's public key set to validate signature of the JWT. See - # [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html# - # ProviderMetadata). - # Optional if the key set document: - # - can be retrieved from - # [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0. - # html - # of the issuer. - # - can be inferred from the email domain of the issuer (e.g. a Google service - # account). - # Example: https://www.googleapis.com/oauth2/v1/certs - # Corresponds to the JSON property `jwksUri` - # @return [String] - attr_accessor :jwks_uri - - # The list of JWT - # [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32# - # section-4.1.3). - # that are allowed to access. A JWT containing any of these audiences will - # be accepted. When this setting is absent, only JWTs with audience - # "https://Service_name/API_name" - # will be accepted. For example, if no audiences are in the setting, - # LibraryService API will only accept JWTs with the following audience - # "https://library-example.googleapis.com/google.example.library.v1. - # LibraryService". - # Example: - # audiences: bookstore_android.apps.googleusercontent.com, - # bookstore_web.apps.googleusercontent.com - # Corresponds to the JSON property `audiences` - # @return [String] - attr_accessor :audiences - - # The unique identifier of the auth provider. It will be referred to by - # `AuthRequirement.provider_id`. - # Example: "bookstore_auth". - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifies the principal that issued the JWT. See - # https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1 - # Usually a URL or an email address. - # Example: https://securetoken.google.com - # Example: 1234567-compute@developer.gserviceaccount.com - # Corresponds to the JSON property `issuer` - # @return [String] - attr_accessor :issuer - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @jwks_uri = args[:jwks_uri] if args.key?(:jwks_uri) - @audiences = args[:audiences] if args.key?(:audiences) - @id = args[:id] if args.key?(:id) - @issuer = args[:issuer] if args.key?(:issuer) - end - end - - # Enum value definition. - class EnumValue - include Google::Apis::Core::Hashable - - # Protocol buffer options. - # Corresponds to the JSON property `options` - # @return [Array] - attr_accessor :options - - # Enum value number. - # Corresponds to the JSON property `number` - # @return [Fixnum] - attr_accessor :number - - # Enum value name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @options = args[:options] if args.key?(:options) - @number = args[:number] if args.key?(:number) - @name = args[:name] if args.key?(:name) - end - end - - # `Service` is the root object of Google service configuration schema. It - # describes basic information about a service, such as the name and the - # title, and delegates other aspects to sub-sections. Each sub-section is - # either a proto message or a repeated proto message that configures a - # specific aspect, such as auth. See each proto message definition for details. - # Example: - # type: google.api.Service - # config_version: 3 - # name: calendar.googleapis.com - # title: Google Calendar API - # apis: - # - name: google.calendar.v3.Calendar - # authentication: - # providers: - # - id: google_calendar_auth - # jwks_uri: https://www.googleapis.com/oauth2/v1/certs - # issuer: https://securetoken.google.com - # rules: - # - selector: "*" - # requirements: - # provider_id: google_calendar_auth - class Service - include Google::Apis::Core::Hashable - - # Configuration for network endpoints. If this is empty, then an endpoint - # with the same name as the service is automatically generated to service all - # defined APIs. - # Corresponds to the JSON property `endpoints` - # @return [Array] - attr_accessor :endpoints - - # A list of API interfaces exported by this service. Only the `name` field - # of the google.protobuf.Api needs to be provided by the configuration - # author, as the remaining fields will be derived from the IDL during the - # normalization process. It is an error to specify an API interface here - # which cannot be resolved against the associated IDL files. - # Corresponds to the JSON property `apis` - # @return [Array] - attr_accessor :apis - - # Defines the logs used by this service. - # Corresponds to the JSON property `logs` - # @return [Array] - attr_accessor :logs - - # A list of all proto message types included in this API service. - # Types referenced directly or indirectly by the `apis` are - # automatically included. Messages which are not referenced but - # shall be included, such as types used by the `google.protobuf.Any` type, - # should be listed here by name. Example: - # types: - # - name: google.protobuf.Int32 - # Corresponds to the JSON property `types` - # @return [Array] - attr_accessor :types - - # Source information used to create a Service Config - # Corresponds to the JSON property `sourceInfo` - # @return [Google::Apis::ServiceuserV1::SourceInfo] - attr_accessor :source_info - - # Defines the HTTP configuration for a service. It contains a list of - # HttpRule, each specifying the mapping of an RPC method - # to one or more HTTP REST API methods. - # Corresponds to the JSON property `http` - # @return [Google::Apis::ServiceuserV1::Http] - attr_accessor :http - - # `Backend` defines the backend configuration for a service. - # Corresponds to the JSON property `backend` - # @return [Google::Apis::ServiceuserV1::Backend] - attr_accessor :backend - - # ### System parameter configuration - # A system parameter is a special kind of parameter defined by the API - # system, not by an individual API. It is typically mapped to an HTTP header - # and/or a URL query parameter. This configuration specifies which methods - # change the names of the system parameters. - # Corresponds to the JSON property `systemParameters` - # @return [Google::Apis::ServiceuserV1::SystemParameters] - attr_accessor :system_parameters - - # `Documentation` provides the information for describing a service. - # Example: - #
documentation:
-        # summary: >
-        # The Google Calendar API gives access
-        # to most calendar features.
-        # pages:
-        # - name: Overview
-        # content: (== include google/foo/overview.md ==)
-        # - name: Tutorial
-        # content: (== include google/foo/tutorial.md ==)
-        # subpages;
-        # - name: Java
-        # content: (== include google/foo/tutorial_java.md ==)
-        # rules:
-        # - selector: google.calendar.Calendar.Get
-        # description: >
-        # ...
-        # - selector: google.calendar.Calendar.Put
-        # description: >
-        # ...
-        # 
- # Documentation is provided in markdown syntax. In addition to - # standard markdown features, definition lists, tables and fenced - # code blocks are supported. Section headers can be provided and are - # interpreted relative to the section nesting of the context where - # a documentation fragment is embedded. - # Documentation from the IDL is merged with documentation defined - # via the config at normalization time, where documentation provided - # by config rules overrides IDL provided. - # A number of constructs specific to the API platform are supported - # in documentation text. - # In order to reference a proto element, the following - # notation can be used: - #
[fully.qualified.proto.name][]
- # To override the display text used for the link, this can be used: - #
[display text][fully.qualified.proto.name]
- # Text can be excluded from doc using the following notation: - #
(-- internal comment --)
- # Comments can be made conditional using a visibility label. The below - # text will be only rendered if the `BETA` label is available: - #
(--BETA: comment for BETA users --)
- # A few directives are available in documentation. Note that - # directives must appear on a single line to be properly - # identified. The `include` directive includes a markdown file from - # an external source: - #
(== include path/to/file ==)
- # The `resource_for` directive marks a message to be the resource of - # a collection in REST view. If it is not specified, tools attempt - # to infer the resource from the operations in a collection: - #
(== resource_for v1.shelves.books ==)
- # The directive `suppress_warning` does not directly affect documentation - # and is documented together with service config validation. - # Corresponds to the JSON property `documentation` - # @return [Google::Apis::ServiceuserV1::Documentation] - attr_accessor :documentation - - # Logging configuration of the service. - # The following example shows how to configure logs to be sent to the - # producer and consumer projects. In the example, the `activity_history` - # log is sent to both the producer and consumer projects, whereas the - # `purchase_history` log is only sent to the producer project. - # monitored_resources: - # - type: library.googleapis.com/branch - # labels: - # - key: /city - # description: The city where the library branch is located in. - # - key: /name - # description: The name of the branch. - # logs: - # - name: activity_history - # labels: - # - key: /customer_id - # - name: purchase_history - # logging: - # producer_destinations: - # - monitored_resource: library.googleapis.com/branch - # logs: - # - activity_history - # - purchase_history - # consumer_destinations: - # - monitored_resource: library.googleapis.com/branch - # logs: - # - activity_history - # Corresponds to the JSON property `logging` - # @return [Google::Apis::ServiceuserV1::Logging] - attr_accessor :logging - - # Defines the monitored resources used by this service. This is required - # by the Service.monitoring and Service.logging configurations. - # Corresponds to the JSON property `monitoredResources` - # @return [Array] - attr_accessor :monitored_resources - - # A list of all enum types included in this API service. Enums - # referenced directly or indirectly by the `apis` are automatically - # included. Enums which are not referenced but shall be included - # should be listed here by name. Example: - # enums: - # - name: google.someapi.v1.SomeEnum - # Corresponds to the JSON property `enums` - # @return [Array] - attr_accessor :enums - - # `Context` defines which contexts an API requests. - # Example: - # context: - # rules: - # - selector: "*" - # requested: - # - google.rpc.context.ProjectContext - # - google.rpc.context.OriginContext - # The above specifies that all methods in the API request - # `google.rpc.context.ProjectContext` and - # `google.rpc.context.OriginContext`. - # Available context types are defined in package - # `google.rpc.context`. - # Corresponds to the JSON property `context` - # @return [Google::Apis::ServiceuserV1::Context] - attr_accessor :context - - # A unique ID for a specific instance of this message, typically assigned - # by the client for tracking purpose. If empty, the server may choose to - # generate one instead. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Configuration controlling usage of a service. - # Corresponds to the JSON property `usage` - # @return [Google::Apis::ServiceuserV1::Usage] - attr_accessor :usage - - # Defines the metrics used by this service. - # Corresponds to the JSON property `metrics` - # @return [Array] - attr_accessor :metrics - - # `Authentication` defines the authentication configuration for an API. - # Example for an API targeted for external use: - # name: calendar.googleapis.com - # authentication: - # providers: - # - id: google_calendar_auth - # jwks_uri: https://www.googleapis.com/oauth2/v1/certs - # issuer: https://securetoken.google.com - # rules: - # - selector: "*" - # requirements: - # provider_id: google_calendar_auth - # Corresponds to the JSON property `authentication` - # @return [Google::Apis::ServiceuserV1::Authentication] - attr_accessor :authentication - - # Experimental service configuration. These configuration options can - # only be used by whitelisted users. - # Corresponds to the JSON property `experimental` - # @return [Google::Apis::ServiceuserV1::Experimental] - attr_accessor :experimental - - # Selects and configures the service controller used by the service. The - # service controller handles features like abuse, quota, billing, logging, - # monitoring, etc. - # Corresponds to the JSON property `control` - # @return [Google::Apis::ServiceuserV1::Control] - attr_accessor :control - - # The version of the service configuration. The config version may - # influence interpretation of the configuration, for example, to - # determine defaults. This is documented together with applicable - # options. The current default for the config version itself is `3`. - # Corresponds to the JSON property `configVersion` - # @return [Fixnum] - attr_accessor :config_version - - # Monitoring configuration of the service. - # The example below shows how to configure monitored resources and metrics - # for monitoring. In the example, a monitored resource and two metrics are - # defined. The `library.googleapis.com/book/returned_count` metric is sent - # to both producer and consumer projects, whereas the - # `library.googleapis.com/book/overdue_count` metric is only sent to the - # consumer project. - # monitored_resources: - # - type: library.googleapis.com/branch - # labels: - # - key: /city - # description: The city where the library branch is located in. - # - key: /name - # description: The name of the branch. - # metrics: - # - name: library.googleapis.com/book/returned_count - # metric_kind: DELTA - # value_type: INT64 - # labels: - # - key: /customer_id - # - name: library.googleapis.com/book/overdue_count - # metric_kind: GAUGE - # value_type: INT64 - # labels: - # - key: /customer_id - # monitoring: - # producer_destinations: - # - monitored_resource: library.googleapis.com/branch - # metrics: - # - library.googleapis.com/book/returned_count - # consumer_destinations: - # - monitored_resource: library.googleapis.com/branch - # metrics: - # - library.googleapis.com/book/returned_count - # - library.googleapis.com/book/overdue_count - # Corresponds to the JSON property `monitoring` - # @return [Google::Apis::ServiceuserV1::Monitoring] - attr_accessor :monitoring - - # A list of all proto message types included in this API service. - # It serves similar purpose as [google.api.Service.types], except that - # these types are not needed by user-defined APIs. Therefore, they will not - # show up in the generated discovery doc. This field should only be used - # to define system APIs in ESF. - # Corresponds to the JSON property `systemTypes` - # @return [Array] - attr_accessor :system_types - - # The id of the Google developer project that owns the service. - # Members of this project can manage the service configuration, - # manage consumption of the service, etc. - # Corresponds to the JSON property `producerProjectId` - # @return [String] - attr_accessor :producer_project_id - - # `Visibility` defines restrictions for the visibility of service - # elements. Restrictions are specified using visibility labels - # (e.g., TRUSTED_TESTER) that are elsewhere linked to users and projects. - # Users and projects can have access to more than one visibility label. The - # effective visibility for multiple labels is the union of each label's - # elements, plus any unrestricted elements. - # If an element and its parents have no restrictions, visibility is - # unconditionally granted. - # Example: - # visibility: - # rules: - # - selector: google.calendar.Calendar.EnhancedSearch - # restriction: TRUSTED_TESTER - # - selector: google.calendar.Calendar.Delegate - # restriction: GOOGLE_INTERNAL - # Here, all methods are publicly visible except for the restricted methods - # EnhancedSearch and Delegate. - # Corresponds to the JSON property `visibility` - # @return [Google::Apis::ServiceuserV1::Visibility] - attr_accessor :visibility - - # Quota configuration helps to achieve fairness and budgeting in service - # usage. - # The quota configuration works this way: - # - The service configuration defines a set of metrics. - # - For API calls, the quota.metric_rules maps methods to metrics with - # corresponding costs. - # - The quota.limits defines limits on the metrics, which will be used for - # quota checks at runtime. - # An example quota configuration in yaml format: - # quota: - # - name: apiWriteQpsPerProject - # metric: library.googleapis.com/write_calls - # unit: "1/min/`project`" # rate limit for consumer projects - # values: - # STANDARD: 10000 - # # The metric rules bind all methods to the read_calls metric, - # # except for the UpdateBook and DeleteBook methods. These two methods - # # are mapped to the write_calls metric, with the UpdateBook method - # # consuming at twice rate as the DeleteBook method. - # metric_rules: - # - selector: "*" - # metric_costs: - # library.googleapis.com/read_calls: 1 - # - selector: google.example.library.v1.LibraryService.UpdateBook - # metric_costs: - # library.googleapis.com/write_calls: 2 - # - selector: google.example.library.v1.LibraryService.DeleteBook - # metric_costs: - # library.googleapis.com/write_calls: 1 - # Corresponding Metric definition: - # metrics: - # - name: library.googleapis.com/read_calls - # display_name: Read requests - # metric_kind: DELTA - # value_type: INT64 - # - name: library.googleapis.com/write_calls - # display_name: Write requests - # metric_kind: DELTA - # value_type: INT64 - # Corresponds to the JSON property `quota` - # @return [Google::Apis::ServiceuserV1::Quota] - attr_accessor :quota - - # The DNS address at which this service is available, - # e.g. `calendar.googleapis.com`. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Customize service error responses. For example, list any service - # specific protobuf types that can appear in error detail lists of - # error responses. - # Example: - # custom_error: - # types: - # - google.foo.v1.CustomError - # - google.foo.v1.AnotherError - # Corresponds to the JSON property `customError` - # @return [Google::Apis::ServiceuserV1::CustomError] - attr_accessor :custom_error - - # The product title associated with this service. - # 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) - @endpoints = args[:endpoints] if args.key?(:endpoints) - @apis = args[:apis] if args.key?(:apis) - @logs = args[:logs] if args.key?(:logs) - @types = args[:types] if args.key?(:types) - @source_info = args[:source_info] if args.key?(:source_info) - @http = args[:http] if args.key?(:http) - @backend = args[:backend] if args.key?(:backend) - @system_parameters = args[:system_parameters] if args.key?(:system_parameters) - @documentation = args[:documentation] if args.key?(:documentation) - @logging = args[:logging] if args.key?(:logging) - @monitored_resources = args[:monitored_resources] if args.key?(:monitored_resources) - @enums = args[:enums] if args.key?(:enums) - @context = args[:context] if args.key?(:context) - @id = args[:id] if args.key?(:id) - @usage = args[:usage] if args.key?(:usage) - @metrics = args[:metrics] if args.key?(:metrics) - @authentication = args[:authentication] if args.key?(:authentication) - @experimental = args[:experimental] if args.key?(:experimental) - @control = args[:control] if args.key?(:control) - @config_version = args[:config_version] if args.key?(:config_version) - @monitoring = args[:monitoring] if args.key?(:monitoring) - @system_types = args[:system_types] if args.key?(:system_types) - @producer_project_id = args[:producer_project_id] if args.key?(:producer_project_id) - @visibility = args[:visibility] if args.key?(:visibility) - @quota = args[:quota] if args.key?(:quota) - @name = args[:name] if args.key?(:name) - @custom_error = args[:custom_error] if args.key?(:custom_error) - @title = args[:title] if args.key?(:title) - end - end - - # A custom pattern is used for defining custom HTTP verb. - class CustomHttpPattern - include Google::Apis::Core::Hashable - - # The name of this custom HTTP verb. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The path matched by this custom verb. - # Corresponds to the JSON property `path` - # @return [String] - attr_accessor :path - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @kind = args[:kind] if args.key?(:kind) - @path = args[:path] if args.key?(:path) - end - end - - # The metadata associated with a long running operation resource. - class OperationMetadata - include Google::Apis::Core::Hashable - - # The full name of the resources that this operation is directly - # associated with. - # Corresponds to the JSON property `resourceNames` - # @return [Array] - attr_accessor :resource_names - - # Detailed status information for each step. The order is undetermined. - # Corresponds to the JSON property `steps` - # @return [Array] - attr_accessor :steps - - # Percentage of completion of this operation, ranging from 0 to 100. - # Corresponds to the JSON property `progressPercentage` - # @return [Fixnum] - attr_accessor :progress_percentage - - # The start time of the operation. - # Corresponds to the JSON property `startTime` - # @return [String] - attr_accessor :start_time - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @resource_names = args[:resource_names] if args.key?(:resource_names) - @steps = args[:steps] if args.key?(:steps) - @progress_percentage = args[:progress_percentage] if args.key?(:progress_percentage) - @start_time = args[:start_time] if args.key?(:start_time) - end - end - - # The published version of a Service that is managed by - # Google Service Management. - class PublishedService - include Google::Apis::Core::Hashable - - # `Service` is the root object of Google service configuration schema. It - # describes basic information about a service, such as the name and the - # title, and delegates other aspects to sub-sections. Each sub-section is - # either a proto message or a repeated proto message that configures a - # specific aspect, such as auth. See each proto message definition for details. - # Example: - # type: google.api.Service - # config_version: 3 - # name: calendar.googleapis.com - # title: Google Calendar API - # apis: - # - name: google.calendar.v3.Calendar - # authentication: - # providers: - # - id: google_calendar_auth - # jwks_uri: https://www.googleapis.com/oauth2/v1/certs - # issuer: https://securetoken.google.com - # rules: - # - selector: "*" - # requirements: - # provider_id: google_calendar_auth - # Corresponds to the JSON property `service` - # @return [Google::Apis::ServiceuserV1::Service] - attr_accessor :service - - # The resource name of the service. - # A valid name would be: - # - services/serviceuser.googleapis.com - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @service = args[:service] if args.key?(:service) - @name = args[:name] if args.key?(:name) - end - end - - # Define a system parameter rule mapping system parameter definitions to - # methods. - class SystemParameterRule - include Google::Apis::Core::Hashable - - # Selects the methods to which this rule applies. Use '*' to indicate all - # methods in all APIs. - # Refer to selector for syntax details. - # Corresponds to the JSON property `selector` - # @return [String] - attr_accessor :selector - - # Define parameters. Multiple names may be defined for a parameter. - # For a given method call, only one of them should be used. If multiple - # names are used the behavior is implementation-dependent. - # If none of the specified names are present the behavior is - # parameter-dependent. - # Corresponds to the JSON property `parameters` - # @return [Array] - attr_accessor :parameters - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @selector = args[:selector] if args.key?(:selector) - @parameters = args[:parameters] if args.key?(:parameters) - end - end - - # A visibility rule provides visibility configuration for an individual API - # element. - class VisibilityRule - include Google::Apis::Core::Hashable - - # A comma-separated list of visibility labels that apply to the `selector`. - # Any of the listed labels can be used to grant the visibility. - # If a rule has multiple labels, removing one of the labels but not all of - # them can break clients. - # Example: - # visibility: - # rules: - # - selector: google.calendar.Calendar.EnhancedSearch - # restriction: GOOGLE_INTERNAL, TRUSTED_TESTER - # Removing GOOGLE_INTERNAL from this restriction will break clients that - # rely on this method and only had access to it through GOOGLE_INTERNAL. - # Corresponds to the JSON property `restriction` - # @return [String] - attr_accessor :restriction - - # Selects methods, messages, fields, enums, etc. to which this rule applies. - # Refer to selector for syntax details. - # Corresponds to the JSON property `selector` - # @return [String] - attr_accessor :selector - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @restriction = args[:restriction] if args.key?(:restriction) - @selector = args[:selector] if args.key?(:selector) - end - end - - # `HttpRule` defines the mapping of an RPC method to one or more HTTP - # REST APIs. The mapping determines what portions of the request - # message are populated from the path, query parameters, or body of - # the HTTP request. The mapping is typically specified as an - # `google.api.http` annotation, see "google/api/annotations.proto" - # for details. - # The mapping consists of a field specifying the path template and - # method kind. The path template can refer to fields in the request - # message, as in the example below which describes a REST GET - # operation on a resource collection of messages: - # service Messaging ` - # rpc GetMessage(GetMessageRequest) returns (Message) ` - # option (google.api.http).get = "/v1/messages/`message_id`/`sub. - # subfield`"; - # ` - # ` - # message GetMessageRequest ` - # message SubMessage ` - # string subfield = 1; - # ` - # string message_id = 1; // mapped to the URL - # SubMessage sub = 2; // `sub.subfield` is url-mapped - # ` - # message Message ` - # string text = 1; // content of the resource - # ` - # The same http annotation can alternatively be expressed inside the - # `GRPC API Configuration` YAML file. - # http: - # rules: - # - selector: .Messaging.GetMessage - # get: /v1/messages/`message_id`/`sub.subfield` - # This definition enables an automatic, bidrectional mapping of HTTP - # JSON to RPC. Example: - # HTTP | RPC - # -----|----- - # `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: - # SubMessage(subfield: "foo"))` - # In general, not only fields but also field paths can be referenced - # from a path pattern. Fields mapped to the path pattern cannot be - # repeated and must have a primitive (non-message) type. - # Any fields in the request message which are not bound by the path - # pattern automatically become (optional) HTTP query - # parameters. Assume the following definition of the request message: - # message GetMessageRequest ` - # message SubMessage ` - # string subfield = 1; - # ` - # string message_id = 1; // mapped to the URL - # int64 revision = 2; // becomes a parameter - # SubMessage sub = 3; // `sub.subfield` becomes a parameter - # ` - # This enables a HTTP JSON to RPC mapping as below: - # HTTP | RPC - # -----|----- - # `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: - # "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - # Note that fields which are mapped to HTTP parameters must have a - # primitive type or a repeated primitive type. Message types are not - # allowed. In the case of a repeated type, the parameter can be - # repeated in the URL, as in `...?param=A¶m=B`. - # For HTTP method kinds which allow a request body, the `body` field - # specifies the mapping. Consider a REST update method on the - # message resource collection: - # service Messaging ` - # rpc UpdateMessage(UpdateMessageRequest) returns (Message) ` - # option (google.api.http) = ` - # put: "/v1/messages/`message_id`" - # body: "message" - # `; - # ` - # ` - # message UpdateMessageRequest ` - # string message_id = 1; // mapped to the URL - # Message message = 2; // mapped to the body - # ` - # The following HTTP JSON to RPC mapping is enabled, where the - # representation of the JSON in the request body is determined by - # protos JSON encoding: - # HTTP | RPC - # -----|----- - # `PUT /v1/messages/123456 ` "text": "Hi!" `` | `UpdateMessage(message_id: " - # 123456" message ` text: "Hi!" `)` - # The special name `*` can be used in the body mapping to define that - # every field not bound by the path template should be mapped to the - # request body. This enables the following alternative definition of - # the update method: - # service Messaging ` - # rpc UpdateMessage(Message) returns (Message) ` - # option (google.api.http) = ` - # put: "/v1/messages/`message_id`" - # body: "*" - # `; - # ` - # ` - # message Message ` - # string message_id = 1; - # string text = 2; - # ` - # The following HTTP JSON to RPC mapping is enabled: - # HTTP | RPC - # -----|----- - # `PUT /v1/messages/123456 ` "text": "Hi!" `` | `UpdateMessage(message_id: " - # 123456" text: "Hi!")` - # Note that when using `*` in the body mapping, it is not possible to - # have HTTP parameters, as all fields not bound by the path end in - # the body. This makes this option more rarely used in practice of - # defining REST APIs. The common usage of `*` is in custom methods - # which don't use the URL at all for transferring data. - # It is possible to define multiple HTTP methods for one RPC by using - # the `additional_bindings` option. Example: - # service Messaging ` - # rpc GetMessage(GetMessageRequest) returns (Message) ` - # option (google.api.http) = ` - # get: "/v1/messages/`message_id`" - # additional_bindings ` - # get: "/v1/users/`user_id`/messages/`message_id`" - # ` - # `; - # ` - # ` - # message GetMessageRequest ` - # string message_id = 1; - # string user_id = 2; - # ` - # This enables the following two alternative HTTP JSON to RPC - # mappings: - # HTTP | RPC - # -----|----- - # `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` - # `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: " - # 123456")` - # # Rules for HTTP mapping - # The rules for mapping HTTP path, query parameters, and body fields - # to the request message are as follows: - # 1. The `body` field specifies either `*` or a field path, or is - # omitted. If omitted, it assumes there is no HTTP body. - # 2. Leaf fields (recursive expansion of nested messages in the - # request) can be classified into three types: - # (a) Matched in the URL template. - # (b) Covered by body (if body is `*`, everything except (a) fields; - # else everything under the body field) - # (c) All other fields. - # 3. URL query parameters found in the HTTP request are mapped to (c) fields. - # 4. Any body sent with an HTTP request can contain only (b) fields. - # The syntax of the path template is as follows: - # Template = "/" Segments [ Verb ] ; - # Segments = Segment ` "/" Segment ` ; - # Segment = "*" | "**" | LITERAL | Variable ; - # Variable = "`" FieldPath [ "=" Segments ] "`" ; - # FieldPath = IDENT ` "." IDENT ` ; - # Verb = ":" LITERAL ; - # The syntax `*` matches a single path segment. It follows the semantics of - # [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String - # Expansion. - # The syntax `**` matches zero or more path segments. It follows the semantics - # of [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.3 Reserved - # Expansion. NOTE: it must be the last segment in the path except the Verb. - # The syntax `LITERAL` matches literal text in the URL path. - # The syntax `Variable` matches the entire path as specified by its template; - # this nested template must not contain further variables. If a variable - # matches a single path segment, its template may be omitted, e.g. ``var`` - # is equivalent to ``var=*``. - # NOTE: the field paths in variables and in the `body` must not refer to - # repeated fields or map fields. - # Use CustomHttpPattern to specify any HTTP method that is not included in the - # `pattern` field, such as HEAD, or "*" to leave the HTTP method unspecified for - # a given URL path rule. The wild-card rule is useful for services that provide - # content to Web (HTML) clients. - class HttpRule - include Google::Apis::Core::Hashable - - # Additional HTTP bindings for the selector. Nested bindings must - # not contain an `additional_bindings` field themselves (that is, - # the nesting may only be one level deep). - # Corresponds to the JSON property `additionalBindings` - # @return [Array] - attr_accessor :additional_bindings - - # The name of the response field whose value is mapped to the HTTP body of - # response. Other response fields are ignored. This field is optional. When - # not set, the response message will be used as HTTP body of response. - # NOTE: the referred field must be not a repeated field and must be present - # at the top-level of response message type. - # Corresponds to the JSON property `responseBody` - # @return [String] - attr_accessor :response_body - - # Use this only for Scotty Requests. Do not use this for media support using - # Bytestream, add instead [][google.bytestream.RestByteStream] as an API to - # your configuration for Bytestream methods. - # Corresponds to the JSON property `mediaUpload` - # @return [Google::Apis::ServiceuserV1::MediaUpload] - attr_accessor :media_upload - - # Selects methods to which this rule applies. - # Refer to selector for syntax details. - # Corresponds to the JSON property `selector` - # @return [String] - attr_accessor :selector - - # A custom pattern is used for defining custom HTTP verb. - # Corresponds to the JSON property `custom` - # @return [Google::Apis::ServiceuserV1::CustomHttpPattern] - attr_accessor :custom - - # Used for listing and getting information about resources. - # Corresponds to the JSON property `get` - # @return [String] - attr_accessor :get - - # Used for updating a resource. - # Corresponds to the JSON property `patch` - # @return [String] - attr_accessor :patch - - # Used for updating a resource. - # Corresponds to the JSON property `put` - # @return [String] - attr_accessor :put - - # Used for deleting a resource. - # Corresponds to the JSON property `delete` - # @return [String] - attr_accessor :delete - - # The name of the request field whose value is mapped to the HTTP body, or - # `*` for mapping all fields not captured by the path pattern to the HTTP - # body. NOTE: the referred field must not be a repeated field and must be - # present at the top-level of request message type. - # Corresponds to the JSON property `body` - # @return [String] - attr_accessor :body - - # Use this only for Scotty Requests. Do not use this for media support using - # Bytestream, add instead [][google.bytestream.RestByteStream] as an API to - # your configuration for Bytestream methods. - # Corresponds to the JSON property `mediaDownload` - # @return [Google::Apis::ServiceuserV1::MediaDownload] - attr_accessor :media_download - - # Used for creating a resource. - # Corresponds to the JSON property `post` - # @return [String] - attr_accessor :post - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @additional_bindings = args[:additional_bindings] if args.key?(:additional_bindings) - @response_body = args[:response_body] if args.key?(:response_body) - @media_upload = args[:media_upload] if args.key?(:media_upload) - @selector = args[:selector] if args.key?(:selector) - @custom = args[:custom] if args.key?(:custom) - @get = args[:get] if args.key?(:get) - @patch = args[:patch] if args.key?(:patch) - @put = args[:put] if args.key?(:put) - @delete = args[:delete] if args.key?(:delete) - @body = args[:body] if args.key?(:body) - @media_download = args[:media_download] if args.key?(:media_download) - @post = args[:post] if args.key?(:post) - end - end - - # Configuration of a specific monitoring destination (the producer project - # or the consumer project). - class MonitoringDestination - include Google::Apis::Core::Hashable - - # The monitored resource type. The type must be defined in - # Service.monitored_resources section. - # Corresponds to the JSON property `monitoredResource` - # @return [String] - attr_accessor :monitored_resource - - # Names of the metrics to report to this monitoring destination. - # Each name must be defined in Service.metrics section. - # Corresponds to the JSON property `metrics` - # @return [Array] - attr_accessor :metrics - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @monitored_resource = args[:monitored_resource] if args.key?(:monitored_resource) - @metrics = args[:metrics] if args.key?(:metrics) - end - end - # `Visibility` defines restrictions for the visibility of service # elements. Restrictions are specified using visibility labels # (e.g., TRUSTED_TESTER) that are elsewhere linked to users and projects. @@ -2069,6 +338,13 @@ module Google # @return [String] attr_accessor :metric + # Optional. User-visible, extended description for this quota limit. + # Should be used only when more context is needed to understand this limit + # than provided by the limit's display name (see: `display_name`). + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + # User-visible display name for this limit. # Optional. If not set, the UI will provide a default display name based on # the quota configuration. This field can be used to override the default @@ -2077,13 +353,6 @@ module Google # @return [String] attr_accessor :display_name - # Optional. User-visible, extended description for this quota limit. - # Should be used only when more context is needed to understand this limit - # than provided by the limit's display name (see: `display_name`). - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - # Tiered limit values. Also allows for regional or zone overrides for these # values if "/`region`" or "/`zone`" is specified in the unit field. # Currently supported tiers from low to high: @@ -2201,8 +470,8 @@ module Google def update!(**args) @default_limit = args[:default_limit] if args.key?(:default_limit) @metric = args[:metric] if args.key?(:metric) - @display_name = args[:display_name] if args.key?(:display_name) @description = args[:description] if args.key?(:description) + @display_name = args[:display_name] if args.key?(:display_name) @values = args[:values] if args.key?(:values) @unit = args[:unit] if args.key?(:unit) @max_limit = args[:max_limit] if args.key?(:max_limit) @@ -2216,6 +485,11 @@ module Google class MethodProp include Google::Apis::Core::Hashable + # The URL of the output message type. + # Corresponds to the JSON property `responseTypeUrl` + # @return [String] + attr_accessor :response_type_url + # Any metadata attached to the method. # Corresponds to the JSON property `options` # @return [Array] @@ -2248,24 +522,19 @@ module Google # @return [String] attr_accessor :syntax - # The URL of the output message type. - # Corresponds to the JSON property `responseTypeUrl` - # @return [String] - attr_accessor :response_type_url - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @response_type_url = args[:response_type_url] if args.key?(:response_type_url) @options = args[:options] if args.key?(:options) @response_streaming = args[:response_streaming] if args.key?(:response_streaming) @name = args[:name] if args.key?(:name) @request_type_url = args[:request_type_url] if args.key?(:request_type_url) @request_streaming = args[:request_streaming] if args.key?(:request_streaming) @syntax = args[:syntax] if args.key?(:syntax) - @response_type_url = args[:response_type_url] if args.key?(:response_type_url) end end @@ -2468,11 +737,6 @@ module Google class SystemParameter include Google::Apis::Core::Hashable - # Define the name of the parameter, such as "api_key" . It is case sensitive. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - # Define the URL query parameter name to use for the parameter. It is case # sensitive. # Corresponds to the JSON property `urlQueryParameter` @@ -2485,15 +749,20 @@ module Google # @return [String] attr_accessor :http_header + # Define the name of the parameter, such as "api_key" . It is case sensitive. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @name = args[:name] if args.key?(:name) @url_query_parameter = args[:url_query_parameter] if args.key?(:url_query_parameter) @http_header = args[:http_header] if args.key?(:http_header) + @name = args[:name] if args.key?(:name) end end @@ -2501,27 +770,16 @@ module Google class Field include Google::Apis::Core::Hashable - # The field type URL, without the scheme, for message or enumeration - # types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`. - # Corresponds to the JSON property `typeUrl` + # The field type. + # Corresponds to the JSON property `kind` # @return [String] - attr_accessor :type_url - - # The field number. - # Corresponds to the JSON property `number` - # @return [Fixnum] - attr_accessor :number + attr_accessor :kind # The field JSON name. # Corresponds to the JSON property `jsonName` # @return [String] attr_accessor :json_name - # The field type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - # The protocol buffer options. # Corresponds to the JSON property `options` # @return [Array] @@ -2554,22 +812,33 @@ module Google # @return [String] attr_accessor :name + # The field type URL, without the scheme, for message or enumeration + # types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`. + # Corresponds to the JSON property `typeUrl` + # @return [String] + attr_accessor :type_url + + # The field number. + # Corresponds to the JSON property `number` + # @return [Fixnum] + attr_accessor :number + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @type_url = args[:type_url] if args.key?(:type_url) - @number = args[:number] if args.key?(:number) - @json_name = args[:json_name] if args.key?(:json_name) @kind = args[:kind] if args.key?(:kind) + @json_name = args[:json_name] if args.key?(:json_name) @options = args[:options] if args.key?(:options) @oneof_index = args[:oneof_index] if args.key?(:oneof_index) @packed = args[:packed] if args.key?(:packed) @cardinality = args[:cardinality] if args.key?(:cardinality) @default_value = args[:default_value] if args.key?(:default_value) @name = args[:name] if args.key?(:name) + @type_url = args[:type_url] if args.key?(:type_url) + @number = args[:number] if args.key?(:number) end end @@ -2611,14 +880,6 @@ module Google class Monitoring include Google::Apis::Core::Hashable - # Monitoring configurations for sending metrics to the consumer project. - # There can be multiple consumer destinations, each one must have a - # different monitored resource type. A metric can be used in at most - # one consumer destination. - # Corresponds to the JSON property `consumerDestinations` - # @return [Array] - attr_accessor :consumer_destinations - # Monitoring configurations for sending metrics to the producer project. # There can be multiple producer destinations, each one must have a # different monitored resource type. A metric can be used in at most @@ -2627,14 +888,22 @@ module Google # @return [Array] attr_accessor :producer_destinations + # Monitoring configurations for sending metrics to the consumer project. + # There can be multiple consumer destinations, each one must have a + # different monitored resource type. A metric can be used in at most + # one consumer destination. + # Corresponds to the JSON property `consumerDestinations` + # @return [Array] + attr_accessor :consumer_destinations + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @consumer_destinations = args[:consumer_destinations] if args.key?(:consumer_destinations) @producer_destinations = args[:producer_destinations] if args.key?(:producer_destinations) + @consumer_destinations = args[:consumer_destinations] if args.key?(:consumer_destinations) end end @@ -2642,16 +911,6 @@ module Google class Enum include Google::Apis::Core::Hashable - # Enum type name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Enum value definitions. - # Corresponds to the JSON property `enumvalue` - # @return [Array] - attr_accessor :enumvalue - # Protocol buffer options. # Corresponds to the JSON property `options` # @return [Array] @@ -2668,17 +927,40 @@ module Google # @return [String] attr_accessor :syntax + # Enum type name. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Enum value definitions. + # Corresponds to the JSON property `enumvalue` + # @return [Array] + attr_accessor :enumvalue + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @name = args[:name] if args.key?(:name) - @enumvalue = args[:enumvalue] if args.key?(:enumvalue) @options = args[:options] if args.key?(:options) @source_context = args[:source_context] if args.key?(:source_context) @syntax = args[:syntax] if args.key?(:syntax) + @name = args[:name] if args.key?(:name) + @enumvalue = args[:enumvalue] if args.key?(:enumvalue) + end + end + + # Request message for EnableService method. + class EnableServiceRequest + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) end end @@ -2713,23 +995,15 @@ module Google end end - # Request message for EnableService method. - class EnableServiceRequest - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - # A protocol buffer message type. class Type include Google::Apis::Core::Hashable + # The list of fields. + # Corresponds to the JSON property `fields` + # @return [Array] + attr_accessor :fields + # The fully qualified message name. # Corresponds to the JSON property `name` # @return [String] @@ -2740,39 +1014,34 @@ module Google # @return [Array] attr_accessor :oneofs - # The source syntax. - # Corresponds to the JSON property `syntax` - # @return [String] - attr_accessor :syntax - # `SourceContext` represents information about the source of a # protobuf element, like the file in which it is defined. # Corresponds to the JSON property `sourceContext` # @return [Google::Apis::ServiceuserV1::SourceContext] attr_accessor :source_context + # The source syntax. + # Corresponds to the JSON property `syntax` + # @return [String] + attr_accessor :syntax + # The protocol buffer options. # Corresponds to the JSON property `options` # @return [Array] attr_accessor :options - # The list of fields. - # Corresponds to the JSON property `fields` - # @return [Array] - attr_accessor :fields - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @fields = args[:fields] if args.key?(:fields) @name = args[:name] if args.key?(:name) @oneofs = args[:oneofs] if args.key?(:oneofs) - @syntax = args[:syntax] if args.key?(:syntax) @source_context = args[:source_context] if args.key?(:source_context) + @syntax = args[:syntax] if args.key?(:syntax) @options = args[:options] if args.key?(:options) - @fields = args[:fields] if args.key?(:fields) end end @@ -2826,6 +1095,11 @@ module Google class DocumentationRule include Google::Apis::Core::Hashable + # Description of the selected API(s). + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + # Deprecation description of the selected element(s). It can be provided if an # element is marked as `deprecated`. # Corresponds to the JSON property `deprecationDescription` @@ -2842,20 +1116,15 @@ module Google # @return [String] attr_accessor :selector - # Description of the selected API(s). - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @description = args[:description] if args.key?(:description) @deprecation_description = args[:deprecation_description] if args.key?(:deprecation_description) @selector = args[:selector] if args.key?(:selector) - @description = args[:description] if args.key?(:description) end end @@ -2890,6 +1159,12 @@ module Google class ContextRule include Google::Apis::Core::Hashable + # Selects the methods to which this rule applies. + # Refer to selector for syntax details. + # Corresponds to the JSON property `selector` + # @return [String] + attr_accessor :selector + # A list of full type names of provided contexts. # Corresponds to the JSON property `provided` # @return [Array] @@ -2900,42 +1175,15 @@ module Google # @return [Array] attr_accessor :requested - # Selects the methods to which this rule applies. - # Refer to selector for syntax details. - # Corresponds to the JSON property `selector` - # @return [String] - attr_accessor :selector - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @selector = args[:selector] if args.key?(:selector) @provided = args[:provided] if args.key?(:provided) @requested = args[:requested] if args.key?(:requested) - @selector = args[:selector] if args.key?(:selector) - end - end - - # `SourceContext` represents information about the source of a - # protobuf element, like the file in which it is defined. - class SourceContext - include Google::Apis::Core::Hashable - - # The path-qualified name of the .proto file that contained the associated - # protobuf element. For example: `"google/protobuf/source_context.proto"`. - # Corresponds to the JSON property `fileName` - # @return [String] - attr_accessor :file_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @file_name = args[:file_name] if args.key?(:file_name) end end @@ -2945,6 +1193,23 @@ module Google class MetricDescriptor include Google::Apis::Core::Hashable + # Whether the metric records instantaneous values, changes to a value, etc. + # Some combinations of `metric_kind` and `value_type` might not be supported. + # Corresponds to the JSON property `metricKind` + # @return [String] + attr_accessor :metric_kind + + # A detailed description of the metric, which can be used in documentation. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # A concise name for the metric, which can be displayed in user interfaces. + # Use sentence case without an ending period, for example "Request count". + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + # The unit in which the metric value is reported. It is only applicable # if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The # supported units are a subset of [The Unified Code for Units of @@ -3037,22 +1302,33 @@ module Google # @return [String] attr_accessor :value_type - # Whether the metric records instantaneous values, changes to a value, etc. - # Some combinations of `metric_kind` and `value_type` might not be supported. - # Corresponds to the JSON property `metricKind` - # @return [String] - attr_accessor :metric_kind + def initialize(**args) + update!(**args) + end - # A concise name for the metric, which can be displayed in user interfaces. - # Use sentence case without an ending period, for example "Request count". - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name + # Update properties of this object + def update!(**args) + @metric_kind = args[:metric_kind] if args.key?(:metric_kind) + @description = args[:description] if args.key?(:description) + @display_name = args[:display_name] if args.key?(:display_name) + @unit = args[:unit] if args.key?(:unit) + @labels = args[:labels] if args.key?(:labels) + @name = args[:name] if args.key?(:name) + @type = args[:type] if args.key?(:type) + @value_type = args[:value_type] if args.key?(:value_type) + end + end - # A detailed description of the metric, which can be used in documentation. - # Corresponds to the JSON property `description` + # `SourceContext` represents information about the source of a + # protobuf element, like the file in which it is defined. + class SourceContext + include Google::Apis::Core::Hashable + + # The path-qualified name of the .proto file that contained the associated + # protobuf element. For example: `"google/protobuf/source_context.proto"`. + # Corresponds to the JSON property `fileName` # @return [String] - attr_accessor :description + attr_accessor :file_name def initialize(**args) update!(**args) @@ -3060,14 +1336,84 @@ module Google # Update properties of this object def update!(**args) - @unit = args[:unit] if args.key?(:unit) - @labels = args[:labels] if args.key?(:labels) + @file_name = args[:file_name] if args.key?(:file_name) + end + end + + # `Endpoint` describes a network endpoint that serves a set of APIs. + # A service may expose any number of endpoints, and all endpoints share the + # same service configuration, such as quota configuration and monitoring + # configuration. + # Example service configuration: + # name: library-example.googleapis.com + # endpoints: + # # Below entry makes 'google.example.library.v1.Library' + # # API be served from endpoint address library-example.googleapis.com. + # # It also allows HTTP OPTIONS calls to be passed to the backend, for + # # it to decide whether the subsequent cross-origin request is + # # allowed to proceed. + # - name: library-example.googleapis.com + # allow_cors: true + class Endpoint + include Google::Apis::Core::Hashable + + # The list of APIs served by this endpoint. + # If no APIs are specified this translates to "all APIs" exported by the + # service, as defined in the top-level service configuration. + # Corresponds to the JSON property `apis` + # @return [Array] + attr_accessor :apis + + # DEPRECATED: This field is no longer supported. Instead of using aliases, + # please specify multiple google.api.Endpoint for each of the intented + # alias. + # Additional names that this endpoint will be hosted on. + # Corresponds to the JSON property `aliases` + # @return [Array] + attr_accessor :aliases + + # Allowing + # [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka + # cross-domain traffic, would allow the backends served from this endpoint to + # receive and respond to HTTP OPTIONS requests. The response will be used by + # the browser to determine whether the subsequent cross-origin request is + # allowed to proceed. + # Corresponds to the JSON property `allowCors` + # @return [Boolean] + attr_accessor :allow_cors + alias_method :allow_cors?, :allow_cors + + # The canonical name of this endpoint. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The specification of an Internet routable address of API frontend that will + # handle requests to this [API Endpoint](https://cloud.google.com/apis/design/ + # glossary). + # It should be either a valid IPv4 address or a fully-qualified domain name. + # For example, "8.8.8.8" or "myservice.appspot.com". + # Corresponds to the JSON property `target` + # @return [String] + attr_accessor :target + + # The list of features enabled on this endpoint. + # Corresponds to the JSON property `features` + # @return [Array] + attr_accessor :features + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @apis = args[:apis] if args.key?(:apis) + @aliases = args[:aliases] if args.key?(:aliases) + @allow_cors = args[:allow_cors] if args.key?(:allow_cors) @name = args[:name] if args.key?(:name) - @type = args[:type] if args.key?(:type) - @value_type = args[:value_type] if args.key?(:value_type) - @metric_kind = args[:metric_kind] if args.key?(:metric_kind) - @display_name = args[:display_name] if args.key?(:display_name) - @description = args[:description] if args.key?(:description) + @target = args[:target] if args.key?(:target) + @features = args[:features] if args.key?(:features) end end @@ -3097,81 +1443,6 @@ module Google end end - # `Endpoint` describes a network endpoint that serves a set of APIs. - # A service may expose any number of endpoints, and all endpoints share the - # same service configuration, such as quota configuration and monitoring - # configuration. - # Example service configuration: - # name: library-example.googleapis.com - # endpoints: - # # Below entry makes 'google.example.library.v1.Library' - # # API be served from endpoint address library-example.googleapis.com. - # # It also allows HTTP OPTIONS calls to be passed to the backend, for - # # it to decide whether the subsequent cross-origin request is - # # allowed to proceed. - # - name: library-example.googleapis.com - # allow_cors: true - class Endpoint - include Google::Apis::Core::Hashable - - # Allowing - # [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka - # cross-domain traffic, would allow the backends served from this endpoint to - # receive and respond to HTTP OPTIONS requests. The response will be used by - # the browser to determine whether the subsequent cross-origin request is - # allowed to proceed. - # Corresponds to the JSON property `allowCors` - # @return [Boolean] - attr_accessor :allow_cors - alias_method :allow_cors?, :allow_cors - - # DEPRECATED: This field is no longer supported. Instead of using aliases, - # please specify multiple google.api.Endpoint for each of the intented - # alias. - # Additional names that this endpoint will be hosted on. - # Corresponds to the JSON property `aliases` - # @return [Array] - attr_accessor :aliases - - # The canonical name of this endpoint. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The specification of an Internet routable address of API frontend that will - # handle requests to this [API Endpoint](https://cloud.google.com/apis/design/ - # glossary). - # It should be either a valid IPv4 address or a fully-qualified domain name. - # For example, "8.8.8.8" or "myservice.appspot.com". - # Corresponds to the JSON property `target` - # @return [String] - attr_accessor :target - - # The list of features enabled on this endpoint. - # Corresponds to the JSON property `features` - # @return [Array] - attr_accessor :features - - # The list of APIs served by this endpoint. - # Corresponds to the JSON property `apis` - # @return [Array] - attr_accessor :apis - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @allow_cors = args[:allow_cors] if args.key?(:allow_cors) - @aliases = args[:aliases] if args.key?(:aliases) - @name = args[:name] if args.key?(:name) - @target = args[:target] if args.key?(:target) - @features = args[:features] if args.key?(:features) - @apis = args[:apis] if args.key?(:apis) - end - end - # OAuth scopes are a way to define data and permissions on data. For example, # there are scopes defined for "Read-only access to Google Calendar" and # "Access to Cloud Platform". Users can consent to a scope for an application, @@ -3369,6 +1640,13 @@ module Google class MonitoredResourceDescriptor include Google::Apis::Core::Hashable + # Required. The monitored resource type. For example, the type + # `"cloudsql_database"` represents databases in Google Cloud SQL. + # The maximum length of this value is 256 characters. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + # Required. A set of labels used to describe instances of this monitored # resource type. For example, an individual Google Cloud SQL database is # identified by values for the labels `"database_id"` and `"zone"`. @@ -3400,53 +1678,76 @@ module Google # @return [String] attr_accessor :description - # Required. The monitored resource type. For example, the type - # `"cloudsql_database"` represents databases in Google Cloud SQL. - # The maximum length of this value is 256 characters. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @type = args[:type] if args.key?(:type) @labels = args[:labels] if args.key?(:labels) @name = args[:name] if args.key?(:name) @display_name = args[:display_name] if args.key?(:display_name) @description = args[:description] if args.key?(:description) - @type = args[:type] if args.key?(:type) end end + # Defines the Media configuration for a service in case of a download. # Use this only for Scotty Requests. Do not use this for media support using # Bytestream, add instead [][google.bytestream.RestByteStream] as an API to # your configuration for Bytestream methods. class MediaDownload include Google::Apis::Core::Hashable + # Name of the Scotty dropzone to use for the current API. + # Corresponds to the JSON property `dropzone` + # @return [String] + attr_accessor :dropzone + + # Optional maximum acceptable size for direct download. + # The size is specified in bytes. + # Corresponds to the JSON property `maxDirectDownloadSize` + # @return [Fixnum] + attr_accessor :max_direct_download_size + + # A boolean that determines if direct download from ESF should be used for + # download of this media. + # Corresponds to the JSON property `useDirectDownload` + # @return [Boolean] + attr_accessor :use_direct_download + alias_method :use_direct_download?, :use_direct_download + # Whether download is enabled. # Corresponds to the JSON property `enabled` # @return [Boolean] attr_accessor :enabled alias_method :enabled?, :enabled - # DO NOT USE THIS FIELD UNTIL THIS WARNING IS REMOVED. + # DO NOT USE FIELDS BELOW THIS LINE UNTIL THIS WARNING IS REMOVED. # Specify name of the download service if one is used for download. # Corresponds to the JSON property `downloadService` # @return [String] attr_accessor :download_service + # A boolean that determines whether a notification for the completion of a + # download should be sent to the backend. + # Corresponds to the JSON property `completeNotification` + # @return [Boolean] + attr_accessor :complete_notification + alias_method :complete_notification?, :complete_notification + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @dropzone = args[:dropzone] if args.key?(:dropzone) + @max_direct_download_size = args[:max_direct_download_size] if args.key?(:max_direct_download_size) + @use_direct_download = args[:use_direct_download] if args.key?(:use_direct_download) @enabled = args[:enabled] if args.key?(:enabled) @download_service = args[:download_service] if args.key?(:download_service) + @complete_notification = args[:complete_notification] if args.key?(:complete_notification) end end @@ -3483,6 +1784,1825 @@ module Google def update!(**args) end end + + # Response message for SearchServices method. + class SearchServicesResponse + include Google::Apis::Core::Hashable + + # Services available publicly or available to the authenticated caller. + # Corresponds to the JSON property `services` + # @return [Array] + attr_accessor :services + + # Token that can be passed to `ListAvailableServices` to resume a paginated + # query. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @services = args[:services] if args.key?(:services) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # Defines the Media configuration for a service in case of an upload. + # Use this only for Scotty Requests. Do not use this for media support using + # Bytestream, add instead [][google.bytestream.RestByteStream] as an API to + # your configuration for Bytestream methods. + class MediaUpload + include Google::Apis::Core::Hashable + + # Whether upload is enabled. + # Corresponds to the JSON property `enabled` + # @return [Boolean] + attr_accessor :enabled + alias_method :enabled?, :enabled + + # Whether to receive a notification for progress changes of media upload. + # Corresponds to the JSON property `progressNotification` + # @return [Boolean] + attr_accessor :progress_notification + alias_method :progress_notification?, :progress_notification + + # A boolean that determines whether a notification for the completion of an + # upload should be sent to the backend. These notifications will not be seen + # by the client and will not consume quota. + # Corresponds to the JSON property `completeNotification` + # @return [Boolean] + attr_accessor :complete_notification + alias_method :complete_notification?, :complete_notification + + # Name of the Scotty dropzone to use for the current API. + # Corresponds to the JSON property `dropzone` + # @return [String] + attr_accessor :dropzone + + # Whether to receive a notification on the start of media upload. + # Corresponds to the JSON property `startNotification` + # @return [Boolean] + attr_accessor :start_notification + alias_method :start_notification?, :start_notification + + # DO NOT USE FIELDS BELOW THIS LINE UNTIL THIS WARNING IS REMOVED. + # Specify name of the upload service if one is used for upload. + # Corresponds to the JSON property `uploadService` + # @return [String] + attr_accessor :upload_service + + # An array of mimetype patterns. Esf will only accept uploads that match one + # of the given patterns. + # Corresponds to the JSON property `mimeTypes` + # @return [Array] + attr_accessor :mime_types + + # Optional maximum acceptable size for an upload. + # The size is specified in bytes. + # Corresponds to the JSON property `maxSize` + # @return [Fixnum] + attr_accessor :max_size + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @enabled = args[:enabled] if args.key?(:enabled) + @progress_notification = args[:progress_notification] if args.key?(:progress_notification) + @complete_notification = args[:complete_notification] if args.key?(:complete_notification) + @dropzone = args[:dropzone] if args.key?(:dropzone) + @start_notification = args[:start_notification] if args.key?(:start_notification) + @upload_service = args[:upload_service] if args.key?(:upload_service) + @mime_types = args[:mime_types] if args.key?(:mime_types) + @max_size = args[:max_size] if args.key?(:max_size) + end + end + + # Usage configuration rules for the service. + # NOTE: Under development. + # Use this rule to configure unregistered calls for the service. Unregistered + # calls are calls that do not contain consumer project identity. + # (Example: calls that do not contain an API key). + # By default, API methods do not allow unregistered calls, and each method call + # must be identified by a consumer project identity. Use this rule to + # allow/disallow unregistered calls. + # Example of an API that wants to allow unregistered calls for entire service. + # usage: + # rules: + # - selector: "*" + # allow_unregistered_calls: true + # Example of a method that wants to allow unregistered calls. + # usage: + # rules: + # - selector: "google.example.library.v1.LibraryService.CreateBook" + # allow_unregistered_calls: true + class UsageRule + include Google::Apis::Core::Hashable + + # Selects the methods to which this rule applies. Use '*' to indicate all + # methods in all APIs. + # Refer to selector for syntax details. + # Corresponds to the JSON property `selector` + # @return [String] + attr_accessor :selector + + # True, if the method allows unregistered calls; false otherwise. + # Corresponds to the JSON property `allowUnregisteredCalls` + # @return [Boolean] + attr_accessor :allow_unregistered_calls + alias_method :allow_unregistered_calls?, :allow_unregistered_calls + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @selector = args[:selector] if args.key?(:selector) + @allow_unregistered_calls = args[:allow_unregistered_calls] if args.key?(:allow_unregistered_calls) + end + end + + # User-defined authentication requirements, including support for + # [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web- + # token-32). + class AuthRequirement + include Google::Apis::Core::Hashable + + # NOTE: This will be deprecated soon, once AuthProvider.audiences is + # implemented and accepted in all the runtime components. + # The list of JWT + # [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32# + # section-4.1.3). + # that are allowed to access. A JWT containing any of these audiences will + # be accepted. When this setting is absent, only JWTs with audience + # "https://Service_name/API_name" + # will be accepted. For example, if no audiences are in the setting, + # LibraryService API will only accept JWTs with the following audience + # "https://library-example.googleapis.com/google.example.library.v1. + # LibraryService". + # Example: + # audiences: bookstore_android.apps.googleusercontent.com, + # bookstore_web.apps.googleusercontent.com + # Corresponds to the JSON property `audiences` + # @return [String] + attr_accessor :audiences + + # id from authentication provider. + # Example: + # provider_id: bookstore_auth + # Corresponds to the JSON property `providerId` + # @return [String] + attr_accessor :provider_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @audiences = args[:audiences] if args.key?(:audiences) + @provider_id = args[:provider_id] if args.key?(:provider_id) + end + end + + # `Documentation` provides the information for describing a service. + # Example: + #
documentation:
+      # summary: >
+      # The Google Calendar API gives access
+      # to most calendar features.
+      # pages:
+      # - name: Overview
+      # content: (== include google/foo/overview.md ==)
+      # - name: Tutorial
+      # content: (== include google/foo/tutorial.md ==)
+      # subpages;
+      # - name: Java
+      # content: (== include google/foo/tutorial_java.md ==)
+      # rules:
+      # - selector: google.calendar.Calendar.Get
+      # description: >
+      # ...
+      # - selector: google.calendar.Calendar.Put
+      # description: >
+      # ...
+      # 
+ # Documentation is provided in markdown syntax. In addition to + # standard markdown features, definition lists, tables and fenced + # code blocks are supported. Section headers can be provided and are + # interpreted relative to the section nesting of the context where + # a documentation fragment is embedded. + # Documentation from the IDL is merged with documentation defined + # via the config at normalization time, where documentation provided + # by config rules overrides IDL provided. + # A number of constructs specific to the API platform are supported + # in documentation text. + # In order to reference a proto element, the following + # notation can be used: + #
[fully.qualified.proto.name][]
+ # To override the display text used for the link, this can be used: + #
[display text][fully.qualified.proto.name]
+ # Text can be excluded from doc using the following notation: + #
(-- internal comment --)
+ # Comments can be made conditional using a visibility label. The below + # text will be only rendered if the `BETA` label is available: + #
(--BETA: comment for BETA users --)
+ # A few directives are available in documentation. Note that + # directives must appear on a single line to be properly + # identified. The `include` directive includes a markdown file from + # an external source: + #
(== include path/to/file ==)
+ # The `resource_for` directive marks a message to be the resource of + # a collection in REST view. If it is not specified, tools attempt + # to infer the resource from the operations in a collection: + #
(== resource_for v1.shelves.books ==)
+ # The directive `suppress_warning` does not directly affect documentation + # and is documented together with service config validation. + class Documentation + include Google::Apis::Core::Hashable + + # A short summary of what the service does. Can only be provided by + # plain text. + # Corresponds to the JSON property `summary` + # @return [String] + attr_accessor :summary + + # The URL to the root of documentation. + # Corresponds to the JSON property `documentationRootUrl` + # @return [String] + attr_accessor :documentation_root_url + + # A list of documentation rules that apply to individual API elements. + # **NOTE:** All service configuration rules follow "last one wins" order. + # Corresponds to the JSON property `rules` + # @return [Array] + attr_accessor :rules + + # Declares a single overview page. For example: + #
documentation:
+        # summary: ...
+        # overview: (== include overview.md ==)
+        # 
+ # This is a shortcut for the following declaration (using pages style): + #
documentation:
+        # summary: ...
+        # pages:
+        # - name: Overview
+        # content: (== include overview.md ==)
+        # 
+ # Note: you cannot specify both `overview` field and `pages` field. + # Corresponds to the JSON property `overview` + # @return [String] + attr_accessor :overview + + # The top level pages for the documentation set. + # Corresponds to the JSON property `pages` + # @return [Array] + attr_accessor :pages + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @summary = args[:summary] if args.key?(:summary) + @documentation_root_url = args[:documentation_root_url] if args.key?(:documentation_root_url) + @rules = args[:rules] if args.key?(:rules) + @overview = args[:overview] if args.key?(:overview) + @pages = args[:pages] if args.key?(:pages) + end + end + + # Authentication rules for the service. + # By default, if a method has any authentication requirements, every request + # must include a valid credential matching one of the requirements. + # It's an error to include more than one kind of credential in a single + # request. + # If a method doesn't have any auth requirements, request credentials will be + # ignored. + class AuthenticationRule + include Google::Apis::Core::Hashable + + # OAuth scopes are a way to define data and permissions on data. For example, + # there are scopes defined for "Read-only access to Google Calendar" and + # "Access to Cloud Platform". Users can consent to a scope for an application, + # giving it permission to access that data on their behalf. + # OAuth scope specifications should be fairly coarse grained; a user will need + # to see and understand the text description of what your scope means. + # In most cases: use one or at most two OAuth scopes for an entire family of + # products. If your product has multiple APIs, you should probably be sharing + # the OAuth scope across all of those APIs. + # When you need finer grained OAuth consent screens: talk with your product + # management about how developers will use them in practice. + # Please note that even though each of the canonical scopes is enough for a + # request to be accepted and passed to the backend, a request can still fail + # due to the backend requiring additional scopes or permissions. + # Corresponds to the JSON property `oauth` + # @return [Google::Apis::ServiceuserV1::OAuthRequirements] + attr_accessor :oauth + + # Configuration for a custom authentication provider. + # Corresponds to the JSON property `customAuth` + # @return [Google::Apis::ServiceuserV1::CustomAuthRequirements] + attr_accessor :custom_auth + + # Requirements for additional authentication providers. + # Corresponds to the JSON property `requirements` + # @return [Array] + attr_accessor :requirements + + # Selects the methods to which this rule applies. + # Refer to selector for syntax details. + # Corresponds to the JSON property `selector` + # @return [String] + attr_accessor :selector + + # Whether to allow requests without a credential. The credential can be + # an OAuth token, Google cookies (first-party auth) or EndUserCreds. + # For requests without credentials, if the service control environment is + # specified, each incoming request **must** be associated with a service + # consumer. This can be done by passing an API key that belongs to a consumer + # project. + # Corresponds to the JSON property `allowWithoutCredential` + # @return [Boolean] + attr_accessor :allow_without_credential + alias_method :allow_without_credential?, :allow_without_credential + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @oauth = args[:oauth] if args.key?(:oauth) + @custom_auth = args[:custom_auth] if args.key?(:custom_auth) + @requirements = args[:requirements] if args.key?(:requirements) + @selector = args[:selector] if args.key?(:selector) + @allow_without_credential = args[:allow_without_credential] if args.key?(:allow_without_credential) + end + end + + # A backend rule provides configuration for an individual API element. + class BackendRule + include Google::Apis::Core::Hashable + + # The address of the API backend. + # Corresponds to the JSON property `address` + # @return [String] + attr_accessor :address + + # Selects the methods to which this rule applies. + # Refer to selector for syntax details. + # Corresponds to the JSON property `selector` + # @return [String] + attr_accessor :selector + + # The number of seconds to wait for a response from a request. The + # default depends on the deployment context. + # Corresponds to the JSON property `deadline` + # @return [Float] + attr_accessor :deadline + + # Minimum deadline in seconds needed for this method. Calls having deadline + # value lower than this will be rejected. + # Corresponds to the JSON property `minDeadline` + # @return [Float] + attr_accessor :min_deadline + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @address = args[:address] if args.key?(:address) + @selector = args[:selector] if args.key?(:selector) + @deadline = args[:deadline] if args.key?(:deadline) + @min_deadline = args[:min_deadline] if args.key?(:min_deadline) + end + end + + # Api is a light-weight descriptor for a protocol buffer service. + class Api + include Google::Apis::Core::Hashable + + # `SourceContext` represents information about the source of a + # protobuf element, like the file in which it is defined. + # Corresponds to the JSON property `sourceContext` + # @return [Google::Apis::ServiceuserV1::SourceContext] + attr_accessor :source_context + + # The source syntax of the service. + # Corresponds to the JSON property `syntax` + # @return [String] + attr_accessor :syntax + + # A version string for this api. If specified, must have the form + # `major-version.minor-version`, as in `1.10`. If the minor version + # is omitted, it defaults to zero. If the entire version field is + # empty, the major version is derived from the package name, as + # outlined below. If the field is not empty, the version in the + # package name will be verified to be consistent with what is + # provided here. + # The versioning schema uses [semantic + # versioning](http://semver.org) where the major version number + # indicates a breaking change and the minor version an additive, + # non-breaking change. Both version numbers are signals to users + # what to expect from different versions, and should be carefully + # chosen based on the product plan. + # The major version is also reflected in the package name of the + # API, which must end in `v`, as in + # `google.feature.v1`. For major versions 0 and 1, the suffix can + # be omitted. Zero major versions must only be used for + # experimental, none-GA apis. + # Corresponds to the JSON property `version` + # @return [String] + attr_accessor :version + + # Included APIs. See Mixin. + # Corresponds to the JSON property `mixins` + # @return [Array] + attr_accessor :mixins + + # Any metadata attached to the API. + # Corresponds to the JSON property `options` + # @return [Array] + attr_accessor :options + + # The methods of this api, in unspecified order. + # Corresponds to the JSON property `methods` + # @return [Array] + attr_accessor :methods_prop + + # The fully qualified name of this api, including package name + # followed by the api's simple name. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @source_context = args[:source_context] if args.key?(:source_context) + @syntax = args[:syntax] if args.key?(:syntax) + @version = args[:version] if args.key?(:version) + @mixins = args[:mixins] if args.key?(:mixins) + @options = args[:options] if args.key?(:options) + @methods_prop = args[:methods_prop] if args.key?(:methods_prop) + @name = args[:name] if args.key?(:name) + end + end + + # Bind API methods to metrics. Binding a method to a metric causes that + # metric's configured quota, billing, and monitoring behaviors to apply to the + # method call. + # Used by metric-based quotas only. + class MetricRule + include Google::Apis::Core::Hashable + + # Selects the methods to which this rule applies. + # Refer to selector for syntax details. + # Corresponds to the JSON property `selector` + # @return [String] + attr_accessor :selector + + # Metrics to update when the selected methods are called, and the associated + # cost applied to each metric. + # The key of the map is the metric name, and the values are the amount + # increased for the metric against which the quota limits are defined. + # The value must not be negative. + # Corresponds to the JSON property `metricCosts` + # @return [Hash] + attr_accessor :metric_costs + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @selector = args[:selector] if args.key?(:selector) + @metric_costs = args[:metric_costs] if args.key?(:metric_costs) + end + end + + # `Authentication` defines the authentication configuration for an API. + # Example for an API targeted for external use: + # name: calendar.googleapis.com + # authentication: + # providers: + # - id: google_calendar_auth + # jwks_uri: https://www.googleapis.com/oauth2/v1/certs + # issuer: https://securetoken.google.com + # rules: + # - selector: "*" + # requirements: + # provider_id: google_calendar_auth + class Authentication + include Google::Apis::Core::Hashable + + # A list of authentication rules that apply to individual API methods. + # **NOTE:** All service configuration rules follow "last one wins" order. + # Corresponds to the JSON property `rules` + # @return [Array] + attr_accessor :rules + + # Defines a set of authentication providers that a service supports. + # Corresponds to the JSON property `providers` + # @return [Array] + attr_accessor :providers + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @rules = args[:rules] if args.key?(:rules) + @providers = args[:providers] if args.key?(:providers) + end + end + + # This resource represents a long-running operation that is the result of a + # network API call. + class Operation + include Google::Apis::Core::Hashable + + # The normal response of the operation in case of success. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # Corresponds to the JSON property `response` + # @return [Hash] + attr_accessor :response + + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should have the format of `operations/some/unique/name`. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The `Status` type defines a logical error model that is suitable for different + # programming environments, including REST APIs and RPC APIs. It is used by + # [gRPC](https://github.com/grpc). The error model is designed to be: + # - Simple to use and understand for most users + # - Flexible enough to meet unexpected needs + # # Overview + # The `Status` message contains three pieces of data: error code, error message, + # and error details. The error code should be an enum value of + # google.rpc.Code, but it may accept additional error codes if needed. The + # error message should be a developer-facing English message that helps + # developers *understand* and *resolve* the error. If a localized user-facing + # error message is needed, put the localized message in the error details or + # localize it in the client. The optional error details may contain arbitrary + # information about the error. There is a predefined set of error detail types + # in the package `google.rpc` that can be used for common error conditions. + # # Language mapping + # The `Status` message is the logical representation of the error model, but it + # is not necessarily the actual wire format. When the `Status` message is + # exposed in different client libraries and different wire protocols, it can be + # mapped differently. For example, it will likely be mapped to some exceptions + # in Java, but more likely mapped to some error codes in C. + # # Other uses + # The error model and the `Status` message can be used in a variety of + # environments, either with or without APIs, to provide a + # consistent developer experience across different environments. + # Example uses of this error model include: + # - Partial errors. If a service needs to return partial errors to the client, + # it may embed the `Status` in the normal response to indicate the partial + # errors. + # - Workflow errors. A typical workflow has multiple steps. Each step may + # have a `Status` message for error reporting. + # - Batch operations. If a client uses batch request and batch response, the + # `Status` message should be used directly inside batch response, one for + # each error sub-response. + # - Asynchronous operations. If an API call embeds asynchronous operation + # results in its response, the status of those operations should be + # represented directly using the `Status` message. + # - Logging. If some API errors are stored in logs, the message `Status` could + # be used directly after any stripping needed for security/privacy reasons. + # Corresponds to the JSON property `error` + # @return [Google::Apis::ServiceuserV1::Status] + attr_accessor :error + + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # Corresponds to the JSON property `metadata` + # @return [Hash] + attr_accessor :metadata + + # If the value is `false`, it means the operation is still in progress. + # If true, the operation is completed, and either `error` or `response` is + # available. + # Corresponds to the JSON property `done` + # @return [Boolean] + attr_accessor :done + alias_method :done?, :done + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @response = args[:response] if args.key?(:response) + @name = args[:name] if args.key?(:name) + @error = args[:error] if args.key?(:error) + @metadata = args[:metadata] if args.key?(:metadata) + @done = args[:done] if args.key?(:done) + end + end + + # Represents a documentation page. A page can contain subpages to represent + # nested documentation set structure. + class Page + include Google::Apis::Core::Hashable + + # The Markdown content of the page. You can use (== include `path` ==&# + # 41; + # to include content from a Markdown file. + # Corresponds to the JSON property `content` + # @return [String] + attr_accessor :content + + # Subpages of this page. The order of subpages specified here will be + # honored in the generated docset. + # Corresponds to the JSON property `subpages` + # @return [Array] + attr_accessor :subpages + + # The name of the page. It will be used as an identity of the page to + # generate URI of the page, text of the link to this page in navigation, + # etc. The full page name (start from the root page name to this page + # concatenated with `.`) can be used as reference to the page in your + # documentation. For example: + #
pages:
+        # - name: Tutorial
+        # content: (== include tutorial.md ==)
+        # subpages:
+        # - name: Java
+        # content: (== include tutorial_java.md ==)
+        # 
+ # You can reference `Java` page using Markdown reference link syntax: + # `Java`. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @content = args[:content] if args.key?(:content) + @subpages = args[:subpages] if args.key?(:subpages) + @name = args[:name] if args.key?(:name) + end + end + + # The `Status` type defines a logical error model that is suitable for different + # programming environments, including REST APIs and RPC APIs. It is used by + # [gRPC](https://github.com/grpc). The error model is designed to be: + # - Simple to use and understand for most users + # - Flexible enough to meet unexpected needs + # # Overview + # The `Status` message contains three pieces of data: error code, error message, + # and error details. The error code should be an enum value of + # google.rpc.Code, but it may accept additional error codes if needed. The + # error message should be a developer-facing English message that helps + # developers *understand* and *resolve* the error. If a localized user-facing + # error message is needed, put the localized message in the error details or + # localize it in the client. The optional error details may contain arbitrary + # information about the error. There is a predefined set of error detail types + # in the package `google.rpc` that can be used for common error conditions. + # # Language mapping + # The `Status` message is the logical representation of the error model, but it + # is not necessarily the actual wire format. When the `Status` message is + # exposed in different client libraries and different wire protocols, it can be + # mapped differently. For example, it will likely be mapped to some exceptions + # in Java, but more likely mapped to some error codes in C. + # # Other uses + # The error model and the `Status` message can be used in a variety of + # environments, either with or without APIs, to provide a + # consistent developer experience across different environments. + # Example uses of this error model include: + # - Partial errors. If a service needs to return partial errors to the client, + # it may embed the `Status` in the normal response to indicate the partial + # errors. + # - Workflow errors. A typical workflow has multiple steps. Each step may + # have a `Status` message for error reporting. + # - Batch operations. If a client uses batch request and batch response, the + # `Status` message should be used directly inside batch response, one for + # each error sub-response. + # - Asynchronous operations. If an API call embeds asynchronous operation + # results in its response, the status of those operations should be + # represented directly using the `Status` message. + # - Logging. If some API errors are stored in logs, the message `Status` could + # be used directly after any stripping needed for security/privacy reasons. + class Status + include Google::Apis::Core::Hashable + + # A list of messages that carry the error details. There will be a + # common set of message types for APIs to use. + # Corresponds to the JSON property `details` + # @return [Array>] + attr_accessor :details + + # The status code, which should be an enum value of google.rpc.Code. + # Corresponds to the JSON property `code` + # @return [Fixnum] + attr_accessor :code + + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # google.rpc.Status.details field, or localized by the client. + # Corresponds to the JSON property `message` + # @return [String] + attr_accessor :message + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @details = args[:details] if args.key?(:details) + @code = args[:code] if args.key?(:code) + @message = args[:message] if args.key?(:message) + end + end + + # Configuration for an anthentication provider, including support for + # [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web- + # token-32). + class AuthProvider + include Google::Apis::Core::Hashable + + # The list of JWT + # [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32# + # section-4.1.3). + # that are allowed to access. A JWT containing any of these audiences will + # be accepted. When this setting is absent, only JWTs with audience + # "https://Service_name/API_name" + # will be accepted. For example, if no audiences are in the setting, + # LibraryService API will only accept JWTs with the following audience + # "https://library-example.googleapis.com/google.example.library.v1. + # LibraryService". + # Example: + # audiences: bookstore_android.apps.googleusercontent.com, + # bookstore_web.apps.googleusercontent.com + # Corresponds to the JSON property `audiences` + # @return [String] + attr_accessor :audiences + + # The unique identifier of the auth provider. It will be referred to by + # `AuthRequirement.provider_id`. + # Example: "bookstore_auth". + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # Identifies the principal that issued the JWT. See + # https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1 + # Usually a URL or an email address. + # Example: https://securetoken.google.com + # Example: 1234567-compute@developer.gserviceaccount.com + # Corresponds to the JSON property `issuer` + # @return [String] + attr_accessor :issuer + + # URL of the provider's public key set to validate signature of the JWT. See + # [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html# + # ProviderMetadata). + # Optional if the key set document: + # - can be retrieved from + # [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0. + # html + # of the issuer. + # - can be inferred from the email domain of the issuer (e.g. a Google service + # account). + # Example: https://www.googleapis.com/oauth2/v1/certs + # Corresponds to the JSON property `jwksUri` + # @return [String] + attr_accessor :jwks_uri + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @audiences = args[:audiences] if args.key?(:audiences) + @id = args[:id] if args.key?(:id) + @issuer = args[:issuer] if args.key?(:issuer) + @jwks_uri = args[:jwks_uri] if args.key?(:jwks_uri) + end + end + + # Enum value definition. + class EnumValue + include Google::Apis::Core::Hashable + + # Enum value name. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Protocol buffer options. + # Corresponds to the JSON property `options` + # @return [Array] + attr_accessor :options + + # Enum value number. + # Corresponds to the JSON property `number` + # @return [Fixnum] + attr_accessor :number + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @name = args[:name] if args.key?(:name) + @options = args[:options] if args.key?(:options) + @number = args[:number] if args.key?(:number) + end + end + + # `Service` is the root object of Google service configuration schema. It + # describes basic information about a service, such as the name and the + # title, and delegates other aspects to sub-sections. Each sub-section is + # either a proto message or a repeated proto message that configures a + # specific aspect, such as auth. See each proto message definition for details. + # Example: + # type: google.api.Service + # config_version: 3 + # name: calendar.googleapis.com + # title: Google Calendar API + # apis: + # - name: google.calendar.v3.Calendar + # authentication: + # providers: + # - id: google_calendar_auth + # jwks_uri: https://www.googleapis.com/oauth2/v1/certs + # issuer: https://securetoken.google.com + # rules: + # - selector: "*" + # requirements: + # provider_id: google_calendar_auth + class Service + include Google::Apis::Core::Hashable + + # Configuration controlling usage of a service. + # Corresponds to the JSON property `usage` + # @return [Google::Apis::ServiceuserV1::Usage] + attr_accessor :usage + + # Defines the metrics used by this service. + # Corresponds to the JSON property `metrics` + # @return [Array] + attr_accessor :metrics + + # `Authentication` defines the authentication configuration for an API. + # Example for an API targeted for external use: + # name: calendar.googleapis.com + # authentication: + # providers: + # - id: google_calendar_auth + # jwks_uri: https://www.googleapis.com/oauth2/v1/certs + # issuer: https://securetoken.google.com + # rules: + # - selector: "*" + # requirements: + # provider_id: google_calendar_auth + # Corresponds to the JSON property `authentication` + # @return [Google::Apis::ServiceuserV1::Authentication] + attr_accessor :authentication + + # Experimental service configuration. These configuration options can + # only be used by whitelisted users. + # Corresponds to the JSON property `experimental` + # @return [Google::Apis::ServiceuserV1::Experimental] + attr_accessor :experimental + + # Selects and configures the service controller used by the service. The + # service controller handles features like abuse, quota, billing, logging, + # monitoring, etc. + # Corresponds to the JSON property `control` + # @return [Google::Apis::ServiceuserV1::Control] + attr_accessor :control + + # The version of the service configuration. The config version may + # influence interpretation of the configuration, for example, to + # determine defaults. This is documented together with applicable + # options. The current default for the config version itself is `3`. + # Corresponds to the JSON property `configVersion` + # @return [Fixnum] + attr_accessor :config_version + + # Monitoring configuration of the service. + # The example below shows how to configure monitored resources and metrics + # for monitoring. In the example, a monitored resource and two metrics are + # defined. The `library.googleapis.com/book/returned_count` metric is sent + # to both producer and consumer projects, whereas the + # `library.googleapis.com/book/overdue_count` metric is only sent to the + # consumer project. + # monitored_resources: + # - type: library.googleapis.com/branch + # labels: + # - key: /city + # description: The city where the library branch is located in. + # - key: /name + # description: The name of the branch. + # metrics: + # - name: library.googleapis.com/book/returned_count + # metric_kind: DELTA + # value_type: INT64 + # labels: + # - key: /customer_id + # - name: library.googleapis.com/book/overdue_count + # metric_kind: GAUGE + # value_type: INT64 + # labels: + # - key: /customer_id + # monitoring: + # producer_destinations: + # - monitored_resource: library.googleapis.com/branch + # metrics: + # - library.googleapis.com/book/returned_count + # consumer_destinations: + # - monitored_resource: library.googleapis.com/branch + # metrics: + # - library.googleapis.com/book/returned_count + # - library.googleapis.com/book/overdue_count + # Corresponds to the JSON property `monitoring` + # @return [Google::Apis::ServiceuserV1::Monitoring] + attr_accessor :monitoring + + # A list of all proto message types included in this API service. + # It serves similar purpose as [google.api.Service.types], except that + # these types are not needed by user-defined APIs. Therefore, they will not + # show up in the generated discovery doc. This field should only be used + # to define system APIs in ESF. + # Corresponds to the JSON property `systemTypes` + # @return [Array] + attr_accessor :system_types + + # The id of the Google developer project that owns the service. + # Members of this project can manage the service configuration, + # manage consumption of the service, etc. + # Corresponds to the JSON property `producerProjectId` + # @return [String] + attr_accessor :producer_project_id + + # `Visibility` defines restrictions for the visibility of service + # elements. Restrictions are specified using visibility labels + # (e.g., TRUSTED_TESTER) that are elsewhere linked to users and projects. + # Users and projects can have access to more than one visibility label. The + # effective visibility for multiple labels is the union of each label's + # elements, plus any unrestricted elements. + # If an element and its parents have no restrictions, visibility is + # unconditionally granted. + # Example: + # visibility: + # rules: + # - selector: google.calendar.Calendar.EnhancedSearch + # restriction: TRUSTED_TESTER + # - selector: google.calendar.Calendar.Delegate + # restriction: GOOGLE_INTERNAL + # Here, all methods are publicly visible except for the restricted methods + # EnhancedSearch and Delegate. + # Corresponds to the JSON property `visibility` + # @return [Google::Apis::ServiceuserV1::Visibility] + attr_accessor :visibility + + # Quota configuration helps to achieve fairness and budgeting in service + # usage. + # The quota configuration works this way: + # - The service configuration defines a set of metrics. + # - For API calls, the quota.metric_rules maps methods to metrics with + # corresponding costs. + # - The quota.limits defines limits on the metrics, which will be used for + # quota checks at runtime. + # An example quota configuration in yaml format: + # quota: + # - name: apiWriteQpsPerProject + # metric: library.googleapis.com/write_calls + # unit: "1/min/`project`" # rate limit for consumer projects + # values: + # STANDARD: 10000 + # # The metric rules bind all methods to the read_calls metric, + # # except for the UpdateBook and DeleteBook methods. These two methods + # # are mapped to the write_calls metric, with the UpdateBook method + # # consuming at twice rate as the DeleteBook method. + # metric_rules: + # - selector: "*" + # metric_costs: + # library.googleapis.com/read_calls: 1 + # - selector: google.example.library.v1.LibraryService.UpdateBook + # metric_costs: + # library.googleapis.com/write_calls: 2 + # - selector: google.example.library.v1.LibraryService.DeleteBook + # metric_costs: + # library.googleapis.com/write_calls: 1 + # Corresponding Metric definition: + # metrics: + # - name: library.googleapis.com/read_calls + # display_name: Read requests + # metric_kind: DELTA + # value_type: INT64 + # - name: library.googleapis.com/write_calls + # display_name: Write requests + # metric_kind: DELTA + # value_type: INT64 + # Corresponds to the JSON property `quota` + # @return [Google::Apis::ServiceuserV1::Quota] + attr_accessor :quota + + # The DNS address at which this service is available, + # e.g. `calendar.googleapis.com`. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Customize service error responses. For example, list any service + # specific protobuf types that can appear in error detail lists of + # error responses. + # Example: + # custom_error: + # types: + # - google.foo.v1.CustomError + # - google.foo.v1.AnotherError + # Corresponds to the JSON property `customError` + # @return [Google::Apis::ServiceuserV1::CustomError] + attr_accessor :custom_error + + # The product title associated with this service. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + # Configuration for network endpoints. If this is empty, then an endpoint + # with the same name as the service is automatically generated to service all + # defined APIs. + # Corresponds to the JSON property `endpoints` + # @return [Array] + attr_accessor :endpoints + + # A list of API interfaces exported by this service. Only the `name` field + # of the google.protobuf.Api needs to be provided by the configuration + # author, as the remaining fields will be derived from the IDL during the + # normalization process. It is an error to specify an API interface here + # which cannot be resolved against the associated IDL files. + # Corresponds to the JSON property `apis` + # @return [Array] + attr_accessor :apis + + # Defines the logs used by this service. + # Corresponds to the JSON property `logs` + # @return [Array] + attr_accessor :logs + + # A list of all proto message types included in this API service. + # Types referenced directly or indirectly by the `apis` are + # automatically included. Messages which are not referenced but + # shall be included, such as types used by the `google.protobuf.Any` type, + # should be listed here by name. Example: + # types: + # - name: google.protobuf.Int32 + # Corresponds to the JSON property `types` + # @return [Array] + attr_accessor :types + + # Source information used to create a Service Config + # Corresponds to the JSON property `sourceInfo` + # @return [Google::Apis::ServiceuserV1::SourceInfo] + attr_accessor :source_info + + # Defines the HTTP configuration for a service. It contains a list of + # HttpRule, each specifying the mapping of an RPC method + # to one or more HTTP REST API methods. + # Corresponds to the JSON property `http` + # @return [Google::Apis::ServiceuserV1::Http] + attr_accessor :http + + # `Backend` defines the backend configuration for a service. + # Corresponds to the JSON property `backend` + # @return [Google::Apis::ServiceuserV1::Backend] + attr_accessor :backend + + # ### System parameter configuration + # A system parameter is a special kind of parameter defined by the API + # system, not by an individual API. It is typically mapped to an HTTP header + # and/or a URL query parameter. This configuration specifies which methods + # change the names of the system parameters. + # Corresponds to the JSON property `systemParameters` + # @return [Google::Apis::ServiceuserV1::SystemParameters] + attr_accessor :system_parameters + + # `Documentation` provides the information for describing a service. + # Example: + #
documentation:
+        # summary: >
+        # The Google Calendar API gives access
+        # to most calendar features.
+        # pages:
+        # - name: Overview
+        # content: (== include google/foo/overview.md ==)
+        # - name: Tutorial
+        # content: (== include google/foo/tutorial.md ==)
+        # subpages;
+        # - name: Java
+        # content: (== include google/foo/tutorial_java.md ==)
+        # rules:
+        # - selector: google.calendar.Calendar.Get
+        # description: >
+        # ...
+        # - selector: google.calendar.Calendar.Put
+        # description: >
+        # ...
+        # 
+ # Documentation is provided in markdown syntax. In addition to + # standard markdown features, definition lists, tables and fenced + # code blocks are supported. Section headers can be provided and are + # interpreted relative to the section nesting of the context where + # a documentation fragment is embedded. + # Documentation from the IDL is merged with documentation defined + # via the config at normalization time, where documentation provided + # by config rules overrides IDL provided. + # A number of constructs specific to the API platform are supported + # in documentation text. + # In order to reference a proto element, the following + # notation can be used: + #
[fully.qualified.proto.name][]
+ # To override the display text used for the link, this can be used: + #
[display text][fully.qualified.proto.name]
+ # Text can be excluded from doc using the following notation: + #
(-- internal comment --)
+ # Comments can be made conditional using a visibility label. The below + # text will be only rendered if the `BETA` label is available: + #
(--BETA: comment for BETA users --)
+ # A few directives are available in documentation. Note that + # directives must appear on a single line to be properly + # identified. The `include` directive includes a markdown file from + # an external source: + #
(== include path/to/file ==)
+ # The `resource_for` directive marks a message to be the resource of + # a collection in REST view. If it is not specified, tools attempt + # to infer the resource from the operations in a collection: + #
(== resource_for v1.shelves.books ==)
+ # The directive `suppress_warning` does not directly affect documentation + # and is documented together with service config validation. + # Corresponds to the JSON property `documentation` + # @return [Google::Apis::ServiceuserV1::Documentation] + attr_accessor :documentation + + # Logging configuration of the service. + # The following example shows how to configure logs to be sent to the + # producer and consumer projects. In the example, the `activity_history` + # log is sent to both the producer and consumer projects, whereas the + # `purchase_history` log is only sent to the producer project. + # monitored_resources: + # - type: library.googleapis.com/branch + # labels: + # - key: /city + # description: The city where the library branch is located in. + # - key: /name + # description: The name of the branch. + # logs: + # - name: activity_history + # labels: + # - key: /customer_id + # - name: purchase_history + # logging: + # producer_destinations: + # - monitored_resource: library.googleapis.com/branch + # logs: + # - activity_history + # - purchase_history + # consumer_destinations: + # - monitored_resource: library.googleapis.com/branch + # logs: + # - activity_history + # Corresponds to the JSON property `logging` + # @return [Google::Apis::ServiceuserV1::Logging] + attr_accessor :logging + + # Defines the monitored resources used by this service. This is required + # by the Service.monitoring and Service.logging configurations. + # Corresponds to the JSON property `monitoredResources` + # @return [Array] + attr_accessor :monitored_resources + + # A list of all enum types included in this API service. Enums + # referenced directly or indirectly by the `apis` are automatically + # included. Enums which are not referenced but shall be included + # should be listed here by name. Example: + # enums: + # - name: google.someapi.v1.SomeEnum + # Corresponds to the JSON property `enums` + # @return [Array] + attr_accessor :enums + + # `Context` defines which contexts an API requests. + # Example: + # context: + # rules: + # - selector: "*" + # requested: + # - google.rpc.context.ProjectContext + # - google.rpc.context.OriginContext + # The above specifies that all methods in the API request + # `google.rpc.context.ProjectContext` and + # `google.rpc.context.OriginContext`. + # Available context types are defined in package + # `google.rpc.context`. + # Corresponds to the JSON property `context` + # @return [Google::Apis::ServiceuserV1::Context] + attr_accessor :context + + # A unique ID for a specific instance of this message, typically assigned + # by the client for tracking purpose. If empty, the server may choose to + # generate one instead. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @usage = args[:usage] if args.key?(:usage) + @metrics = args[:metrics] if args.key?(:metrics) + @authentication = args[:authentication] if args.key?(:authentication) + @experimental = args[:experimental] if args.key?(:experimental) + @control = args[:control] if args.key?(:control) + @config_version = args[:config_version] if args.key?(:config_version) + @monitoring = args[:monitoring] if args.key?(:monitoring) + @system_types = args[:system_types] if args.key?(:system_types) + @producer_project_id = args[:producer_project_id] if args.key?(:producer_project_id) + @visibility = args[:visibility] if args.key?(:visibility) + @quota = args[:quota] if args.key?(:quota) + @name = args[:name] if args.key?(:name) + @custom_error = args[:custom_error] if args.key?(:custom_error) + @title = args[:title] if args.key?(:title) + @endpoints = args[:endpoints] if args.key?(:endpoints) + @apis = args[:apis] if args.key?(:apis) + @logs = args[:logs] if args.key?(:logs) + @types = args[:types] if args.key?(:types) + @source_info = args[:source_info] if args.key?(:source_info) + @http = args[:http] if args.key?(:http) + @backend = args[:backend] if args.key?(:backend) + @system_parameters = args[:system_parameters] if args.key?(:system_parameters) + @documentation = args[:documentation] if args.key?(:documentation) + @logging = args[:logging] if args.key?(:logging) + @monitored_resources = args[:monitored_resources] if args.key?(:monitored_resources) + @enums = args[:enums] if args.key?(:enums) + @context = args[:context] if args.key?(:context) + @id = args[:id] if args.key?(:id) + end + end + + # A custom pattern is used for defining custom HTTP verb. + class CustomHttpPattern + include Google::Apis::Core::Hashable + + # The path matched by this custom verb. + # Corresponds to the JSON property `path` + # @return [String] + attr_accessor :path + + # The name of this custom HTTP verb. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @path = args[:path] if args.key?(:path) + @kind = args[:kind] if args.key?(:kind) + end + end + + # The metadata associated with a long running operation resource. + class OperationMetadata + include Google::Apis::Core::Hashable + + # The start time of the operation. + # Corresponds to the JSON property `startTime` + # @return [String] + attr_accessor :start_time + + # The full name of the resources that this operation is directly + # associated with. + # Corresponds to the JSON property `resourceNames` + # @return [Array] + attr_accessor :resource_names + + # Detailed status information for each step. The order is undetermined. + # Corresponds to the JSON property `steps` + # @return [Array] + attr_accessor :steps + + # Percentage of completion of this operation, ranging from 0 to 100. + # Corresponds to the JSON property `progressPercentage` + # @return [Fixnum] + attr_accessor :progress_percentage + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @start_time = args[:start_time] if args.key?(:start_time) + @resource_names = args[:resource_names] if args.key?(:resource_names) + @steps = args[:steps] if args.key?(:steps) + @progress_percentage = args[:progress_percentage] if args.key?(:progress_percentage) + end + end + + # Define a system parameter rule mapping system parameter definitions to + # methods. + class SystemParameterRule + include Google::Apis::Core::Hashable + + # Selects the methods to which this rule applies. Use '*' to indicate all + # methods in all APIs. + # Refer to selector for syntax details. + # Corresponds to the JSON property `selector` + # @return [String] + attr_accessor :selector + + # Define parameters. Multiple names may be defined for a parameter. + # For a given method call, only one of them should be used. If multiple + # names are used the behavior is implementation-dependent. + # If none of the specified names are present the behavior is + # parameter-dependent. + # Corresponds to the JSON property `parameters` + # @return [Array] + attr_accessor :parameters + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @selector = args[:selector] if args.key?(:selector) + @parameters = args[:parameters] if args.key?(:parameters) + end + end + + # The published version of a Service that is managed by + # Google Service Management. + class PublishedService + include Google::Apis::Core::Hashable + + # `Service` is the root object of Google service configuration schema. It + # describes basic information about a service, such as the name and the + # title, and delegates other aspects to sub-sections. Each sub-section is + # either a proto message or a repeated proto message that configures a + # specific aspect, such as auth. See each proto message definition for details. + # Example: + # type: google.api.Service + # config_version: 3 + # name: calendar.googleapis.com + # title: Google Calendar API + # apis: + # - name: google.calendar.v3.Calendar + # authentication: + # providers: + # - id: google_calendar_auth + # jwks_uri: https://www.googleapis.com/oauth2/v1/certs + # issuer: https://securetoken.google.com + # rules: + # - selector: "*" + # requirements: + # provider_id: google_calendar_auth + # Corresponds to the JSON property `service` + # @return [Google::Apis::ServiceuserV1::Service] + attr_accessor :service + + # The resource name of the service. + # A valid name would be: + # - services/serviceuser.googleapis.com + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @service = args[:service] if args.key?(:service) + @name = args[:name] if args.key?(:name) + end + end + + # `HttpRule` defines the mapping of an RPC method to one or more HTTP + # REST APIs. The mapping determines what portions of the request + # message are populated from the path, query parameters, or body of + # the HTTP request. The mapping is typically specified as an + # `google.api.http` annotation, see "google/api/annotations.proto" + # for details. + # The mapping consists of a field specifying the path template and + # method kind. The path template can refer to fields in the request + # message, as in the example below which describes a REST GET + # operation on a resource collection of messages: + # service Messaging ` + # rpc GetMessage(GetMessageRequest) returns (Message) ` + # option (google.api.http).get = "/v1/messages/`message_id`/`sub. + # subfield`"; + # ` + # ` + # message GetMessageRequest ` + # message SubMessage ` + # string subfield = 1; + # ` + # string message_id = 1; // mapped to the URL + # SubMessage sub = 2; // `sub.subfield` is url-mapped + # ` + # message Message ` + # string text = 1; // content of the resource + # ` + # The same http annotation can alternatively be expressed inside the + # `GRPC API Configuration` YAML file. + # http: + # rules: + # - selector: .Messaging.GetMessage + # get: /v1/messages/`message_id`/`sub.subfield` + # This definition enables an automatic, bidrectional mapping of HTTP + # JSON to RPC. Example: + # HTTP | RPC + # -----|----- + # `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: + # SubMessage(subfield: "foo"))` + # In general, not only fields but also field paths can be referenced + # from a path pattern. Fields mapped to the path pattern cannot be + # repeated and must have a primitive (non-message) type. + # Any fields in the request message which are not bound by the path + # pattern automatically become (optional) HTTP query + # parameters. Assume the following definition of the request message: + # service Messaging ` + # rpc GetMessage(GetMessageRequest) returns (Message) ` + # option (google.api.http).get = "/v1/messages/`message_id`"; + # ` + # ` + # message GetMessageRequest ` + # message SubMessage ` + # string subfield = 1; + # ` + # string message_id = 1; // mapped to the URL + # int64 revision = 2; // becomes a parameter + # SubMessage sub = 3; // `sub.subfield` becomes a parameter + # ` + # This enables a HTTP JSON to RPC mapping as below: + # HTTP | RPC + # -----|----- + # `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: + # "123456" revision: 2 sub: SubMessage(subfield: "foo"))` + # Note that fields which are mapped to HTTP parameters must have a + # primitive type or a repeated primitive type. Message types are not + # allowed. In the case of a repeated type, the parameter can be + # repeated in the URL, as in `...?param=A¶m=B`. + # For HTTP method kinds which allow a request body, the `body` field + # specifies the mapping. Consider a REST update method on the + # message resource collection: + # service Messaging ` + # rpc UpdateMessage(UpdateMessageRequest) returns (Message) ` + # option (google.api.http) = ` + # put: "/v1/messages/`message_id`" + # body: "message" + # `; + # ` + # ` + # message UpdateMessageRequest ` + # string message_id = 1; // mapped to the URL + # Message message = 2; // mapped to the body + # ` + # The following HTTP JSON to RPC mapping is enabled, where the + # representation of the JSON in the request body is determined by + # protos JSON encoding: + # HTTP | RPC + # -----|----- + # `PUT /v1/messages/123456 ` "text": "Hi!" `` | `UpdateMessage(message_id: " + # 123456" message ` text: "Hi!" `)` + # The special name `*` can be used in the body mapping to define that + # every field not bound by the path template should be mapped to the + # request body. This enables the following alternative definition of + # the update method: + # service Messaging ` + # rpc UpdateMessage(Message) returns (Message) ` + # option (google.api.http) = ` + # put: "/v1/messages/`message_id`" + # body: "*" + # `; + # ` + # ` + # message Message ` + # string message_id = 1; + # string text = 2; + # ` + # The following HTTP JSON to RPC mapping is enabled: + # HTTP | RPC + # -----|----- + # `PUT /v1/messages/123456 ` "text": "Hi!" `` | `UpdateMessage(message_id: " + # 123456" text: "Hi!")` + # Note that when using `*` in the body mapping, it is not possible to + # have HTTP parameters, as all fields not bound by the path end in + # the body. This makes this option more rarely used in practice of + # defining REST APIs. The common usage of `*` is in custom methods + # which don't use the URL at all for transferring data. + # It is possible to define multiple HTTP methods for one RPC by using + # the `additional_bindings` option. Example: + # service Messaging ` + # rpc GetMessage(GetMessageRequest) returns (Message) ` + # option (google.api.http) = ` + # get: "/v1/messages/`message_id`" + # additional_bindings ` + # get: "/v1/users/`user_id`/messages/`message_id`" + # ` + # `; + # ` + # ` + # message GetMessageRequest ` + # string message_id = 1; + # string user_id = 2; + # ` + # This enables the following two alternative HTTP JSON to RPC + # mappings: + # HTTP | RPC + # -----|----- + # `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` + # `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: " + # 123456")` + # # Rules for HTTP mapping + # The rules for mapping HTTP path, query parameters, and body fields + # to the request message are as follows: + # 1. The `body` field specifies either `*` or a field path, or is + # omitted. If omitted, it assumes there is no HTTP body. + # 2. Leaf fields (recursive expansion of nested messages in the + # request) can be classified into three types: + # (a) Matched in the URL template. + # (b) Covered by body (if body is `*`, everything except (a) fields; + # else everything under the body field) + # (c) All other fields. + # 3. URL query parameters found in the HTTP request are mapped to (c) fields. + # 4. Any body sent with an HTTP request can contain only (b) fields. + # The syntax of the path template is as follows: + # Template = "/" Segments [ Verb ] ; + # Segments = Segment ` "/" Segment ` ; + # Segment = "*" | "**" | LITERAL | Variable ; + # Variable = "`" FieldPath [ "=" Segments ] "`" ; + # FieldPath = IDENT ` "." IDENT ` ; + # Verb = ":" LITERAL ; + # The syntax `*` matches a single path segment. It follows the semantics of + # [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String + # Expansion. + # The syntax `**` matches zero or more path segments. It follows the semantics + # of [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.3 Reserved + # Expansion. NOTE: it must be the last segment in the path except the Verb. + # The syntax `LITERAL` matches literal text in the URL path. + # The syntax `Variable` matches the entire path as specified by its template; + # this nested template must not contain further variables. If a variable + # matches a single path segment, its template may be omitted, e.g. ``var`` + # is equivalent to ``var=*``. + # NOTE: the field paths in variables and in the `body` must not refer to + # repeated fields or map fields. + # Use CustomHttpPattern to specify any HTTP method that is not included in the + # `pattern` field, such as HEAD, or "*" to leave the HTTP method unspecified for + # a given URL path rule. The wild-card rule is useful for services that provide + # content to Web (HTML) clients. + class HttpRule + include Google::Apis::Core::Hashable + + # Optional. The rest method name is by default derived from the URL + # pattern. If specified, this field overrides the default method name. + # Example: + # rpc CreateResource(CreateResourceRequest) + # returns (CreateResourceResponse) ` + # option (google.api.http) = ` + # post: "/v1/resources", + # body: "resource", + # rest_method_name: "insert" + # `; + # ` + # This method has the automatically derived rest method name "create", but + # for backwards compatability with apiary, it is specified as insert. + # Corresponds to the JSON property `restMethodName` + # @return [String] + attr_accessor :rest_method_name + + # Additional HTTP bindings for the selector. Nested bindings must + # not contain an `additional_bindings` field themselves (that is, + # the nesting may only be one level deep). + # Corresponds to the JSON property `additionalBindings` + # @return [Array] + attr_accessor :additional_bindings + + # The name of the response field whose value is mapped to the HTTP body of + # response. Other response fields are ignored. This field is optional. When + # not set, the response message will be used as HTTP body of response. + # NOTE: the referred field must be not a repeated field and must be present + # at the top-level of response message type. + # Corresponds to the JSON property `responseBody` + # @return [String] + attr_accessor :response_body + + # Optional. The REST collection name is by default derived from the URL + # pattern. If specified, this field overrides the default collection name. + # Example: + # rpc AddressesAggregatedList(AddressesAggregatedListRequest) + # returns (AddressesAggregatedListResponse) ` + # option (google.api.http) = ` + # get: "/v1/projects/`project_id`/aggregated/addresses" + # rest_collection: "projects.addresses" + # `; + # ` + # This method has the automatically derived collection name + # "projects.aggregated". Because, semantically, this rpc is actually an + # operation on the "projects.addresses" collection, the `rest_collection` + # field is configured to override the derived collection name. + # Corresponds to the JSON property `restCollection` + # @return [String] + attr_accessor :rest_collection + + # Defines the Media configuration for a service in case of an upload. + # Use this only for Scotty Requests. Do not use this for media support using + # Bytestream, add instead [][google.bytestream.RestByteStream] as an API to + # your configuration for Bytestream methods. + # Corresponds to the JSON property `mediaUpload` + # @return [Google::Apis::ServiceuserV1::MediaUpload] + attr_accessor :media_upload + + # Selects methods to which this rule applies. + # Refer to selector for syntax details. + # Corresponds to the JSON property `selector` + # @return [String] + attr_accessor :selector + + # A custom pattern is used for defining custom HTTP verb. + # Corresponds to the JSON property `custom` + # @return [Google::Apis::ServiceuserV1::CustomHttpPattern] + attr_accessor :custom + + # Used for updating a resource. + # Corresponds to the JSON property `patch` + # @return [String] + attr_accessor :patch + + # Used for listing and getting information about resources. + # Corresponds to the JSON property `get` + # @return [String] + attr_accessor :get + + # Used for updating a resource. + # Corresponds to the JSON property `put` + # @return [String] + attr_accessor :put + + # Used for deleting a resource. + # Corresponds to the JSON property `delete` + # @return [String] + attr_accessor :delete + + # The name of the request field whose value is mapped to the HTTP body, or + # `*` for mapping all fields not captured by the path pattern to the HTTP + # body. NOTE: the referred field must not be a repeated field and must be + # present at the top-level of request message type. + # Corresponds to the JSON property `body` + # @return [String] + attr_accessor :body + + # Used for creating a resource. + # Corresponds to the JSON property `post` + # @return [String] + attr_accessor :post + + # Defines the Media configuration for a service in case of a download. + # Use this only for Scotty Requests. Do not use this for media support using + # Bytestream, add instead [][google.bytestream.RestByteStream] as an API to + # your configuration for Bytestream methods. + # Corresponds to the JSON property `mediaDownload` + # @return [Google::Apis::ServiceuserV1::MediaDownload] + attr_accessor :media_download + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @rest_method_name = args[:rest_method_name] if args.key?(:rest_method_name) + @additional_bindings = args[:additional_bindings] if args.key?(:additional_bindings) + @response_body = args[:response_body] if args.key?(:response_body) + @rest_collection = args[:rest_collection] if args.key?(:rest_collection) + @media_upload = args[:media_upload] if args.key?(:media_upload) + @selector = args[:selector] if args.key?(:selector) + @custom = args[:custom] if args.key?(:custom) + @patch = args[:patch] if args.key?(:patch) + @get = args[:get] if args.key?(:get) + @put = args[:put] if args.key?(:put) + @delete = args[:delete] if args.key?(:delete) + @body = args[:body] if args.key?(:body) + @post = args[:post] if args.key?(:post) + @media_download = args[:media_download] if args.key?(:media_download) + end + end + + # A visibility rule provides visibility configuration for an individual API + # element. + class VisibilityRule + include Google::Apis::Core::Hashable + + # A comma-separated list of visibility labels that apply to the `selector`. + # Any of the listed labels can be used to grant the visibility. + # If a rule has multiple labels, removing one of the labels but not all of + # them can break clients. + # Example: + # visibility: + # rules: + # - selector: google.calendar.Calendar.EnhancedSearch + # restriction: GOOGLE_INTERNAL, TRUSTED_TESTER + # Removing GOOGLE_INTERNAL from this restriction will break clients that + # rely on this method and only had access to it through GOOGLE_INTERNAL. + # Corresponds to the JSON property `restriction` + # @return [String] + attr_accessor :restriction + + # Selects methods, messages, fields, enums, etc. to which this rule applies. + # Refer to selector for syntax details. + # Corresponds to the JSON property `selector` + # @return [String] + attr_accessor :selector + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @restriction = args[:restriction] if args.key?(:restriction) + @selector = args[:selector] if args.key?(:selector) + end + end + + # Configuration of a specific monitoring destination (the producer project + # or the consumer project). + class MonitoringDestination + include Google::Apis::Core::Hashable + + # The monitored resource type. The type must be defined in + # Service.monitored_resources section. + # Corresponds to the JSON property `monitoredResource` + # @return [String] + attr_accessor :monitored_resource + + # Names of the metrics to report to this monitoring destination. + # Each name must be defined in Service.metrics section. + # Corresponds to the JSON property `metrics` + # @return [Array] + attr_accessor :metrics + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @monitored_resource = args[:monitored_resource] if args.key?(:monitored_resource) + @metrics = args[:metrics] if args.key?(:metrics) + end + end end end end diff --git a/generated/google/apis/serviceuser_v1/representations.rb b/generated/google/apis/serviceuser_v1/representations.rb index bc661d8ce..66a07e9de 100644 --- a/generated/google/apis/serviceuser_v1/representations.rb +++ b/generated/google/apis/serviceuser_v1/representations.rb @@ -22,144 +22,6 @@ module Google module Apis module ServiceuserV1 - class SearchServicesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class MediaUpload - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UsageRule - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AuthRequirement - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Documentation - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AuthenticationRule - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BackendRule - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Api - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class MetricRule - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Authentication - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Operation - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Page - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Status - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AuthProvider - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class EnumValue - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Service - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CustomHttpPattern - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class OperationMetadata - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class PublishedService - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SystemParameterRule - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class VisibilityRule - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class HttpRule - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class MonitoringDestination - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class Visibility class Representation < Google::Apis::Core::JsonRepresentation; end @@ -268,13 +130,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class LabelDescriptor + class EnableServiceRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class EnableServiceRequest + class LabelDescriptor class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -316,19 +178,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class SourceContext - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class MetricDescriptor class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class ListEnabledServicesResponse + class SourceContext class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -340,6 +196,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class ListEnabledServicesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class OAuthRequirements class Representation < Google::Apis::Core::JsonRepresentation; end @@ -395,291 +257,141 @@ module Google end class SearchServicesResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :services, as: 'services', class: Google::Apis::ServiceuserV1::PublishedService, decorator: Google::Apis::ServiceuserV1::PublishedService::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :next_page_token, as: 'nextPageToken' - end + include Google::Apis::Core::JsonObjectSupport end class MediaUpload - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :upload_service, as: 'uploadService' - property :enabled, as: 'enabled' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class UsageRule - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :allow_unregistered_calls, as: 'allowUnregisteredCalls' - property :selector, as: 'selector' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class AuthRequirement - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :provider_id, as: 'providerId' - property :audiences, as: 'audiences' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class Documentation - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :rules, as: 'rules', class: Google::Apis::ServiceuserV1::DocumentationRule, decorator: Google::Apis::ServiceuserV1::DocumentationRule::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :overview, as: 'overview' - collection :pages, as: 'pages', class: Google::Apis::ServiceuserV1::Page, decorator: Google::Apis::ServiceuserV1::Page::Representation - - property :summary, as: 'summary' - property :documentation_root_url, as: 'documentationRootUrl' - end + include Google::Apis::Core::JsonObjectSupport end class AuthenticationRule - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :requirements, as: 'requirements', class: Google::Apis::ServiceuserV1::AuthRequirement, decorator: Google::Apis::ServiceuserV1::AuthRequirement::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :selector, as: 'selector' - property :allow_without_credential, as: 'allowWithoutCredential' - property :oauth, as: 'oauth', class: Google::Apis::ServiceuserV1::OAuthRequirements, decorator: Google::Apis::ServiceuserV1::OAuthRequirements::Representation - - property :custom_auth, as: 'customAuth', class: Google::Apis::ServiceuserV1::CustomAuthRequirements, decorator: Google::Apis::ServiceuserV1::CustomAuthRequirements::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class BackendRule - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :selector, as: 'selector' - property :deadline, as: 'deadline' - property :min_deadline, as: 'minDeadline' - property :address, as: 'address' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class Api - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :version, as: 'version' - collection :mixins, as: 'mixins', class: Google::Apis::ServiceuserV1::Mixin, decorator: Google::Apis::ServiceuserV1::Mixin::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - collection :options, as: 'options', class: Google::Apis::ServiceuserV1::Option, decorator: Google::Apis::ServiceuserV1::Option::Representation - - collection :methods_prop, as: 'methods', class: Google::Apis::ServiceuserV1::MethodProp, decorator: Google::Apis::ServiceuserV1::MethodProp::Representation - - property :name, as: 'name' - property :syntax, as: 'syntax' - property :source_context, as: 'sourceContext', class: Google::Apis::ServiceuserV1::SourceContext, decorator: Google::Apis::ServiceuserV1::SourceContext::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class MetricRule - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :selector, as: 'selector' - hash :metric_costs, as: 'metricCosts' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class Authentication - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :rules, as: 'rules', class: Google::Apis::ServiceuserV1::AuthenticationRule, decorator: Google::Apis::ServiceuserV1::AuthenticationRule::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - collection :providers, as: 'providers', class: Google::Apis::ServiceuserV1::AuthProvider, decorator: Google::Apis::ServiceuserV1::AuthProvider::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class Operation - # @private - class Representation < Google::Apis::Core::JsonRepresentation - hash :response, as: 'response' - property :name, as: 'name' - property :error, as: 'error', class: Google::Apis::ServiceuserV1::Status, decorator: Google::Apis::ServiceuserV1::Status::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - hash :metadata, as: 'metadata' - property :done, as: 'done' - end + include Google::Apis::Core::JsonObjectSupport end class Page - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :subpages, as: 'subpages', class: Google::Apis::ServiceuserV1::Page, decorator: Google::Apis::ServiceuserV1::Page::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :name, as: 'name' - property :content, as: 'content' - end + include Google::Apis::Core::JsonObjectSupport end class Status - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :code, as: 'code' - property :message, as: 'message' - collection :details, as: 'details' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class AuthProvider - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :jwks_uri, as: 'jwksUri' - property :audiences, as: 'audiences' - property :id, as: 'id' - property :issuer, as: 'issuer' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class EnumValue - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :options, as: 'options', class: Google::Apis::ServiceuserV1::Option, decorator: Google::Apis::ServiceuserV1::Option::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :number, as: 'number' - property :name, as: 'name' - end + include Google::Apis::Core::JsonObjectSupport end class Service - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :endpoints, as: 'endpoints', class: Google::Apis::ServiceuserV1::Endpoint, decorator: Google::Apis::ServiceuserV1::Endpoint::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - collection :apis, as: 'apis', class: Google::Apis::ServiceuserV1::Api, decorator: Google::Apis::ServiceuserV1::Api::Representation - - collection :logs, as: 'logs', class: Google::Apis::ServiceuserV1::LogDescriptor, decorator: Google::Apis::ServiceuserV1::LogDescriptor::Representation - - collection :types, as: 'types', class: Google::Apis::ServiceuserV1::Type, decorator: Google::Apis::ServiceuserV1::Type::Representation - - property :source_info, as: 'sourceInfo', class: Google::Apis::ServiceuserV1::SourceInfo, decorator: Google::Apis::ServiceuserV1::SourceInfo::Representation - - property :http, as: 'http', class: Google::Apis::ServiceuserV1::Http, decorator: Google::Apis::ServiceuserV1::Http::Representation - - property :backend, as: 'backend', class: Google::Apis::ServiceuserV1::Backend, decorator: Google::Apis::ServiceuserV1::Backend::Representation - - property :system_parameters, as: 'systemParameters', class: Google::Apis::ServiceuserV1::SystemParameters, decorator: Google::Apis::ServiceuserV1::SystemParameters::Representation - - property :documentation, as: 'documentation', class: Google::Apis::ServiceuserV1::Documentation, decorator: Google::Apis::ServiceuserV1::Documentation::Representation - - property :logging, as: 'logging', class: Google::Apis::ServiceuserV1::Logging, decorator: Google::Apis::ServiceuserV1::Logging::Representation - - collection :monitored_resources, as: 'monitoredResources', class: Google::Apis::ServiceuserV1::MonitoredResourceDescriptor, decorator: Google::Apis::ServiceuserV1::MonitoredResourceDescriptor::Representation - - collection :enums, as: 'enums', class: Google::Apis::ServiceuserV1::Enum, decorator: Google::Apis::ServiceuserV1::Enum::Representation - - property :context, as: 'context', class: Google::Apis::ServiceuserV1::Context, decorator: Google::Apis::ServiceuserV1::Context::Representation - - property :id, as: 'id' - property :usage, as: 'usage', class: Google::Apis::ServiceuserV1::Usage, decorator: Google::Apis::ServiceuserV1::Usage::Representation - - collection :metrics, as: 'metrics', class: Google::Apis::ServiceuserV1::MetricDescriptor, decorator: Google::Apis::ServiceuserV1::MetricDescriptor::Representation - - property :authentication, as: 'authentication', class: Google::Apis::ServiceuserV1::Authentication, decorator: Google::Apis::ServiceuserV1::Authentication::Representation - - property :experimental, as: 'experimental', class: Google::Apis::ServiceuserV1::Experimental, decorator: Google::Apis::ServiceuserV1::Experimental::Representation - - property :control, as: 'control', class: Google::Apis::ServiceuserV1::Control, decorator: Google::Apis::ServiceuserV1::Control::Representation - - property :config_version, as: 'configVersion' - property :monitoring, as: 'monitoring', class: Google::Apis::ServiceuserV1::Monitoring, decorator: Google::Apis::ServiceuserV1::Monitoring::Representation - - collection :system_types, as: 'systemTypes', class: Google::Apis::ServiceuserV1::Type, decorator: Google::Apis::ServiceuserV1::Type::Representation - - property :producer_project_id, as: 'producerProjectId' - property :visibility, as: 'visibility', class: Google::Apis::ServiceuserV1::Visibility, decorator: Google::Apis::ServiceuserV1::Visibility::Representation - - property :quota, as: 'quota', class: Google::Apis::ServiceuserV1::Quota, decorator: Google::Apis::ServiceuserV1::Quota::Representation - - property :name, as: 'name' - property :custom_error, as: 'customError', class: Google::Apis::ServiceuserV1::CustomError, decorator: Google::Apis::ServiceuserV1::CustomError::Representation - - property :title, as: 'title' - end + include Google::Apis::Core::JsonObjectSupport end class CustomHttpPattern - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :kind, as: 'kind' - property :path, as: 'path' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class OperationMetadata - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :resource_names, as: 'resourceNames' - collection :steps, as: 'steps', class: Google::Apis::ServiceuserV1::Step, decorator: Google::Apis::ServiceuserV1::Step::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :progress_percentage, as: 'progressPercentage' - property :start_time, as: 'startTime' - end - end - - class PublishedService - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :service, as: 'service', class: Google::Apis::ServiceuserV1::Service, decorator: Google::Apis::ServiceuserV1::Service::Representation - - property :name, as: 'name' - end + include Google::Apis::Core::JsonObjectSupport end class SystemParameterRule - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :selector, as: 'selector' - collection :parameters, as: 'parameters', class: Google::Apis::ServiceuserV1::SystemParameter, decorator: Google::Apis::ServiceuserV1::SystemParameter::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end - class VisibilityRule - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :restriction, as: 'restriction' - property :selector, as: 'selector' - end + class PublishedService + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class HttpRule - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :additional_bindings, as: 'additionalBindings', class: Google::Apis::ServiceuserV1::HttpRule, decorator: Google::Apis::ServiceuserV1::HttpRule::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :response_body, as: 'responseBody' - property :media_upload, as: 'mediaUpload', class: Google::Apis::ServiceuserV1::MediaUpload, decorator: Google::Apis::ServiceuserV1::MediaUpload::Representation + include Google::Apis::Core::JsonObjectSupport + end - property :selector, as: 'selector' - property :custom, as: 'custom', class: Google::Apis::ServiceuserV1::CustomHttpPattern, decorator: Google::Apis::ServiceuserV1::CustomHttpPattern::Representation + class VisibilityRule + class Representation < Google::Apis::Core::JsonRepresentation; end - property :get, as: 'get' - property :patch, as: 'patch' - property :put, as: 'put' - property :delete, as: 'delete' - property :body, as: 'body' - property :media_download, as: 'mediaDownload', class: Google::Apis::ServiceuserV1::MediaDownload, decorator: Google::Apis::ServiceuserV1::MediaDownload::Representation - - property :post, as: 'post' - end + include Google::Apis::Core::JsonObjectSupport end class MonitoringDestination - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :monitored_resource, as: 'monitoredResource' - collection :metrics, as: 'metrics' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class Visibility @@ -747,8 +459,8 @@ module Google class Representation < Google::Apis::Core::JsonRepresentation property :default_limit, :numeric_string => true, as: 'defaultLimit' property :metric, as: 'metric' - property :display_name, as: 'displayName' property :description, as: 'description' + property :display_name, as: 'displayName' hash :values, as: 'values' property :unit, as: 'unit' property :max_limit, :numeric_string => true, as: 'maxLimit' @@ -761,6 +473,7 @@ module Google class MethodProp # @private class Representation < Google::Apis::Core::JsonRepresentation + property :response_type_url, as: 'responseTypeUrl' collection :options, as: 'options', class: Google::Apis::ServiceuserV1::Option, decorator: Google::Apis::ServiceuserV1::Option::Representation property :response_streaming, as: 'responseStreaming' @@ -768,7 +481,6 @@ module Google property :request_type_url, as: 'requestTypeUrl' property :request_streaming, as: 'requestStreaming' property :syntax, as: 'syntax' - property :response_type_url, as: 'responseTypeUrl' end end @@ -815,19 +527,17 @@ module Google class SystemParameter # @private class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' property :url_query_parameter, as: 'urlQueryParameter' property :http_header, as: 'httpHeader' + property :name, as: 'name' end end class Field # @private class Representation < Google::Apis::Core::JsonRepresentation - property :type_url, as: 'typeUrl' - property :number, as: 'number' - property :json_name, as: 'jsonName' property :kind, as: 'kind' + property :json_name, as: 'jsonName' collection :options, as: 'options', class: Google::Apis::ServiceuserV1::Option, decorator: Google::Apis::ServiceuserV1::Option::Representation property :oneof_index, as: 'oneofIndex' @@ -835,30 +545,38 @@ module Google property :cardinality, as: 'cardinality' property :default_value, as: 'defaultValue' property :name, as: 'name' + property :type_url, as: 'typeUrl' + property :number, as: 'number' end end class Monitoring # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :consumer_destinations, as: 'consumerDestinations', class: Google::Apis::ServiceuserV1::MonitoringDestination, decorator: Google::Apis::ServiceuserV1::MonitoringDestination::Representation - collection :producer_destinations, as: 'producerDestinations', class: Google::Apis::ServiceuserV1::MonitoringDestination, decorator: Google::Apis::ServiceuserV1::MonitoringDestination::Representation + collection :consumer_destinations, as: 'consumerDestinations', class: Google::Apis::ServiceuserV1::MonitoringDestination, decorator: Google::Apis::ServiceuserV1::MonitoringDestination::Representation + end end class Enum # @private class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - collection :enumvalue, as: 'enumvalue', class: Google::Apis::ServiceuserV1::EnumValue, decorator: Google::Apis::ServiceuserV1::EnumValue::Representation - collection :options, as: 'options', class: Google::Apis::ServiceuserV1::Option, decorator: Google::Apis::ServiceuserV1::Option::Representation property :source_context, as: 'sourceContext', class: Google::Apis::ServiceuserV1::SourceContext, decorator: Google::Apis::ServiceuserV1::SourceContext::Representation property :syntax, as: 'syntax' + property :name, as: 'name' + collection :enumvalue, as: 'enumvalue', class: Google::Apis::ServiceuserV1::EnumValue, decorator: Google::Apis::ServiceuserV1::EnumValue::Representation + + end + end + + class EnableServiceRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation end end @@ -871,24 +589,18 @@ module Google end end - class EnableServiceRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end - end - class Type # @private class Representation < Google::Apis::Core::JsonRepresentation + collection :fields, as: 'fields', class: Google::Apis::ServiceuserV1::Field, decorator: Google::Apis::ServiceuserV1::Field::Representation + property :name, as: 'name' collection :oneofs, as: 'oneofs' - property :syntax, as: 'syntax' property :source_context, as: 'sourceContext', class: Google::Apis::ServiceuserV1::SourceContext, decorator: Google::Apis::ServiceuserV1::SourceContext::Representation + property :syntax, as: 'syntax' collection :options, as: 'options', class: Google::Apis::ServiceuserV1::Option, decorator: Google::Apis::ServiceuserV1::Option::Representation - collection :fields, as: 'fields', class: Google::Apis::ServiceuserV1::Field, decorator: Google::Apis::ServiceuserV1::Field::Representation - end end @@ -911,9 +623,9 @@ module Google class DocumentationRule # @private class Representation < Google::Apis::Core::JsonRepresentation + property :description, as: 'description' property :deprecation_description, as: 'deprecationDescription' property :selector, as: 'selector' - property :description, as: 'description' end end @@ -927,9 +639,24 @@ module Google class ContextRule # @private class Representation < Google::Apis::Core::JsonRepresentation + property :selector, as: 'selector' collection :provided, as: 'provided' collection :requested, as: 'requested' - property :selector, as: 'selector' + end + end + + class MetricDescriptor + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :metric_kind, as: 'metricKind' + property :description, as: 'description' + property :display_name, as: 'displayName' + property :unit, as: 'unit' + collection :labels, as: 'labels', class: Google::Apis::ServiceuserV1::LabelDescriptor, decorator: Google::Apis::ServiceuserV1::LabelDescriptor::Representation + + property :name, as: 'name' + property :type, as: 'type' + property :value_type, as: 'valueType' end end @@ -940,18 +667,15 @@ module Google end end - class MetricDescriptor + class Endpoint # @private class Representation < Google::Apis::Core::JsonRepresentation - property :unit, as: 'unit' - collection :labels, as: 'labels', class: Google::Apis::ServiceuserV1::LabelDescriptor, decorator: Google::Apis::ServiceuserV1::LabelDescriptor::Representation - + collection :apis, as: 'apis' + collection :aliases, as: 'aliases' + property :allow_cors, as: 'allowCors' property :name, as: 'name' - property :type, as: 'type' - property :value_type, as: 'valueType' - property :metric_kind, as: 'metricKind' - property :display_name, as: 'displayName' - property :description, as: 'description' + property :target, as: 'target' + collection :features, as: 'features' end end @@ -964,18 +688,6 @@ module Google end end - class Endpoint - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :allow_cors, as: 'allowCors' - collection :aliases, as: 'aliases' - property :name, as: 'name' - property :target, as: 'target' - collection :features, as: 'features' - collection :apis, as: 'apis' - end - end - class OAuthRequirements # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1023,20 +735,24 @@ module Google class MonitoredResourceDescriptor # @private class Representation < Google::Apis::Core::JsonRepresentation + property :type, as: 'type' collection :labels, as: 'labels', class: Google::Apis::ServiceuserV1::LabelDescriptor, decorator: Google::Apis::ServiceuserV1::LabelDescriptor::Representation property :name, as: 'name' property :display_name, as: 'displayName' property :description, as: 'description' - property :type, as: 'type' end end class MediaDownload # @private class Representation < Google::Apis::Core::JsonRepresentation + property :dropzone, as: 'dropzone' + property :max_direct_download_size, :numeric_string => true, as: 'maxDirectDownloadSize' + property :use_direct_download, as: 'useDirectDownload' property :enabled, as: 'enabled' property :download_service, as: 'downloadService' + property :complete_notification, as: 'completeNotification' end end @@ -1052,6 +768,302 @@ module Google class Representation < Google::Apis::Core::JsonRepresentation end end + + class SearchServicesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :services, as: 'services', class: Google::Apis::ServiceuserV1::PublishedService, decorator: Google::Apis::ServiceuserV1::PublishedService::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class MediaUpload + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :enabled, as: 'enabled' + property :progress_notification, as: 'progressNotification' + property :complete_notification, as: 'completeNotification' + property :dropzone, as: 'dropzone' + property :start_notification, as: 'startNotification' + property :upload_service, as: 'uploadService' + collection :mime_types, as: 'mimeTypes' + property :max_size, :numeric_string => true, as: 'maxSize' + end + end + + class UsageRule + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :selector, as: 'selector' + property :allow_unregistered_calls, as: 'allowUnregisteredCalls' + end + end + + class AuthRequirement + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :audiences, as: 'audiences' + property :provider_id, as: 'providerId' + end + end + + class Documentation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :summary, as: 'summary' + property :documentation_root_url, as: 'documentationRootUrl' + collection :rules, as: 'rules', class: Google::Apis::ServiceuserV1::DocumentationRule, decorator: Google::Apis::ServiceuserV1::DocumentationRule::Representation + + property :overview, as: 'overview' + collection :pages, as: 'pages', class: Google::Apis::ServiceuserV1::Page, decorator: Google::Apis::ServiceuserV1::Page::Representation + + end + end + + class AuthenticationRule + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :oauth, as: 'oauth', class: Google::Apis::ServiceuserV1::OAuthRequirements, decorator: Google::Apis::ServiceuserV1::OAuthRequirements::Representation + + property :custom_auth, as: 'customAuth', class: Google::Apis::ServiceuserV1::CustomAuthRequirements, decorator: Google::Apis::ServiceuserV1::CustomAuthRequirements::Representation + + collection :requirements, as: 'requirements', class: Google::Apis::ServiceuserV1::AuthRequirement, decorator: Google::Apis::ServiceuserV1::AuthRequirement::Representation + + property :selector, as: 'selector' + property :allow_without_credential, as: 'allowWithoutCredential' + end + end + + class BackendRule + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :address, as: 'address' + property :selector, as: 'selector' + property :deadline, as: 'deadline' + property :min_deadline, as: 'minDeadline' + end + end + + class Api + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :source_context, as: 'sourceContext', class: Google::Apis::ServiceuserV1::SourceContext, decorator: Google::Apis::ServiceuserV1::SourceContext::Representation + + property :syntax, as: 'syntax' + property :version, as: 'version' + collection :mixins, as: 'mixins', class: Google::Apis::ServiceuserV1::Mixin, decorator: Google::Apis::ServiceuserV1::Mixin::Representation + + collection :options, as: 'options', class: Google::Apis::ServiceuserV1::Option, decorator: Google::Apis::ServiceuserV1::Option::Representation + + collection :methods_prop, as: 'methods', class: Google::Apis::ServiceuserV1::MethodProp, decorator: Google::Apis::ServiceuserV1::MethodProp::Representation + + property :name, as: 'name' + end + end + + class MetricRule + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :selector, as: 'selector' + hash :metric_costs, as: 'metricCosts' + end + end + + class Authentication + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :rules, as: 'rules', class: Google::Apis::ServiceuserV1::AuthenticationRule, decorator: Google::Apis::ServiceuserV1::AuthenticationRule::Representation + + collection :providers, as: 'providers', class: Google::Apis::ServiceuserV1::AuthProvider, decorator: Google::Apis::ServiceuserV1::AuthProvider::Representation + + end + end + + class Operation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + hash :response, as: 'response' + property :name, as: 'name' + property :error, as: 'error', class: Google::Apis::ServiceuserV1::Status, decorator: Google::Apis::ServiceuserV1::Status::Representation + + hash :metadata, as: 'metadata' + property :done, as: 'done' + end + end + + class Page + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :content, as: 'content' + collection :subpages, as: 'subpages', class: Google::Apis::ServiceuserV1::Page, decorator: Google::Apis::ServiceuserV1::Page::Representation + + property :name, as: 'name' + end + end + + class Status + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :details, as: 'details' + property :code, as: 'code' + property :message, as: 'message' + end + end + + class AuthProvider + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :audiences, as: 'audiences' + property :id, as: 'id' + property :issuer, as: 'issuer' + property :jwks_uri, as: 'jwksUri' + end + end + + class EnumValue + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :name, as: 'name' + collection :options, as: 'options', class: Google::Apis::ServiceuserV1::Option, decorator: Google::Apis::ServiceuserV1::Option::Representation + + property :number, as: 'number' + end + end + + class Service + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :usage, as: 'usage', class: Google::Apis::ServiceuserV1::Usage, decorator: Google::Apis::ServiceuserV1::Usage::Representation + + collection :metrics, as: 'metrics', class: Google::Apis::ServiceuserV1::MetricDescriptor, decorator: Google::Apis::ServiceuserV1::MetricDescriptor::Representation + + property :authentication, as: 'authentication', class: Google::Apis::ServiceuserV1::Authentication, decorator: Google::Apis::ServiceuserV1::Authentication::Representation + + property :experimental, as: 'experimental', class: Google::Apis::ServiceuserV1::Experimental, decorator: Google::Apis::ServiceuserV1::Experimental::Representation + + property :control, as: 'control', class: Google::Apis::ServiceuserV1::Control, decorator: Google::Apis::ServiceuserV1::Control::Representation + + property :config_version, as: 'configVersion' + property :monitoring, as: 'monitoring', class: Google::Apis::ServiceuserV1::Monitoring, decorator: Google::Apis::ServiceuserV1::Monitoring::Representation + + collection :system_types, as: 'systemTypes', class: Google::Apis::ServiceuserV1::Type, decorator: Google::Apis::ServiceuserV1::Type::Representation + + property :producer_project_id, as: 'producerProjectId' + property :visibility, as: 'visibility', class: Google::Apis::ServiceuserV1::Visibility, decorator: Google::Apis::ServiceuserV1::Visibility::Representation + + property :quota, as: 'quota', class: Google::Apis::ServiceuserV1::Quota, decorator: Google::Apis::ServiceuserV1::Quota::Representation + + property :name, as: 'name' + property :custom_error, as: 'customError', class: Google::Apis::ServiceuserV1::CustomError, decorator: Google::Apis::ServiceuserV1::CustomError::Representation + + property :title, as: 'title' + collection :endpoints, as: 'endpoints', class: Google::Apis::ServiceuserV1::Endpoint, decorator: Google::Apis::ServiceuserV1::Endpoint::Representation + + collection :apis, as: 'apis', class: Google::Apis::ServiceuserV1::Api, decorator: Google::Apis::ServiceuserV1::Api::Representation + + collection :logs, as: 'logs', class: Google::Apis::ServiceuserV1::LogDescriptor, decorator: Google::Apis::ServiceuserV1::LogDescriptor::Representation + + collection :types, as: 'types', class: Google::Apis::ServiceuserV1::Type, decorator: Google::Apis::ServiceuserV1::Type::Representation + + property :source_info, as: 'sourceInfo', class: Google::Apis::ServiceuserV1::SourceInfo, decorator: Google::Apis::ServiceuserV1::SourceInfo::Representation + + property :http, as: 'http', class: Google::Apis::ServiceuserV1::Http, decorator: Google::Apis::ServiceuserV1::Http::Representation + + property :backend, as: 'backend', class: Google::Apis::ServiceuserV1::Backend, decorator: Google::Apis::ServiceuserV1::Backend::Representation + + property :system_parameters, as: 'systemParameters', class: Google::Apis::ServiceuserV1::SystemParameters, decorator: Google::Apis::ServiceuserV1::SystemParameters::Representation + + property :documentation, as: 'documentation', class: Google::Apis::ServiceuserV1::Documentation, decorator: Google::Apis::ServiceuserV1::Documentation::Representation + + property :logging, as: 'logging', class: Google::Apis::ServiceuserV1::Logging, decorator: Google::Apis::ServiceuserV1::Logging::Representation + + collection :monitored_resources, as: 'monitoredResources', class: Google::Apis::ServiceuserV1::MonitoredResourceDescriptor, decorator: Google::Apis::ServiceuserV1::MonitoredResourceDescriptor::Representation + + collection :enums, as: 'enums', class: Google::Apis::ServiceuserV1::Enum, decorator: Google::Apis::ServiceuserV1::Enum::Representation + + property :context, as: 'context', class: Google::Apis::ServiceuserV1::Context, decorator: Google::Apis::ServiceuserV1::Context::Representation + + property :id, as: 'id' + end + end + + class CustomHttpPattern + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :path, as: 'path' + property :kind, as: 'kind' + end + end + + class OperationMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :start_time, as: 'startTime' + collection :resource_names, as: 'resourceNames' + collection :steps, as: 'steps', class: Google::Apis::ServiceuserV1::Step, decorator: Google::Apis::ServiceuserV1::Step::Representation + + property :progress_percentage, as: 'progressPercentage' + end + end + + class SystemParameterRule + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :selector, as: 'selector' + collection :parameters, as: 'parameters', class: Google::Apis::ServiceuserV1::SystemParameter, decorator: Google::Apis::ServiceuserV1::SystemParameter::Representation + + end + end + + class PublishedService + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :service, as: 'service', class: Google::Apis::ServiceuserV1::Service, decorator: Google::Apis::ServiceuserV1::Service::Representation + + property :name, as: 'name' + end + end + + class HttpRule + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :rest_method_name, as: 'restMethodName' + collection :additional_bindings, as: 'additionalBindings', class: Google::Apis::ServiceuserV1::HttpRule, decorator: Google::Apis::ServiceuserV1::HttpRule::Representation + + property :response_body, as: 'responseBody' + property :rest_collection, as: 'restCollection' + property :media_upload, as: 'mediaUpload', class: Google::Apis::ServiceuserV1::MediaUpload, decorator: Google::Apis::ServiceuserV1::MediaUpload::Representation + + property :selector, as: 'selector' + property :custom, as: 'custom', class: Google::Apis::ServiceuserV1::CustomHttpPattern, decorator: Google::Apis::ServiceuserV1::CustomHttpPattern::Representation + + property :patch, as: 'patch' + property :get, as: 'get' + property :put, as: 'put' + property :delete, as: 'delete' + property :body, as: 'body' + property :post, as: 'post' + property :media_download, as: 'mediaDownload', class: Google::Apis::ServiceuserV1::MediaDownload, decorator: Google::Apis::ServiceuserV1::MediaDownload::Representation + + end + end + + class VisibilityRule + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :restriction, as: 'restriction' + property :selector, as: 'selector' + end + end + + class MonitoringDestination + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :monitored_resource, as: 'monitoredResource' + collection :metrics, as: 'metrics' + end + end end end end diff --git a/generated/google/apis/serviceuser_v1/service.rb b/generated/google/apis/serviceuser_v1/service.rb index 337988329..8f121df97 100644 --- a/generated/google/apis/serviceuser_v1/service.rb +++ b/generated/google/apis/serviceuser_v1/service.rb @@ -60,11 +60,11 @@ module Google # A valid path would be: # - /v1/projects/my-project/services/servicemanagement.googleapis.com:disable # @param [Google::Apis::ServiceuserV1::DisableServiceRequest] disable_service_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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -77,15 +77,15 @@ 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 disable_service(name, disable_service_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def disable_service(name, disable_service_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:disable', options) command.request_representation = Google::Apis::ServiceuserV1::DisableServiceRequest::Representation command.request_object = disable_service_request_object command.response_representation = Google::Apis::ServiceuserV1::Operation::Representation command.response_class = Google::Apis::ServiceuserV1::Operation command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -98,11 +98,11 @@ module Google # A valid path would be: # - /v1/projects/my-project/services/servicemanagement.googleapis.com:enable # @param [Google::Apis::ServiceuserV1::EnableServiceRequest] enable_service_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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -115,15 +115,15 @@ 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 enable_service(name, enable_service_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def enable_service(name, enable_service_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:enable', options) command.request_representation = Google::Apis::ServiceuserV1::EnableServiceRequest::Representation command.request_object = enable_service_request_object command.response_representation = Google::Apis::ServiceuserV1::Operation::Representation command.response_class = Google::Apis::ServiceuserV1::Operation command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -137,11 +137,11 @@ module Google # call. # @param [Fixnum] page_size # Requested size of the next page of data. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -154,15 +154,15 @@ 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_project_services(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_project_services(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/services', options) command.response_representation = Google::Apis::ServiceuserV1::ListEnabledServicesResponse::Representation command.response_class = Google::Apis::ServiceuserV1::ListEnabledServicesResponse command.params['parent'] = parent unless parent.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -175,11 +175,11 @@ module Google # call. # @param [Fixnum] page_size # Requested size of the next page of data. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -192,14 +192,14 @@ 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 search_services(page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + def search_services(page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/services:search', options) command.response_representation = Google::Apis::ServiceuserV1::SearchServicesResponse::Representation command.response_class = Google::Apis::ServiceuserV1::SearchServicesResponse command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end diff --git a/generated/google/apis/sheets_v4.rb b/generated/google/apis/sheets_v4.rb index 9fa1e7a64..87a8e81f9 100644 --- a/generated/google/apis/sheets_v4.rb +++ b/generated/google/apis/sheets_v4.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/sheets/ module SheetsV4 VERSION = 'V4' - REVISION = '20170428' + REVISION = '20170519' # View and manage Google Drive files and folders that you have opened or created with this app AUTH_DRIVE_FILE = 'https://www.googleapis.com/auth/drive.file' diff --git a/generated/google/apis/sheets_v4/classes.rb b/generated/google/apis/sheets_v4/classes.rb index 920bf9205..c8c280aec 100644 --- a/generated/google/apis/sheets_v4/classes.rb +++ b/generated/google/apis/sheets_v4/classes.rb @@ -22,1021 +22,6 @@ module Google module Apis module SheetsV4 - # Appends rows or columns to the end of a sheet. - class AppendDimensionRequest - include Google::Apis::Core::Hashable - - # Whether rows or columns should be appended. - # Corresponds to the JSON property `dimension` - # @return [String] - attr_accessor :dimension - - # The number of rows or columns to append. - # Corresponds to the JSON property `length` - # @return [Fixnum] - attr_accessor :length - - # The sheet to append rows or columns to. - # Corresponds to the JSON property `sheetId` - # @return [Fixnum] - attr_accessor :sheet_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @dimension = args[:dimension] if args.key?(:dimension) - @length = args[:length] if args.key?(:length) - @sheet_id = args[:sheet_id] if args.key?(:sheet_id) - end - end - - # Adds a named range to the spreadsheet. - class AddNamedRangeRequest - include Google::Apis::Core::Hashable - - # A named range. - # Corresponds to the JSON property `namedRange` - # @return [Google::Apis::SheetsV4::NamedRange] - attr_accessor :named_range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @named_range = args[:named_range] if args.key?(:named_range) - end - end - - # Update an embedded object's position (such as a moving or resizing a - # chart or image). - class UpdateEmbeddedObjectPositionRequest - include Google::Apis::Core::Hashable - - # The position of an embedded object such as a chart. - # Corresponds to the JSON property `newPosition` - # @return [Google::Apis::SheetsV4::EmbeddedObjectPosition] - attr_accessor :new_position - - # The fields of OverlayPosition - # that should be updated when setting a new position. Used only if - # newPosition.overlayPosition - # is set, in which case at least one field must - # be specified. The root `newPosition.overlayPosition` is implied and - # should not be specified. - # A single `"*"` can be used as short-hand for listing every field. - # Corresponds to the JSON property `fields` - # @return [String] - attr_accessor :fields - - # The ID of the object to moved. - # Corresponds to the JSON property `objectId` - # @return [Fixnum] - attr_accessor :object_id_prop - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @new_position = args[:new_position] if args.key?(:new_position) - @fields = args[:fields] if args.key?(:fields) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) - end - end - - # The rotation applied to text in a cell. - class TextRotation - include Google::Apis::Core::Hashable - - # The angle between the standard orientation and the desired orientation. - # Measured in degrees. Valid values are between -90 and 90. Positive - # angles are angled upwards, negative are angled downwards. - # Note: For LTR text direction positive angles are in the counterclockwise - # direction, whereas for RTL they are in the clockwise direction - # Corresponds to the JSON property `angle` - # @return [Fixnum] - attr_accessor :angle - - # If true, text reads top to bottom, but the orientation of individual - # characters is unchanged. - # For example: - # | V | - # | e | - # | r | - # | t | - # | i | - # | c | - # | a | - # | l | - # Corresponds to the JSON property `vertical` - # @return [Boolean] - attr_accessor :vertical - alias_method :vertical?, :vertical - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @angle = args[:angle] if args.key?(:angle) - @vertical = args[:vertical] if args.key?(:vertical) - end - end - - # A pie chart. - class PieChartSpec - include Google::Apis::Core::Hashable - - # The data included in a domain or series. - # Corresponds to the JSON property `series` - # @return [Google::Apis::SheetsV4::ChartData] - attr_accessor :series - - # Where the legend of the pie chart should be drawn. - # Corresponds to the JSON property `legendPosition` - # @return [String] - attr_accessor :legend_position - - # The size of the hole in the pie chart. - # Corresponds to the JSON property `pieHole` - # @return [Float] - attr_accessor :pie_hole - - # The data included in a domain or series. - # Corresponds to the JSON property `domain` - # @return [Google::Apis::SheetsV4::ChartData] - attr_accessor :domain - - # True if the pie is three dimensional. - # Corresponds to the JSON property `threeDimensional` - # @return [Boolean] - attr_accessor :three_dimensional - alias_method :three_dimensional?, :three_dimensional - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @series = args[:series] if args.key?(:series) - @legend_position = args[:legend_position] if args.key?(:legend_position) - @pie_hole = args[:pie_hole] if args.key?(:pie_hole) - @domain = args[:domain] if args.key?(:domain) - @three_dimensional = args[:three_dimensional] if args.key?(:three_dimensional) - end - end - - # Updates properties of the filter view. - class UpdateFilterViewRequest - include Google::Apis::Core::Hashable - - # A filter view. - # Corresponds to the JSON property `filter` - # @return [Google::Apis::SheetsV4::FilterView] - attr_accessor :filter - - # The fields that should be updated. At least one field must be specified. - # The root `filter` is implied and should not be specified. - # A single `"*"` can be used as short-hand for listing every field. - # Corresponds to the JSON property `fields` - # @return [String] - attr_accessor :fields - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @filter = args[:filter] if args.key?(:filter) - @fields = args[:fields] if args.key?(:fields) - end - end - - # A rule describing a conditional format. - class ConditionalFormatRule - include Google::Apis::Core::Hashable - - # The ranges that will be formatted if the condition is true. - # All the ranges must be on the same grid. - # Corresponds to the JSON property `ranges` - # @return [Array] - attr_accessor :ranges - - # A rule that applies a gradient color scale format, based on - # the interpolation points listed. The format of a cell will vary - # based on its contents as compared to the values of the interpolation - # points. - # Corresponds to the JSON property `gradientRule` - # @return [Google::Apis::SheetsV4::GradientRule] - attr_accessor :gradient_rule - - # A rule that may or may not match, depending on the condition. - # Corresponds to the JSON property `booleanRule` - # @return [Google::Apis::SheetsV4::BooleanRule] - attr_accessor :boolean_rule - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @ranges = args[:ranges] if args.key?(:ranges) - @gradient_rule = args[:gradient_rule] if args.key?(:gradient_rule) - @boolean_rule = args[:boolean_rule] if args.key?(:boolean_rule) - end - end - - # Copies data from the source to the destination. - class CopyPasteRequest - include Google::Apis::Core::Hashable - - # How that data should be oriented when pasting. - # Corresponds to the JSON property `pasteOrientation` - # @return [String] - attr_accessor :paste_orientation - - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - # Corresponds to the JSON property `source` - # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :source - - # What kind of data to paste. - # Corresponds to the JSON property `pasteType` - # @return [String] - attr_accessor :paste_type - - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - # Corresponds to the JSON property `destination` - # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :destination - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @paste_orientation = args[:paste_orientation] if args.key?(:paste_orientation) - @source = args[:source] if args.key?(:source) - @paste_type = args[:paste_type] if args.key?(:paste_type) - @destination = args[:destination] if args.key?(:destination) - end - end - - # A condition that can evaluate to true or false. - # BooleanConditions are used by conditional formatting, - # data validation, and the criteria in filters. - class BooleanCondition - include Google::Apis::Core::Hashable - - # The type of condition. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # The values of the condition. The number of supported values depends - # on the condition type. Some support zero values, - # others one or two values, - # and ConditionType.ONE_OF_LIST supports an arbitrary number of values. - # Corresponds to the JSON property `values` - # @return [Array] - attr_accessor :values - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @type = args[:type] if args.key?(:type) - @values = args[:values] if args.key?(:values) - end - end - - # A single kind of update to apply to a spreadsheet. - class Request - include Google::Apis::Core::Hashable - - # Adds a new sheet. - # When a sheet is added at a given index, - # all subsequent sheets' indexes are incremented. - # To add an object sheet, use AddChartRequest instead and specify - # EmbeddedObjectPosition.sheetId or - # EmbeddedObjectPosition.newSheet. - # Corresponds to the JSON property `addSheet` - # @return [Google::Apis::SheetsV4::AddSheetRequest] - attr_accessor :add_sheet - - # Updates an existing protected range with the specified - # protectedRangeId. - # Corresponds to the JSON property `updateProtectedRange` - # @return [Google::Apis::SheetsV4::UpdateProtectedRangeRequest] - attr_accessor :update_protected_range - - # Deletes a particular filter view. - # Corresponds to the JSON property `deleteFilterView` - # @return [Google::Apis::SheetsV4::DeleteFilterViewRequest] - attr_accessor :delete_filter_view - - # Copies data from the source to the destination. - # Corresponds to the JSON property `copyPaste` - # @return [Google::Apis::SheetsV4::CopyPasteRequest] - attr_accessor :copy_paste - - # Inserts rows or columns in a sheet at a particular index. - # Corresponds to the JSON property `insertDimension` - # @return [Google::Apis::SheetsV4::InsertDimensionRequest] - attr_accessor :insert_dimension - - # Deletes a range of cells, shifting other cells into the deleted area. - # Corresponds to the JSON property `deleteRange` - # @return [Google::Apis::SheetsV4::DeleteRangeRequest] - attr_accessor :delete_range - - # Removes the banded range with the given ID from the spreadsheet. - # Corresponds to the JSON property `deleteBanding` - # @return [Google::Apis::SheetsV4::DeleteBandingRequest] - attr_accessor :delete_banding - - # Adds a filter view. - # Corresponds to the JSON property `addFilterView` - # @return [Google::Apis::SheetsV4::AddFilterViewRequest] - attr_accessor :add_filter_view - - # Sets a data validation rule to every cell in the range. - # To clear validation in a range, call this with no rule specified. - # Corresponds to the JSON property `setDataValidation` - # @return [Google::Apis::SheetsV4::SetDataValidationRequest] - attr_accessor :set_data_validation - - # Updates the borders of a range. - # If a field is not set in the request, that means the border remains as-is. - # For example, with two subsequent UpdateBordersRequest: - # 1. range: A1:A5 `` top: RED, bottom: WHITE `` - # 2. range: A1:A5 `` left: BLUE `` - # That would result in A1:A5 having a borders of - # `` top: RED, bottom: WHITE, left: BLUE ``. - # If you want to clear a border, explicitly set the style to - # NONE. - # Corresponds to the JSON property `updateBorders` - # @return [Google::Apis::SheetsV4::UpdateBordersRequest] - attr_accessor :update_borders - - # Deletes a conditional format rule at the given index. - # All subsequent rules' indexes are decremented. - # Corresponds to the JSON property `deleteConditionalFormatRule` - # @return [Google::Apis::SheetsV4::DeleteConditionalFormatRuleRequest] - attr_accessor :delete_conditional_format_rule - - # Clears the basic filter, if any exists on the sheet. - # Corresponds to the JSON property `clearBasicFilter` - # @return [Google::Apis::SheetsV4::ClearBasicFilterRequest] - attr_accessor :clear_basic_filter - - # Updates all cells in the range to the values in the given Cell object. - # Only the fields listed in the fields field are updated; others are - # unchanged. - # If writing a cell with a formula, the formula's ranges will automatically - # increment for each field in the range. - # For example, if writing a cell with formula `=A1` into range B2:C4, - # B2 would be `=A1`, B3 would be `=A2`, B4 would be `=A3`, - # C2 would be `=B1`, C3 would be `=B2`, C4 would be `=B3`. - # To keep the formula's ranges static, use the `$` indicator. - # For example, use the formula `=$A$1` to prevent both the row and the - # column from incrementing. - # Corresponds to the JSON property `repeatCell` - # @return [Google::Apis::SheetsV4::RepeatCellRequest] - attr_accessor :repeat_cell - - # Appends rows or columns to the end of a sheet. - # Corresponds to the JSON property `appendDimension` - # @return [Google::Apis::SheetsV4::AppendDimensionRequest] - attr_accessor :append_dimension - - # Updates a conditional format rule at the given index, - # or moves a conditional format rule to another index. - # Corresponds to the JSON property `updateConditionalFormatRule` - # @return [Google::Apis::SheetsV4::UpdateConditionalFormatRuleRequest] - attr_accessor :update_conditional_format_rule - - # Inserts cells into a range, shifting the existing cells over or down. - # Corresponds to the JSON property `insertRange` - # @return [Google::Apis::SheetsV4::InsertRangeRequest] - attr_accessor :insert_range - - # Moves one or more rows or columns. - # Corresponds to the JSON property `moveDimension` - # @return [Google::Apis::SheetsV4::MoveDimensionRequest] - attr_accessor :move_dimension - - # Updates properties of the supplied banded range. - # Corresponds to the JSON property `updateBanding` - # @return [Google::Apis::SheetsV4::UpdateBandingRequest] - attr_accessor :update_banding - - # Removes the named range with the given ID from the spreadsheet. - # Corresponds to the JSON property `deleteNamedRange` - # @return [Google::Apis::SheetsV4::DeleteNamedRangeRequest] - attr_accessor :delete_named_range - - # Adds a new protected range. - # Corresponds to the JSON property `addProtectedRange` - # @return [Google::Apis::SheetsV4::AddProtectedRangeRequest] - attr_accessor :add_protected_range - - # Duplicates the contents of a sheet. - # Corresponds to the JSON property `duplicateSheet` - # @return [Google::Apis::SheetsV4::DuplicateSheetRequest] - attr_accessor :duplicate_sheet - - # Deletes the requested sheet. - # Corresponds to the JSON property `deleteSheet` - # @return [Google::Apis::SheetsV4::DeleteSheetRequest] - attr_accessor :delete_sheet - - # Unmerges cells in the given range. - # Corresponds to the JSON property `unmergeCells` - # @return [Google::Apis::SheetsV4::UnmergeCellsRequest] - attr_accessor :unmerge_cells - - # Update an embedded object's position (such as a moving or resizing a - # chart or image). - # Corresponds to the JSON property `updateEmbeddedObjectPosition` - # @return [Google::Apis::SheetsV4::UpdateEmbeddedObjectPositionRequest] - attr_accessor :update_embedded_object_position - - # Updates properties of dimensions within the specified range. - # Corresponds to the JSON property `updateDimensionProperties` - # @return [Google::Apis::SheetsV4::UpdateDimensionPropertiesRequest] - attr_accessor :update_dimension_properties - - # Inserts data into the spreadsheet starting at the specified coordinate. - # Corresponds to the JSON property `pasteData` - # @return [Google::Apis::SheetsV4::PasteDataRequest] - attr_accessor :paste_data - - # Sets the basic filter associated with a sheet. - # Corresponds to the JSON property `setBasicFilter` - # @return [Google::Apis::SheetsV4::SetBasicFilterRequest] - attr_accessor :set_basic_filter - - # Adds a new conditional format rule at the given index. - # All subsequent rules' indexes are incremented. - # Corresponds to the JSON property `addConditionalFormatRule` - # @return [Google::Apis::SheetsV4::AddConditionalFormatRuleRequest] - attr_accessor :add_conditional_format_rule - - # Updates all cells in a range with new data. - # Corresponds to the JSON property `updateCells` - # @return [Google::Apis::SheetsV4::UpdateCellsRequest] - attr_accessor :update_cells - - # Adds a named range to the spreadsheet. - # Corresponds to the JSON property `addNamedRange` - # @return [Google::Apis::SheetsV4::AddNamedRangeRequest] - attr_accessor :add_named_range - - # Updates properties of a spreadsheet. - # Corresponds to the JSON property `updateSpreadsheetProperties` - # @return [Google::Apis::SheetsV4::UpdateSpreadsheetPropertiesRequest] - attr_accessor :update_spreadsheet_properties - - # Deletes the embedded object with the given ID. - # Corresponds to the JSON property `deleteEmbeddedObject` - # @return [Google::Apis::SheetsV4::DeleteEmbeddedObjectRequest] - attr_accessor :delete_embedded_object - - # Updates properties of the filter view. - # Corresponds to the JSON property `updateFilterView` - # @return [Google::Apis::SheetsV4::UpdateFilterViewRequest] - attr_accessor :update_filter_view - - # Adds a new banded range to the spreadsheet. - # Corresponds to the JSON property `addBanding` - # @return [Google::Apis::SheetsV4::AddBandingRequest] - attr_accessor :add_banding - - # Adds new cells after the last row with data in a sheet, - # inserting new rows into the sheet if necessary. - # Corresponds to the JSON property `appendCells` - # @return [Google::Apis::SheetsV4::AppendCellsRequest] - attr_accessor :append_cells - - # Automatically resizes one or more dimensions based on the contents - # of the cells in that dimension. - # Corresponds to the JSON property `autoResizeDimensions` - # @return [Google::Apis::SheetsV4::AutoResizeDimensionsRequest] - attr_accessor :auto_resize_dimensions - - # Moves data from the source to the destination. - # Corresponds to the JSON property `cutPaste` - # @return [Google::Apis::SheetsV4::CutPasteRequest] - attr_accessor :cut_paste - - # Merges all cells in the range. - # Corresponds to the JSON property `mergeCells` - # @return [Google::Apis::SheetsV4::MergeCellsRequest] - attr_accessor :merge_cells - - # Updates properties of the named range with the specified - # namedRangeId. - # Corresponds to the JSON property `updateNamedRange` - # @return [Google::Apis::SheetsV4::UpdateNamedRangeRequest] - attr_accessor :update_named_range - - # Updates properties of the sheet with the specified - # sheetId. - # Corresponds to the JSON property `updateSheetProperties` - # @return [Google::Apis::SheetsV4::UpdateSheetPropertiesRequest] - attr_accessor :update_sheet_properties - - # Deletes the dimensions from the sheet. - # Corresponds to the JSON property `deleteDimension` - # @return [Google::Apis::SheetsV4::DeleteDimensionRequest] - attr_accessor :delete_dimension - - # Fills in more data based on existing data. - # Corresponds to the JSON property `autoFill` - # @return [Google::Apis::SheetsV4::AutoFillRequest] - attr_accessor :auto_fill - - # Sorts data in rows based on a sort order per column. - # Corresponds to the JSON property `sortRange` - # @return [Google::Apis::SheetsV4::SortRangeRequest] - attr_accessor :sort_range - - # Deletes the protected range with the given ID. - # Corresponds to the JSON property `deleteProtectedRange` - # @return [Google::Apis::SheetsV4::DeleteProtectedRangeRequest] - attr_accessor :delete_protected_range - - # Duplicates a particular filter view. - # Corresponds to the JSON property `duplicateFilterView` - # @return [Google::Apis::SheetsV4::DuplicateFilterViewRequest] - attr_accessor :duplicate_filter_view - - # Adds a chart to a sheet in the spreadsheet. - # Corresponds to the JSON property `addChart` - # @return [Google::Apis::SheetsV4::AddChartRequest] - attr_accessor :add_chart - - # Finds and replaces data in cells over a range, sheet, or all sheets. - # Corresponds to the JSON property `findReplace` - # @return [Google::Apis::SheetsV4::FindReplaceRequest] - attr_accessor :find_replace - - # Updates a chart's specifications. - # (This does not move or resize a chart. To move or resize a chart, use - # UpdateEmbeddedObjectPositionRequest.) - # Corresponds to the JSON property `updateChartSpec` - # @return [Google::Apis::SheetsV4::UpdateChartSpecRequest] - attr_accessor :update_chart_spec - - # Splits a column of text into multiple columns, - # based on a delimiter in each cell. - # Corresponds to the JSON property `textToColumns` - # @return [Google::Apis::SheetsV4::TextToColumnsRequest] - attr_accessor :text_to_columns - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @add_sheet = args[:add_sheet] if args.key?(:add_sheet) - @update_protected_range = args[:update_protected_range] if args.key?(:update_protected_range) - @delete_filter_view = args[:delete_filter_view] if args.key?(:delete_filter_view) - @copy_paste = args[:copy_paste] if args.key?(:copy_paste) - @insert_dimension = args[:insert_dimension] if args.key?(:insert_dimension) - @delete_range = args[:delete_range] if args.key?(:delete_range) - @delete_banding = args[:delete_banding] if args.key?(:delete_banding) - @add_filter_view = args[:add_filter_view] if args.key?(:add_filter_view) - @set_data_validation = args[:set_data_validation] if args.key?(:set_data_validation) - @update_borders = args[:update_borders] if args.key?(:update_borders) - @delete_conditional_format_rule = args[:delete_conditional_format_rule] if args.key?(:delete_conditional_format_rule) - @clear_basic_filter = args[:clear_basic_filter] if args.key?(:clear_basic_filter) - @repeat_cell = args[:repeat_cell] if args.key?(:repeat_cell) - @append_dimension = args[:append_dimension] if args.key?(:append_dimension) - @update_conditional_format_rule = args[:update_conditional_format_rule] if args.key?(:update_conditional_format_rule) - @insert_range = args[:insert_range] if args.key?(:insert_range) - @move_dimension = args[:move_dimension] if args.key?(:move_dimension) - @update_banding = args[:update_banding] if args.key?(:update_banding) - @delete_named_range = args[:delete_named_range] if args.key?(:delete_named_range) - @add_protected_range = args[:add_protected_range] if args.key?(:add_protected_range) - @duplicate_sheet = args[:duplicate_sheet] if args.key?(:duplicate_sheet) - @delete_sheet = args[:delete_sheet] if args.key?(:delete_sheet) - @unmerge_cells = args[:unmerge_cells] if args.key?(:unmerge_cells) - @update_embedded_object_position = args[:update_embedded_object_position] if args.key?(:update_embedded_object_position) - @update_dimension_properties = args[:update_dimension_properties] if args.key?(:update_dimension_properties) - @paste_data = args[:paste_data] if args.key?(:paste_data) - @set_basic_filter = args[:set_basic_filter] if args.key?(:set_basic_filter) - @add_conditional_format_rule = args[:add_conditional_format_rule] if args.key?(:add_conditional_format_rule) - @update_cells = args[:update_cells] if args.key?(:update_cells) - @add_named_range = args[:add_named_range] if args.key?(:add_named_range) - @update_spreadsheet_properties = args[:update_spreadsheet_properties] if args.key?(:update_spreadsheet_properties) - @delete_embedded_object = args[:delete_embedded_object] if args.key?(:delete_embedded_object) - @update_filter_view = args[:update_filter_view] if args.key?(:update_filter_view) - @add_banding = args[:add_banding] if args.key?(:add_banding) - @append_cells = args[:append_cells] if args.key?(:append_cells) - @auto_resize_dimensions = args[:auto_resize_dimensions] if args.key?(:auto_resize_dimensions) - @cut_paste = args[:cut_paste] if args.key?(:cut_paste) - @merge_cells = args[:merge_cells] if args.key?(:merge_cells) - @update_named_range = args[:update_named_range] if args.key?(:update_named_range) - @update_sheet_properties = args[:update_sheet_properties] if args.key?(:update_sheet_properties) - @delete_dimension = args[:delete_dimension] if args.key?(:delete_dimension) - @auto_fill = args[:auto_fill] if args.key?(:auto_fill) - @sort_range = args[:sort_range] if args.key?(:sort_range) - @delete_protected_range = args[:delete_protected_range] if args.key?(:delete_protected_range) - @duplicate_filter_view = args[:duplicate_filter_view] if args.key?(:duplicate_filter_view) - @add_chart = args[:add_chart] if args.key?(:add_chart) - @find_replace = args[:find_replace] if args.key?(:find_replace) - @update_chart_spec = args[:update_chart_spec] if args.key?(:update_chart_spec) - @text_to_columns = args[:text_to_columns] if args.key?(:text_to_columns) - end - end - - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - class GridRange - include Google::Apis::Core::Hashable - - # The start row (inclusive) of the range, or not set if unbounded. - # Corresponds to the JSON property `startRowIndex` - # @return [Fixnum] - attr_accessor :start_row_index - - # The start column (inclusive) of the range, or not set if unbounded. - # Corresponds to the JSON property `startColumnIndex` - # @return [Fixnum] - attr_accessor :start_column_index - - # The sheet this range is on. - # Corresponds to the JSON property `sheetId` - # @return [Fixnum] - attr_accessor :sheet_id - - # The end row (exclusive) of the range, or not set if unbounded. - # Corresponds to the JSON property `endRowIndex` - # @return [Fixnum] - attr_accessor :end_row_index - - # The end column (exclusive) of the range, or not set if unbounded. - # Corresponds to the JSON property `endColumnIndex` - # @return [Fixnum] - attr_accessor :end_column_index - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @start_row_index = args[:start_row_index] if args.key?(:start_row_index) - @start_column_index = args[:start_column_index] if args.key?(:start_column_index) - @sheet_id = args[:sheet_id] if args.key?(:sheet_id) - @end_row_index = args[:end_row_index] if args.key?(:end_row_index) - @end_column_index = args[:end_column_index] if args.key?(:end_column_index) - end - end - - # The specification for a basic chart. See BasicChartType for the list - # of charts this supports. - class BasicChartSpec - include Google::Apis::Core::Hashable - - # The type of the chart. - # Corresponds to the JSON property `chartType` - # @return [String] - attr_accessor :chart_type - - # The data this chart is visualizing. - # Corresponds to the JSON property `series` - # @return [Array] - attr_accessor :series - - # The position of the chart legend. - # Corresponds to the JSON property `legendPosition` - # @return [String] - attr_accessor :legend_position - - # The domain of data this is charting. - # Only a single domain is supported. - # Corresponds to the JSON property `domains` - # @return [Array] - attr_accessor :domains - - # The number of rows or columns in the data that are "headers". - # If not set, Google Sheets will guess how many rows are headers based - # on the data. - # (Note that BasicChartAxis.title may override the axis title - # inferred from the header values.) - # Corresponds to the JSON property `headerCount` - # @return [Fixnum] - attr_accessor :header_count - - # The axis on the chart. - # Corresponds to the JSON property `axis` - # @return [Array] - attr_accessor :axis - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @chart_type = args[:chart_type] if args.key?(:chart_type) - @series = args[:series] if args.key?(:series) - @legend_position = args[:legend_position] if args.key?(:legend_position) - @domains = args[:domains] if args.key?(:domains) - @header_count = args[:header_count] if args.key?(:header_count) - @axis = args[:axis] if args.key?(:axis) - end - end - - # Sets a data validation rule to every cell in the range. - # To clear validation in a range, call this with no rule specified. - class SetDataValidationRequest - include Google::Apis::Core::Hashable - - # A data validation rule. - # Corresponds to the JSON property `rule` - # @return [Google::Apis::SheetsV4::DataValidationRule] - attr_accessor :rule - - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @rule = args[:rule] if args.key?(:rule) - @range = args[:range] if args.key?(:range) - end - end - - # Data about a specific cell. - class CellData - include Google::Apis::Core::Hashable - - # The format of a cell. - # Corresponds to the JSON property `effectiveFormat` - # @return [Google::Apis::SheetsV4::CellFormat] - attr_accessor :effective_format - - # Any note on the cell. - # Corresponds to the JSON property `note` - # @return [String] - attr_accessor :note - - # A data validation rule. - # Corresponds to the JSON property `dataValidation` - # @return [Google::Apis::SheetsV4::DataValidationRule] - attr_accessor :data_validation - - # The kinds of value that a cell in a spreadsheet can have. - # Corresponds to the JSON property `userEnteredValue` - # @return [Google::Apis::SheetsV4::ExtendedValue] - attr_accessor :user_entered_value - - # The kinds of value that a cell in a spreadsheet can have. - # Corresponds to the JSON property `effectiveValue` - # @return [Google::Apis::SheetsV4::ExtendedValue] - attr_accessor :effective_value - - # Runs of rich text applied to subsections of the cell. Runs are only valid - # on user entered strings, not formulas, bools, or numbers. - # Runs start at specific indexes in the text and continue until the next - # run. Properties of a run will continue unless explicitly changed - # in a subsequent run (and properties of the first run will continue - # the properties of the cell unless explicitly changed). - # When writing, the new runs will overwrite any prior runs. When writing a - # new user_entered_value, previous runs will be erased. - # Corresponds to the JSON property `textFormatRuns` - # @return [Array] - attr_accessor :text_format_runs - - # The formatted value of the cell. - # This is the value as it's shown to the user. - # This field is read-only. - # Corresponds to the JSON property `formattedValue` - # @return [String] - attr_accessor :formatted_value - - # A hyperlink this cell points to, if any. - # This field is read-only. (To set it, use a `=HYPERLINK` formula.) - # Corresponds to the JSON property `hyperlink` - # @return [String] - attr_accessor :hyperlink - - # A pivot table. - # Corresponds to the JSON property `pivotTable` - # @return [Google::Apis::SheetsV4::PivotTable] - attr_accessor :pivot_table - - # The format of a cell. - # Corresponds to the JSON property `userEnteredFormat` - # @return [Google::Apis::SheetsV4::CellFormat] - attr_accessor :user_entered_format - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @effective_format = args[:effective_format] if args.key?(:effective_format) - @note = args[:note] if args.key?(:note) - @data_validation = args[:data_validation] if args.key?(:data_validation) - @user_entered_value = args[:user_entered_value] if args.key?(:user_entered_value) - @effective_value = args[:effective_value] if args.key?(:effective_value) - @text_format_runs = args[:text_format_runs] if args.key?(:text_format_runs) - @formatted_value = args[:formatted_value] if args.key?(:formatted_value) - @hyperlink = args[:hyperlink] if args.key?(:hyperlink) - @pivot_table = args[:pivot_table] if args.key?(:pivot_table) - @user_entered_format = args[:user_entered_format] if args.key?(:user_entered_format) - end - end - - # The request for updating any aspect of a spreadsheet. - class BatchUpdateSpreadsheetRequest - include Google::Apis::Core::Hashable - - # Determines if the update response should include the spreadsheet - # resource. - # Corresponds to the JSON property `includeSpreadsheetInResponse` - # @return [Boolean] - attr_accessor :include_spreadsheet_in_response - alias_method :include_spreadsheet_in_response?, :include_spreadsheet_in_response - - # Limits the ranges included in the response spreadsheet. - # Meaningful only if include_spreadsheet_response is 'true'. - # Corresponds to the JSON property `responseRanges` - # @return [Array] - attr_accessor :response_ranges - - # True if grid data should be returned. Meaningful only if - # if include_spreadsheet_response is 'true'. - # This parameter is ignored if a field mask was set in the request. - # Corresponds to the JSON property `responseIncludeGridData` - # @return [Boolean] - attr_accessor :response_include_grid_data - alias_method :response_include_grid_data?, :response_include_grid_data - - # A list of updates to apply to the spreadsheet. - # Requests will be applied in the order they are specified. - # If any request is not valid, no requests will be applied. - # Corresponds to the JSON property `requests` - # @return [Array] - attr_accessor :requests - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @include_spreadsheet_in_response = args[:include_spreadsheet_in_response] if args.key?(:include_spreadsheet_in_response) - @response_ranges = args[:response_ranges] if args.key?(:response_ranges) - @response_include_grid_data = args[:response_include_grid_data] if args.key?(:response_include_grid_data) - @requests = args[:requests] if args.key?(:requests) - end - end - - # An axis of the chart. - # A chart may not have more than one axis per - # axis position. - class BasicChartAxis - include Google::Apis::Core::Hashable - - # The format of a run of text in a cell. - # Absent values indicate that the field isn't specified. - # Corresponds to the JSON property `format` - # @return [Google::Apis::SheetsV4::TextFormat] - attr_accessor :format - - # The position of this axis. - # Corresponds to the JSON property `position` - # @return [String] - attr_accessor :position - - # The title of this axis. If set, this overrides any title inferred - # from headers of the data. - # 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) - @format = args[:format] if args.key?(:format) - @position = args[:position] if args.key?(:position) - @title = args[:title] if args.key?(:title) - end - end - # The amount of padding around the cell, in pixels. # When updating padding, every field must be specified. class Padding @@ -1075,6 +60,41 @@ module Google end end + # An axis of the chart. + # A chart may not have more than one axis per + # axis position. + class BasicChartAxis + include Google::Apis::Core::Hashable + + # The position of this axis. + # Corresponds to the JSON property `position` + # @return [String] + attr_accessor :position + + # The title of this axis. If set, this overrides any title inferred + # from headers of the data. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + # The format of a run of text in a cell. + # Absent values indicate that the field isn't specified. + # Corresponds to the JSON property `format` + # @return [Google::Apis::SheetsV4::TextFormat] + attr_accessor :format + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @position = args[:position] if args.key?(:position) + @title = args[:title] if args.key?(:title) + @format = args[:format] if args.key?(:format) + end + end + # Deletes the dimensions from the sheet. class DeleteDimensionRequest include Google::Apis::Core::Hashable @@ -1148,17 +168,6 @@ module Google class BatchUpdateValuesResponse include Google::Apis::Core::Hashable - # The total number of rows where at least one cell in the row was updated. - # Corresponds to the JSON property `totalUpdatedRows` - # @return [Fixnum] - attr_accessor :total_updated_rows - - # One UpdateValuesResponse per requested range, in the same order as - # the requests appeared. - # Corresponds to the JSON property `responses` - # @return [Array] - attr_accessor :responses - # The total number of sheets where at least one cell in the sheet was # updated. # Corresponds to the JSON property `totalUpdatedSheets` @@ -1181,18 +190,29 @@ module Google # @return [String] attr_accessor :spreadsheet_id + # The total number of rows where at least one cell in the row was updated. + # Corresponds to the JSON property `totalUpdatedRows` + # @return [Fixnum] + attr_accessor :total_updated_rows + + # One UpdateValuesResponse per requested range, in the same order as + # the requests appeared. + # Corresponds to the JSON property `responses` + # @return [Array] + attr_accessor :responses + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @total_updated_rows = args[:total_updated_rows] if args.key?(:total_updated_rows) - @responses = args[:responses] if args.key?(:responses) @total_updated_sheets = args[:total_updated_sheets] if args.key?(:total_updated_sheets) @total_updated_cells = args[:total_updated_cells] if args.key?(:total_updated_cells) @total_updated_columns = args[:total_updated_columns] if args.key?(:total_updated_columns) @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) + @total_updated_rows = args[:total_updated_rows] if args.key?(:total_updated_rows) + @responses = args[:responses] if args.key?(:responses) end end @@ -1247,11 +267,6 @@ module Google class MergeCellsRequest include Google::Apis::Core::Hashable - # How the cells should be merged. - # Corresponds to the JSON property `mergeType` - # @return [String] - attr_accessor :merge_type - # A range on a sheet. # All indexes are zero-based. # Indexes are half open, e.g the start index is inclusive @@ -1278,14 +293,19 @@ module Google # @return [Google::Apis::SheetsV4::GridRange] attr_accessor :range + # How the cells should be merged. + # Corresponds to the JSON property `mergeType` + # @return [String] + attr_accessor :merge_type + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @merge_type = args[:merge_type] if args.key?(:merge_type) @range = args[:range] if args.key?(:range) + @merge_type = args[:merge_type] if args.key?(:merge_type) end end @@ -1365,17 +385,30 @@ module Google end end + # Clears the basic filter, if any exists on the sheet. + class ClearBasicFilterRequest + include Google::Apis::Core::Hashable + + # The sheet ID on which the basic filter should be cleared. + # Corresponds to the JSON property `sheetId` + # @return [Fixnum] + attr_accessor :sheet_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @sheet_id = args[:sheet_id] if args.key?(:sheet_id) + end + end + # Splits a column of text into multiple columns, # based on a delimiter in each cell. class TextToColumnsRequest include Google::Apis::Core::Hashable - # The delimiter to use. Used only if delimiterType is - # CUSTOM. - # Corresponds to the JSON property `delimiter` - # @return [String] - attr_accessor :delimiter - # A range on a sheet. # All indexes are zero-based. # Indexes are half open, e.g the start index is inclusive @@ -1407,26 +440,32 @@ module Google # @return [String] attr_accessor :delimiter_type + # The delimiter to use. Used only if delimiterType is + # CUSTOM. + # Corresponds to the JSON property `delimiter` + # @return [String] + attr_accessor :delimiter + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @delimiter = args[:delimiter] if args.key?(:delimiter) @source = args[:source] if args.key?(:source) @delimiter_type = args[:delimiter_type] if args.key?(:delimiter_type) + @delimiter = args[:delimiter] if args.key?(:delimiter) end end - # Clears the basic filter, if any exists on the sheet. - class ClearBasicFilterRequest + # Removes the banded range with the given ID from the spreadsheet. + class DeleteBandingRequest include Google::Apis::Core::Hashable - # The sheet ID on which the basic filter should be cleared. - # Corresponds to the JSON property `sheetId` + # The ID of the banded range to delete. + # Corresponds to the JSON property `bandedRangeId` # @return [Fixnum] - attr_accessor :sheet_id + attr_accessor :banded_range_id def initialize(**args) update!(**args) @@ -1434,7 +473,7 @@ module Google # Update properties of this object def update!(**args) - @sheet_id = args[:sheet_id] if args.key?(:sheet_id) + @banded_range_id = args[:banded_range_id] if args.key?(:banded_range_id) end end @@ -1470,29 +509,17 @@ module Google end end - # Removes the banded range with the given ID from the spreadsheet. - class DeleteBandingRequest - include Google::Apis::Core::Hashable - - # The ID of the banded range to delete. - # Corresponds to the JSON property `bandedRangeId` - # @return [Fixnum] - attr_accessor :banded_range_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @banded_range_id = args[:banded_range_id] if args.key?(:banded_range_id) - end - end - # The response when updating a range of values in a spreadsheet. class AppendValuesResponse include Google::Apis::Core::Hashable + # The range (in A1 notation) of the table that values are being appended to + # (before the values were appended). + # Empty if no table was found. + # Corresponds to the JSON property `tableRange` + # @return [String] + attr_accessor :table_range + # The spreadsheet the updates were applied to. # Corresponds to the JSON property `spreadsheetId` # @return [String] @@ -1503,12 +530,26 @@ module Google # @return [Google::Apis::SheetsV4::UpdateValuesResponse] attr_accessor :updates - # The range (in A1 notation) of the table that values are being appended to - # (before the values were appended). - # Empty if no table was found. - # Corresponds to the JSON property `tableRange` - # @return [String] - attr_accessor :table_range + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @table_range = args[:table_range] if args.key?(:table_range) + @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) + @updates = args[:updates] if args.key?(:updates) + end + end + + # Adds a filter view. + class AddFilterViewRequest + include Google::Apis::Core::Hashable + + # A filter view. + # Corresponds to the JSON property `filter` + # @return [Google::Apis::SheetsV4::FilterView] + attr_accessor :filter def initialize(**args) update!(**args) @@ -1516,9 +557,26 @@ module Google # Update properties of this object def update!(**args) - @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) - @updates = args[:updates] if args.key?(:updates) - @table_range = args[:table_range] if args.key?(:table_range) + @filter = args[:filter] if args.key?(:filter) + end + end + + # Criteria for showing/hiding rows in a pivot table. + class PivotFilterCriteria + include Google::Apis::Core::Hashable + + # Values that should be included. Values not listed here are excluded. + # Corresponds to the JSON property `visibleValues` + # @return [Array] + attr_accessor :visible_values + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @visible_values = args[:visible_values] if args.key?(:visible_values) end end @@ -1561,44 +619,6 @@ module Google end end - # Criteria for showing/hiding rows in a pivot table. - class PivotFilterCriteria - include Google::Apis::Core::Hashable - - # Values that should be included. Values not listed here are excluded. - # Corresponds to the JSON property `visibleValues` - # @return [Array] - attr_accessor :visible_values - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @visible_values = args[:visible_values] if args.key?(:visible_values) - end - end - - # Adds a filter view. - class AddFilterViewRequest - include Google::Apis::Core::Hashable - - # A filter view. - # Corresponds to the JSON property `filter` - # @return [Google::Apis::SheetsV4::FilterView] - attr_accessor :filter - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @filter = args[:filter] if args.key?(:filter) - end - end - # Adds a new conditional format rule at the given index. # All subsequent rules' indexes are incremented. class AddConditionalFormatRuleRequest @@ -1629,6 +649,16 @@ module Google class ChartSpec include Google::Apis::Core::Hashable + # The title of the chart. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + # A pie chart. + # Corresponds to the JSON property `pieChart` + # @return [Google::Apis::SheetsV4::PieChartSpec] + attr_accessor :pie_chart + # The specification for a basic chart. See BasicChartType for the list # of charts this supports. # Corresponds to the JSON property `basicChart` @@ -1640,26 +670,16 @@ module Google # @return [String] attr_accessor :hidden_dimension_strategy - # The title of the chart. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # A pie chart. - # Corresponds to the JSON property `pieChart` - # @return [Google::Apis::SheetsV4::PieChartSpec] - attr_accessor :pie_chart - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @basic_chart = args[:basic_chart] if args.key?(:basic_chart) - @hidden_dimension_strategy = args[:hidden_dimension_strategy] if args.key?(:hidden_dimension_strategy) @title = args[:title] if args.key?(:title) @pie_chart = args[:pie_chart] if args.key?(:pie_chart) + @basic_chart = args[:basic_chart] if args.key?(:basic_chart) + @hidden_dimension_strategy = args[:hidden_dimension_strategy] if args.key?(:hidden_dimension_strategy) end end @@ -1905,11 +925,6 @@ module Google class SourceAndDestination include Google::Apis::Core::Hashable - # The dimension that data should be filled into. - # Corresponds to the JSON property `dimension` - # @return [String] - attr_accessor :dimension - # The number of rows or columns that data should be filled into. # Positive numbers expand beyond the last row or last column # of the source. Negative numbers expand before the first row @@ -1944,15 +959,20 @@ module Google # @return [Google::Apis::SheetsV4::GridRange] attr_accessor :source + # The dimension that data should be filled into. + # Corresponds to the JSON property `dimension` + # @return [String] + attr_accessor :dimension + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @dimension = args[:dimension] if args.key?(:dimension) @fill_length = args[:fill_length] if args.key?(:fill_length) @source = args[:source] if args.key?(:source) + @dimension = args[:dimension] if args.key?(:dimension) end end @@ -1960,18 +980,6 @@ module Google class FilterView include Google::Apis::Core::Hashable - # The named range this filter view is backed by, if any. - # When writing, only one of range or named_range_id - # may be set. - # Corresponds to the JSON property `namedRangeId` - # @return [String] - attr_accessor :named_range_id - - # The ID of the filter view. - # Corresponds to the JSON property `filterViewId` - # @return [Fixnum] - attr_accessor :filter_view_id - # The criteria for showing/hiding values per column. # The map's key is the column index, and the value is the criteria for # that column. @@ -2016,18 +1024,30 @@ module Google # @return [Array] attr_accessor :sort_specs + # The named range this filter view is backed by, if any. + # When writing, only one of range or named_range_id + # may be set. + # Corresponds to the JSON property `namedRangeId` + # @return [String] + attr_accessor :named_range_id + + # The ID of the filter view. + # Corresponds to the JSON property `filterViewId` + # @return [Fixnum] + attr_accessor :filter_view_id + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @named_range_id = args[:named_range_id] if args.key?(:named_range_id) - @filter_view_id = args[:filter_view_id] if args.key?(:filter_view_id) @criteria = args[:criteria] if args.key?(:criteria) @title = args[:title] if args.key?(:title) @range = args[:range] if args.key?(:range) @sort_specs = args[:sort_specs] if args.key?(:sort_specs) + @named_range_id = args[:named_range_id] if args.key?(:named_range_id) + @filter_view_id = args[:filter_view_id] if args.key?(:filter_view_id) end end @@ -2045,6 +1065,109 @@ module Google class BandingProperties include Google::Apis::Core::Hashable + # Represents a color in the RGBA color space. This representation is designed + # for simplicity of conversion to/from color representations in various + # languages over compactness; for example, the fields of this representation + # can be trivially provided to the constructor of "java.awt.Color" in Java; it + # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" + # method in iOS; and, with just a little work, it can be easily formatted into + # a CSS "rgba()" string in JavaScript, as well. Here are some examples: + # Example (Java): + # import com.google.type.Color; + # // ... + # public static java.awt.Color fromProto(Color protocolor) ` + # float alpha = protocolor.hasAlpha() + # ? protocolor.getAlpha().getValue() + # : 1.0; + # return new java.awt.Color( + # protocolor.getRed(), + # protocolor.getGreen(), + # protocolor.getBlue(), + # alpha); + # ` + # public static Color toProto(java.awt.Color color) ` + # float red = (float) color.getRed(); + # float green = (float) color.getGreen(); + # float blue = (float) color.getBlue(); + # float denominator = 255.0; + # Color.Builder resultBuilder = + # Color + # .newBuilder() + # .setRed(red / denominator) + # .setGreen(green / denominator) + # .setBlue(blue / denominator); + # int alpha = color.getAlpha(); + # if (alpha != 255) ` + # result.setAlpha( + # FloatValue + # .newBuilder() + # .setValue(((float) alpha) / denominator) + # .build()); + # ` + # return resultBuilder.build(); + # ` + # // ... + # Example (iOS / Obj-C): + # // ... + # static UIColor* fromProto(Color* protocolor) ` + # float red = [protocolor red]; + # float green = [protocolor green]; + # float blue = [protocolor blue]; + # FloatValue* alpha_wrapper = [protocolor alpha]; + # float alpha = 1.0; + # if (alpha_wrapper != nil) ` + # alpha = [alpha_wrapper value]; + # ` + # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; + # ` + # static Color* toProto(UIColor* color) ` + # CGFloat red, green, blue, alpha; + # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` + # return nil; + # ` + # Color* result = [Color alloc] init]; + # [result setRed:red]; + # [result setGreen:green]; + # [result setBlue:blue]; + # if (alpha <= 0.9999) ` + # [result setAlpha:floatWrapperWithValue(alpha)]; + # ` + # [result autorelease]; + # return result; + # ` + # // ... + # Example (JavaScript): + # // ... + # var protoToCssColor = function(rgb_color) ` + # var redFrac = rgb_color.red || 0.0; + # var greenFrac = rgb_color.green || 0.0; + # var blueFrac = rgb_color.blue || 0.0; + # var red = Math.floor(redFrac * 255); + # var green = Math.floor(greenFrac * 255); + # var blue = Math.floor(blueFrac * 255); + # if (!('alpha' in rgb_color)) ` + # return rgbToCssColor_(red, green, blue); + # ` + # var alphaFrac = rgb_color.alpha.value || 0.0; + # var rgbParams = [red, green, blue].join(','); + # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); + # `; + # var rgbToCssColor_ = function(red, green, blue) ` + # var rgbNumber = new Number((red << 16) | (green << 8) | blue); + # var hexString = rgbNumber.toString(16); + # var missingZeros = 6 - hexString.length; + # var resultBuilder = ['#']; + # for (var i = 0; i < missingZeros; i++) ` + # resultBuilder.push('0'); + # ` + # resultBuilder.push(hexString); + # return resultBuilder.join(''); + # `; + # // ... + # Corresponds to the JSON property `firstBandColor` + # @return [Google::Apis::SheetsV4::Color] + attr_accessor :first_band_color + # Represents a color in the RGBA color space. This representation is designed # for simplicity of conversion to/from color representations in various # languages over compactness; for example, the fields of this representation @@ -2354,138 +1477,16 @@ module Google # @return [Google::Apis::SheetsV4::Color] attr_accessor :header_color - # Represents a color in the RGBA color space. This representation is designed - # for simplicity of conversion to/from color representations in various - # languages over compactness; for example, the fields of this representation - # can be trivially provided to the constructor of "java.awt.Color" in Java; it - # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" - # method in iOS; and, with just a little work, it can be easily formatted into - # a CSS "rgba()" string in JavaScript, as well. Here are some examples: - # Example (Java): - # import com.google.type.Color; - # // ... - # public static java.awt.Color fromProto(Color protocolor) ` - # float alpha = protocolor.hasAlpha() - # ? protocolor.getAlpha().getValue() - # : 1.0; - # return new java.awt.Color( - # protocolor.getRed(), - # protocolor.getGreen(), - # protocolor.getBlue(), - # alpha); - # ` - # public static Color toProto(java.awt.Color color) ` - # float red = (float) color.getRed(); - # float green = (float) color.getGreen(); - # float blue = (float) color.getBlue(); - # float denominator = 255.0; - # Color.Builder resultBuilder = - # Color - # .newBuilder() - # .setRed(red / denominator) - # .setGreen(green / denominator) - # .setBlue(blue / denominator); - # int alpha = color.getAlpha(); - # if (alpha != 255) ` - # result.setAlpha( - # FloatValue - # .newBuilder() - # .setValue(((float) alpha) / denominator) - # .build()); - # ` - # return resultBuilder.build(); - # ` - # // ... - # Example (iOS / Obj-C): - # // ... - # static UIColor* fromProto(Color* protocolor) ` - # float red = [protocolor red]; - # float green = [protocolor green]; - # float blue = [protocolor blue]; - # FloatValue* alpha_wrapper = [protocolor alpha]; - # float alpha = 1.0; - # if (alpha_wrapper != nil) ` - # alpha = [alpha_wrapper value]; - # ` - # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; - # ` - # static Color* toProto(UIColor* color) ` - # CGFloat red, green, blue, alpha; - # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` - # return nil; - # ` - # Color* result = [Color alloc] init]; - # [result setRed:red]; - # [result setGreen:green]; - # [result setBlue:blue]; - # if (alpha <= 0.9999) ` - # [result setAlpha:floatWrapperWithValue(alpha)]; - # ` - # [result autorelease]; - # return result; - # ` - # // ... - # Example (JavaScript): - # // ... - # var protoToCssColor = function(rgb_color) ` - # var redFrac = rgb_color.red || 0.0; - # var greenFrac = rgb_color.green || 0.0; - # var blueFrac = rgb_color.blue || 0.0; - # var red = Math.floor(redFrac * 255); - # var green = Math.floor(greenFrac * 255); - # var blue = Math.floor(blueFrac * 255); - # if (!('alpha' in rgb_color)) ` - # return rgbToCssColor_(red, green, blue); - # ` - # var alphaFrac = rgb_color.alpha.value || 0.0; - # var rgbParams = [red, green, blue].join(','); - # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); - # `; - # var rgbToCssColor_ = function(red, green, blue) ` - # var rgbNumber = new Number((red << 16) | (green << 8) | blue); - # var hexString = rgbNumber.toString(16); - # var missingZeros = 6 - hexString.length; - # var resultBuilder = ['#']; - # for (var i = 0; i < missingZeros; i++) ` - # resultBuilder.push('0'); - # ` - # resultBuilder.push(hexString); - # return resultBuilder.join(''); - # `; - # // ... - # Corresponds to the JSON property `firstBandColor` - # @return [Google::Apis::SheetsV4::Color] - attr_accessor :first_band_color - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @first_band_color = args[:first_band_color] if args.key?(:first_band_color) @second_band_color = args[:second_band_color] if args.key?(:second_band_color) @footer_color = args[:footer_color] if args.key?(:footer_color) @header_color = args[:header_color] if args.key?(:header_color) - @first_band_color = args[:first_band_color] if args.key?(:first_band_color) - end - end - - # The result of adding a new protected range. - class AddProtectedRangeResponse - include Google::Apis::Core::Hashable - - # A protected range. - # Corresponds to the JSON property `protectedRange` - # @return [Google::Apis::SheetsV4::ProtectedRange] - attr_accessor :protected_range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @protected_range = args[:protected_range] if args.key?(:protected_range) end end @@ -2544,20 +1545,29 @@ module Google end end + # The result of adding a new protected range. + class AddProtectedRangeResponse + include Google::Apis::Core::Hashable + + # A protected range. + # Corresponds to the JSON property `protectedRange` + # @return [Google::Apis::SheetsV4::ProtectedRange] + attr_accessor :protected_range + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @protected_range = args[:protected_range] if args.key?(:protected_range) + end + end + # The response when updating a range of values in a spreadsheet. class UpdateValuesResponse include Google::Apis::Core::Hashable - # The number of rows where at least one cell in the row was updated. - # Corresponds to the JSON property `updatedRows` - # @return [Fixnum] - attr_accessor :updated_rows - - # Data within a range of the spreadsheet. - # Corresponds to the JSON property `updatedData` - # @return [Google::Apis::SheetsV4::ValueRange] - attr_accessor :updated_data - # The number of columns where at least one cell in the column was updated. # Corresponds to the JSON property `updatedColumns` # @return [Fixnum] @@ -2578,18 +1588,54 @@ module Google # @return [Fixnum] attr_accessor :updated_cells + # The number of rows where at least one cell in the row was updated. + # Corresponds to the JSON property `updatedRows` + # @return [Fixnum] + attr_accessor :updated_rows + + # Data within a range of the spreadsheet. + # Corresponds to the JSON property `updatedData` + # @return [Google::Apis::SheetsV4::ValueRange] + attr_accessor :updated_data + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @updated_rows = args[:updated_rows] if args.key?(:updated_rows) - @updated_data = args[:updated_data] if args.key?(:updated_data) @updated_columns = args[:updated_columns] if args.key?(:updated_columns) @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) @updated_range = args[:updated_range] if args.key?(:updated_range) @updated_cells = args[:updated_cells] if args.key?(:updated_cells) + @updated_rows = args[:updated_rows] if args.key?(:updated_rows) + @updated_data = args[:updated_data] if args.key?(:updated_data) + end + end + + # An error in a cell. + class ErrorValue + include Google::Apis::Core::Hashable + + # The type of error. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # A message with more information about the error + # (in the spreadsheet's locale). + # Corresponds to the JSON property `message` + # @return [String] + attr_accessor :message + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @type = args[:type] if args.key?(:type) + @message = args[:message] if args.key?(:message) end end @@ -2640,32 +1686,6 @@ module Google end end - # An error in a cell. - class ErrorValue - include Google::Apis::Core::Hashable - - # The type of error. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # A message with more information about the error - # (in the spreadsheet's locale). - # Corresponds to the JSON property `message` - # @return [String] - attr_accessor :message - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @type = args[:type] if args.key?(:type) - @message = args[:message] if args.key?(:message) - end - end - # The request to copy a sheet across spreadsheets. class CopySheetToAnotherSpreadsheetRequest include Google::Apis::Core::Hashable @@ -2689,6 +1709,12 @@ module Google class PivotGroupSortValueBucket include Google::Apis::Core::Hashable + # The offset in the PivotTable.values list which the values in this + # grouping should be sorted by. + # Corresponds to the JSON property `valuesIndex` + # @return [Fixnum] + attr_accessor :values_index + # Determines the bucket from which values are chosen to sort. # For example, in a pivot table with one row group & two column groups, # the row group can list up to two values. The first value corresponds @@ -2701,20 +1727,14 @@ module Google # @return [Array] attr_accessor :buckets - # The offset in the PivotTable.values list which the values in this - # grouping should be sorted by. - # Corresponds to the JSON property `valuesIndex` - # @return [Fixnum] - attr_accessor :values_index - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @buckets = args[:buckets] if args.key?(:buckets) @values_index = args[:values_index] if args.key?(:values_index) + @buckets = args[:buckets] if args.key?(:buckets) end end @@ -2722,6 +1742,13 @@ module Google class EmbeddedObjectPosition include Google::Apis::Core::Hashable + # If true, the embedded object will be put on a new sheet whose ID + # is chosen for you. Used only when writing. + # Corresponds to the JSON property `newSheet` + # @return [Boolean] + attr_accessor :new_sheet + alias_method :new_sheet?, :new_sheet + # The sheet this is on. Set only if the embedded object # is on its own sheet. Must be non-negative. # Corresponds to the JSON property `sheetId` @@ -2733,22 +1760,15 @@ module Google # @return [Google::Apis::SheetsV4::OverlayPosition] attr_accessor :overlay_position - # If true, the embedded object will be put on a new sheet whose ID - # is chosen for you. Used only when writing. - # Corresponds to the JSON property `newSheet` - # @return [Boolean] - attr_accessor :new_sheet - alias_method :new_sheet?, :new_sheet - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @new_sheet = args[:new_sheet] if args.key?(:new_sheet) @sheet_id = args[:sheet_id] if args.key?(:sheet_id) @overlay_position = args[:overlay_position] if args.key?(:overlay_position) - @new_sheet = args[:new_sheet] if args.key?(:new_sheet) end end @@ -2775,6 +1795,18 @@ module Google class AutoFillRequest include Google::Apis::Core::Hashable + # True if we should generate data with the "alternate" series. + # This differs based on the type and amount of source data. + # Corresponds to the JSON property `useAlternateSeries` + # @return [Boolean] + attr_accessor :use_alternate_series + alias_method :use_alternate_series?, :use_alternate_series + + # A combination of a source range and how to extend that source. + # Corresponds to the JSON property `sourceAndDestination` + # @return [Google::Apis::SheetsV4::SourceAndDestination] + attr_accessor :source_and_destination + # A range on a sheet. # All indexes are zero-based. # Indexes are half open, e.g the start index is inclusive @@ -2801,27 +1833,15 @@ module Google # @return [Google::Apis::SheetsV4::GridRange] attr_accessor :range - # True if we should generate data with the "alternate" series. - # This differs based on the type and amount of source data. - # Corresponds to the JSON property `useAlternateSeries` - # @return [Boolean] - attr_accessor :use_alternate_series - alias_method :use_alternate_series?, :use_alternate_series - - # A combination of a source range and how to extend that source. - # Corresponds to the JSON property `sourceAndDestination` - # @return [Google::Apis::SheetsV4::SourceAndDestination] - attr_accessor :source_and_destination - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @range = args[:range] if args.key?(:range) @use_alternate_series = args[:use_alternate_series] if args.key?(:use_alternate_series) @source_and_destination = args[:source_and_destination] if args.key?(:source_and_destination) + @range = args[:range] if args.key?(:range) end end @@ -3034,6 +2054,11 @@ module Google class FindReplaceResponse include Google::Apis::Core::Hashable + # The number of non-formula cells changed. + # Corresponds to the JSON property `valuesChanged` + # @return [Fixnum] + attr_accessor :values_changed + # The number of occurrences (possibly multiple within a cell) changed. # For example, if replacing `"e"` with `"o"` in `"Google Sheets"`, this would # be `"3"` because `"Google Sheets"` -> `"Googlo Shoots"`. @@ -3056,22 +2081,17 @@ module Google # @return [Fixnum] attr_accessor :formulas_changed - # The number of non-formula cells changed. - # Corresponds to the JSON property `valuesChanged` - # @return [Fixnum] - attr_accessor :values_changed - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @values_changed = args[:values_changed] if args.key?(:values_changed) @occurrences_changed = args[:occurrences_changed] if args.key?(:occurrences_changed) @rows_changed = args[:rows_changed] if args.key?(:rows_changed) @sheets_changed = args[:sheets_changed] if args.key?(:sheets_changed) @formulas_changed = args[:formulas_changed] if args.key?(:formulas_changed) - @values_changed = args[:values_changed] if args.key?(:values_changed) end end @@ -3136,11 +2156,6 @@ module Google class UpdateConditionalFormatRuleResponse include Google::Apis::Core::Hashable - # A rule describing a conditional format. - # Corresponds to the JSON property `oldRule` - # @return [Google::Apis::SheetsV4::ConditionalFormatRule] - attr_accessor :old_rule - # The index of the new rule. # Corresponds to the JSON property `newIndex` # @return [Fixnum] @@ -3157,56 +2172,21 @@ module Google # @return [Google::Apis::SheetsV4::ConditionalFormatRule] attr_accessor :new_rule + # A rule describing a conditional format. + # Corresponds to the JSON property `oldRule` + # @return [Google::Apis::SheetsV4::ConditionalFormatRule] + attr_accessor :old_rule + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @old_rule = args[:old_rule] if args.key?(:old_rule) @new_index = args[:new_index] if args.key?(:new_index) @old_index = args[:old_index] if args.key?(:old_index) @new_rule = args[:new_rule] if args.key?(:new_rule) - end - end - - # Duplicates the contents of a sheet. - class DuplicateSheetRequest - include Google::Apis::Core::Hashable - - # The name of the new sheet. If empty, a new name is chosen for you. - # Corresponds to the JSON property `newSheetName` - # @return [String] - attr_accessor :new_sheet_name - - # The sheet to duplicate. - # Corresponds to the JSON property `sourceSheetId` - # @return [Fixnum] - attr_accessor :source_sheet_id - - # If set, the ID of the new sheet. If not set, an ID is chosen. - # If set, the ID must not conflict with any existing sheet ID. - # If set, it must be non-negative. - # Corresponds to the JSON property `newSheetId` - # @return [Fixnum] - attr_accessor :new_sheet_id - - # The zero-based index where the new sheet should be inserted. - # The index of all sheets after this are incremented. - # Corresponds to the JSON property `insertSheetIndex` - # @return [Fixnum] - attr_accessor :insert_sheet_index - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @new_sheet_name = args[:new_sheet_name] if args.key?(:new_sheet_name) - @source_sheet_id = args[:source_sheet_id] if args.key?(:source_sheet_id) - @new_sheet_id = args[:new_sheet_id] if args.key?(:new_sheet_id) - @insert_sheet_index = args[:insert_sheet_index] if args.key?(:insert_sheet_index) + @old_rule = args[:old_rule] if args.key?(:old_rule) end end @@ -3245,6 +2225,46 @@ module Google end end + # Duplicates the contents of a sheet. + class DuplicateSheetRequest + include Google::Apis::Core::Hashable + + # If set, the ID of the new sheet. If not set, an ID is chosen. + # If set, the ID must not conflict with any existing sheet ID. + # If set, it must be non-negative. + # Corresponds to the JSON property `newSheetId` + # @return [Fixnum] + attr_accessor :new_sheet_id + + # The zero-based index where the new sheet should be inserted. + # The index of all sheets after this are incremented. + # Corresponds to the JSON property `insertSheetIndex` + # @return [Fixnum] + attr_accessor :insert_sheet_index + + # The name of the new sheet. If empty, a new name is chosen for you. + # Corresponds to the JSON property `newSheetName` + # @return [String] + attr_accessor :new_sheet_name + + # The sheet to duplicate. + # Corresponds to the JSON property `sourceSheetId` + # @return [Fixnum] + attr_accessor :source_sheet_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @new_sheet_id = args[:new_sheet_id] if args.key?(:new_sheet_id) + @insert_sheet_index = args[:insert_sheet_index] if args.key?(:insert_sheet_index) + @new_sheet_name = args[:new_sheet_name] if args.key?(:new_sheet_name) + @source_sheet_id = args[:source_sheet_id] if args.key?(:source_sheet_id) + end + end + # The kinds of value that a cell in a spreadsheet can have. class ExtendedValue include Google::Apis::Core::Hashable @@ -3298,36 +2318,6 @@ module Google class BandedRange include Google::Apis::Core::Hashable - # Properties referring a single dimension (either row or column). If both - # BandedRange.row_properties and BandedRange.column_properties are - # set, the fill colors are applied to cells according to the following rules: - # * header_color and footer_color take priority over band colors. - # * first_band_color takes priority over second_band_color. - # * row_properties takes priority over column_properties. - # For example, the first row color takes priority over the first column - # color, but the first column color takes priority over the second row color. - # Similarly, the row header takes priority over the column header in the - # top left cell, but the column header takes priority over the first row - # color if the row header is not set. - # Corresponds to the JSON property `rowProperties` - # @return [Google::Apis::SheetsV4::BandingProperties] - attr_accessor :row_properties - - # Properties referring a single dimension (either row or column). If both - # BandedRange.row_properties and BandedRange.column_properties are - # set, the fill colors are applied to cells according to the following rules: - # * header_color and footer_color take priority over band colors. - # * first_band_color takes priority over second_band_color. - # * row_properties takes priority over column_properties. - # For example, the first row color takes priority over the first column - # color, but the first column color takes priority over the second row color. - # Similarly, the row header takes priority over the column header in the - # top left cell, but the column header takes priority over the first row - # color if the row header is not set. - # Corresponds to the JSON property `columnProperties` - # @return [Google::Apis::SheetsV4::BandingProperties] - attr_accessor :column_properties - # A range on a sheet. # All indexes are zero-based. # Indexes are half open, e.g the start index is inclusive @@ -3359,16 +2349,46 @@ module Google # @return [Fixnum] attr_accessor :banded_range_id + # Properties referring a single dimension (either row or column). If both + # BandedRange.row_properties and BandedRange.column_properties are + # set, the fill colors are applied to cells according to the following rules: + # * header_color and footer_color take priority over band colors. + # * first_band_color takes priority over second_band_color. + # * row_properties takes priority over column_properties. + # For example, the first row color takes priority over the first column + # color, but the first column color takes priority over the second row color. + # Similarly, the row header takes priority over the column header in the + # top left cell, but the column header takes priority over the first row + # color if the row header is not set. + # Corresponds to the JSON property `rowProperties` + # @return [Google::Apis::SheetsV4::BandingProperties] + attr_accessor :row_properties + + # Properties referring a single dimension (either row or column). If both + # BandedRange.row_properties and BandedRange.column_properties are + # set, the fill colors are applied to cells according to the following rules: + # * header_color and footer_color take priority over band colors. + # * first_band_color takes priority over second_band_color. + # * row_properties takes priority over column_properties. + # For example, the first row color takes priority over the first column + # color, but the first column color takes priority over the second row color. + # Similarly, the row header takes priority over the column header in the + # top left cell, but the column header takes priority over the first row + # color if the row header is not set. + # Corresponds to the JSON property `columnProperties` + # @return [Google::Apis::SheetsV4::BandingProperties] + attr_accessor :column_properties + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @row_properties = args[:row_properties] if args.key?(:row_properties) - @column_properties = args[:column_properties] if args.key?(:column_properties) @range = args[:range] if args.key?(:range) @banded_range_id = args[:banded_range_id] if args.key?(:banded_range_id) + @row_properties = args[:row_properties] if args.key?(:row_properties) + @column_properties = args[:column_properties] if args.key?(:column_properties) end end @@ -3404,11 +2424,6 @@ module Google class Spreadsheet include Google::Apis::Core::Hashable - # Properties of a spreadsheet. - # Corresponds to the JSON property `properties` - # @return [Google::Apis::SheetsV4::SpreadsheetProperties] - attr_accessor :properties - # The ID of the spreadsheet. # This field is read-only. # Corresponds to the JSON property `spreadsheetId` @@ -3431,17 +2446,22 @@ module Google # @return [String] attr_accessor :spreadsheet_url + # Properties of a spreadsheet. + # Corresponds to the JSON property `properties` + # @return [Google::Apis::SheetsV4::SpreadsheetProperties] + attr_accessor :properties + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @properties = args[:properties] if args.key?(:properties) @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) @sheets = args[:sheets] if args.key?(:sheets) @named_ranges = args[:named_ranges] if args.key?(:named_ranges) @spreadsheet_url = args[:spreadsheet_url] if args.key?(:spreadsheet_url) + @properties = args[:properties] if args.key?(:properties) end end @@ -3497,12 +2517,6 @@ module Google class TextFormat include Google::Apis::Core::Hashable - # True if the text is bold. - # Corresponds to the JSON property `bold` - # @return [Boolean] - attr_accessor :bold - alias_method :bold?, :bold - # Represents a color in the RGBA color space. This representation is designed # for simplicity of conversion to/from color representations in various # languages over compactness; for example, the fields of this representation @@ -3606,6 +2620,12 @@ module Google # @return [Google::Apis::SheetsV4::Color] attr_accessor :foreground_color + # True if the text is bold. + # Corresponds to the JSON property `bold` + # @return [Boolean] + attr_accessor :bold + alias_method :bold?, :bold + # The font family. # Corresponds to the JSON property `fontFamily` # @return [String] @@ -3640,8 +2660,8 @@ module Google # Update properties of this object def update!(**args) - @bold = args[:bold] if args.key?(:bold) @foreground_color = args[:foreground_color] if args.key?(:foreground_color) + @bold = args[:bold] if args.key?(:bold) @font_family = args[:font_family] if args.key?(:font_family) @italic = args[:italic] if args.key?(:italic) @strikethrough = args[:strikethrough] if args.key?(:strikethrough) @@ -3693,26 +2713,82 @@ module Google class IterativeCalculationSettings include Google::Apis::Core::Hashable - # When iterative calculation is enabled and successive results differ by - # less than this threshold value, the calculation rounds stop. - # Corresponds to the JSON property `convergenceThreshold` - # @return [Float] - attr_accessor :convergence_threshold - # When iterative calculation is enabled, the maximum number of calculation # rounds to perform. # Corresponds to the JSON property `maxIterations` # @return [Fixnum] attr_accessor :max_iterations + # When iterative calculation is enabled and successive results differ by + # less than this threshold value, the calculation rounds stop. + # Corresponds to the JSON property `convergenceThreshold` + # @return [Float] + attr_accessor :convergence_threshold + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @convergence_threshold = args[:convergence_threshold] if args.key?(:convergence_threshold) @max_iterations = args[:max_iterations] if args.key?(:max_iterations) + @convergence_threshold = args[:convergence_threshold] if args.key?(:convergence_threshold) + end + end + + # Properties of a spreadsheet. + class SpreadsheetProperties + include Google::Apis::Core::Hashable + + # The format of a cell. + # Corresponds to the JSON property `defaultFormat` + # @return [Google::Apis::SheetsV4::CellFormat] + attr_accessor :default_format + + # The amount of time to wait before volatile functions are recalculated. + # Corresponds to the JSON property `autoRecalc` + # @return [String] + attr_accessor :auto_recalc + + # The title of the spreadsheet. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + # The time zone of the spreadsheet, in CLDR format such as + # `America/New_York`. If the time zone isn't recognized, this may + # be a custom time zone such as `GMT-07:00`. + # Corresponds to the JSON property `timeZone` + # @return [String] + attr_accessor :time_zone + + # The locale of the spreadsheet in one of the following formats: + # * an ISO 639-1 language code such as `en` + # * an ISO 639-2 language code such as `fil`, if no 639-1 code exists + # * a combination of the ISO language code and country code, such as `en_US` + # Note: when updating this field, not all locales/languages are supported. + # Corresponds to the JSON property `locale` + # @return [String] + attr_accessor :locale + + # Settings to control how circular dependencies are resolved with iterative + # calculation. + # Corresponds to the JSON property `iterativeCalculationSettings` + # @return [Google::Apis::SheetsV4::IterativeCalculationSettings] + attr_accessor :iterative_calculation_settings + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @default_format = args[:default_format] if args.key?(:default_format) + @auto_recalc = args[:auto_recalc] if args.key?(:auto_recalc) + @title = args[:title] if args.key?(:title) + @time_zone = args[:time_zone] if args.key?(:time_zone) + @locale = args[:locale] if args.key?(:locale) + @iterative_calculation_settings = args[:iterative_calculation_settings] if args.key?(:iterative_calculation_settings) end end @@ -3762,62 +2838,6 @@ module Google end end - # Properties of a spreadsheet. - class SpreadsheetProperties - include Google::Apis::Core::Hashable - - # Settings to control how circular dependencies are resolved with iterative - # calculation. - # Corresponds to the JSON property `iterativeCalculationSettings` - # @return [Google::Apis::SheetsV4::IterativeCalculationSettings] - attr_accessor :iterative_calculation_settings - - # The amount of time to wait before volatile functions are recalculated. - # Corresponds to the JSON property `autoRecalc` - # @return [String] - attr_accessor :auto_recalc - - # The format of a cell. - # Corresponds to the JSON property `defaultFormat` - # @return [Google::Apis::SheetsV4::CellFormat] - attr_accessor :default_format - - # The title of the spreadsheet. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # The time zone of the spreadsheet, in CLDR format such as - # `America/New_York`. If the time zone isn't recognized, this may - # be a custom time zone such as `GMT-07:00`. - # Corresponds to the JSON property `timeZone` - # @return [String] - attr_accessor :time_zone - - # The locale of the spreadsheet in one of the following formats: - # * an ISO 639-1 language code such as `en` - # * an ISO 639-2 language code such as `fil`, if no 639-1 code exists - # * a combination of the ISO language code and country code, such as `en_US` - # Note: when updating this field, not all locales/languages are supported. - # Corresponds to the JSON property `locale` - # @return [String] - attr_accessor :locale - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @iterative_calculation_settings = args[:iterative_calculation_settings] if args.key?(:iterative_calculation_settings) - @auto_recalc = args[:auto_recalc] if args.key?(:auto_recalc) - @default_format = args[:default_format] if args.key?(:default_format) - @title = args[:title] if args.key?(:title) - @time_zone = args[:time_zone] if args.key?(:time_zone) - @locale = args[:locale] if args.key?(:locale) - end - end - # Updates all cells in the range to the values in the given Cell object. # Only the fields listed in the fields field are updated; others are # unchanged. @@ -3945,11 +2965,6 @@ module Google class UpdateSpreadsheetPropertiesRequest include Google::Apis::Core::Hashable - # Properties of a spreadsheet. - # Corresponds to the JSON property `properties` - # @return [Google::Apis::SheetsV4::SpreadsheetProperties] - attr_accessor :properties - # The fields that should be updated. At least one field must be specified. # The root 'properties' is implied and should not be specified. # A single `"*"` can be used as short-hand for listing every field. @@ -3957,14 +2972,19 @@ module Google # @return [String] attr_accessor :fields + # Properties of a spreadsheet. + # Corresponds to the JSON property `properties` + # @return [Google::Apis::SheetsV4::SpreadsheetProperties] + attr_accessor :properties + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @properties = args[:properties] if args.key?(:properties) @fields = args[:fields] if args.key?(:fields) + @properties = args[:properties] if args.key?(:properties) end end @@ -4003,7 +3023,8 @@ module Google # Determines how dates, times, and durations in the response should be # rendered. This is ignored if response_value_render_option is # FORMATTED_VALUE. - # The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER]. + # The default dateTime render option is + # DateTimeRenderOption.SERIAL_NUMBER. # Corresponds to the JSON property `responseDateTimeRenderOption` # @return [String] attr_accessor :response_date_time_render_option @@ -4026,6 +3047,14 @@ module Google class ProtectedRange include Google::Apis::Core::Hashable + # True if the user who requested this protected range can edit the + # protected area. + # This field is read-only. + # Corresponds to the JSON property `requestingUserCanEdit` + # @return [Boolean] + attr_accessor :requesting_user_can_edit + alias_method :requesting_user_can_edit?, :requesting_user_can_edit + # A range on a sheet. # All indexes are zero-based. # Indexes are half open, e.g the start index is inclusive @@ -4094,20 +3123,13 @@ module Google attr_accessor :warning_only alias_method :warning_only?, :warning_only - # True if the user who requested this protected range can edit the - # protected area. - # This field is read-only. - # Corresponds to the JSON property `requestingUserCanEdit` - # @return [Boolean] - attr_accessor :requesting_user_can_edit - alias_method :requesting_user_can_edit?, :requesting_user_can_edit - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @requesting_user_can_edit = args[:requesting_user_can_edit] if args.key?(:requesting_user_can_edit) @range = args[:range] if args.key?(:range) @editors = args[:editors] if args.key?(:editors) @description = args[:description] if args.key?(:description) @@ -4115,7 +3137,6 @@ module Google @named_range_id = args[:named_range_id] if args.key?(:named_range_id) @protected_range_id = args[:protected_range_id] if args.key?(:protected_range_id) @warning_only = args[:warning_only] if args.key?(:warning_only) - @requesting_user_can_edit = args[:requesting_user_can_edit] if args.key?(:requesting_user_can_edit) end end @@ -4123,11 +3144,6 @@ module Google class DimensionProperties include Google::Apis::Core::Hashable - # The height (if a row) or width (if a column) of the dimension in pixels. - # Corresponds to the JSON property `pixelSize` - # @return [Fixnum] - attr_accessor :pixel_size - # True if this dimension is being filtered. # This field is read-only. # Corresponds to the JSON property `hiddenByFilter` @@ -4141,15 +3157,20 @@ module Google attr_accessor :hidden_by_user alias_method :hidden_by_user?, :hidden_by_user + # The height (if a row) or width (if a column) of the dimension in pixels. + # Corresponds to the JSON property `pixelSize` + # @return [Fixnum] + attr_accessor :pixel_size + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @pixel_size = args[:pixel_size] if args.key?(:pixel_size) @hidden_by_filter = args[:hidden_by_filter] if args.key?(:hidden_by_filter) @hidden_by_user = args[:hidden_by_user] if args.key?(:hidden_by_user) + @pixel_size = args[:pixel_size] if args.key?(:pixel_size) end end @@ -4198,6 +3219,11 @@ module Google class NamedRange include Google::Apis::Core::Hashable + # The name of the named range. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + # The ID of the named range. # Corresponds to the JSON property `namedRangeId` # @return [String] @@ -4229,20 +3255,15 @@ module Google # @return [Google::Apis::SheetsV4::GridRange] attr_accessor :range - # The name of the named range. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @name = args[:name] if args.key?(:name) @named_range_id = args[:named_range_id] if args.key?(:named_range_id) @range = args[:range] if args.key?(:range) - @name = args[:name] if args.key?(:name) end end @@ -4300,43 +3321,6 @@ module Google end end - # The borders of the cell. - class Borders - include Google::Apis::Core::Hashable - - # A border along a cell. - # Corresponds to the JSON property `left` - # @return [Google::Apis::SheetsV4::Border] - attr_accessor :left - - # A border along a cell. - # Corresponds to the JSON property `right` - # @return [Google::Apis::SheetsV4::Border] - attr_accessor :right - - # A border along a cell. - # Corresponds to the JSON property `bottom` - # @return [Google::Apis::SheetsV4::Border] - attr_accessor :bottom - - # A border along a cell. - # Corresponds to the JSON property `top` - # @return [Google::Apis::SheetsV4::Border] - attr_accessor :top - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @left = args[:left] if args.key?(:left) - @right = args[:right] if args.key?(:right) - @bottom = args[:bottom] if args.key?(:bottom) - @top = args[:top] if args.key?(:top) - end - end - # A single series of data in a chart. # For example, if charting stock prices over time, multiple series may exist, # one for the "Open Price", "High Price", "Low Price" and "Close Price". @@ -4381,6 +3365,43 @@ module Google end end + # The borders of the cell. + class Borders + include Google::Apis::Core::Hashable + + # A border along a cell. + # Corresponds to the JSON property `right` + # @return [Google::Apis::SheetsV4::Border] + attr_accessor :right + + # A border along a cell. + # Corresponds to the JSON property `bottom` + # @return [Google::Apis::SheetsV4::Border] + attr_accessor :bottom + + # A border along a cell. + # Corresponds to the JSON property `top` + # @return [Google::Apis::SheetsV4::Border] + attr_accessor :top + + # A border along a cell. + # Corresponds to the JSON property `left` + # @return [Google::Apis::SheetsV4::Border] + attr_accessor :left + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @right = args[:right] if args.key?(:right) + @bottom = args[:bottom] if args.key?(:bottom) + @top = args[:top] if args.key?(:top) + @left = args[:left] if args.key?(:left) + end + end + # Automatically resizes one or more dimensions based on the contents # of the cells in that dimension. class AutoResizeDimensionsRequest @@ -4493,31 +3514,6 @@ module Google class CellFormat include Google::Apis::Core::Hashable - # The wrap strategy for the value in the cell. - # Corresponds to the JSON property `wrapStrategy` - # @return [String] - attr_accessor :wrap_strategy - - # The rotation applied to text in a cell. - # Corresponds to the JSON property `textRotation` - # @return [Google::Apis::SheetsV4::TextRotation] - attr_accessor :text_rotation - - # The number format of a cell. - # Corresponds to the JSON property `numberFormat` - # @return [Google::Apis::SheetsV4::NumberFormat] - attr_accessor :number_format - - # How a hyperlink, if it exists, should be displayed in the cell. - # Corresponds to the JSON property `hyperlinkDisplayType` - # @return [String] - attr_accessor :hyperlink_display_type - - # The horizontal alignment of the value in the cell. - # Corresponds to the JSON property `horizontalAlignment` - # @return [String] - attr_accessor :horizontal_alignment - # The format of a run of text in a cell. # Absent values indicate that the field isn't specified. # Corresponds to the JSON property `textFormat` @@ -4627,17 +3623,17 @@ module Google # @return [Google::Apis::SheetsV4::Color] attr_accessor :background_color + # The vertical alignment of the value in the cell. + # Corresponds to the JSON property `verticalAlignment` + # @return [String] + attr_accessor :vertical_alignment + # The amount of padding around the cell, in pixels. # When updating padding, every field must be specified. # Corresponds to the JSON property `padding` # @return [Google::Apis::SheetsV4::Padding] attr_accessor :padding - # The vertical alignment of the value in the cell. - # Corresponds to the JSON property `verticalAlignment` - # @return [String] - attr_accessor :vertical_alignment - # The borders of the cell. # Corresponds to the JSON property `borders` # @return [Google::Apis::SheetsV4::Borders] @@ -4648,23 +3644,48 @@ module Google # @return [String] attr_accessor :text_direction + # The rotation applied to text in a cell. + # Corresponds to the JSON property `textRotation` + # @return [Google::Apis::SheetsV4::TextRotation] + attr_accessor :text_rotation + + # The wrap strategy for the value in the cell. + # Corresponds to the JSON property `wrapStrategy` + # @return [String] + attr_accessor :wrap_strategy + + # The number format of a cell. + # Corresponds to the JSON property `numberFormat` + # @return [Google::Apis::SheetsV4::NumberFormat] + attr_accessor :number_format + + # The horizontal alignment of the value in the cell. + # Corresponds to the JSON property `horizontalAlignment` + # @return [String] + attr_accessor :horizontal_alignment + + # How a hyperlink, if it exists, should be displayed in the cell. + # Corresponds to the JSON property `hyperlinkDisplayType` + # @return [String] + attr_accessor :hyperlink_display_type + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @wrap_strategy = args[:wrap_strategy] if args.key?(:wrap_strategy) - @text_rotation = args[:text_rotation] if args.key?(:text_rotation) - @number_format = args[:number_format] if args.key?(:number_format) - @hyperlink_display_type = args[:hyperlink_display_type] if args.key?(:hyperlink_display_type) - @horizontal_alignment = args[:horizontal_alignment] if args.key?(:horizontal_alignment) @text_format = args[:text_format] if args.key?(:text_format) @background_color = args[:background_color] if args.key?(:background_color) - @padding = args[:padding] if args.key?(:padding) @vertical_alignment = args[:vertical_alignment] if args.key?(:vertical_alignment) + @padding = args[:padding] if args.key?(:padding) @borders = args[:borders] if args.key?(:borders) @text_direction = args[:text_direction] if args.key?(:text_direction) + @text_rotation = args[:text_rotation] if args.key?(:text_rotation) + @wrap_strategy = args[:wrap_strategy] if args.key?(:wrap_strategy) + @number_format = args[:number_format] if args.key?(:number_format) + @horizontal_alignment = args[:horizontal_alignment] if args.key?(:horizontal_alignment) + @hyperlink_display_type = args[:hyperlink_display_type] if args.key?(:hyperlink_display_type) end end @@ -4672,6 +3693,11 @@ module Google class ClearValuesResponse include Google::Apis::Core::Hashable + # The spreadsheet the updates were applied to. + # Corresponds to the JSON property `spreadsheetId` + # @return [String] + attr_accessor :spreadsheet_id + # The range (in A1 notation) that was cleared. # (If the request was for an unbounded range or a ranger larger # than the bounds of the sheet, this will be the actual range @@ -4680,19 +3706,14 @@ module Google # @return [String] attr_accessor :cleared_range - # The spreadsheet the updates were applied to. - # Corresponds to the JSON property `spreadsheetId` - # @return [String] - attr_accessor :spreadsheet_id - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @cleared_range = args[:cleared_range] if args.key?(:cleared_range) @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) + @cleared_range = args[:cleared_range] if args.key?(:cleared_range) end end @@ -4722,25 +3743,6 @@ module Google end end - # Removes the named range with the given ID from the spreadsheet. - class DeleteNamedRangeRequest - include Google::Apis::Core::Hashable - - # The ID of the named range to delete. - # Corresponds to the JSON property `namedRangeId` - # @return [String] - attr_accessor :named_range_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @named_range_id = args[:named_range_id] if args.key?(:named_range_id) - end - end - # The result of adding a banded range. class AddBandingResponse include Google::Apis::Core::Hashable @@ -4760,6 +3762,25 @@ module Google end end + # Removes the named range with the given ID from the spreadsheet. + class DeleteNamedRangeRequest + include Google::Apis::Core::Hashable + + # The ID of the named range to delete. + # Corresponds to the JSON property `namedRangeId` + # @return [String] + attr_accessor :named_range_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @named_range_id = args[:named_range_id] if args.key?(:named_range_id) + end + end + # The data included in a domain or series. class ChartData include Google::Apis::Core::Hashable @@ -4783,25 +3804,25 @@ module Google class BatchGetValuesResponse include Google::Apis::Core::Hashable - # The ID of the spreadsheet the data was retrieved from. - # Corresponds to the JSON property `spreadsheetId` - # @return [String] - attr_accessor :spreadsheet_id - # The requested values. The order of the ValueRanges is the same as the # order of the requested ranges. # Corresponds to the JSON property `valueRanges` # @return [Array] attr_accessor :value_ranges + # The ID of the spreadsheet the data was retrieved from. + # Corresponds to the JSON property `spreadsheetId` + # @return [String] + attr_accessor :spreadsheet_id + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) @value_ranges = args[:value_ranges] if args.key?(:value_ranges) + @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) end end @@ -4934,11 +3955,6 @@ module Google class Color include Google::Apis::Core::Hashable - # The amount of red in the color as a value in the interval [0, 1]. - # Corresponds to the JSON property `red` - # @return [Float] - attr_accessor :red - # The amount of green in the color as a value in the interval [0, 1]. # Corresponds to the JSON property `green` # @return [Float] @@ -4962,16 +3978,21 @@ module Google # @return [Float] attr_accessor :alpha + # The amount of red in the color as a value in the interval [0, 1]. + # Corresponds to the JSON property `red` + # @return [Float] + attr_accessor :red + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @red = args[:red] if args.key?(:red) @green = args[:green] if args.key?(:green) @blue = args[:blue] if args.key?(:blue) @alpha = args[:alpha] if args.key?(:alpha) + @red = args[:red] if args.key?(:red) end end @@ -5026,10 +4047,26 @@ module Google class PivotTable include Google::Apis::Core::Hashable - # A list of values to include in the pivot table. - # Corresponds to the JSON property `values` - # @return [Array] - attr_accessor :values + # An optional mapping of filters per source column offset. + # The filters will be applied before aggregating data into the pivot table. + # The map's key is the column offset of the source range that you want to + # filter, and the value is the criteria for that column. + # For example, if the source was `C10:E15`, a key of `0` will have the filter + # for column `C`, whereas the key `1` is for column `D`. + # Corresponds to the JSON property `criteria` + # @return [Hash] + attr_accessor :criteria + + # Each row grouping in the pivot table. + # Corresponds to the JSON property `rows` + # @return [Array] + attr_accessor :rows + + # Whether values should be listed horizontally (as columns) + # or vertically (as rows). + # Corresponds to the JSON property `valueLayout` + # @return [String] + attr_accessor :value_layout # A range on a sheet. # All indexes are zero-based. @@ -5062,26 +4099,10 @@ module Google # @return [Array] attr_accessor :columns - # An optional mapping of filters per source column offset. - # The filters will be applied before aggregating data into the pivot table. - # The map's key is the column offset of the source range that you want to - # filter, and the value is the criteria for that column. - # For example, if the source was `C10:E15`, a key of `0` will have the filter - # for column `C`, whereas the key `1` is for column `D`. - # Corresponds to the JSON property `criteria` - # @return [Hash] - attr_accessor :criteria - - # Each row grouping in the pivot table. - # Corresponds to the JSON property `rows` - # @return [Array] - attr_accessor :rows - - # Whether values should be listed horizontally (as columns) - # or vertically (as rows). - # Corresponds to the JSON property `valueLayout` - # @return [String] - attr_accessor :value_layout + # A list of values to include in the pivot table. + # Corresponds to the JSON property `values` + # @return [Array] + attr_accessor :values def initialize(**args) update!(**args) @@ -5089,12 +4110,12 @@ module Google # Update properties of this object def update!(**args) - @values = args[:values] if args.key?(:values) - @source = args[:source] if args.key?(:source) - @columns = args[:columns] if args.key?(:columns) @criteria = args[:criteria] if args.key?(:criteria) @rows = args[:rows] if args.key?(:rows) @value_layout = args[:value_layout] if args.key?(:value_layout) + @source = args[:source] if args.key?(:source) + @columns = args[:columns] if args.key?(:columns) + @values = args[:values] if args.key?(:values) end end @@ -5130,41 +4151,6 @@ module Google end end - # Adds new cells after the last row with data in a sheet, - # inserting new rows into the sheet if necessary. - class AppendCellsRequest - include Google::Apis::Core::Hashable - - # The data to append. - # Corresponds to the JSON property `rows` - # @return [Array] - attr_accessor :rows - - # The fields of CellData that should be updated. - # At least one field must be specified. - # The root is the CellData; 'row.values.' should not be specified. - # A single `"*"` can be used as short-hand for listing every field. - # Corresponds to the JSON property `fields` - # @return [String] - attr_accessor :fields - - # The sheet ID to append the data to. - # Corresponds to the JSON property `sheetId` - # @return [Fixnum] - attr_accessor :sheet_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @rows = args[:rows] if args.key?(:rows) - @fields = args[:fields] if args.key?(:fields) - @sheet_id = args[:sheet_id] if args.key?(:sheet_id) - end - end - # Data within a range of the spreadsheet. class ValueRange include Google::Apis::Core::Hashable @@ -5216,6 +4202,41 @@ module Google end end + # Adds new cells after the last row with data in a sheet, + # inserting new rows into the sheet if necessary. + class AppendCellsRequest + include Google::Apis::Core::Hashable + + # The sheet ID to append the data to. + # Corresponds to the JSON property `sheetId` + # @return [Fixnum] + attr_accessor :sheet_id + + # The data to append. + # Corresponds to the JSON property `rows` + # @return [Array] + attr_accessor :rows + + # The fields of CellData that should be updated. + # At least one field must be specified. + # The root is the CellData; 'row.values.' should not be specified. + # A single `"*"` can be used as short-hand for listing every field. + # Corresponds to the JSON property `fields` + # @return [String] + attr_accessor :fields + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @sheet_id = args[:sheet_id] if args.key?(:sheet_id) + @rows = args[:rows] if args.key?(:rows) + @fields = args[:fields] if args.key?(:fields) + end + end + # Adds a new banded range to the spreadsheet. class AddBandingRequest include Google::Apis::Core::Hashable @@ -5239,11 +4260,6 @@ module Google class Response include Google::Apis::Core::Hashable - # The result of adding a sheet. - # Corresponds to the JSON property `addSheet` - # @return [Google::Apis::SheetsV4::AddSheetResponse] - attr_accessor :add_sheet - # The result of updating a conditional format rule. # Corresponds to the JSON property `updateConditionalFormatRule` # @return [Google::Apis::SheetsV4::UpdateConditionalFormatRuleResponse] @@ -5299,13 +4315,17 @@ module Google # @return [Google::Apis::SheetsV4::FindReplaceResponse] attr_accessor :find_replace + # The result of adding a sheet. + # Corresponds to the JSON property `addSheet` + # @return [Google::Apis::SheetsV4::AddSheetResponse] + attr_accessor :add_sheet + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @add_sheet = args[:add_sheet] if args.key?(:add_sheet) @update_conditional_format_rule = args[:update_conditional_format_rule] if args.key?(:update_conditional_format_rule) @add_named_range = args[:add_named_range] if args.key?(:add_named_range) @add_filter_view = args[:add_filter_view] if args.key?(:add_filter_view) @@ -5317,6 +4337,66 @@ module Google @duplicate_filter_view = args[:duplicate_filter_view] if args.key?(:duplicate_filter_view) @add_chart = args[:add_chart] if args.key?(:add_chart) @find_replace = args[:find_replace] if args.key?(:find_replace) + @add_sheet = args[:add_sheet] if args.key?(:add_sheet) + end + end + + # A chart embedded in a sheet. + class EmbeddedChart + include Google::Apis::Core::Hashable + + # The specifications of a chart. + # Corresponds to the JSON property `spec` + # @return [Google::Apis::SheetsV4::ChartSpec] + attr_accessor :spec + + # The ID of the chart. + # Corresponds to the JSON property `chartId` + # @return [Fixnum] + attr_accessor :chart_id + + # The position of an embedded object such as a chart. + # Corresponds to the JSON property `position` + # @return [Google::Apis::SheetsV4::EmbeddedObjectPosition] + attr_accessor :position + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @spec = args[:spec] if args.key?(:spec) + @chart_id = args[:chart_id] if args.key?(:chart_id) + @position = args[:position] if args.key?(:position) + end + end + + # A run of a text format. The format of this run continues until the start + # index of the next run. + # When updating, all fields must be set. + class TextFormatRun + include Google::Apis::Core::Hashable + + # The character index where this run starts. + # Corresponds to the JSON property `startIndex` + # @return [Fixnum] + attr_accessor :start_index + + # The format of a run of text in a cell. + # Absent values indicate that the field isn't specified. + # Corresponds to the JSON property `format` + # @return [Google::Apis::SheetsV4::TextFormat] + attr_accessor :format + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @start_index = args[:start_index] if args.key?(:start_index) + @format = args[:format] if args.key?(:format) end end @@ -5324,6 +4404,13 @@ module Google class InsertRangeRequest include Google::Apis::Core::Hashable + # The dimension which will be shifted when inserting cells. + # If ROWS, existing cells will be shifted down. + # If COLUMNS, existing cells will be shifted right. + # Corresponds to the JSON property `shiftDimension` + # @return [String] + attr_accessor :shift_dimension + # A range on a sheet. # All indexes are zero-based. # Indexes are half open, e.g the start index is inclusive @@ -5350,80 +4437,14 @@ module Google # @return [Google::Apis::SheetsV4::GridRange] attr_accessor :range - # The dimension which will be shifted when inserting cells. - # If ROWS, existing cells will be shifted down. - # If COLUMNS, existing cells will be shifted right. - # Corresponds to the JSON property `shiftDimension` - # @return [String] - attr_accessor :shift_dimension - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @range = args[:range] if args.key?(:range) @shift_dimension = args[:shift_dimension] if args.key?(:shift_dimension) - end - end - - # A run of a text format. The format of this run continues until the start - # index of the next run. - # When updating, all fields must be set. - class TextFormatRun - include Google::Apis::Core::Hashable - - # The format of a run of text in a cell. - # Absent values indicate that the field isn't specified. - # Corresponds to the JSON property `format` - # @return [Google::Apis::SheetsV4::TextFormat] - attr_accessor :format - - # The character index where this run starts. - # Corresponds to the JSON property `startIndex` - # @return [Fixnum] - attr_accessor :start_index - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @format = args[:format] if args.key?(:format) - @start_index = args[:start_index] if args.key?(:start_index) - end - end - - # A chart embedded in a sheet. - class EmbeddedChart - include Google::Apis::Core::Hashable - - # The ID of the chart. - # Corresponds to the JSON property `chartId` - # @return [Fixnum] - attr_accessor :chart_id - - # The position of an embedded object such as a chart. - # Corresponds to the JSON property `position` - # @return [Google::Apis::SheetsV4::EmbeddedObjectPosition] - attr_accessor :position - - # The specifications of a chart. - # Corresponds to the JSON property `spec` - # @return [Google::Apis::SheetsV4::ChartSpec] - attr_accessor :spec - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @chart_id = args[:chart_id] if args.key?(:chart_id) - @position = args[:position] if args.key?(:position) - @spec = args[:spec] if args.key?(:spec) + @range = args[:range] if args.key?(:range) end end @@ -5465,21 +4486,58 @@ module Google end end + # Data in the grid, as well as metadata about the dimensions. + class GridData + include Google::Apis::Core::Hashable + + # The first column this GridData refers to, zero-based. + # Corresponds to the JSON property `startColumn` + # @return [Fixnum] + attr_accessor :start_column + + # Metadata about the requested rows in the grid, starting with the row + # in start_row. + # Corresponds to the JSON property `rowMetadata` + # @return [Array] + attr_accessor :row_metadata + + # The data in the grid, one entry per row, + # starting with the row in startRow. + # The values in RowData will correspond to columns starting + # at start_column. + # Corresponds to the JSON property `rowData` + # @return [Array] + attr_accessor :row_data + + # The first row this GridData refers to, zero-based. + # Corresponds to the JSON property `startRow` + # @return [Fixnum] + attr_accessor :start_row + + # Metadata about the requested columns in the grid, starting with the column + # in start_column. + # Corresponds to the JSON property `columnMetadata` + # @return [Array] + attr_accessor :column_metadata + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @start_column = args[:start_column] if args.key?(:start_column) + @row_metadata = args[:row_metadata] if args.key?(:row_metadata) + @row_data = args[:row_data] if args.key?(:row_data) + @start_row = args[:start_row] if args.key?(:start_row) + @column_metadata = args[:column_metadata] if args.key?(:column_metadata) + end + end + # A border along a cell. class Border include Google::Apis::Core::Hashable - # The width of the border, in pixels. - # Deprecated; the width is determined by the "style" field. - # Corresponds to the JSON property `width` - # @return [Fixnum] - attr_accessor :width - - # The style of the border. - # Corresponds to the JSON property `style` - # @return [String] - attr_accessor :style - # Represents a color in the RGBA color space. This representation is designed # for simplicity of conversion to/from color representations in various # languages over compactness; for example, the fields of this representation @@ -5583,51 +4641,45 @@ module Google # @return [Google::Apis::SheetsV4::Color] attr_accessor :color + # The width of the border, in pixels. + # Deprecated; the width is determined by the "style" field. + # Corresponds to the JSON property `width` + # @return [Fixnum] + attr_accessor :width + + # The style of the border. + # Corresponds to the JSON property `style` + # @return [String] + attr_accessor :style + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @color = args[:color] if args.key?(:color) @width = args[:width] if args.key?(:width) @style = args[:style] if args.key?(:style) - @color = args[:color] if args.key?(:color) end end - # Data in the grid, as well as metadata about the dimensions. - class GridData + # Updates properties of the named range with the specified + # namedRangeId. + class UpdateNamedRangeRequest include Google::Apis::Core::Hashable - # The data in the grid, one entry per row, - # starting with the row in startRow. - # The values in RowData will correspond to columns starting - # at start_column. - # Corresponds to the JSON property `rowData` - # @return [Array] - attr_accessor :row_data + # A named range. + # Corresponds to the JSON property `namedRange` + # @return [Google::Apis::SheetsV4::NamedRange] + attr_accessor :named_range - # The first row this GridData refers to, zero-based. - # Corresponds to the JSON property `startRow` - # @return [Fixnum] - attr_accessor :start_row - - # Metadata about the requested columns in the grid, starting with the column - # in start_column. - # Corresponds to the JSON property `columnMetadata` - # @return [Array] - attr_accessor :column_metadata - - # The first column this GridData refers to, zero-based. - # Corresponds to the JSON property `startColumn` - # @return [Fixnum] - attr_accessor :start_column - - # Metadata about the requested rows in the grid, starting with the row - # in start_row. - # Corresponds to the JSON property `rowMetadata` - # @return [Array] - attr_accessor :row_metadata + # The fields that should be updated. At least one field must be specified. + # The root `namedRange` is implied and should not be specified. + # A single `"*"` can be used as short-hand for listing every field. + # Corresponds to the JSON property `fields` + # @return [String] + attr_accessor :fields def initialize(**args) update!(**args) @@ -5635,11 +4687,8 @@ module Google # Update properties of this object def update!(**args) - @row_data = args[:row_data] if args.key?(:row_data) - @start_row = args[:start_row] if args.key?(:start_row) - @column_metadata = args[:column_metadata] if args.key?(:column_metadata) - @start_column = args[:start_column] if args.key?(:start_column) - @row_metadata = args[:row_metadata] if args.key?(:row_metadata) + @named_range = args[:named_range] if args.key?(:named_range) + @fields = args[:fields] if args.key?(:fields) end end @@ -5683,18 +4732,18 @@ module Google # @return [Fixnum] attr_accessor :sheet_id - # True to find/replace over all sheets. - # Corresponds to the JSON property `allSheets` - # @return [Boolean] - attr_accessor :all_sheets - alias_method :all_sheets?, :all_sheets - # True if the search is case sensitive. # Corresponds to the JSON property `matchCase` # @return [Boolean] attr_accessor :match_case alias_method :match_case?, :match_case + # True to find/replace over all sheets. + # Corresponds to the JSON property `allSheets` + # @return [Boolean] + attr_accessor :all_sheets + alias_method :all_sheets?, :all_sheets + # True if the search should include cells with formulas. # False to skip cells with formulas. # Corresponds to the JSON property `includeFormulas` @@ -5708,6 +4757,11 @@ module Google attr_accessor :match_entire_cell alias_method :match_entire_cell?, :match_entire_cell + # The value to search. + # Corresponds to the JSON property `find` + # @return [String] + attr_accessor :find + # True if the find value is a regex. # The regular expression and replacement should follow Java regex rules # at https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html. @@ -5721,11 +4775,6 @@ module Google attr_accessor :search_by_regex alias_method :search_by_regex?, :search_by_regex - # The value to search. - # Corresponds to the JSON property `find` - # @return [String] - attr_accessor :find - def initialize(**args) update!(**args) end @@ -5735,40 +4784,12 @@ module Google @replacement = args[:replacement] if args.key?(:replacement) @range = args[:range] if args.key?(:range) @sheet_id = args[:sheet_id] if args.key?(:sheet_id) - @all_sheets = args[:all_sheets] if args.key?(:all_sheets) @match_case = args[:match_case] if args.key?(:match_case) + @all_sheets = args[:all_sheets] if args.key?(:all_sheets) @include_formulas = args[:include_formulas] if args.key?(:include_formulas) @match_entire_cell = args[:match_entire_cell] if args.key?(:match_entire_cell) - @search_by_regex = args[:search_by_regex] if args.key?(:search_by_regex) @find = args[:find] if args.key?(:find) - end - end - - # Updates properties of the named range with the specified - # namedRangeId. - class UpdateNamedRangeRequest - include Google::Apis::Core::Hashable - - # A named range. - # Corresponds to the JSON property `namedRange` - # @return [Google::Apis::SheetsV4::NamedRange] - attr_accessor :named_range - - # The fields that should be updated. At least one field must be specified. - # The root `namedRange` is implied and should not be specified. - # A single `"*"` can be used as short-hand for listing every field. - # Corresponds to the JSON property `fields` - # @return [String] - attr_accessor :fields - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @named_range = args[:named_range] if args.key?(:named_range) - @fields = args[:fields] if args.key?(:fields) + @search_by_regex = args[:search_by_regex] if args.key?(:search_by_regex) end end @@ -5931,11 +4952,6 @@ module Google class GridCoordinate include Google::Apis::Core::Hashable - # The sheet this coordinate is on. - # Corresponds to the JSON property `sheetId` - # @return [Fixnum] - attr_accessor :sheet_id - # The row index of the coordinate. # Corresponds to the JSON property `rowIndex` # @return [Fixnum] @@ -5946,15 +4962,20 @@ module Google # @return [Fixnum] attr_accessor :column_index + # The sheet this coordinate is on. + # Corresponds to the JSON property `sheetId` + # @return [Fixnum] + attr_accessor :sheet_id + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @sheet_id = args[:sheet_id] if args.key?(:sheet_id) @row_index = args[:row_index] if args.key?(:row_index) @column_index = args[:column_index] if args.key?(:column_index) + @sheet_id = args[:sheet_id] if args.key?(:sheet_id) end end @@ -5963,11 +4984,6 @@ module Google class UpdateSheetPropertiesRequest include Google::Apis::Core::Hashable - # Properties of a sheet. - # Corresponds to the JSON property `properties` - # @return [Google::Apis::SheetsV4::SheetProperties] - attr_accessor :properties - # The fields that should be updated. At least one field must be specified. # The root `properties` is implied and should not be specified. # A single `"*"` can be used as short-hand for listing every field. @@ -5975,14 +4991,63 @@ module Google # @return [String] attr_accessor :fields + # Properties of a sheet. + # Corresponds to the JSON property `properties` + # @return [Google::Apis::SheetsV4::SheetProperties] + attr_accessor :properties + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @properties = args[:properties] if args.key?(:properties) @fields = args[:fields] if args.key?(:fields) + @properties = args[:properties] if args.key?(:properties) + end + end + + # Properties of a grid. + class GridProperties + include Google::Apis::Core::Hashable + + # The number of rows in the grid. + # Corresponds to the JSON property `rowCount` + # @return [Fixnum] + attr_accessor :row_count + + # The number of rows that are frozen in the grid. + # Corresponds to the JSON property `frozenRowCount` + # @return [Fixnum] + attr_accessor :frozen_row_count + + # True if the grid isn't showing gridlines in the UI. + # Corresponds to the JSON property `hideGridlines` + # @return [Boolean] + attr_accessor :hide_gridlines + alias_method :hide_gridlines?, :hide_gridlines + + # The number of columns in the grid. + # Corresponds to the JSON property `columnCount` + # @return [Fixnum] + attr_accessor :column_count + + # The number of columns that are frozen in the grid. + # Corresponds to the JSON property `frozenColumnCount` + # @return [Fixnum] + attr_accessor :frozen_column_count + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @row_count = args[:row_count] if args.key?(:row_count) + @frozen_row_count = args[:frozen_row_count] if args.key?(:frozen_row_count) + @hide_gridlines = args[:hide_gridlines] if args.key?(:hide_gridlines) + @column_count = args[:column_count] if args.key?(:column_count) + @frozen_column_count = args[:frozen_column_count] if args.key?(:frozen_column_count) end end @@ -6026,35 +5091,14 @@ module Google end end - # Properties of a grid. - class GridProperties + # The result of updating an embedded object's position. + class UpdateEmbeddedObjectPositionResponse include Google::Apis::Core::Hashable - # The number of columns in the grid. - # Corresponds to the JSON property `columnCount` - # @return [Fixnum] - attr_accessor :column_count - - # The number of columns that are frozen in the grid. - # Corresponds to the JSON property `frozenColumnCount` - # @return [Fixnum] - attr_accessor :frozen_column_count - - # The number of rows in the grid. - # Corresponds to the JSON property `rowCount` - # @return [Fixnum] - attr_accessor :row_count - - # The number of rows that are frozen in the grid. - # Corresponds to the JSON property `frozenRowCount` - # @return [Fixnum] - attr_accessor :frozen_row_count - - # True if the grid isn't showing gridlines in the UI. - # Corresponds to the JSON property `hideGridlines` - # @return [Boolean] - attr_accessor :hide_gridlines - alias_method :hide_gridlines?, :hide_gridlines + # The position of an embedded object such as a chart. + # Corresponds to the JSON property `position` + # @return [Google::Apis::SheetsV4::EmbeddedObjectPosition] + attr_accessor :position def initialize(**args) update!(**args) @@ -6062,11 +5106,32 @@ module Google # Update properties of this object def update!(**args) - @column_count = args[:column_count] if args.key?(:column_count) - @frozen_column_count = args[:frozen_column_count] if args.key?(:frozen_column_count) - @row_count = args[:row_count] if args.key?(:row_count) - @frozen_row_count = args[:frozen_row_count] if args.key?(:frozen_row_count) - @hide_gridlines = args[:hide_gridlines] if args.key?(:hide_gridlines) + @position = args[:position] if args.key?(:position) + end + end + + # A sort order associated with a specific column or row. + class SortSpec + include Google::Apis::Core::Hashable + + # The dimension the sort should be applied to. + # Corresponds to the JSON property `dimensionIndex` + # @return [Fixnum] + attr_accessor :dimension_index + + # The order data should be sorted. + # Corresponds to the JSON property `sortOrder` + # @return [String] + attr_accessor :sort_order + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @dimension_index = args[:dimension_index] if args.key?(:dimension_index) + @sort_order = args[:sort_order] if args.key?(:sort_order) end end @@ -6074,21 +5139,6 @@ module Google class Sheet include Google::Apis::Core::Hashable - # Properties of a sheet. - # Corresponds to the JSON property `properties` - # @return [Google::Apis::SheetsV4::SheetProperties] - attr_accessor :properties - - # The specifications of every chart on this sheet. - # Corresponds to the JSON property `charts` - # @return [Array] - attr_accessor :charts - - # The filter views in this sheet. - # Corresponds to the JSON property `filterViews` - # @return [Array] - attr_accessor :filter_views - # The protected ranges in this sheet. # Corresponds to the JSON property `protectedRanges` # @return [Array] @@ -6126,65 +5176,36 @@ module Google # @return [Array] attr_accessor :banded_ranges + # The specifications of every chart on this sheet. + # Corresponds to the JSON property `charts` + # @return [Array] + attr_accessor :charts + + # Properties of a sheet. + # Corresponds to the JSON property `properties` + # @return [Google::Apis::SheetsV4::SheetProperties] + attr_accessor :properties + + # The filter views in this sheet. + # Corresponds to the JSON property `filterViews` + # @return [Array] + attr_accessor :filter_views + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @properties = args[:properties] if args.key?(:properties) - @charts = args[:charts] if args.key?(:charts) - @filter_views = args[:filter_views] if args.key?(:filter_views) @protected_ranges = args[:protected_ranges] if args.key?(:protected_ranges) @conditional_formats = args[:conditional_formats] if args.key?(:conditional_formats) @basic_filter = args[:basic_filter] if args.key?(:basic_filter) @merges = args[:merges] if args.key?(:merges) @data = args[:data] if args.key?(:data) @banded_ranges = args[:banded_ranges] if args.key?(:banded_ranges) - end - end - - # A sort order associated with a specific column or row. - class SortSpec - include Google::Apis::Core::Hashable - - # The dimension the sort should be applied to. - # Corresponds to the JSON property `dimensionIndex` - # @return [Fixnum] - attr_accessor :dimension_index - - # The order data should be sorted. - # Corresponds to the JSON property `sortOrder` - # @return [String] - attr_accessor :sort_order - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @dimension_index = args[:dimension_index] if args.key?(:dimension_index) - @sort_order = args[:sort_order] if args.key?(:sort_order) - end - end - - # The result of updating an embedded object's position. - class UpdateEmbeddedObjectPositionResponse - include Google::Apis::Core::Hashable - - # The position of an embedded object such as a chart. - # Corresponds to the JSON property `position` - # @return [Google::Apis::SheetsV4::EmbeddedObjectPosition] - attr_accessor :position - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @position = args[:position] if args.key?(:position) + @charts = args[:charts] if args.key?(:charts) + @properties = args[:properties] if args.key?(:properties) + @filter_views = args[:filter_views] if args.key?(:filter_views) end end @@ -6192,11 +5213,6 @@ module Google class BooleanRule include Google::Apis::Core::Hashable - # The format of a cell. - # Corresponds to the JSON property `format` - # @return [Google::Apis::SheetsV4::CellFormat] - attr_accessor :format - # A condition that can evaluate to true or false. # BooleanConditions are used by conditional formatting, # data validation, and the criteria in filters. @@ -6204,14 +5220,19 @@ module Google # @return [Google::Apis::SheetsV4::BooleanCondition] attr_accessor :condition + # The format of a cell. + # Corresponds to the JSON property `format` + # @return [Google::Apis::SheetsV4::CellFormat] + attr_accessor :format + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @format = args[:format] if args.key?(:format) @condition = args[:condition] if args.key?(:condition) + @format = args[:format] if args.key?(:format) end end @@ -6306,6 +5327,11 @@ module Google class UpdateConditionalFormatRuleRequest include Google::Apis::Core::Hashable + # A rule describing a conditional format. + # Corresponds to the JSON property `rule` + # @return [Google::Apis::SheetsV4::ConditionalFormatRule] + attr_accessor :rule + # The zero-based index of the rule that should be replaced or moved. # Corresponds to the JSON property `index` # @return [Fixnum] @@ -6322,10 +5348,47 @@ module Google # @return [Fixnum] attr_accessor :new_index - # A rule describing a conditional format. - # Corresponds to the JSON property `rule` - # @return [Google::Apis::SheetsV4::ConditionalFormatRule] - attr_accessor :rule + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @rule = args[:rule] if args.key?(:rule) + @index = args[:index] if args.key?(:index) + @sheet_id = args[:sheet_id] if args.key?(:sheet_id) + @new_index = args[:new_index] if args.key?(:new_index) + end + end + + # A data validation rule. + class DataValidationRule + include Google::Apis::Core::Hashable + + # True if the UI should be customized based on the kind of condition. + # If true, "List" conditions will show a dropdown. + # Corresponds to the JSON property `showCustomUi` + # @return [Boolean] + attr_accessor :show_custom_ui + alias_method :show_custom_ui?, :show_custom_ui + + # True if invalid data should be rejected. + # Corresponds to the JSON property `strict` + # @return [Boolean] + attr_accessor :strict + alias_method :strict?, :strict + + # A message to show the user when adding data to the cell. + # Corresponds to the JSON property `inputMessage` + # @return [String] + attr_accessor :input_message + + # A condition that can evaluate to true or false. + # BooleanConditions are used by conditional formatting, + # data validation, and the criteria in filters. + # Corresponds to the JSON property `condition` + # @return [Google::Apis::SheetsV4::BooleanCondition] + attr_accessor :condition def initialize(**args) update!(**args) @@ -6333,10 +5396,10 @@ module Google # Update properties of this object def update!(**args) - @index = args[:index] if args.key?(:index) - @sheet_id = args[:sheet_id] if args.key?(:sheet_id) - @new_index = args[:new_index] if args.key?(:new_index) - @rule = args[:rule] if args.key?(:rule) + @show_custom_ui = args[:show_custom_ui] if args.key?(:show_custom_ui) + @strict = args[:strict] if args.key?(:strict) + @input_message = args[:input_message] if args.key?(:input_message) + @condition = args[:condition] if args.key?(:condition) end end @@ -6360,52 +5423,20 @@ module Google end end - # A data validation rule. - class DataValidationRule - include Google::Apis::Core::Hashable - - # A message to show the user when adding data to the cell. - # Corresponds to the JSON property `inputMessage` - # @return [String] - attr_accessor :input_message - - # A condition that can evaluate to true or false. - # BooleanConditions are used by conditional formatting, - # data validation, and the criteria in filters. - # Corresponds to the JSON property `condition` - # @return [Google::Apis::SheetsV4::BooleanCondition] - attr_accessor :condition - - # True if the UI should be customized based on the kind of condition. - # If true, "List" conditions will show a dropdown. - # Corresponds to the JSON property `showCustomUi` - # @return [Boolean] - attr_accessor :show_custom_ui - alias_method :show_custom_ui?, :show_custom_ui - - # True if invalid data should be rejected. - # Corresponds to the JSON property `strict` - # @return [Boolean] - attr_accessor :strict - alias_method :strict?, :strict - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @input_message = args[:input_message] if args.key?(:input_message) - @condition = args[:condition] if args.key?(:condition) - @show_custom_ui = args[:show_custom_ui] if args.key?(:show_custom_ui) - @strict = args[:strict] if args.key?(:strict) - end - end - # Inserts data into the spreadsheet starting at the specified coordinate. class PasteDataRequest include Google::Apis::Core::Hashable + # The data to insert. + # Corresponds to the JSON property `data` + # @return [String] + attr_accessor :data + + # The delimiter in the data. + # Corresponds to the JSON property `delimiter` + # @return [String] + attr_accessor :delimiter + # How the data should be pasted. # Corresponds to the JSON property `type` # @return [String] @@ -6423,15 +5454,351 @@ module Google # @return [Google::Apis::SheetsV4::GridCoordinate] attr_accessor :coordinate - # The data to insert. - # Corresponds to the JSON property `data` - # @return [String] - attr_accessor :data + def initialize(**args) + update!(**args) + end - # The delimiter in the data. - # Corresponds to the JSON property `delimiter` + # Update properties of this object + def update!(**args) + @data = args[:data] if args.key?(:data) + @delimiter = args[:delimiter] if args.key?(:delimiter) + @type = args[:type] if args.key?(:type) + @html = args[:html] if args.key?(:html) + @coordinate = args[:coordinate] if args.key?(:coordinate) + end + end + + # Appends rows or columns to the end of a sheet. + class AppendDimensionRequest + include Google::Apis::Core::Hashable + + # Whether rows or columns should be appended. + # Corresponds to the JSON property `dimension` # @return [String] - attr_accessor :delimiter + attr_accessor :dimension + + # The number of rows or columns to append. + # Corresponds to the JSON property `length` + # @return [Fixnum] + attr_accessor :length + + # The sheet to append rows or columns to. + # Corresponds to the JSON property `sheetId` + # @return [Fixnum] + attr_accessor :sheet_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @dimension = args[:dimension] if args.key?(:dimension) + @length = args[:length] if args.key?(:length) + @sheet_id = args[:sheet_id] if args.key?(:sheet_id) + end + end + + # Adds a named range to the spreadsheet. + class AddNamedRangeRequest + include Google::Apis::Core::Hashable + + # A named range. + # Corresponds to the JSON property `namedRange` + # @return [Google::Apis::SheetsV4::NamedRange] + attr_accessor :named_range + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @named_range = args[:named_range] if args.key?(:named_range) + end + end + + # Update an embedded object's position (such as a moving or resizing a + # chart or image). + class UpdateEmbeddedObjectPositionRequest + include Google::Apis::Core::Hashable + + # The fields of OverlayPosition + # that should be updated when setting a new position. Used only if + # newPosition.overlayPosition + # is set, in which case at least one field must + # be specified. The root `newPosition.overlayPosition` is implied and + # should not be specified. + # A single `"*"` can be used as short-hand for listing every field. + # Corresponds to the JSON property `fields` + # @return [String] + attr_accessor :fields + + # The ID of the object to moved. + # Corresponds to the JSON property `objectId` + # @return [Fixnum] + attr_accessor :object_id_prop + + # The position of an embedded object such as a chart. + # Corresponds to the JSON property `newPosition` + # @return [Google::Apis::SheetsV4::EmbeddedObjectPosition] + attr_accessor :new_position + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @fields = args[:fields] if args.key?(:fields) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + @new_position = args[:new_position] if args.key?(:new_position) + end + end + + # The rotation applied to text in a cell. + class TextRotation + include Google::Apis::Core::Hashable + + # If true, text reads top to bottom, but the orientation of individual + # characters is unchanged. + # For example: + # | V | + # | e | + # | r | + # | t | + # | i | + # | c | + # | a | + # | l | + # Corresponds to the JSON property `vertical` + # @return [Boolean] + attr_accessor :vertical + alias_method :vertical?, :vertical + + # The angle between the standard orientation and the desired orientation. + # Measured in degrees. Valid values are between -90 and 90. Positive + # angles are angled upwards, negative are angled downwards. + # Note: For LTR text direction positive angles are in the counterclockwise + # direction, whereas for RTL they are in the clockwise direction + # Corresponds to the JSON property `angle` + # @return [Fixnum] + attr_accessor :angle + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @vertical = args[:vertical] if args.key?(:vertical) + @angle = args[:angle] if args.key?(:angle) + end + end + + # A pie chart. + class PieChartSpec + include Google::Apis::Core::Hashable + + # The data included in a domain or series. + # Corresponds to the JSON property `domain` + # @return [Google::Apis::SheetsV4::ChartData] + attr_accessor :domain + + # True if the pie is three dimensional. + # Corresponds to the JSON property `threeDimensional` + # @return [Boolean] + attr_accessor :three_dimensional + alias_method :three_dimensional?, :three_dimensional + + # The data included in a domain or series. + # Corresponds to the JSON property `series` + # @return [Google::Apis::SheetsV4::ChartData] + attr_accessor :series + + # Where the legend of the pie chart should be drawn. + # Corresponds to the JSON property `legendPosition` + # @return [String] + attr_accessor :legend_position + + # The size of the hole in the pie chart. + # Corresponds to the JSON property `pieHole` + # @return [Float] + attr_accessor :pie_hole + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @domain = args[:domain] if args.key?(:domain) + @three_dimensional = args[:three_dimensional] if args.key?(:three_dimensional) + @series = args[:series] if args.key?(:series) + @legend_position = args[:legend_position] if args.key?(:legend_position) + @pie_hole = args[:pie_hole] if args.key?(:pie_hole) + end + end + + # Updates properties of the filter view. + class UpdateFilterViewRequest + include Google::Apis::Core::Hashable + + # A filter view. + # Corresponds to the JSON property `filter` + # @return [Google::Apis::SheetsV4::FilterView] + attr_accessor :filter + + # The fields that should be updated. At least one field must be specified. + # The root `filter` is implied and should not be specified. + # A single `"*"` can be used as short-hand for listing every field. + # Corresponds to the JSON property `fields` + # @return [String] + attr_accessor :fields + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @filter = args[:filter] if args.key?(:filter) + @fields = args[:fields] if args.key?(:fields) + end + end + + # A rule describing a conditional format. + class ConditionalFormatRule + include Google::Apis::Core::Hashable + + # A rule that may or may not match, depending on the condition. + # Corresponds to the JSON property `booleanRule` + # @return [Google::Apis::SheetsV4::BooleanRule] + attr_accessor :boolean_rule + + # The ranges that will be formatted if the condition is true. + # All the ranges must be on the same grid. + # Corresponds to the JSON property `ranges` + # @return [Array] + attr_accessor :ranges + + # A rule that applies a gradient color scale format, based on + # the interpolation points listed. The format of a cell will vary + # based on its contents as compared to the values of the interpolation + # points. + # Corresponds to the JSON property `gradientRule` + # @return [Google::Apis::SheetsV4::GradientRule] + attr_accessor :gradient_rule + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @boolean_rule = args[:boolean_rule] if args.key?(:boolean_rule) + @ranges = args[:ranges] if args.key?(:ranges) + @gradient_rule = args[:gradient_rule] if args.key?(:gradient_rule) + end + end + + # Copies data from the source to the destination. + class CopyPasteRequest + include Google::Apis::Core::Hashable + + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + # Corresponds to the JSON property `source` + # @return [Google::Apis::SheetsV4::GridRange] + attr_accessor :source + + # What kind of data to paste. + # Corresponds to the JSON property `pasteType` + # @return [String] + attr_accessor :paste_type + + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + # Corresponds to the JSON property `destination` + # @return [Google::Apis::SheetsV4::GridRange] + attr_accessor :destination + + # How that data should be oriented when pasting. + # Corresponds to the JSON property `pasteOrientation` + # @return [String] + attr_accessor :paste_orientation + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @source = args[:source] if args.key?(:source) + @paste_type = args[:paste_type] if args.key?(:paste_type) + @destination = args[:destination] if args.key?(:destination) + @paste_orientation = args[:paste_orientation] if args.key?(:paste_orientation) + end + end + + # A condition that can evaluate to true or false. + # BooleanConditions are used by conditional formatting, + # data validation, and the criteria in filters. + class BooleanCondition + include Google::Apis::Core::Hashable + + # The type of condition. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # The values of the condition. The number of supported values depends + # on the condition type. Some support zero values, + # others one or two values, + # and ConditionType.ONE_OF_LIST supports an arbitrary number of values. + # Corresponds to the JSON property `values` + # @return [Array] + attr_accessor :values def initialize(**args) update!(**args) @@ -6440,10 +5807,646 @@ module Google # Update properties of this object def update!(**args) @type = args[:type] if args.key?(:type) - @html = args[:html] if args.key?(:html) - @coordinate = args[:coordinate] if args.key?(:coordinate) - @data = args[:data] if args.key?(:data) - @delimiter = args[:delimiter] if args.key?(:delimiter) + @values = args[:values] if args.key?(:values) + end + end + + # A single kind of update to apply to a spreadsheet. + class Request + include Google::Apis::Core::Hashable + + # Updates a chart's specifications. + # (This does not move or resize a chart. To move or resize a chart, use + # UpdateEmbeddedObjectPositionRequest.) + # Corresponds to the JSON property `updateChartSpec` + # @return [Google::Apis::SheetsV4::UpdateChartSpecRequest] + attr_accessor :update_chart_spec + + # Splits a column of text into multiple columns, + # based on a delimiter in each cell. + # Corresponds to the JSON property `textToColumns` + # @return [Google::Apis::SheetsV4::TextToColumnsRequest] + attr_accessor :text_to_columns + + # Adds a new sheet. + # When a sheet is added at a given index, + # all subsequent sheets' indexes are incremented. + # To add an object sheet, use AddChartRequest instead and specify + # EmbeddedObjectPosition.sheetId or + # EmbeddedObjectPosition.newSheet. + # Corresponds to the JSON property `addSheet` + # @return [Google::Apis::SheetsV4::AddSheetRequest] + attr_accessor :add_sheet + + # Updates an existing protected range with the specified + # protectedRangeId. + # Corresponds to the JSON property `updateProtectedRange` + # @return [Google::Apis::SheetsV4::UpdateProtectedRangeRequest] + attr_accessor :update_protected_range + + # Deletes a particular filter view. + # Corresponds to the JSON property `deleteFilterView` + # @return [Google::Apis::SheetsV4::DeleteFilterViewRequest] + attr_accessor :delete_filter_view + + # Copies data from the source to the destination. + # Corresponds to the JSON property `copyPaste` + # @return [Google::Apis::SheetsV4::CopyPasteRequest] + attr_accessor :copy_paste + + # Inserts rows or columns in a sheet at a particular index. + # Corresponds to the JSON property `insertDimension` + # @return [Google::Apis::SheetsV4::InsertDimensionRequest] + attr_accessor :insert_dimension + + # Deletes a range of cells, shifting other cells into the deleted area. + # Corresponds to the JSON property `deleteRange` + # @return [Google::Apis::SheetsV4::DeleteRangeRequest] + attr_accessor :delete_range + + # Removes the banded range with the given ID from the spreadsheet. + # Corresponds to the JSON property `deleteBanding` + # @return [Google::Apis::SheetsV4::DeleteBandingRequest] + attr_accessor :delete_banding + + # Adds a filter view. + # Corresponds to the JSON property `addFilterView` + # @return [Google::Apis::SheetsV4::AddFilterViewRequest] + attr_accessor :add_filter_view + + # Updates the borders of a range. + # If a field is not set in the request, that means the border remains as-is. + # For example, with two subsequent UpdateBordersRequest: + # 1. range: A1:A5 `` top: RED, bottom: WHITE `` + # 2. range: A1:A5 `` left: BLUE `` + # That would result in A1:A5 having a borders of + # `` top: RED, bottom: WHITE, left: BLUE ``. + # If you want to clear a border, explicitly set the style to + # NONE. + # Corresponds to the JSON property `updateBorders` + # @return [Google::Apis::SheetsV4::UpdateBordersRequest] + attr_accessor :update_borders + + # Sets a data validation rule to every cell in the range. + # To clear validation in a range, call this with no rule specified. + # Corresponds to the JSON property `setDataValidation` + # @return [Google::Apis::SheetsV4::SetDataValidationRequest] + attr_accessor :set_data_validation + + # Deletes a conditional format rule at the given index. + # All subsequent rules' indexes are decremented. + # Corresponds to the JSON property `deleteConditionalFormatRule` + # @return [Google::Apis::SheetsV4::DeleteConditionalFormatRuleRequest] + attr_accessor :delete_conditional_format_rule + + # Updates all cells in the range to the values in the given Cell object. + # Only the fields listed in the fields field are updated; others are + # unchanged. + # If writing a cell with a formula, the formula's ranges will automatically + # increment for each field in the range. + # For example, if writing a cell with formula `=A1` into range B2:C4, + # B2 would be `=A1`, B3 would be `=A2`, B4 would be `=A3`, + # C2 would be `=B1`, C3 would be `=B2`, C4 would be `=B3`. + # To keep the formula's ranges static, use the `$` indicator. + # For example, use the formula `=$A$1` to prevent both the row and the + # column from incrementing. + # Corresponds to the JSON property `repeatCell` + # @return [Google::Apis::SheetsV4::RepeatCellRequest] + attr_accessor :repeat_cell + + # Clears the basic filter, if any exists on the sheet. + # Corresponds to the JSON property `clearBasicFilter` + # @return [Google::Apis::SheetsV4::ClearBasicFilterRequest] + attr_accessor :clear_basic_filter + + # Appends rows or columns to the end of a sheet. + # Corresponds to the JSON property `appendDimension` + # @return [Google::Apis::SheetsV4::AppendDimensionRequest] + attr_accessor :append_dimension + + # Updates a conditional format rule at the given index, + # or moves a conditional format rule to another index. + # Corresponds to the JSON property `updateConditionalFormatRule` + # @return [Google::Apis::SheetsV4::UpdateConditionalFormatRuleRequest] + attr_accessor :update_conditional_format_rule + + # Inserts cells into a range, shifting the existing cells over or down. + # Corresponds to the JSON property `insertRange` + # @return [Google::Apis::SheetsV4::InsertRangeRequest] + attr_accessor :insert_range + + # Moves one or more rows or columns. + # Corresponds to the JSON property `moveDimension` + # @return [Google::Apis::SheetsV4::MoveDimensionRequest] + attr_accessor :move_dimension + + # Updates properties of the supplied banded range. + # Corresponds to the JSON property `updateBanding` + # @return [Google::Apis::SheetsV4::UpdateBandingRequest] + attr_accessor :update_banding + + # Removes the named range with the given ID from the spreadsheet. + # Corresponds to the JSON property `deleteNamedRange` + # @return [Google::Apis::SheetsV4::DeleteNamedRangeRequest] + attr_accessor :delete_named_range + + # Adds a new protected range. + # Corresponds to the JSON property `addProtectedRange` + # @return [Google::Apis::SheetsV4::AddProtectedRangeRequest] + attr_accessor :add_protected_range + + # Duplicates the contents of a sheet. + # Corresponds to the JSON property `duplicateSheet` + # @return [Google::Apis::SheetsV4::DuplicateSheetRequest] + attr_accessor :duplicate_sheet + + # Unmerges cells in the given range. + # Corresponds to the JSON property `unmergeCells` + # @return [Google::Apis::SheetsV4::UnmergeCellsRequest] + attr_accessor :unmerge_cells + + # Deletes the requested sheet. + # Corresponds to the JSON property `deleteSheet` + # @return [Google::Apis::SheetsV4::DeleteSheetRequest] + attr_accessor :delete_sheet + + # Update an embedded object's position (such as a moving or resizing a + # chart or image). + # Corresponds to the JSON property `updateEmbeddedObjectPosition` + # @return [Google::Apis::SheetsV4::UpdateEmbeddedObjectPositionRequest] + attr_accessor :update_embedded_object_position + + # Updates properties of dimensions within the specified range. + # Corresponds to the JSON property `updateDimensionProperties` + # @return [Google::Apis::SheetsV4::UpdateDimensionPropertiesRequest] + attr_accessor :update_dimension_properties + + # Inserts data into the spreadsheet starting at the specified coordinate. + # Corresponds to the JSON property `pasteData` + # @return [Google::Apis::SheetsV4::PasteDataRequest] + attr_accessor :paste_data + + # Sets the basic filter associated with a sheet. + # Corresponds to the JSON property `setBasicFilter` + # @return [Google::Apis::SheetsV4::SetBasicFilterRequest] + attr_accessor :set_basic_filter + + # Adds a new conditional format rule at the given index. + # All subsequent rules' indexes are incremented. + # Corresponds to the JSON property `addConditionalFormatRule` + # @return [Google::Apis::SheetsV4::AddConditionalFormatRuleRequest] + attr_accessor :add_conditional_format_rule + + # Updates all cells in a range with new data. + # Corresponds to the JSON property `updateCells` + # @return [Google::Apis::SheetsV4::UpdateCellsRequest] + attr_accessor :update_cells + + # Adds a named range to the spreadsheet. + # Corresponds to the JSON property `addNamedRange` + # @return [Google::Apis::SheetsV4::AddNamedRangeRequest] + attr_accessor :add_named_range + + # Updates properties of a spreadsheet. + # Corresponds to the JSON property `updateSpreadsheetProperties` + # @return [Google::Apis::SheetsV4::UpdateSpreadsheetPropertiesRequest] + attr_accessor :update_spreadsheet_properties + + # Deletes the embedded object with the given ID. + # Corresponds to the JSON property `deleteEmbeddedObject` + # @return [Google::Apis::SheetsV4::DeleteEmbeddedObjectRequest] + attr_accessor :delete_embedded_object + + # Updates properties of the filter view. + # Corresponds to the JSON property `updateFilterView` + # @return [Google::Apis::SheetsV4::UpdateFilterViewRequest] + attr_accessor :update_filter_view + + # Adds a new banded range to the spreadsheet. + # Corresponds to the JSON property `addBanding` + # @return [Google::Apis::SheetsV4::AddBandingRequest] + attr_accessor :add_banding + + # Automatically resizes one or more dimensions based on the contents + # of the cells in that dimension. + # Corresponds to the JSON property `autoResizeDimensions` + # @return [Google::Apis::SheetsV4::AutoResizeDimensionsRequest] + attr_accessor :auto_resize_dimensions + + # Adds new cells after the last row with data in a sheet, + # inserting new rows into the sheet if necessary. + # Corresponds to the JSON property `appendCells` + # @return [Google::Apis::SheetsV4::AppendCellsRequest] + attr_accessor :append_cells + + # Moves data from the source to the destination. + # Corresponds to the JSON property `cutPaste` + # @return [Google::Apis::SheetsV4::CutPasteRequest] + attr_accessor :cut_paste + + # Merges all cells in the range. + # Corresponds to the JSON property `mergeCells` + # @return [Google::Apis::SheetsV4::MergeCellsRequest] + attr_accessor :merge_cells + + # Updates properties of the named range with the specified + # namedRangeId. + # Corresponds to the JSON property `updateNamedRange` + # @return [Google::Apis::SheetsV4::UpdateNamedRangeRequest] + attr_accessor :update_named_range + + # Updates properties of the sheet with the specified + # sheetId. + # Corresponds to the JSON property `updateSheetProperties` + # @return [Google::Apis::SheetsV4::UpdateSheetPropertiesRequest] + attr_accessor :update_sheet_properties + + # Deletes the dimensions from the sheet. + # Corresponds to the JSON property `deleteDimension` + # @return [Google::Apis::SheetsV4::DeleteDimensionRequest] + attr_accessor :delete_dimension + + # Fills in more data based on existing data. + # Corresponds to the JSON property `autoFill` + # @return [Google::Apis::SheetsV4::AutoFillRequest] + attr_accessor :auto_fill + + # Sorts data in rows based on a sort order per column. + # Corresponds to the JSON property `sortRange` + # @return [Google::Apis::SheetsV4::SortRangeRequest] + attr_accessor :sort_range + + # Deletes the protected range with the given ID. + # Corresponds to the JSON property `deleteProtectedRange` + # @return [Google::Apis::SheetsV4::DeleteProtectedRangeRequest] + attr_accessor :delete_protected_range + + # Duplicates a particular filter view. + # Corresponds to the JSON property `duplicateFilterView` + # @return [Google::Apis::SheetsV4::DuplicateFilterViewRequest] + attr_accessor :duplicate_filter_view + + # Adds a chart to a sheet in the spreadsheet. + # Corresponds to the JSON property `addChart` + # @return [Google::Apis::SheetsV4::AddChartRequest] + attr_accessor :add_chart + + # Finds and replaces data in cells over a range, sheet, or all sheets. + # Corresponds to the JSON property `findReplace` + # @return [Google::Apis::SheetsV4::FindReplaceRequest] + attr_accessor :find_replace + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @update_chart_spec = args[:update_chart_spec] if args.key?(:update_chart_spec) + @text_to_columns = args[:text_to_columns] if args.key?(:text_to_columns) + @add_sheet = args[:add_sheet] if args.key?(:add_sheet) + @update_protected_range = args[:update_protected_range] if args.key?(:update_protected_range) + @delete_filter_view = args[:delete_filter_view] if args.key?(:delete_filter_view) + @copy_paste = args[:copy_paste] if args.key?(:copy_paste) + @insert_dimension = args[:insert_dimension] if args.key?(:insert_dimension) + @delete_range = args[:delete_range] if args.key?(:delete_range) + @delete_banding = args[:delete_banding] if args.key?(:delete_banding) + @add_filter_view = args[:add_filter_view] if args.key?(:add_filter_view) + @update_borders = args[:update_borders] if args.key?(:update_borders) + @set_data_validation = args[:set_data_validation] if args.key?(:set_data_validation) + @delete_conditional_format_rule = args[:delete_conditional_format_rule] if args.key?(:delete_conditional_format_rule) + @repeat_cell = args[:repeat_cell] if args.key?(:repeat_cell) + @clear_basic_filter = args[:clear_basic_filter] if args.key?(:clear_basic_filter) + @append_dimension = args[:append_dimension] if args.key?(:append_dimension) + @update_conditional_format_rule = args[:update_conditional_format_rule] if args.key?(:update_conditional_format_rule) + @insert_range = args[:insert_range] if args.key?(:insert_range) + @move_dimension = args[:move_dimension] if args.key?(:move_dimension) + @update_banding = args[:update_banding] if args.key?(:update_banding) + @delete_named_range = args[:delete_named_range] if args.key?(:delete_named_range) + @add_protected_range = args[:add_protected_range] if args.key?(:add_protected_range) + @duplicate_sheet = args[:duplicate_sheet] if args.key?(:duplicate_sheet) + @unmerge_cells = args[:unmerge_cells] if args.key?(:unmerge_cells) + @delete_sheet = args[:delete_sheet] if args.key?(:delete_sheet) + @update_embedded_object_position = args[:update_embedded_object_position] if args.key?(:update_embedded_object_position) + @update_dimension_properties = args[:update_dimension_properties] if args.key?(:update_dimension_properties) + @paste_data = args[:paste_data] if args.key?(:paste_data) + @set_basic_filter = args[:set_basic_filter] if args.key?(:set_basic_filter) + @add_conditional_format_rule = args[:add_conditional_format_rule] if args.key?(:add_conditional_format_rule) + @update_cells = args[:update_cells] if args.key?(:update_cells) + @add_named_range = args[:add_named_range] if args.key?(:add_named_range) + @update_spreadsheet_properties = args[:update_spreadsheet_properties] if args.key?(:update_spreadsheet_properties) + @delete_embedded_object = args[:delete_embedded_object] if args.key?(:delete_embedded_object) + @update_filter_view = args[:update_filter_view] if args.key?(:update_filter_view) + @add_banding = args[:add_banding] if args.key?(:add_banding) + @auto_resize_dimensions = args[:auto_resize_dimensions] if args.key?(:auto_resize_dimensions) + @append_cells = args[:append_cells] if args.key?(:append_cells) + @cut_paste = args[:cut_paste] if args.key?(:cut_paste) + @merge_cells = args[:merge_cells] if args.key?(:merge_cells) + @update_named_range = args[:update_named_range] if args.key?(:update_named_range) + @update_sheet_properties = args[:update_sheet_properties] if args.key?(:update_sheet_properties) + @delete_dimension = args[:delete_dimension] if args.key?(:delete_dimension) + @auto_fill = args[:auto_fill] if args.key?(:auto_fill) + @sort_range = args[:sort_range] if args.key?(:sort_range) + @delete_protected_range = args[:delete_protected_range] if args.key?(:delete_protected_range) + @duplicate_filter_view = args[:duplicate_filter_view] if args.key?(:duplicate_filter_view) + @add_chart = args[:add_chart] if args.key?(:add_chart) + @find_replace = args[:find_replace] if args.key?(:find_replace) + end + end + + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + class GridRange + include Google::Apis::Core::Hashable + + # The sheet this range is on. + # Corresponds to the JSON property `sheetId` + # @return [Fixnum] + attr_accessor :sheet_id + + # The end row (exclusive) of the range, or not set if unbounded. + # Corresponds to the JSON property `endRowIndex` + # @return [Fixnum] + attr_accessor :end_row_index + + # The end column (exclusive) of the range, or not set if unbounded. + # Corresponds to the JSON property `endColumnIndex` + # @return [Fixnum] + attr_accessor :end_column_index + + # The start row (inclusive) of the range, or not set if unbounded. + # Corresponds to the JSON property `startRowIndex` + # @return [Fixnum] + attr_accessor :start_row_index + + # The start column (inclusive) of the range, or not set if unbounded. + # Corresponds to the JSON property `startColumnIndex` + # @return [Fixnum] + attr_accessor :start_column_index + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @sheet_id = args[:sheet_id] if args.key?(:sheet_id) + @end_row_index = args[:end_row_index] if args.key?(:end_row_index) + @end_column_index = args[:end_column_index] if args.key?(:end_column_index) + @start_row_index = args[:start_row_index] if args.key?(:start_row_index) + @start_column_index = args[:start_column_index] if args.key?(:start_column_index) + end + end + + # The specification for a basic chart. See BasicChartType for the list + # of charts this supports. + class BasicChartSpec + include Google::Apis::Core::Hashable + + # The number of rows or columns in the data that are "headers". + # If not set, Google Sheets will guess how many rows are headers based + # on the data. + # (Note that BasicChartAxis.title may override the axis title + # inferred from the header values.) + # Corresponds to the JSON property `headerCount` + # @return [Fixnum] + attr_accessor :header_count + + # The axis on the chart. + # Corresponds to the JSON property `axis` + # @return [Array] + attr_accessor :axis + + # The type of the chart. + # Corresponds to the JSON property `chartType` + # @return [String] + attr_accessor :chart_type + + # The data this chart is visualizing. + # Corresponds to the JSON property `series` + # @return [Array] + attr_accessor :series + + # The position of the chart legend. + # Corresponds to the JSON property `legendPosition` + # @return [String] + attr_accessor :legend_position + + # The domain of data this is charting. + # Only a single domain is supported. + # Corresponds to the JSON property `domains` + # @return [Array] + attr_accessor :domains + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @header_count = args[:header_count] if args.key?(:header_count) + @axis = args[:axis] if args.key?(:axis) + @chart_type = args[:chart_type] if args.key?(:chart_type) + @series = args[:series] if args.key?(:series) + @legend_position = args[:legend_position] if args.key?(:legend_position) + @domains = args[:domains] if args.key?(:domains) + end + end + + # Sets a data validation rule to every cell in the range. + # To clear validation in a range, call this with no rule specified. + class SetDataValidationRequest + include Google::Apis::Core::Hashable + + # A data validation rule. + # Corresponds to the JSON property `rule` + # @return [Google::Apis::SheetsV4::DataValidationRule] + attr_accessor :rule + + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + # Corresponds to the JSON property `range` + # @return [Google::Apis::SheetsV4::GridRange] + attr_accessor :range + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @rule = args[:rule] if args.key?(:rule) + @range = args[:range] if args.key?(:range) + end + end + + # Data about a specific cell. + class CellData + include Google::Apis::Core::Hashable + + # A pivot table. + # Corresponds to the JSON property `pivotTable` + # @return [Google::Apis::SheetsV4::PivotTable] + attr_accessor :pivot_table + + # The format of a cell. + # Corresponds to the JSON property `userEnteredFormat` + # @return [Google::Apis::SheetsV4::CellFormat] + attr_accessor :user_entered_format + + # The format of a cell. + # Corresponds to the JSON property `effectiveFormat` + # @return [Google::Apis::SheetsV4::CellFormat] + attr_accessor :effective_format + + # Any note on the cell. + # Corresponds to the JSON property `note` + # @return [String] + attr_accessor :note + + # The kinds of value that a cell in a spreadsheet can have. + # Corresponds to the JSON property `userEnteredValue` + # @return [Google::Apis::SheetsV4::ExtendedValue] + attr_accessor :user_entered_value + + # A data validation rule. + # Corresponds to the JSON property `dataValidation` + # @return [Google::Apis::SheetsV4::DataValidationRule] + attr_accessor :data_validation + + # The kinds of value that a cell in a spreadsheet can have. + # Corresponds to the JSON property `effectiveValue` + # @return [Google::Apis::SheetsV4::ExtendedValue] + attr_accessor :effective_value + + # Runs of rich text applied to subsections of the cell. Runs are only valid + # on user entered strings, not formulas, bools, or numbers. + # Runs start at specific indexes in the text and continue until the next + # run. Properties of a run will continue unless explicitly changed + # in a subsequent run (and properties of the first run will continue + # the properties of the cell unless explicitly changed). + # When writing, the new runs will overwrite any prior runs. When writing a + # new user_entered_value, previous runs will be erased. + # Corresponds to the JSON property `textFormatRuns` + # @return [Array] + attr_accessor :text_format_runs + + # The formatted value of the cell. + # This is the value as it's shown to the user. + # This field is read-only. + # Corresponds to the JSON property `formattedValue` + # @return [String] + attr_accessor :formatted_value + + # A hyperlink this cell points to, if any. + # This field is read-only. (To set it, use a `=HYPERLINK` formula + # in the userEnteredValue.formulaValue + # field.) + # Corresponds to the JSON property `hyperlink` + # @return [String] + attr_accessor :hyperlink + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @pivot_table = args[:pivot_table] if args.key?(:pivot_table) + @user_entered_format = args[:user_entered_format] if args.key?(:user_entered_format) + @effective_format = args[:effective_format] if args.key?(:effective_format) + @note = args[:note] if args.key?(:note) + @user_entered_value = args[:user_entered_value] if args.key?(:user_entered_value) + @data_validation = args[:data_validation] if args.key?(:data_validation) + @effective_value = args[:effective_value] if args.key?(:effective_value) + @text_format_runs = args[:text_format_runs] if args.key?(:text_format_runs) + @formatted_value = args[:formatted_value] if args.key?(:formatted_value) + @hyperlink = args[:hyperlink] if args.key?(:hyperlink) + end + end + + # The request for updating any aspect of a spreadsheet. + class BatchUpdateSpreadsheetRequest + include Google::Apis::Core::Hashable + + # Determines if the update response should include the spreadsheet + # resource. + # Corresponds to the JSON property `includeSpreadsheetInResponse` + # @return [Boolean] + attr_accessor :include_spreadsheet_in_response + alias_method :include_spreadsheet_in_response?, :include_spreadsheet_in_response + + # Limits the ranges included in the response spreadsheet. + # Meaningful only if include_spreadsheet_response is 'true'. + # Corresponds to the JSON property `responseRanges` + # @return [Array] + attr_accessor :response_ranges + + # True if grid data should be returned. Meaningful only if + # if include_spreadsheet_response is 'true'. + # This parameter is ignored if a field mask was set in the request. + # Corresponds to the JSON property `responseIncludeGridData` + # @return [Boolean] + attr_accessor :response_include_grid_data + alias_method :response_include_grid_data?, :response_include_grid_data + + # A list of updates to apply to the spreadsheet. + # Requests will be applied in the order they are specified. + # If any request is not valid, no requests will be applied. + # Corresponds to the JSON property `requests` + # @return [Array] + attr_accessor :requests + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @include_spreadsheet_in_response = args[:include_spreadsheet_in_response] if args.key?(:include_spreadsheet_in_response) + @response_ranges = args[:response_ranges] if args.key?(:response_ranges) + @response_include_grid_data = args[:response_include_grid_data] if args.key?(:response_include_grid_data) + @requests = args[:requests] if args.key?(:requests) end end end diff --git a/generated/google/apis/sheets_v4/representations.rb b/generated/google/apis/sheets_v4/representations.rb index e92f6a2fd..216103a17 100644 --- a/generated/google/apis/sheets_v4/representations.rb +++ b/generated/google/apis/sheets_v4/representations.rb @@ -22,91 +22,7 @@ module Google module Apis module SheetsV4 - class AppendDimensionRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AddNamedRangeRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateEmbeddedObjectPositionRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class TextRotation - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class PieChartSpec - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateFilterViewRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ConditionalFormatRule - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CopyPasteRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BooleanCondition - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Request - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class GridRange - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BasicChartSpec - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SetDataValidationRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CellData - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BatchUpdateSpreadsheetRequest + class Padding class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -118,12 +34,6 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class Padding - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class DeleteDimensionRequest class Representation < Google::Apis::Core::JsonRepresentation; end @@ -184,19 +94,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class TextToColumnsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class ClearBasicFilterRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class BatchUpdateSpreadsheetResponse + class TextToColumnsRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -208,13 +112,19 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class BatchUpdateSpreadsheetResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class AppendValuesResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class MoveDimensionRequest + class AddFilterViewRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -226,7 +136,7 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class AddFilterViewRequest + class MoveDimensionRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -280,13 +190,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class AddProtectedRangeResponse + class BasicFilter class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class BasicFilter + class AddProtectedRangeResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -298,13 +208,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class PivotValue + class ErrorValue class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class ErrorValue + class PivotValue class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -394,13 +304,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class DuplicateSheetRequest + class ConditionValue class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class ConditionValue + class DuplicateSheetRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -466,13 +376,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class OverlayPosition + class SpreadsheetProperties class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class SpreadsheetProperties + class OverlayPosition class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -538,13 +448,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class Borders + class BasicChartSeries class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class BasicChartSeries + class Borders class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -580,13 +490,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class DeleteNamedRangeRequest + class AddBandingResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class AddBandingResponse + class DeleteNamedRangeRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -634,13 +544,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class AppendCellsRequest + class ValueRange class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class ValueRange + class AppendCellsRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -658,7 +568,7 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class InsertRangeRequest + class EmbeddedChart class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -670,7 +580,7 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class EmbeddedChart + class InsertRangeRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -688,19 +598,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class Border - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class GridData class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class FindReplaceRequest + class Border class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -712,6 +616,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class FindReplaceRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class AddSheetRequest class Representation < Google::Apis::Core::JsonRepresentation; end @@ -748,19 +658,19 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class UnmergeCellsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class GridProperties class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class Sheet + class UnmergeCellsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UpdateEmbeddedObjectPositionResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -772,7 +682,7 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class UpdateEmbeddedObjectPositionResponse + class Sheet class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -808,13 +718,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class BasicChartDomain + class DataValidationRule class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class DataValidationRule + class BasicChartDomain class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -827,277 +737,93 @@ module Google end class AppendDimensionRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :dimension, as: 'dimension' - property :length, as: 'length' - property :sheet_id, as: 'sheetId' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class AddNamedRangeRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :named_range, as: 'namedRange', class: Google::Apis::SheetsV4::NamedRange, decorator: Google::Apis::SheetsV4::NamedRange::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class UpdateEmbeddedObjectPositionRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :new_position, as: 'newPosition', class: Google::Apis::SheetsV4::EmbeddedObjectPosition, decorator: Google::Apis::SheetsV4::EmbeddedObjectPosition::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :fields, as: 'fields' - property :object_id_prop, as: 'objectId' - end + include Google::Apis::Core::JsonObjectSupport end class TextRotation - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :angle, as: 'angle' - property :vertical, as: 'vertical' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class PieChartSpec - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :series, as: 'series', class: Google::Apis::SheetsV4::ChartData, decorator: Google::Apis::SheetsV4::ChartData::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :legend_position, as: 'legendPosition' - property :pie_hole, as: 'pieHole' - property :domain, as: 'domain', class: Google::Apis::SheetsV4::ChartData, decorator: Google::Apis::SheetsV4::ChartData::Representation - - property :three_dimensional, as: 'threeDimensional' - end + include Google::Apis::Core::JsonObjectSupport end class UpdateFilterViewRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :filter, as: 'filter', class: Google::Apis::SheetsV4::FilterView, decorator: Google::Apis::SheetsV4::FilterView::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :fields, as: 'fields' - end + include Google::Apis::Core::JsonObjectSupport end class ConditionalFormatRule - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :ranges, as: 'ranges', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :gradient_rule, as: 'gradientRule', class: Google::Apis::SheetsV4::GradientRule, decorator: Google::Apis::SheetsV4::GradientRule::Representation - - property :boolean_rule, as: 'booleanRule', class: Google::Apis::SheetsV4::BooleanRule, decorator: Google::Apis::SheetsV4::BooleanRule::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class CopyPasteRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :paste_orientation, as: 'pasteOrientation' - property :source, as: 'source', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :paste_type, as: 'pasteType' - property :destination, as: 'destination', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class BooleanCondition - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :type, as: 'type' - collection :values, as: 'values', class: Google::Apis::SheetsV4::ConditionValue, decorator: Google::Apis::SheetsV4::ConditionValue::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class Request - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :add_sheet, as: 'addSheet', class: Google::Apis::SheetsV4::AddSheetRequest, decorator: Google::Apis::SheetsV4::AddSheetRequest::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :update_protected_range, as: 'updateProtectedRange', class: Google::Apis::SheetsV4::UpdateProtectedRangeRequest, decorator: Google::Apis::SheetsV4::UpdateProtectedRangeRequest::Representation - - property :delete_filter_view, as: 'deleteFilterView', class: Google::Apis::SheetsV4::DeleteFilterViewRequest, decorator: Google::Apis::SheetsV4::DeleteFilterViewRequest::Representation - - property :copy_paste, as: 'copyPaste', class: Google::Apis::SheetsV4::CopyPasteRequest, decorator: Google::Apis::SheetsV4::CopyPasteRequest::Representation - - property :insert_dimension, as: 'insertDimension', class: Google::Apis::SheetsV4::InsertDimensionRequest, decorator: Google::Apis::SheetsV4::InsertDimensionRequest::Representation - - property :delete_range, as: 'deleteRange', class: Google::Apis::SheetsV4::DeleteRangeRequest, decorator: Google::Apis::SheetsV4::DeleteRangeRequest::Representation - - property :delete_banding, as: 'deleteBanding', class: Google::Apis::SheetsV4::DeleteBandingRequest, decorator: Google::Apis::SheetsV4::DeleteBandingRequest::Representation - - property :add_filter_view, as: 'addFilterView', class: Google::Apis::SheetsV4::AddFilterViewRequest, decorator: Google::Apis::SheetsV4::AddFilterViewRequest::Representation - - property :set_data_validation, as: 'setDataValidation', class: Google::Apis::SheetsV4::SetDataValidationRequest, decorator: Google::Apis::SheetsV4::SetDataValidationRequest::Representation - - property :update_borders, as: 'updateBorders', class: Google::Apis::SheetsV4::UpdateBordersRequest, decorator: Google::Apis::SheetsV4::UpdateBordersRequest::Representation - - property :delete_conditional_format_rule, as: 'deleteConditionalFormatRule', class: Google::Apis::SheetsV4::DeleteConditionalFormatRuleRequest, decorator: Google::Apis::SheetsV4::DeleteConditionalFormatRuleRequest::Representation - - property :clear_basic_filter, as: 'clearBasicFilter', class: Google::Apis::SheetsV4::ClearBasicFilterRequest, decorator: Google::Apis::SheetsV4::ClearBasicFilterRequest::Representation - - property :repeat_cell, as: 'repeatCell', class: Google::Apis::SheetsV4::RepeatCellRequest, decorator: Google::Apis::SheetsV4::RepeatCellRequest::Representation - - property :append_dimension, as: 'appendDimension', class: Google::Apis::SheetsV4::AppendDimensionRequest, decorator: Google::Apis::SheetsV4::AppendDimensionRequest::Representation - - property :update_conditional_format_rule, as: 'updateConditionalFormatRule', class: Google::Apis::SheetsV4::UpdateConditionalFormatRuleRequest, decorator: Google::Apis::SheetsV4::UpdateConditionalFormatRuleRequest::Representation - - property :insert_range, as: 'insertRange', class: Google::Apis::SheetsV4::InsertRangeRequest, decorator: Google::Apis::SheetsV4::InsertRangeRequest::Representation - - property :move_dimension, as: 'moveDimension', class: Google::Apis::SheetsV4::MoveDimensionRequest, decorator: Google::Apis::SheetsV4::MoveDimensionRequest::Representation - - property :update_banding, as: 'updateBanding', class: Google::Apis::SheetsV4::UpdateBandingRequest, decorator: Google::Apis::SheetsV4::UpdateBandingRequest::Representation - - property :delete_named_range, as: 'deleteNamedRange', class: Google::Apis::SheetsV4::DeleteNamedRangeRequest, decorator: Google::Apis::SheetsV4::DeleteNamedRangeRequest::Representation - - property :add_protected_range, as: 'addProtectedRange', class: Google::Apis::SheetsV4::AddProtectedRangeRequest, decorator: Google::Apis::SheetsV4::AddProtectedRangeRequest::Representation - - property :duplicate_sheet, as: 'duplicateSheet', class: Google::Apis::SheetsV4::DuplicateSheetRequest, decorator: Google::Apis::SheetsV4::DuplicateSheetRequest::Representation - - property :delete_sheet, as: 'deleteSheet', class: Google::Apis::SheetsV4::DeleteSheetRequest, decorator: Google::Apis::SheetsV4::DeleteSheetRequest::Representation - - property :unmerge_cells, as: 'unmergeCells', class: Google::Apis::SheetsV4::UnmergeCellsRequest, decorator: Google::Apis::SheetsV4::UnmergeCellsRequest::Representation - - property :update_embedded_object_position, as: 'updateEmbeddedObjectPosition', class: Google::Apis::SheetsV4::UpdateEmbeddedObjectPositionRequest, decorator: Google::Apis::SheetsV4::UpdateEmbeddedObjectPositionRequest::Representation - - property :update_dimension_properties, as: 'updateDimensionProperties', class: Google::Apis::SheetsV4::UpdateDimensionPropertiesRequest, decorator: Google::Apis::SheetsV4::UpdateDimensionPropertiesRequest::Representation - - property :paste_data, as: 'pasteData', class: Google::Apis::SheetsV4::PasteDataRequest, decorator: Google::Apis::SheetsV4::PasteDataRequest::Representation - - property :set_basic_filter, as: 'setBasicFilter', class: Google::Apis::SheetsV4::SetBasicFilterRequest, decorator: Google::Apis::SheetsV4::SetBasicFilterRequest::Representation - - property :add_conditional_format_rule, as: 'addConditionalFormatRule', class: Google::Apis::SheetsV4::AddConditionalFormatRuleRequest, decorator: Google::Apis::SheetsV4::AddConditionalFormatRuleRequest::Representation - - property :update_cells, as: 'updateCells', class: Google::Apis::SheetsV4::UpdateCellsRequest, decorator: Google::Apis::SheetsV4::UpdateCellsRequest::Representation - - property :add_named_range, as: 'addNamedRange', class: Google::Apis::SheetsV4::AddNamedRangeRequest, decorator: Google::Apis::SheetsV4::AddNamedRangeRequest::Representation - - property :update_spreadsheet_properties, as: 'updateSpreadsheetProperties', class: Google::Apis::SheetsV4::UpdateSpreadsheetPropertiesRequest, decorator: Google::Apis::SheetsV4::UpdateSpreadsheetPropertiesRequest::Representation - - property :delete_embedded_object, as: 'deleteEmbeddedObject', class: Google::Apis::SheetsV4::DeleteEmbeddedObjectRequest, decorator: Google::Apis::SheetsV4::DeleteEmbeddedObjectRequest::Representation - - property :update_filter_view, as: 'updateFilterView', class: Google::Apis::SheetsV4::UpdateFilterViewRequest, decorator: Google::Apis::SheetsV4::UpdateFilterViewRequest::Representation - - property :add_banding, as: 'addBanding', class: Google::Apis::SheetsV4::AddBandingRequest, decorator: Google::Apis::SheetsV4::AddBandingRequest::Representation - - property :append_cells, as: 'appendCells', class: Google::Apis::SheetsV4::AppendCellsRequest, decorator: Google::Apis::SheetsV4::AppendCellsRequest::Representation - - property :auto_resize_dimensions, as: 'autoResizeDimensions', class: Google::Apis::SheetsV4::AutoResizeDimensionsRequest, decorator: Google::Apis::SheetsV4::AutoResizeDimensionsRequest::Representation - - property :cut_paste, as: 'cutPaste', class: Google::Apis::SheetsV4::CutPasteRequest, decorator: Google::Apis::SheetsV4::CutPasteRequest::Representation - - property :merge_cells, as: 'mergeCells', class: Google::Apis::SheetsV4::MergeCellsRequest, decorator: Google::Apis::SheetsV4::MergeCellsRequest::Representation - - property :update_named_range, as: 'updateNamedRange', class: Google::Apis::SheetsV4::UpdateNamedRangeRequest, decorator: Google::Apis::SheetsV4::UpdateNamedRangeRequest::Representation - - property :update_sheet_properties, as: 'updateSheetProperties', class: Google::Apis::SheetsV4::UpdateSheetPropertiesRequest, decorator: Google::Apis::SheetsV4::UpdateSheetPropertiesRequest::Representation - - property :delete_dimension, as: 'deleteDimension', class: Google::Apis::SheetsV4::DeleteDimensionRequest, decorator: Google::Apis::SheetsV4::DeleteDimensionRequest::Representation - - property :auto_fill, as: 'autoFill', class: Google::Apis::SheetsV4::AutoFillRequest, decorator: Google::Apis::SheetsV4::AutoFillRequest::Representation - - property :sort_range, as: 'sortRange', class: Google::Apis::SheetsV4::SortRangeRequest, decorator: Google::Apis::SheetsV4::SortRangeRequest::Representation - - property :delete_protected_range, as: 'deleteProtectedRange', class: Google::Apis::SheetsV4::DeleteProtectedRangeRequest, decorator: Google::Apis::SheetsV4::DeleteProtectedRangeRequest::Representation - - property :duplicate_filter_view, as: 'duplicateFilterView', class: Google::Apis::SheetsV4::DuplicateFilterViewRequest, decorator: Google::Apis::SheetsV4::DuplicateFilterViewRequest::Representation - - property :add_chart, as: 'addChart', class: Google::Apis::SheetsV4::AddChartRequest, decorator: Google::Apis::SheetsV4::AddChartRequest::Representation - - property :find_replace, as: 'findReplace', class: Google::Apis::SheetsV4::FindReplaceRequest, decorator: Google::Apis::SheetsV4::FindReplaceRequest::Representation - - property :update_chart_spec, as: 'updateChartSpec', class: Google::Apis::SheetsV4::UpdateChartSpecRequest, decorator: Google::Apis::SheetsV4::UpdateChartSpecRequest::Representation - - property :text_to_columns, as: 'textToColumns', class: Google::Apis::SheetsV4::TextToColumnsRequest, decorator: Google::Apis::SheetsV4::TextToColumnsRequest::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class GridRange - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :start_row_index, as: 'startRowIndex' - property :start_column_index, as: 'startColumnIndex' - property :sheet_id, as: 'sheetId' - property :end_row_index, as: 'endRowIndex' - property :end_column_index, as: 'endColumnIndex' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class BasicChartSpec - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :chart_type, as: 'chartType' - collection :series, as: 'series', class: Google::Apis::SheetsV4::BasicChartSeries, decorator: Google::Apis::SheetsV4::BasicChartSeries::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :legend_position, as: 'legendPosition' - collection :domains, as: 'domains', class: Google::Apis::SheetsV4::BasicChartDomain, decorator: Google::Apis::SheetsV4::BasicChartDomain::Representation - - property :header_count, as: 'headerCount' - collection :axis, as: 'axis', class: Google::Apis::SheetsV4::BasicChartAxis, decorator: Google::Apis::SheetsV4::BasicChartAxis::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class SetDataValidationRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :rule, as: 'rule', class: Google::Apis::SheetsV4::DataValidationRule, decorator: Google::Apis::SheetsV4::DataValidationRule::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class CellData - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :effective_format, as: 'effectiveFormat', class: Google::Apis::SheetsV4::CellFormat, decorator: Google::Apis::SheetsV4::CellFormat::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :note, as: 'note' - property :data_validation, as: 'dataValidation', class: Google::Apis::SheetsV4::DataValidationRule, decorator: Google::Apis::SheetsV4::DataValidationRule::Representation - - property :user_entered_value, as: 'userEnteredValue', class: Google::Apis::SheetsV4::ExtendedValue, decorator: Google::Apis::SheetsV4::ExtendedValue::Representation - - property :effective_value, as: 'effectiveValue', class: Google::Apis::SheetsV4::ExtendedValue, decorator: Google::Apis::SheetsV4::ExtendedValue::Representation - - collection :text_format_runs, as: 'textFormatRuns', class: Google::Apis::SheetsV4::TextFormatRun, decorator: Google::Apis::SheetsV4::TextFormatRun::Representation - - property :formatted_value, as: 'formattedValue' - property :hyperlink, as: 'hyperlink' - property :pivot_table, as: 'pivotTable', class: Google::Apis::SheetsV4::PivotTable, decorator: Google::Apis::SheetsV4::PivotTable::Representation - - property :user_entered_format, as: 'userEnteredFormat', class: Google::Apis::SheetsV4::CellFormat, decorator: Google::Apis::SheetsV4::CellFormat::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class BatchUpdateSpreadsheetRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :include_spreadsheet_in_response, as: 'includeSpreadsheetInResponse' - collection :response_ranges, as: 'responseRanges' - property :response_include_grid_data, as: 'responseIncludeGridData' - collection :requests, as: 'requests', class: Google::Apis::SheetsV4::Request, decorator: Google::Apis::SheetsV4::Request::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class BasicChartAxis - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :format, as: 'format', class: Google::Apis::SheetsV4::TextFormat, decorator: Google::Apis::SheetsV4::TextFormat::Representation - - property :position, as: 'position' - property :title, as: 'title' - end + include Google::Apis::Core::JsonObjectSupport end class Padding @@ -1110,6 +836,16 @@ module Google end end + class BasicChartAxis + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :position, as: 'position' + property :title, as: 'title' + property :format, as: 'format', class: Google::Apis::SheetsV4::TextFormat, decorator: Google::Apis::SheetsV4::TextFormat::Representation + + end + end + class DeleteDimensionRequest # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1137,13 +873,13 @@ module Google class BatchUpdateValuesResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - property :total_updated_rows, as: 'totalUpdatedRows' - collection :responses, as: 'responses', class: Google::Apis::SheetsV4::UpdateValuesResponse, decorator: Google::Apis::SheetsV4::UpdateValuesResponse::Representation - property :total_updated_sheets, as: 'totalUpdatedSheets' property :total_updated_cells, as: 'totalUpdatedCells' property :total_updated_columns, as: 'totalUpdatedColumns' property :spreadsheet_id, as: 'spreadsheetId' + property :total_updated_rows, as: 'totalUpdatedRows' + collection :responses, as: 'responses', class: Google::Apis::SheetsV4::UpdateValuesResponse, decorator: Google::Apis::SheetsV4::UpdateValuesResponse::Representation + end end @@ -1160,9 +896,9 @@ module Google class MergeCellsRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :merge_type, as: 'mergeType' property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + property :merge_type, as: 'mergeType' end end @@ -1197,16 +933,6 @@ module Google end end - class TextToColumnsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :delimiter, as: 'delimiter' - property :source, as: 'source', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - - property :delimiter_type, as: 'delimiterType' - end - end - class ClearBasicFilterRequest # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1214,6 +940,23 @@ module Google end end + class TextToColumnsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :source, as: 'source', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + property :delimiter_type, as: 'delimiterType' + property :delimiter, as: 'delimiter' + end + end + + class DeleteBandingRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :banded_range_id, as: 'bandedRangeId' + end + end + class BatchUpdateSpreadsheetResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1225,28 +968,20 @@ module Google end end - class DeleteBandingRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :banded_range_id, as: 'bandedRangeId' - end - end - class AppendValuesResponse # @private class Representation < Google::Apis::Core::JsonRepresentation + property :table_range, as: 'tableRange' property :spreadsheet_id, as: 'spreadsheetId' property :updates, as: 'updates', class: Google::Apis::SheetsV4::UpdateValuesResponse, decorator: Google::Apis::SheetsV4::UpdateValuesResponse::Representation - property :table_range, as: 'tableRange' end end - class MoveDimensionRequest + class AddFilterViewRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :destination_index, as: 'destinationIndex' - property :source, as: 'source', class: Google::Apis::SheetsV4::DimensionRange, decorator: Google::Apis::SheetsV4::DimensionRange::Representation + property :filter, as: 'filter', class: Google::Apis::SheetsV4::FilterView, decorator: Google::Apis::SheetsV4::FilterView::Representation end end @@ -1258,10 +993,11 @@ module Google end end - class AddFilterViewRequest + class MoveDimensionRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :filter, as: 'filter', class: Google::Apis::SheetsV4::FilterView, decorator: Google::Apis::SheetsV4::FilterView::Representation + property :destination_index, as: 'destinationIndex' + property :source, as: 'source', class: Google::Apis::SheetsV4::DimensionRange, decorator: Google::Apis::SheetsV4::DimensionRange::Representation end end @@ -1278,12 +1014,12 @@ module Google class ChartSpec # @private class Representation < Google::Apis::Core::JsonRepresentation - property :basic_chart, as: 'basicChart', class: Google::Apis::SheetsV4::BasicChartSpec, decorator: Google::Apis::SheetsV4::BasicChartSpec::Representation - - property :hidden_dimension_strategy, as: 'hiddenDimensionStrategy' property :title, as: 'title' property :pie_chart, as: 'pieChart', class: Google::Apis::SheetsV4::PieChartSpec, decorator: Google::Apis::SheetsV4::PieChartSpec::Representation + property :basic_chart, as: 'basicChart', class: Google::Apis::SheetsV4::BasicChartSpec, decorator: Google::Apis::SheetsV4::BasicChartSpec::Representation + + property :hidden_dimension_strategy, as: 'hiddenDimensionStrategy' end end @@ -1325,18 +1061,16 @@ module Google class SourceAndDestination # @private class Representation < Google::Apis::Core::JsonRepresentation - property :dimension, as: 'dimension' property :fill_length, as: 'fillLength' property :source, as: 'source', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + property :dimension, as: 'dimension' end end class FilterView # @private class Representation < Google::Apis::Core::JsonRepresentation - property :named_range_id, as: 'namedRangeId' - property :filter_view_id, as: 'filterViewId' hash :criteria, as: 'criteria', class: Google::Apis::SheetsV4::FilterCriteria, decorator: Google::Apis::SheetsV4::FilterCriteria::Representation property :title, as: 'title' @@ -1344,28 +1078,22 @@ module Google collection :sort_specs, as: 'sortSpecs', class: Google::Apis::SheetsV4::SortSpec, decorator: Google::Apis::SheetsV4::SortSpec::Representation + property :named_range_id, as: 'namedRangeId' + property :filter_view_id, as: 'filterViewId' end end class BandingProperties # @private class Representation < Google::Apis::Core::JsonRepresentation + property :first_band_color, as: 'firstBandColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation + property :second_band_color, as: 'secondBandColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation property :footer_color, as: 'footerColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation property :header_color, as: 'headerColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation - property :first_band_color, as: 'firstBandColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation - - end - end - - class AddProtectedRangeResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :protected_range, as: 'protectedRange', class: Google::Apis::SheetsV4::ProtectedRange, decorator: Google::Apis::SheetsV4::ProtectedRange::Representation - end end @@ -1381,16 +1109,32 @@ module Google end end + class AddProtectedRangeResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :protected_range, as: 'protectedRange', class: Google::Apis::SheetsV4::ProtectedRange, decorator: Google::Apis::SheetsV4::ProtectedRange::Representation + + end + end + class UpdateValuesResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - property :updated_rows, as: 'updatedRows' - property :updated_data, as: 'updatedData', class: Google::Apis::SheetsV4::ValueRange, decorator: Google::Apis::SheetsV4::ValueRange::Representation - property :updated_columns, as: 'updatedColumns' property :spreadsheet_id, as: 'spreadsheetId' property :updated_range, as: 'updatedRange' property :updated_cells, as: 'updatedCells' + property :updated_rows, as: 'updatedRows' + property :updated_data, as: 'updatedData', class: Google::Apis::SheetsV4::ValueRange, decorator: Google::Apis::SheetsV4::ValueRange::Representation + + end + end + + class ErrorValue + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :type, as: 'type' + property :message, as: 'message' end end @@ -1404,14 +1148,6 @@ module Google end end - class ErrorValue - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :type, as: 'type' - property :message, as: 'message' - end - end - class CopySheetToAnotherSpreadsheetRequest # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1422,19 +1158,19 @@ module Google class PivotGroupSortValueBucket # @private class Representation < Google::Apis::Core::JsonRepresentation + property :values_index, as: 'valuesIndex' collection :buckets, as: 'buckets', class: Google::Apis::SheetsV4::ExtendedValue, decorator: Google::Apis::SheetsV4::ExtendedValue::Representation - property :values_index, as: 'valuesIndex' end end class EmbeddedObjectPosition # @private class Representation < Google::Apis::Core::JsonRepresentation + property :new_sheet, as: 'newSheet' property :sheet_id, as: 'sheetId' property :overlay_position, as: 'overlayPosition', class: Google::Apis::SheetsV4::OverlayPosition, decorator: Google::Apis::SheetsV4::OverlayPosition::Representation - property :new_sheet, as: 'newSheet' end end @@ -1448,11 +1184,11 @@ module Google class AutoFillRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - property :use_alternate_series, as: 'useAlternateSeries' property :source_and_destination, as: 'sourceAndDestination', class: Google::Apis::SheetsV4::SourceAndDestination, decorator: Google::Apis::SheetsV4::SourceAndDestination::Representation + property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + end end @@ -1495,11 +1231,11 @@ module Google class FindReplaceResponse # @private class Representation < Google::Apis::Core::JsonRepresentation + property :values_changed, as: 'valuesChanged' property :occurrences_changed, as: 'occurrencesChanged' property :rows_changed, as: 'rowsChanged' property :sheets_changed, as: 'sheetsChanged' property :formulas_changed, as: 'formulasChanged' - property :values_changed, as: 'valuesChanged' end end @@ -1527,22 +1263,12 @@ module Google class UpdateConditionalFormatRuleResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - property :old_rule, as: 'oldRule', class: Google::Apis::SheetsV4::ConditionalFormatRule, decorator: Google::Apis::SheetsV4::ConditionalFormatRule::Representation - property :new_index, as: 'newIndex' property :old_index, as: 'oldIndex' property :new_rule, as: 'newRule', class: Google::Apis::SheetsV4::ConditionalFormatRule, decorator: Google::Apis::SheetsV4::ConditionalFormatRule::Representation - end - end + property :old_rule, as: 'oldRule', class: Google::Apis::SheetsV4::ConditionalFormatRule, decorator: Google::Apis::SheetsV4::ConditionalFormatRule::Representation - class DuplicateSheetRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :new_sheet_name, as: 'newSheetName' - property :source_sheet_id, as: 'sourceSheetId' - property :new_sheet_id, as: 'newSheetId' - property :insert_sheet_index, as: 'insertSheetIndex' end end @@ -1554,6 +1280,16 @@ module Google end end + class DuplicateSheetRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :new_sheet_id, as: 'newSheetId' + property :insert_sheet_index, as: 'insertSheetIndex' + property :new_sheet_name, as: 'newSheetName' + property :source_sheet_id, as: 'sourceSheetId' + end + end + class ExtendedValue # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1569,13 +1305,13 @@ module Google class BandedRange # @private class Representation < Google::Apis::Core::JsonRepresentation + property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + property :banded_range_id, as: 'bandedRangeId' property :row_properties, as: 'rowProperties', class: Google::Apis::SheetsV4::BandingProperties, decorator: Google::Apis::SheetsV4::BandingProperties::Representation property :column_properties, as: 'columnProperties', class: Google::Apis::SheetsV4::BandingProperties, decorator: Google::Apis::SheetsV4::BandingProperties::Representation - property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - - property :banded_range_id, as: 'bandedRangeId' end end @@ -1590,14 +1326,14 @@ module Google class Spreadsheet # @private class Representation < Google::Apis::Core::JsonRepresentation - property :properties, as: 'properties', class: Google::Apis::SheetsV4::SpreadsheetProperties, decorator: Google::Apis::SheetsV4::SpreadsheetProperties::Representation - property :spreadsheet_id, as: 'spreadsheetId' collection :sheets, as: 'sheets', class: Google::Apis::SheetsV4::Sheet, decorator: Google::Apis::SheetsV4::Sheet::Representation collection :named_ranges, as: 'namedRanges', class: Google::Apis::SheetsV4::NamedRange, decorator: Google::Apis::SheetsV4::NamedRange::Representation property :spreadsheet_url, as: 'spreadsheetUrl' + property :properties, as: 'properties', class: Google::Apis::SheetsV4::SpreadsheetProperties, decorator: Google::Apis::SheetsV4::SpreadsheetProperties::Representation + end end @@ -1621,9 +1357,9 @@ module Google class TextFormat # @private class Representation < Google::Apis::Core::JsonRepresentation - property :bold, as: 'bold' property :foreground_color, as: 'foregroundColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation + property :bold, as: 'bold' property :font_family, as: 'fontFamily' property :italic, as: 'italic' property :strikethrough, as: 'strikethrough' @@ -1651,8 +1387,22 @@ module Google class IterativeCalculationSettings # @private class Representation < Google::Apis::Core::JsonRepresentation - property :convergence_threshold, as: 'convergenceThreshold' property :max_iterations, as: 'maxIterations' + property :convergence_threshold, as: 'convergenceThreshold' + end + end + + class SpreadsheetProperties + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :default_format, as: 'defaultFormat', class: Google::Apis::SheetsV4::CellFormat, decorator: Google::Apis::SheetsV4::CellFormat::Representation + + property :auto_recalc, as: 'autoRecalc' + property :title, as: 'title' + property :time_zone, as: 'timeZone' + property :locale, as: 'locale' + property :iterative_calculation_settings, as: 'iterativeCalculationSettings', class: Google::Apis::SheetsV4::IterativeCalculationSettings, decorator: Google::Apis::SheetsV4::IterativeCalculationSettings::Representation + end end @@ -1668,20 +1418,6 @@ module Google end end - class SpreadsheetProperties - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :iterative_calculation_settings, as: 'iterativeCalculationSettings', class: Google::Apis::SheetsV4::IterativeCalculationSettings, decorator: Google::Apis::SheetsV4::IterativeCalculationSettings::Representation - - property :auto_recalc, as: 'autoRecalc' - property :default_format, as: 'defaultFormat', class: Google::Apis::SheetsV4::CellFormat, decorator: Google::Apis::SheetsV4::CellFormat::Representation - - property :title, as: 'title' - property :time_zone, as: 'timeZone' - property :locale, as: 'locale' - end - end - class RepeatCellRequest # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1713,9 +1449,9 @@ module Google class UpdateSpreadsheetPropertiesRequest # @private class Representation < Google::Apis::Core::JsonRepresentation + property :fields, as: 'fields' property :properties, as: 'properties', class: Google::Apis::SheetsV4::SpreadsheetProperties, decorator: Google::Apis::SheetsV4::SpreadsheetProperties::Representation - property :fields, as: 'fields' end end @@ -1734,6 +1470,7 @@ module Google class ProtectedRange # @private class Representation < Google::Apis::Core::JsonRepresentation + property :requesting_user_can_edit, as: 'requestingUserCanEdit' property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation property :editors, as: 'editors', class: Google::Apis::SheetsV4::Editors, decorator: Google::Apis::SheetsV4::Editors::Representation @@ -1744,16 +1481,15 @@ module Google property :named_range_id, as: 'namedRangeId' property :protected_range_id, as: 'protectedRangeId' property :warning_only, as: 'warningOnly' - property :requesting_user_can_edit, as: 'requestingUserCanEdit' end end class DimensionProperties # @private class Representation < Google::Apis::Core::JsonRepresentation - property :pixel_size, as: 'pixelSize' property :hidden_by_filter, as: 'hiddenByFilter' property :hidden_by_user, as: 'hiddenByUser' + property :pixel_size, as: 'pixelSize' end end @@ -1770,10 +1506,10 @@ module Google class NamedRange # @private class Representation < Google::Apis::Core::JsonRepresentation + property :name, as: 'name' property :named_range_id, as: 'namedRangeId' property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - property :name, as: 'name' end end @@ -1788,20 +1524,6 @@ module Google end end - class Borders - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :left, as: 'left', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation - - property :right, as: 'right', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation - - property :bottom, as: 'bottom', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation - - property :top, as: 'top', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation - - end - end - class BasicChartSeries # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1812,6 +1534,20 @@ module Google end end + class Borders + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :right, as: 'right', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + + property :bottom, as: 'bottom', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + + property :top, as: 'top', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + + property :left, as: 'left', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + + end + end + class AutoResizeDimensionsRequest # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1843,31 +1579,31 @@ module Google class CellFormat # @private class Representation < Google::Apis::Core::JsonRepresentation - property :wrap_strategy, as: 'wrapStrategy' - property :text_rotation, as: 'textRotation', class: Google::Apis::SheetsV4::TextRotation, decorator: Google::Apis::SheetsV4::TextRotation::Representation - - property :number_format, as: 'numberFormat', class: Google::Apis::SheetsV4::NumberFormat, decorator: Google::Apis::SheetsV4::NumberFormat::Representation - - property :hyperlink_display_type, as: 'hyperlinkDisplayType' - property :horizontal_alignment, as: 'horizontalAlignment' property :text_format, as: 'textFormat', class: Google::Apis::SheetsV4::TextFormat, decorator: Google::Apis::SheetsV4::TextFormat::Representation property :background_color, as: 'backgroundColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation + property :vertical_alignment, as: 'verticalAlignment' property :padding, as: 'padding', class: Google::Apis::SheetsV4::Padding, decorator: Google::Apis::SheetsV4::Padding::Representation - property :vertical_alignment, as: 'verticalAlignment' property :borders, as: 'borders', class: Google::Apis::SheetsV4::Borders, decorator: Google::Apis::SheetsV4::Borders::Representation property :text_direction, as: 'textDirection' + property :text_rotation, as: 'textRotation', class: Google::Apis::SheetsV4::TextRotation, decorator: Google::Apis::SheetsV4::TextRotation::Representation + + property :wrap_strategy, as: 'wrapStrategy' + property :number_format, as: 'numberFormat', class: Google::Apis::SheetsV4::NumberFormat, decorator: Google::Apis::SheetsV4::NumberFormat::Representation + + property :horizontal_alignment, as: 'horizontalAlignment' + property :hyperlink_display_type, as: 'hyperlinkDisplayType' end end class ClearValuesResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - property :cleared_range, as: 'clearedRange' property :spreadsheet_id, as: 'spreadsheetId' + property :cleared_range, as: 'clearedRange' end end @@ -1879,13 +1615,6 @@ module Google end end - class DeleteNamedRangeRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :named_range_id, as: 'namedRangeId' - end - end - class AddBandingResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1894,6 +1623,13 @@ module Google end end + class DeleteNamedRangeRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :named_range_id, as: 'namedRangeId' + end + end + class ChartData # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1905,9 +1641,9 @@ module Google class BatchGetValuesResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - property :spreadsheet_id, as: 'spreadsheetId' collection :value_ranges, as: 'valueRanges', class: Google::Apis::SheetsV4::ValueRange, decorator: Google::Apis::SheetsV4::ValueRange::Representation + property :spreadsheet_id, as: 'spreadsheetId' end end @@ -1923,10 +1659,10 @@ module Google class Color # @private class Representation < Google::Apis::Core::JsonRepresentation - property :red, as: 'red' property :green, as: 'green' property :blue, as: 'blue' property :alpha, as: 'alpha' + property :red, as: 'red' end end @@ -1946,17 +1682,17 @@ module Google class PivotTable # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :values, as: 'values', class: Google::Apis::SheetsV4::PivotValue, decorator: Google::Apis::SheetsV4::PivotValue::Representation - - property :source, as: 'source', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - - collection :columns, as: 'columns', class: Google::Apis::SheetsV4::PivotGroup, decorator: Google::Apis::SheetsV4::PivotGroup::Representation - hash :criteria, as: 'criteria', class: Google::Apis::SheetsV4::PivotFilterCriteria, decorator: Google::Apis::SheetsV4::PivotFilterCriteria::Representation collection :rows, as: 'rows', class: Google::Apis::SheetsV4::PivotGroup, decorator: Google::Apis::SheetsV4::PivotGroup::Representation property :value_layout, as: 'valueLayout' + property :source, as: 'source', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + collection :columns, as: 'columns', class: Google::Apis::SheetsV4::PivotGroup, decorator: Google::Apis::SheetsV4::PivotGroup::Representation + + collection :values, as: 'values', class: Google::Apis::SheetsV4::PivotValue, decorator: Google::Apis::SheetsV4::PivotValue::Representation + end end @@ -1968,16 +1704,6 @@ module Google end end - class AppendCellsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :rows, as: 'rows', class: Google::Apis::SheetsV4::RowData, decorator: Google::Apis::SheetsV4::RowData::Representation - - property :fields, as: 'fields' - property :sheet_id, as: 'sheetId' - end - end - class ValueRange # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1991,6 +1717,16 @@ module Google end end + class AppendCellsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :sheet_id, as: 'sheetId' + collection :rows, as: 'rows', class: Google::Apis::SheetsV4::RowData, decorator: Google::Apis::SheetsV4::RowData::Representation + + property :fields, as: 'fields' + end + end + class AddBandingRequest # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -2002,8 +1738,6 @@ module Google class Response # @private class Representation < Google::Apis::Core::JsonRepresentation - property :add_sheet, as: 'addSheet', class: Google::Apis::SheetsV4::AddSheetResponse, decorator: Google::Apis::SheetsV4::AddSheetResponse::Representation - property :update_conditional_format_rule, as: 'updateConditionalFormatRule', class: Google::Apis::SheetsV4::UpdateConditionalFormatRuleResponse, decorator: Google::Apis::SheetsV4::UpdateConditionalFormatRuleResponse::Representation property :add_named_range, as: 'addNamedRange', class: Google::Apis::SheetsV4::AddNamedRangeResponse, decorator: Google::Apis::SheetsV4::AddNamedRangeResponse::Representation @@ -2026,34 +1760,36 @@ module Google property :find_replace, as: 'findReplace', class: Google::Apis::SheetsV4::FindReplaceResponse, decorator: Google::Apis::SheetsV4::FindReplaceResponse::Representation - end - end + property :add_sheet, as: 'addSheet', class: Google::Apis::SheetsV4::AddSheetResponse, decorator: Google::Apis::SheetsV4::AddSheetResponse::Representation - class InsertRangeRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - - property :shift_dimension, as: 'shiftDimension' - end - end - - class TextFormatRun - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :format, as: 'format', class: Google::Apis::SheetsV4::TextFormat, decorator: Google::Apis::SheetsV4::TextFormat::Representation - - property :start_index, as: 'startIndex' end end class EmbeddedChart # @private class Representation < Google::Apis::Core::JsonRepresentation + property :spec, as: 'spec', class: Google::Apis::SheetsV4::ChartSpec, decorator: Google::Apis::SheetsV4::ChartSpec::Representation + property :chart_id, as: 'chartId' property :position, as: 'position', class: Google::Apis::SheetsV4::EmbeddedObjectPosition, decorator: Google::Apis::SheetsV4::EmbeddedObjectPosition::Representation - property :spec, as: 'spec', class: Google::Apis::SheetsV4::ChartSpec, decorator: Google::Apis::SheetsV4::ChartSpec::Representation + end + end + + class TextFormatRun + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :start_index, as: 'startIndex' + property :format, as: 'format', class: Google::Apis::SheetsV4::TextFormat, decorator: Google::Apis::SheetsV4::TextFormat::Representation + + end + end + + class InsertRangeRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :shift_dimension, as: 'shiftDimension' + property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation end end @@ -2074,27 +1810,36 @@ module Google end end - class Border - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :width, as: 'width' - property :style, as: 'style' - property :color, as: 'color', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation - - end - end - class GridData # @private class Representation < Google::Apis::Core::JsonRepresentation + property :start_column, as: 'startColumn' + collection :row_metadata, as: 'rowMetadata', class: Google::Apis::SheetsV4::DimensionProperties, decorator: Google::Apis::SheetsV4::DimensionProperties::Representation + collection :row_data, as: 'rowData', class: Google::Apis::SheetsV4::RowData, decorator: Google::Apis::SheetsV4::RowData::Representation property :start_row, as: 'startRow' collection :column_metadata, as: 'columnMetadata', class: Google::Apis::SheetsV4::DimensionProperties, decorator: Google::Apis::SheetsV4::DimensionProperties::Representation - property :start_column, as: 'startColumn' - collection :row_metadata, as: 'rowMetadata', class: Google::Apis::SheetsV4::DimensionProperties, decorator: Google::Apis::SheetsV4::DimensionProperties::Representation + end + end + class Border + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :color, as: 'color', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation + + property :width, as: 'width' + property :style, as: 'style' + end + end + + class UpdateNamedRangeRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :named_range, as: 'namedRange', class: Google::Apis::SheetsV4::NamedRange, decorator: Google::Apis::SheetsV4::NamedRange::Representation + + property :fields, as: 'fields' end end @@ -2105,21 +1850,12 @@ module Google property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation property :sheet_id, as: 'sheetId' - property :all_sheets, as: 'allSheets' property :match_case, as: 'matchCase' + property :all_sheets, as: 'allSheets' property :include_formulas, as: 'includeFormulas' property :match_entire_cell, as: 'matchEntireCell' - property :search_by_regex, as: 'searchByRegex' property :find, as: 'find' - end - end - - class UpdateNamedRangeRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :named_range, as: 'namedRange', class: Google::Apis::SheetsV4::NamedRange, decorator: Google::Apis::SheetsV4::NamedRange::Representation - - property :fields, as: 'fields' + property :search_by_regex, as: 'searchByRegex' end end @@ -2164,18 +1900,29 @@ module Google class GridCoordinate # @private class Representation < Google::Apis::Core::JsonRepresentation - property :sheet_id, as: 'sheetId' property :row_index, as: 'rowIndex' property :column_index, as: 'columnIndex' + property :sheet_id, as: 'sheetId' end end class UpdateSheetPropertiesRequest # @private class Representation < Google::Apis::Core::JsonRepresentation + property :fields, as: 'fields' property :properties, as: 'properties', class: Google::Apis::SheetsV4::SheetProperties, decorator: Google::Apis::SheetsV4::SheetProperties::Representation - property :fields, as: 'fields' + end + end + + class GridProperties + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :row_count, as: 'rowCount' + property :frozen_row_count, as: 'frozenRowCount' + property :hide_gridlines, as: 'hideGridlines' + property :column_count, as: 'columnCount' + property :frozen_column_count, as: 'frozenColumnCount' end end @@ -2187,37 +1934,10 @@ module Google end end - class GridProperties + class UpdateEmbeddedObjectPositionResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - property :column_count, as: 'columnCount' - property :frozen_column_count, as: 'frozenColumnCount' - property :row_count, as: 'rowCount' - property :frozen_row_count, as: 'frozenRowCount' - property :hide_gridlines, as: 'hideGridlines' - end - end - - class Sheet - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :properties, as: 'properties', class: Google::Apis::SheetsV4::SheetProperties, decorator: Google::Apis::SheetsV4::SheetProperties::Representation - - collection :charts, as: 'charts', class: Google::Apis::SheetsV4::EmbeddedChart, decorator: Google::Apis::SheetsV4::EmbeddedChart::Representation - - collection :filter_views, as: 'filterViews', class: Google::Apis::SheetsV4::FilterView, decorator: Google::Apis::SheetsV4::FilterView::Representation - - collection :protected_ranges, as: 'protectedRanges', class: Google::Apis::SheetsV4::ProtectedRange, decorator: Google::Apis::SheetsV4::ProtectedRange::Representation - - collection :conditional_formats, as: 'conditionalFormats', class: Google::Apis::SheetsV4::ConditionalFormatRule, decorator: Google::Apis::SheetsV4::ConditionalFormatRule::Representation - - property :basic_filter, as: 'basicFilter', class: Google::Apis::SheetsV4::BasicFilter, decorator: Google::Apis::SheetsV4::BasicFilter::Representation - - collection :merges, as: 'merges', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - - collection :data, as: 'data', class: Google::Apis::SheetsV4::GridData, decorator: Google::Apis::SheetsV4::GridData::Representation - - collection :banded_ranges, as: 'bandedRanges', class: Google::Apis::SheetsV4::BandedRange, decorator: Google::Apis::SheetsV4::BandedRange::Representation + property :position, as: 'position', class: Google::Apis::SheetsV4::EmbeddedObjectPosition, decorator: Google::Apis::SheetsV4::EmbeddedObjectPosition::Representation end end @@ -2230,10 +1950,26 @@ module Google end end - class UpdateEmbeddedObjectPositionResponse + class Sheet # @private class Representation < Google::Apis::Core::JsonRepresentation - property :position, as: 'position', class: Google::Apis::SheetsV4::EmbeddedObjectPosition, decorator: Google::Apis::SheetsV4::EmbeddedObjectPosition::Representation + collection :protected_ranges, as: 'protectedRanges', class: Google::Apis::SheetsV4::ProtectedRange, decorator: Google::Apis::SheetsV4::ProtectedRange::Representation + + collection :conditional_formats, as: 'conditionalFormats', class: Google::Apis::SheetsV4::ConditionalFormatRule, decorator: Google::Apis::SheetsV4::ConditionalFormatRule::Representation + + property :basic_filter, as: 'basicFilter', class: Google::Apis::SheetsV4::BasicFilter, decorator: Google::Apis::SheetsV4::BasicFilter::Representation + + collection :merges, as: 'merges', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + collection :data, as: 'data', class: Google::Apis::SheetsV4::GridData, decorator: Google::Apis::SheetsV4::GridData::Representation + + collection :banded_ranges, as: 'bandedRanges', class: Google::Apis::SheetsV4::BandedRange, decorator: Google::Apis::SheetsV4::BandedRange::Representation + + collection :charts, as: 'charts', class: Google::Apis::SheetsV4::EmbeddedChart, decorator: Google::Apis::SheetsV4::EmbeddedChart::Representation + + property :properties, as: 'properties', class: Google::Apis::SheetsV4::SheetProperties, decorator: Google::Apis::SheetsV4::SheetProperties::Representation + + collection :filter_views, as: 'filterViews', class: Google::Apis::SheetsV4::FilterView, decorator: Google::Apis::SheetsV4::FilterView::Representation end end @@ -2241,10 +1977,10 @@ module Google class BooleanRule # @private class Representation < Google::Apis::Core::JsonRepresentation - property :format, as: 'format', class: Google::Apis::SheetsV4::CellFormat, decorator: Google::Apis::SheetsV4::CellFormat::Representation - property :condition, as: 'condition', class: Google::Apis::SheetsV4::BooleanCondition, decorator: Google::Apis::SheetsV4::BooleanCondition::Representation + property :format, as: 'format', class: Google::Apis::SheetsV4::CellFormat, decorator: Google::Apis::SheetsV4::CellFormat::Representation + end end @@ -2278,10 +2014,21 @@ module Google class UpdateConditionalFormatRuleRequest # @private class Representation < Google::Apis::Core::JsonRepresentation + property :rule, as: 'rule', class: Google::Apis::SheetsV4::ConditionalFormatRule, decorator: Google::Apis::SheetsV4::ConditionalFormatRule::Representation + property :index, as: 'index' property :sheet_id, as: 'sheetId' property :new_index, as: 'newIndex' - property :rule, as: 'rule', class: Google::Apis::SheetsV4::ConditionalFormatRule, decorator: Google::Apis::SheetsV4::ConditionalFormatRule::Representation + end + end + + class DataValidationRule + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :show_custom_ui, as: 'showCustomUi' + property :strict, as: 'strict' + property :input_message, as: 'inputMessage' + property :condition, as: 'condition', class: Google::Apis::SheetsV4::BooleanCondition, decorator: Google::Apis::SheetsV4::BooleanCondition::Representation end end @@ -2294,26 +2041,279 @@ module Google end end - class DataValidationRule - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :input_message, as: 'inputMessage' - property :condition, as: 'condition', class: Google::Apis::SheetsV4::BooleanCondition, decorator: Google::Apis::SheetsV4::BooleanCondition::Representation - - property :show_custom_ui, as: 'showCustomUi' - property :strict, as: 'strict' - end - end - class PasteDataRequest # @private class Representation < Google::Apis::Core::JsonRepresentation + property :data, as: 'data' + property :delimiter, as: 'delimiter' property :type, as: 'type' property :html, as: 'html' property :coordinate, as: 'coordinate', class: Google::Apis::SheetsV4::GridCoordinate, decorator: Google::Apis::SheetsV4::GridCoordinate::Representation - property :data, as: 'data' - property :delimiter, as: 'delimiter' + end + end + + class AppendDimensionRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :dimension, as: 'dimension' + property :length, as: 'length' + property :sheet_id, as: 'sheetId' + end + end + + class AddNamedRangeRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :named_range, as: 'namedRange', class: Google::Apis::SheetsV4::NamedRange, decorator: Google::Apis::SheetsV4::NamedRange::Representation + + end + end + + class UpdateEmbeddedObjectPositionRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :fields, as: 'fields' + property :object_id_prop, as: 'objectId' + property :new_position, as: 'newPosition', class: Google::Apis::SheetsV4::EmbeddedObjectPosition, decorator: Google::Apis::SheetsV4::EmbeddedObjectPosition::Representation + + end + end + + class TextRotation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :vertical, as: 'vertical' + property :angle, as: 'angle' + end + end + + class PieChartSpec + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :domain, as: 'domain', class: Google::Apis::SheetsV4::ChartData, decorator: Google::Apis::SheetsV4::ChartData::Representation + + property :three_dimensional, as: 'threeDimensional' + property :series, as: 'series', class: Google::Apis::SheetsV4::ChartData, decorator: Google::Apis::SheetsV4::ChartData::Representation + + property :legend_position, as: 'legendPosition' + property :pie_hole, as: 'pieHole' + end + end + + class UpdateFilterViewRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :filter, as: 'filter', class: Google::Apis::SheetsV4::FilterView, decorator: Google::Apis::SheetsV4::FilterView::Representation + + property :fields, as: 'fields' + end + end + + class ConditionalFormatRule + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :boolean_rule, as: 'booleanRule', class: Google::Apis::SheetsV4::BooleanRule, decorator: Google::Apis::SheetsV4::BooleanRule::Representation + + collection :ranges, as: 'ranges', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + property :gradient_rule, as: 'gradientRule', class: Google::Apis::SheetsV4::GradientRule, decorator: Google::Apis::SheetsV4::GradientRule::Representation + + end + end + + class CopyPasteRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :source, as: 'source', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + property :paste_type, as: 'pasteType' + property :destination, as: 'destination', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + property :paste_orientation, as: 'pasteOrientation' + end + end + + class BooleanCondition + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :type, as: 'type' + collection :values, as: 'values', class: Google::Apis::SheetsV4::ConditionValue, decorator: Google::Apis::SheetsV4::ConditionValue::Representation + + end + end + + class Request + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :update_chart_spec, as: 'updateChartSpec', class: Google::Apis::SheetsV4::UpdateChartSpecRequest, decorator: Google::Apis::SheetsV4::UpdateChartSpecRequest::Representation + + property :text_to_columns, as: 'textToColumns', class: Google::Apis::SheetsV4::TextToColumnsRequest, decorator: Google::Apis::SheetsV4::TextToColumnsRequest::Representation + + property :add_sheet, as: 'addSheet', class: Google::Apis::SheetsV4::AddSheetRequest, decorator: Google::Apis::SheetsV4::AddSheetRequest::Representation + + property :update_protected_range, as: 'updateProtectedRange', class: Google::Apis::SheetsV4::UpdateProtectedRangeRequest, decorator: Google::Apis::SheetsV4::UpdateProtectedRangeRequest::Representation + + property :delete_filter_view, as: 'deleteFilterView', class: Google::Apis::SheetsV4::DeleteFilterViewRequest, decorator: Google::Apis::SheetsV4::DeleteFilterViewRequest::Representation + + property :copy_paste, as: 'copyPaste', class: Google::Apis::SheetsV4::CopyPasteRequest, decorator: Google::Apis::SheetsV4::CopyPasteRequest::Representation + + property :insert_dimension, as: 'insertDimension', class: Google::Apis::SheetsV4::InsertDimensionRequest, decorator: Google::Apis::SheetsV4::InsertDimensionRequest::Representation + + property :delete_range, as: 'deleteRange', class: Google::Apis::SheetsV4::DeleteRangeRequest, decorator: Google::Apis::SheetsV4::DeleteRangeRequest::Representation + + property :delete_banding, as: 'deleteBanding', class: Google::Apis::SheetsV4::DeleteBandingRequest, decorator: Google::Apis::SheetsV4::DeleteBandingRequest::Representation + + property :add_filter_view, as: 'addFilterView', class: Google::Apis::SheetsV4::AddFilterViewRequest, decorator: Google::Apis::SheetsV4::AddFilterViewRequest::Representation + + property :update_borders, as: 'updateBorders', class: Google::Apis::SheetsV4::UpdateBordersRequest, decorator: Google::Apis::SheetsV4::UpdateBordersRequest::Representation + + property :set_data_validation, as: 'setDataValidation', class: Google::Apis::SheetsV4::SetDataValidationRequest, decorator: Google::Apis::SheetsV4::SetDataValidationRequest::Representation + + property :delete_conditional_format_rule, as: 'deleteConditionalFormatRule', class: Google::Apis::SheetsV4::DeleteConditionalFormatRuleRequest, decorator: Google::Apis::SheetsV4::DeleteConditionalFormatRuleRequest::Representation + + property :repeat_cell, as: 'repeatCell', class: Google::Apis::SheetsV4::RepeatCellRequest, decorator: Google::Apis::SheetsV4::RepeatCellRequest::Representation + + property :clear_basic_filter, as: 'clearBasicFilter', class: Google::Apis::SheetsV4::ClearBasicFilterRequest, decorator: Google::Apis::SheetsV4::ClearBasicFilterRequest::Representation + + property :append_dimension, as: 'appendDimension', class: Google::Apis::SheetsV4::AppendDimensionRequest, decorator: Google::Apis::SheetsV4::AppendDimensionRequest::Representation + + property :update_conditional_format_rule, as: 'updateConditionalFormatRule', class: Google::Apis::SheetsV4::UpdateConditionalFormatRuleRequest, decorator: Google::Apis::SheetsV4::UpdateConditionalFormatRuleRequest::Representation + + property :insert_range, as: 'insertRange', class: Google::Apis::SheetsV4::InsertRangeRequest, decorator: Google::Apis::SheetsV4::InsertRangeRequest::Representation + + property :move_dimension, as: 'moveDimension', class: Google::Apis::SheetsV4::MoveDimensionRequest, decorator: Google::Apis::SheetsV4::MoveDimensionRequest::Representation + + property :update_banding, as: 'updateBanding', class: Google::Apis::SheetsV4::UpdateBandingRequest, decorator: Google::Apis::SheetsV4::UpdateBandingRequest::Representation + + property :delete_named_range, as: 'deleteNamedRange', class: Google::Apis::SheetsV4::DeleteNamedRangeRequest, decorator: Google::Apis::SheetsV4::DeleteNamedRangeRequest::Representation + + property :add_protected_range, as: 'addProtectedRange', class: Google::Apis::SheetsV4::AddProtectedRangeRequest, decorator: Google::Apis::SheetsV4::AddProtectedRangeRequest::Representation + + property :duplicate_sheet, as: 'duplicateSheet', class: Google::Apis::SheetsV4::DuplicateSheetRequest, decorator: Google::Apis::SheetsV4::DuplicateSheetRequest::Representation + + property :unmerge_cells, as: 'unmergeCells', class: Google::Apis::SheetsV4::UnmergeCellsRequest, decorator: Google::Apis::SheetsV4::UnmergeCellsRequest::Representation + + property :delete_sheet, as: 'deleteSheet', class: Google::Apis::SheetsV4::DeleteSheetRequest, decorator: Google::Apis::SheetsV4::DeleteSheetRequest::Representation + + property :update_embedded_object_position, as: 'updateEmbeddedObjectPosition', class: Google::Apis::SheetsV4::UpdateEmbeddedObjectPositionRequest, decorator: Google::Apis::SheetsV4::UpdateEmbeddedObjectPositionRequest::Representation + + property :update_dimension_properties, as: 'updateDimensionProperties', class: Google::Apis::SheetsV4::UpdateDimensionPropertiesRequest, decorator: Google::Apis::SheetsV4::UpdateDimensionPropertiesRequest::Representation + + property :paste_data, as: 'pasteData', class: Google::Apis::SheetsV4::PasteDataRequest, decorator: Google::Apis::SheetsV4::PasteDataRequest::Representation + + property :set_basic_filter, as: 'setBasicFilter', class: Google::Apis::SheetsV4::SetBasicFilterRequest, decorator: Google::Apis::SheetsV4::SetBasicFilterRequest::Representation + + property :add_conditional_format_rule, as: 'addConditionalFormatRule', class: Google::Apis::SheetsV4::AddConditionalFormatRuleRequest, decorator: Google::Apis::SheetsV4::AddConditionalFormatRuleRequest::Representation + + property :update_cells, as: 'updateCells', class: Google::Apis::SheetsV4::UpdateCellsRequest, decorator: Google::Apis::SheetsV4::UpdateCellsRequest::Representation + + property :add_named_range, as: 'addNamedRange', class: Google::Apis::SheetsV4::AddNamedRangeRequest, decorator: Google::Apis::SheetsV4::AddNamedRangeRequest::Representation + + property :update_spreadsheet_properties, as: 'updateSpreadsheetProperties', class: Google::Apis::SheetsV4::UpdateSpreadsheetPropertiesRequest, decorator: Google::Apis::SheetsV4::UpdateSpreadsheetPropertiesRequest::Representation + + property :delete_embedded_object, as: 'deleteEmbeddedObject', class: Google::Apis::SheetsV4::DeleteEmbeddedObjectRequest, decorator: Google::Apis::SheetsV4::DeleteEmbeddedObjectRequest::Representation + + property :update_filter_view, as: 'updateFilterView', class: Google::Apis::SheetsV4::UpdateFilterViewRequest, decorator: Google::Apis::SheetsV4::UpdateFilterViewRequest::Representation + + property :add_banding, as: 'addBanding', class: Google::Apis::SheetsV4::AddBandingRequest, decorator: Google::Apis::SheetsV4::AddBandingRequest::Representation + + property :auto_resize_dimensions, as: 'autoResizeDimensions', class: Google::Apis::SheetsV4::AutoResizeDimensionsRequest, decorator: Google::Apis::SheetsV4::AutoResizeDimensionsRequest::Representation + + property :append_cells, as: 'appendCells', class: Google::Apis::SheetsV4::AppendCellsRequest, decorator: Google::Apis::SheetsV4::AppendCellsRequest::Representation + + property :cut_paste, as: 'cutPaste', class: Google::Apis::SheetsV4::CutPasteRequest, decorator: Google::Apis::SheetsV4::CutPasteRequest::Representation + + property :merge_cells, as: 'mergeCells', class: Google::Apis::SheetsV4::MergeCellsRequest, decorator: Google::Apis::SheetsV4::MergeCellsRequest::Representation + + property :update_named_range, as: 'updateNamedRange', class: Google::Apis::SheetsV4::UpdateNamedRangeRequest, decorator: Google::Apis::SheetsV4::UpdateNamedRangeRequest::Representation + + property :update_sheet_properties, as: 'updateSheetProperties', class: Google::Apis::SheetsV4::UpdateSheetPropertiesRequest, decorator: Google::Apis::SheetsV4::UpdateSheetPropertiesRequest::Representation + + property :delete_dimension, as: 'deleteDimension', class: Google::Apis::SheetsV4::DeleteDimensionRequest, decorator: Google::Apis::SheetsV4::DeleteDimensionRequest::Representation + + property :auto_fill, as: 'autoFill', class: Google::Apis::SheetsV4::AutoFillRequest, decorator: Google::Apis::SheetsV4::AutoFillRequest::Representation + + property :sort_range, as: 'sortRange', class: Google::Apis::SheetsV4::SortRangeRequest, decorator: Google::Apis::SheetsV4::SortRangeRequest::Representation + + property :delete_protected_range, as: 'deleteProtectedRange', class: Google::Apis::SheetsV4::DeleteProtectedRangeRequest, decorator: Google::Apis::SheetsV4::DeleteProtectedRangeRequest::Representation + + property :duplicate_filter_view, as: 'duplicateFilterView', class: Google::Apis::SheetsV4::DuplicateFilterViewRequest, decorator: Google::Apis::SheetsV4::DuplicateFilterViewRequest::Representation + + property :add_chart, as: 'addChart', class: Google::Apis::SheetsV4::AddChartRequest, decorator: Google::Apis::SheetsV4::AddChartRequest::Representation + + property :find_replace, as: 'findReplace', class: Google::Apis::SheetsV4::FindReplaceRequest, decorator: Google::Apis::SheetsV4::FindReplaceRequest::Representation + + end + end + + class GridRange + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :sheet_id, as: 'sheetId' + property :end_row_index, as: 'endRowIndex' + property :end_column_index, as: 'endColumnIndex' + property :start_row_index, as: 'startRowIndex' + property :start_column_index, as: 'startColumnIndex' + end + end + + class BasicChartSpec + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :header_count, as: 'headerCount' + collection :axis, as: 'axis', class: Google::Apis::SheetsV4::BasicChartAxis, decorator: Google::Apis::SheetsV4::BasicChartAxis::Representation + + property :chart_type, as: 'chartType' + collection :series, as: 'series', class: Google::Apis::SheetsV4::BasicChartSeries, decorator: Google::Apis::SheetsV4::BasicChartSeries::Representation + + property :legend_position, as: 'legendPosition' + collection :domains, as: 'domains', class: Google::Apis::SheetsV4::BasicChartDomain, decorator: Google::Apis::SheetsV4::BasicChartDomain::Representation + + end + end + + class SetDataValidationRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :rule, as: 'rule', class: Google::Apis::SheetsV4::DataValidationRule, decorator: Google::Apis::SheetsV4::DataValidationRule::Representation + + property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + end + end + + class CellData + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :pivot_table, as: 'pivotTable', class: Google::Apis::SheetsV4::PivotTable, decorator: Google::Apis::SheetsV4::PivotTable::Representation + + property :user_entered_format, as: 'userEnteredFormat', class: Google::Apis::SheetsV4::CellFormat, decorator: Google::Apis::SheetsV4::CellFormat::Representation + + property :effective_format, as: 'effectiveFormat', class: Google::Apis::SheetsV4::CellFormat, decorator: Google::Apis::SheetsV4::CellFormat::Representation + + property :note, as: 'note' + property :user_entered_value, as: 'userEnteredValue', class: Google::Apis::SheetsV4::ExtendedValue, decorator: Google::Apis::SheetsV4::ExtendedValue::Representation + + property :data_validation, as: 'dataValidation', class: Google::Apis::SheetsV4::DataValidationRule, decorator: Google::Apis::SheetsV4::DataValidationRule::Representation + + property :effective_value, as: 'effectiveValue', class: Google::Apis::SheetsV4::ExtendedValue, decorator: Google::Apis::SheetsV4::ExtendedValue::Representation + + collection :text_format_runs, as: 'textFormatRuns', class: Google::Apis::SheetsV4::TextFormatRun, decorator: Google::Apis::SheetsV4::TextFormatRun::Representation + + property :formatted_value, as: 'formattedValue' + property :hyperlink, as: 'hyperlink' + end + end + + class BatchUpdateSpreadsheetRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :include_spreadsheet_in_response, as: 'includeSpreadsheetInResponse' + collection :response_ranges, as: 'responseRanges' + property :response_include_grid_data, as: 'responseIncludeGridData' + collection :requests, as: 'requests', class: Google::Apis::SheetsV4::Request, decorator: Google::Apis::SheetsV4::Request::Representation + end end end diff --git a/generated/google/apis/sheets_v4/service.rb b/generated/google/apis/sheets_v4/service.rb index 7458b1cfc..6103912b0 100644 --- a/generated/google/apis/sheets_v4/service.rb +++ b/generated/google/apis/sheets_v4/service.rb @@ -70,11 +70,11 @@ module Google # @param [Boolean] include_grid_data # True if grid data should be returned. # This parameter is ignored if a field mask was set in the request. + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -87,25 +87,25 @@ 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 get_spreadsheet(spreadsheet_id, ranges: nil, include_grid_data: nil, quota_user: nil, fields: nil, options: nil, &block) + def get_spreadsheet(spreadsheet_id, ranges: nil, include_grid_data: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v4/spreadsheets/{spreadsheetId}', options) command.response_representation = Google::Apis::SheetsV4::Spreadsheet::Representation command.response_class = Google::Apis::SheetsV4::Spreadsheet command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? command.query['ranges'] = ranges unless ranges.nil? command.query['includeGridData'] = include_grid_data unless include_grid_data.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Creates a spreadsheet, returning the newly created spreadsheet. # @param [Google::Apis::SheetsV4::Spreadsheet] spreadsheet_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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -118,14 +118,14 @@ 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 create_spreadsheet(spreadsheet_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def create_spreadsheet(spreadsheet_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v4/spreadsheets', options) command.request_representation = Google::Apis::SheetsV4::Spreadsheet::Representation command.request_object = spreadsheet_object command.response_representation = Google::Apis::SheetsV4::Spreadsheet::Representation command.response_class = Google::Apis::SheetsV4::Spreadsheet - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -148,11 +148,11 @@ module Google # @param [String] spreadsheet_id # The spreadsheet to apply the updates to. # @param [Google::Apis::SheetsV4::BatchUpdateSpreadsheetRequest] batch_update_spreadsheet_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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -165,15 +165,143 @@ 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 batch_update_spreadsheet(spreadsheet_id, batch_update_spreadsheet_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def batch_update_spreadsheet(spreadsheet_id, batch_update_spreadsheet_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}:batchUpdate', options) command.request_representation = Google::Apis::SheetsV4::BatchUpdateSpreadsheetRequest::Representation command.request_object = batch_update_spreadsheet_request_object command.response_representation = Google::Apis::SheetsV4::BatchUpdateSpreadsheetResponse::Representation command.response_class = Google::Apis::SheetsV4::BatchUpdateSpreadsheetResponse command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Copies a single sheet from a spreadsheet to another spreadsheet. + # Returns the properties of the newly created sheet. + # @param [String] spreadsheet_id + # The ID of the spreadsheet containing the sheet to copy. + # @param [Fixnum] sheet_id + # The ID of the sheet to copy. + # @param [Google::Apis::SheetsV4::CopySheetToAnotherSpreadsheetRequest] copy_sheet_to_another_spreadsheet_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::SheetsV4::SheetProperties] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SheetsV4::SheetProperties] + # + # @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 copy_spreadsheet(spreadsheet_id, sheet_id, copy_sheet_to_another_spreadsheet_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo', options) + command.request_representation = Google::Apis::SheetsV4::CopySheetToAnotherSpreadsheetRequest::Representation + command.request_object = copy_sheet_to_another_spreadsheet_request_object + command.response_representation = Google::Apis::SheetsV4::SheetProperties::Representation + command.response_class = Google::Apis::SheetsV4::SheetProperties + command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? + command.params['sheetId'] = sheet_id unless sheet_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Clears values from a spreadsheet. + # The caller must specify the spreadsheet ID and range. + # Only values are cleared -- all other properties of the cell (such as + # formatting, data validation, etc..) are kept. + # @param [String] spreadsheet_id + # The ID of the spreadsheet to update. + # @param [String] range + # The A1 notation of the values to clear. + # @param [Google::Apis::SheetsV4::ClearValuesRequest] clear_values_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::SheetsV4::ClearValuesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SheetsV4::ClearValuesResponse] + # + # @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 clear_values(spreadsheet_id, range, clear_values_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/values/{range}:clear', options) + command.request_representation = Google::Apis::SheetsV4::ClearValuesRequest::Representation + command.request_object = clear_values_request_object + command.response_representation = Google::Apis::SheetsV4::ClearValuesResponse::Representation + command.response_class = Google::Apis::SheetsV4::ClearValuesResponse + command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? + command.params['range'] = range unless range.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Returns one or more ranges of values from a spreadsheet. + # The caller must specify the spreadsheet ID and one or more ranges. + # @param [String] spreadsheet_id + # The ID of the spreadsheet to retrieve data from. + # @param [Array, String] ranges + # The A1 notation of the values to retrieve. + # @param [String] major_dimension + # The major dimension that results should use. + # For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, + # then requesting `range=A1:B2,majorDimension=ROWS` will return + # `[[1,2],[3,4]]`, + # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return + # `[[1,3],[2,4]]`. + # @param [String] value_render_option + # How values should be represented in the output. + # The default render option is ValueRenderOption.FORMATTED_VALUE. + # @param [String] date_time_render_option + # How dates, times, and durations should be represented in the output. + # This is ignored if value_render_option is + # FORMATTED_VALUE. + # The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER]. + # @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::SheetsV4::BatchGetValuesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SheetsV4::BatchGetValuesResponse] + # + # @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 batch_get_spreadsheet_values(spreadsheet_id, ranges: nil, major_dimension: nil, value_render_option: nil, date_time_render_option: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v4/spreadsheets/{spreadsheetId}/values:batchGet', options) + command.response_representation = Google::Apis::SheetsV4::BatchGetValuesResponse::Representation + command.response_class = Google::Apis::SheetsV4::BatchGetValuesResponse + command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? + command.query['ranges'] = ranges unless ranges.nil? + command.query['majorDimension'] = major_dimension unless major_dimension.nil? + command.query['valueRenderOption'] = value_render_option unless value_render_option.nil? + command.query['dateTimeRenderOption'] = date_time_render_option unless date_time_render_option.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -212,11 +340,11 @@ module Google # Determines if the update response should include the values # of the cells that were appended. By default, responses # do not include the updated values. + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -229,7 +357,7 @@ 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 append_spreadsheet_value(spreadsheet_id, range, value_range_object = nil, response_value_render_option: nil, insert_data_option: nil, value_input_option: nil, response_date_time_render_option: nil, include_values_in_response: nil, quota_user: nil, fields: nil, options: nil, &block) + def append_spreadsheet_value(spreadsheet_id, range, value_range_object = nil, response_value_render_option: nil, insert_data_option: nil, value_input_option: nil, response_date_time_render_option: nil, include_values_in_response: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/values/{range}:append', options) command.request_representation = Google::Apis::SheetsV4::ValueRange::Representation command.request_object = value_range_object @@ -242,8 +370,8 @@ module Google command.query['valueInputOption'] = value_input_option unless value_input_option.nil? command.query['responseDateTimeRenderOption'] = response_date_time_render_option unless response_date_time_render_option.nil? command.query['includeValuesInResponse'] = include_values_in_response unless include_values_in_response.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -254,11 +382,11 @@ module Google # @param [String] spreadsheet_id # The ID of the spreadsheet to update. # @param [Google::Apis::SheetsV4::BatchClearValuesRequest] batch_clear_values_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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -271,15 +399,15 @@ 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 batch_clear_values(spreadsheet_id, batch_clear_values_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def batch_clear_values(spreadsheet_id, batch_clear_values_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/values:batchClear', options) command.request_representation = Google::Apis::SheetsV4::BatchClearValuesRequest::Representation command.request_object = batch_clear_values_request_object command.response_representation = Google::Apis::SheetsV4::BatchClearValuesResponse::Representation command.response_class = Google::Apis::SheetsV4::BatchClearValuesResponse command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -289,6 +417,13 @@ module Google # The ID of the spreadsheet to retrieve data from. # @param [String] range # The A1 notation of the values to retrieve. + # @param [String] major_dimension + # The major dimension that results should use. + # For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, + # then requesting `range=A1:B2,majorDimension=ROWS` will return + # `[[1,2],[3,4]]`, + # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return + # `[[1,3],[2,4]]`. # @param [String] value_render_option # How values should be represented in the output. # The default render option is ValueRenderOption.FORMATTED_VALUE. @@ -297,18 +432,11 @@ module Google # This is ignored if value_render_option is # FORMATTED_VALUE. # The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER]. - # @param [String] major_dimension - # The major dimension that results should use. - # For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, - # then requesting `range=A1:B2,majorDimension=ROWS` will return - # `[[1,2],[3,4]]`, - # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return - # `[[1,3],[2,4]]`. + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -321,17 +449,17 @@ 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 get_spreadsheet_values(spreadsheet_id, range, value_render_option: nil, date_time_render_option: nil, major_dimension: nil, quota_user: nil, fields: nil, options: nil, &block) + def get_spreadsheet_values(spreadsheet_id, range, major_dimension: nil, value_render_option: nil, date_time_render_option: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v4/spreadsheets/{spreadsheetId}/values/{range}', options) command.response_representation = Google::Apis::SheetsV4::ValueRange::Representation command.response_class = Google::Apis::SheetsV4::ValueRange command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? command.params['range'] = range unless range.nil? + command.query['majorDimension'] = major_dimension unless major_dimension.nil? command.query['valueRenderOption'] = value_render_option unless value_render_option.nil? command.query['dateTimeRenderOption'] = date_time_render_option unless date_time_render_option.nil? - command.query['majorDimension'] = major_dimension unless major_dimension.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -343,6 +471,9 @@ module Google # @param [String] range # The A1 notation of the values to update. # @param [Google::Apis::SheetsV4::ValueRange] value_range_object + # @param [String] response_value_render_option + # Determines how values in the response should be rendered. + # The default render option is ValueRenderOption.FORMATTED_VALUE. # @param [String] value_input_option # How the input data should be interpreted. # @param [String] response_date_time_render_option @@ -357,14 +488,11 @@ module Google # If the range to write was larger than than the range actually written, # the response will include all values in the requested range (excluding # trailing empty rows and columns). - # @param [String] response_value_render_option - # Determines how values in the response should be rendered. - # The default render option is ValueRenderOption.FORMATTED_VALUE. + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -377,7 +505,7 @@ 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 update_spreadsheet_value(spreadsheet_id, range, value_range_object = nil, value_input_option: nil, response_date_time_render_option: nil, include_values_in_response: nil, response_value_render_option: nil, quota_user: nil, fields: nil, options: nil, &block) + def update_spreadsheet_value(spreadsheet_id, range, value_range_object = nil, response_value_render_option: nil, value_input_option: nil, response_date_time_render_option: nil, include_values_in_response: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:put, 'v4/spreadsheets/{spreadsheetId}/values/{range}', options) command.request_representation = Google::Apis::SheetsV4::ValueRange::Representation command.request_object = value_range_object @@ -385,12 +513,12 @@ module Google command.response_class = Google::Apis::SheetsV4::UpdateValuesResponse command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? command.params['range'] = range unless range.nil? + command.query['responseValueRenderOption'] = response_value_render_option unless response_value_render_option.nil? command.query['valueInputOption'] = value_input_option unless value_input_option.nil? command.query['responseDateTimeRenderOption'] = response_date_time_render_option unless response_date_time_render_option.nil? command.query['includeValuesInResponse'] = include_values_in_response unless include_values_in_response.nil? - command.query['responseValueRenderOption'] = response_value_render_option unless response_value_render_option.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -401,11 +529,11 @@ module Google # @param [String] spreadsheet_id # The ID of the spreadsheet to update. # @param [Google::Apis::SheetsV4::BatchUpdateValuesRequest] batch_update_values_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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -418,143 +546,15 @@ 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 batch_update_values(spreadsheet_id, batch_update_values_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def batch_update_values(spreadsheet_id, batch_update_values_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/values:batchUpdate', options) command.request_representation = Google::Apis::SheetsV4::BatchUpdateValuesRequest::Representation command.request_object = batch_update_values_request_object command.response_representation = Google::Apis::SheetsV4::BatchUpdateValuesResponse::Representation command.response_class = Google::Apis::SheetsV4::BatchUpdateValuesResponse command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Clears values from a spreadsheet. - # The caller must specify the spreadsheet ID and range. - # Only values are cleared -- all other properties of the cell (such as - # formatting, data validation, etc..) are kept. - # @param [String] spreadsheet_id - # The ID of the spreadsheet to update. - # @param [String] range - # The A1 notation of the values to clear. - # @param [Google::Apis::SheetsV4::ClearValuesRequest] clear_values_request_object - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SheetsV4::ClearValuesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SheetsV4::ClearValuesResponse] - # - # @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 clear_values(spreadsheet_id, range, clear_values_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/values/{range}:clear', options) - command.request_representation = Google::Apis::SheetsV4::ClearValuesRequest::Representation - command.request_object = clear_values_request_object - command.response_representation = Google::Apis::SheetsV4::ClearValuesResponse::Representation - command.response_class = Google::Apis::SheetsV4::ClearValuesResponse - command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? - command.params['range'] = range unless range.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Returns one or more ranges of values from a spreadsheet. - # The caller must specify the spreadsheet ID and one or more ranges. - # @param [String] spreadsheet_id - # The ID of the spreadsheet to retrieve data from. - # @param [String] value_render_option - # How values should be represented in the output. - # The default render option is ValueRenderOption.FORMATTED_VALUE. - # @param [String] date_time_render_option - # How dates, times, and durations should be represented in the output. - # This is ignored if value_render_option is - # FORMATTED_VALUE. - # The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER]. - # @param [Array, String] ranges - # The A1 notation of the values to retrieve. - # @param [String] major_dimension - # The major dimension that results should use. - # For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, - # then requesting `range=A1:B2,majorDimension=ROWS` will return - # `[[1,2],[3,4]]`, - # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return - # `[[1,3],[2,4]]`. - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SheetsV4::BatchGetValuesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SheetsV4::BatchGetValuesResponse] - # - # @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 batch_get_spreadsheet_values(spreadsheet_id, value_render_option: nil, date_time_render_option: nil, ranges: nil, major_dimension: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v4/spreadsheets/{spreadsheetId}/values:batchGet', options) - command.response_representation = Google::Apis::SheetsV4::BatchGetValuesResponse::Representation - command.response_class = Google::Apis::SheetsV4::BatchGetValuesResponse - command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? - command.query['valueRenderOption'] = value_render_option unless value_render_option.nil? - command.query['dateTimeRenderOption'] = date_time_render_option unless date_time_render_option.nil? - command.query['ranges'] = ranges unless ranges.nil? - command.query['majorDimension'] = major_dimension unless major_dimension.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Copies a single sheet from a spreadsheet to another spreadsheet. - # Returns the properties of the newly created sheet. - # @param [String] spreadsheet_id - # The ID of the spreadsheet containing the sheet to copy. - # @param [Fixnum] sheet_id - # The ID of the sheet to copy. - # @param [Google::Apis::SheetsV4::CopySheetToAnotherSpreadsheetRequest] copy_sheet_to_another_spreadsheet_request_object - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SheetsV4::SheetProperties] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SheetsV4::SheetProperties] - # - # @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 copy_spreadsheet(spreadsheet_id, sheet_id, copy_sheet_to_another_spreadsheet_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo', options) - command.request_representation = Google::Apis::SheetsV4::CopySheetToAnotherSpreadsheetRequest::Representation - command.request_object = copy_sheet_to_another_spreadsheet_request_object - command.response_representation = Google::Apis::SheetsV4::SheetProperties::Representation - command.response_class = Google::Apis::SheetsV4::SheetProperties - command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? - command.params['sheetId'] = sheet_id unless sheet_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end diff --git a/generated/google/apis/slides_v1.rb b/generated/google/apis/slides_v1.rb index 24e1cdbdd..40be2f91d 100644 --- a/generated/google/apis/slides_v1.rb +++ b/generated/google/apis/slides_v1.rb @@ -25,7 +25,10 @@ module Google # @see https://developers.google.com/slides/ module SlidesV1 VERSION = 'V1' - REVISION = '20170427' + REVISION = '20170519' + + # View and manage your spreadsheets in Google Drive + AUTH_SPREADSHEETS = 'https://www.googleapis.com/auth/spreadsheets' # View and manage your Google Slides presentations AUTH_PRESENTATIONS = 'https://www.googleapis.com/auth/presentations' @@ -41,9 +44,6 @@ module Google # View the files in your Google Drive AUTH_DRIVE_READONLY = 'https://www.googleapis.com/auth/drive.readonly' - - # View and manage your spreadsheets in Google Drive - AUTH_SPREADSHEETS = 'https://www.googleapis.com/auth/spreadsheets' end end end diff --git a/generated/google/apis/slides_v1/classes.rb b/generated/google/apis/slides_v1/classes.rb index 5c1d07474..0162a50a8 100644 --- a/generated/google/apis/slides_v1/classes.rb +++ b/generated/google/apis/slides_v1/classes.rb @@ -22,6 +22,2979 @@ module Google module Apis module SlidesV1 + # A location of a single table cell within a table. + class TableCellLocation + include Google::Apis::Core::Hashable + + # The 0-based row index. + # Corresponds to the JSON property `rowIndex` + # @return [Fixnum] + attr_accessor :row_index + + # The 0-based column index. + # Corresponds to the JSON property `columnIndex` + # @return [Fixnum] + attr_accessor :column_index + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @row_index = args[:row_index] if args.key?(:row_index) + @column_index = args[:column_index] if args.key?(:column_index) + end + end + + # The result of creating a line. + class CreateLineResponse + include Google::Apis::Core::Hashable + + # The object ID of the created line. + # Corresponds to the JSON property `objectId` + # @return [String] + attr_accessor :object_id_prop + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + end + end + + # The result of replacing text. + class ReplaceAllTextResponse + include Google::Apis::Core::Hashable + + # The number of occurrences changed by replacing all text. + # Corresponds to the JSON property `occurrencesChanged` + # @return [Fixnum] + attr_accessor :occurrences_changed + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @occurrences_changed = args[:occurrences_changed] if args.key?(:occurrences_changed) + end + end + + # Updates the styling for all of the paragraphs within a Shape or Table that + # overlap with the given text index range. + class UpdateParagraphStyleRequest + include Google::Apis::Core::Hashable + + # The fields that should be updated. + # At least one field must be specified. The root `style` is implied and + # should not be specified. A single `"*"` can be used as short-hand for + # listing every field. + # For example, to update the paragraph alignment, set `fields` to + # `"alignment"`. + # To reset a property to its default value, include its field name in the + # field mask but leave the field itself unset. + # Corresponds to the JSON property `fields` + # @return [String] + attr_accessor :fields + + # The object ID of the shape or table with the text to be styled. + # Corresponds to the JSON property `objectId` + # @return [String] + attr_accessor :object_id_prop + + # Specifies a contiguous range of an indexed collection, such as characters in + # text. + # Corresponds to the JSON property `textRange` + # @return [Google::Apis::SlidesV1::Range] + attr_accessor :text_range + + # A location of a single table cell within a table. + # Corresponds to the JSON property `cellLocation` + # @return [Google::Apis::SlidesV1::TableCellLocation] + attr_accessor :cell_location + + # Styles that apply to a whole paragraph. + # If this text is contained in a shape with a parent placeholder, then these + # paragraph styles may be + # inherited from the parent. Which paragraph styles are inherited depend on the + # nesting level of lists: + # * A paragraph not in a list will inherit its paragraph style from the + # paragraph at the 0 nesting level of the list inside the parent placeholder. + # * A paragraph in a list will inherit its paragraph style from the paragraph + # at its corresponding nesting level of the list inside the parent + # placeholder. + # Inherited paragraph styles are represented as unset fields in this message. + # Corresponds to the JSON property `style` + # @return [Google::Apis::SlidesV1::ParagraphStyle] + attr_accessor :style + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @fields = args[:fields] if args.key?(:fields) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + @text_range = args[:text_range] if args.key?(:text_range) + @cell_location = args[:cell_location] if args.key?(:cell_location) + @style = args[:style] if args.key?(:style) + end + end + + # The palette of predefined colors for a page. + class ColorScheme + include Google::Apis::Core::Hashable + + # The ThemeColorType and corresponding concrete color pairs. + # Corresponds to the JSON property `colors` + # @return [Array] + attr_accessor :colors + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @colors = args[:colors] if args.key?(:colors) + end + end + + # A PageElement kind representing a + # generic shape that does not have a more specific classification. + class Shape + include Google::Apis::Core::Hashable + + # The type of the shape. + # Corresponds to the JSON property `shapeType` + # @return [String] + attr_accessor :shape_type + + # The general text content. The text must reside in a compatible shape (e.g. + # text box or rectangle) or a table cell in a page. + # Corresponds to the JSON property `text` + # @return [Google::Apis::SlidesV1::TextContent] + attr_accessor :text + + # The placeholder information that uniquely identifies a placeholder shape. + # Corresponds to the JSON property `placeholder` + # @return [Google::Apis::SlidesV1::Placeholder] + attr_accessor :placeholder + + # The properties of a Shape. + # If the shape is a placeholder shape as determined by the + # placeholder field, then these + # properties may be inherited from a parent placeholder shape. + # Determining the rendered value of the property depends on the corresponding + # property_state field value. + # Corresponds to the JSON property `shapeProperties` + # @return [Google::Apis::SlidesV1::ShapeProperties] + attr_accessor :shape_properties + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @shape_type = args[:shape_type] if args.key?(:shape_type) + @text = args[:text] if args.key?(:text) + @placeholder = args[:placeholder] if args.key?(:placeholder) + @shape_properties = args[:shape_properties] if args.key?(:shape_properties) + end + end + + # A PageElement kind representing an + # image. + class Image + include Google::Apis::Core::Hashable + + # The properties of the Image. + # Corresponds to the JSON property `imageProperties` + # @return [Google::Apis::SlidesV1::ImageProperties] + attr_accessor :image_properties + + # An URL to an image with a default lifetime of 30 minutes. + # This URL is tagged with the account of the requester. Anyone with the URL + # effectively accesses the image as the original requester. Access to the + # image may be lost if the presentation's sharing settings change. + # Corresponds to the JSON property `contentUrl` + # @return [String] + attr_accessor :content_url + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @image_properties = args[:image_properties] if args.key?(:image_properties) + @content_url = args[:content_url] if args.key?(:content_url) + end + end + + # AffineTransform uses a 3x3 matrix with an implied last row of [ 0 0 1 ] + # to transform source coordinates (x,y) into destination coordinates (x', y') + # according to: + # x' x = shear_y scale_y translate_y + # 1 [ 1 ] + # After transformation, + # x' = scale_x * x + shear_x * y + translate_x; + # y' = scale_y * y + shear_y * x + translate_y; + # This message is therefore composed of these six matrix elements. + class AffineTransform + include Google::Apis::Core::Hashable + + # The units for translate elements. + # Corresponds to the JSON property `unit` + # @return [String] + attr_accessor :unit + + # The X coordinate scaling element. + # Corresponds to the JSON property `scaleX` + # @return [Float] + attr_accessor :scale_x + + # The X coordinate shearing element. + # Corresponds to the JSON property `shearX` + # @return [Float] + attr_accessor :shear_x + + # The Y coordinate scaling element. + # Corresponds to the JSON property `scaleY` + # @return [Float] + attr_accessor :scale_y + + # The Y coordinate translation element. + # Corresponds to the JSON property `translateY` + # @return [Float] + attr_accessor :translate_y + + # The X coordinate translation element. + # Corresponds to the JSON property `translateX` + # @return [Float] + attr_accessor :translate_x + + # The Y coordinate shearing element. + # Corresponds to the JSON property `shearY` + # @return [Float] + attr_accessor :shear_y + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @unit = args[:unit] if args.key?(:unit) + @scale_x = args[:scale_x] if args.key?(:scale_x) + @shear_x = args[:shear_x] if args.key?(:shear_x) + @scale_y = args[:scale_y] if args.key?(:scale_y) + @translate_y = args[:translate_y] if args.key?(:translate_y) + @translate_x = args[:translate_x] if args.key?(:translate_x) + @shear_y = args[:shear_y] if args.key?(:shear_y) + end + end + + # Inserts text into a shape or a table cell. + class InsertTextRequest + include Google::Apis::Core::Hashable + + # A location of a single table cell within a table. + # Corresponds to the JSON property `cellLocation` + # @return [Google::Apis::SlidesV1::TableCellLocation] + attr_accessor :cell_location + + # The object ID of the shape or table where the text will be inserted. + # Corresponds to the JSON property `objectId` + # @return [String] + attr_accessor :object_id_prop + + # The text to be inserted. + # Inserting a newline character will implicitly create a new + # ParagraphMarker at that index. + # The paragraph style of the new paragraph will be copied from the paragraph + # at the current insertion index, including lists and bullets. + # Text styles for inserted text will be determined automatically, generally + # preserving the styling of neighboring text. In most cases, the text will be + # added to the TextRun that exists at the + # insertion index. + # Some control characters (U+0000-U+0008, U+000C-U+001F) and characters + # from the Unicode Basic Multilingual Plane Private Use Area (U+E000-U+F8FF) + # will be stripped out of the inserted text. + # Corresponds to the JSON property `text` + # @return [String] + attr_accessor :text + + # The index where the text will be inserted, in Unicode code units, based + # on TextElement indexes. + # The index is zero-based and is computed from the start of the string. + # The index may be adjusted to prevent insertions inside Unicode grapheme + # clusters. In these cases, the text will be inserted immediately after the + # grapheme cluster. + # Corresponds to the JSON property `insertionIndex` + # @return [Fixnum] + attr_accessor :insertion_index + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @cell_location = args[:cell_location] if args.key?(:cell_location) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + @text = args[:text] if args.key?(:text) + @insertion_index = args[:insertion_index] if args.key?(:insertion_index) + end + end + + # A TextElement kind that represents auto text. + class AutoText + include Google::Apis::Core::Hashable + + # The type of this auto text. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # The rendered content of this auto text, if available. + # Corresponds to the JSON property `content` + # @return [String] + attr_accessor :content + + # Represents the styling that can be applied to a TextRun. + # If this text is contained in a shape with a parent placeholder, then these + # text styles may be + # inherited from the parent. Which text styles are inherited depend on the + # nesting level of lists: + # * A text run in a paragraph that is not in a list will inherit its text style + # from the the newline character in the paragraph at the 0 nesting level of + # the list inside the parent placeholder. + # * A text run in a paragraph that is in a list will inherit its text style + # from the newline character in the paragraph at its corresponding nesting + # level of the list inside the parent placeholder. + # Inherited text styles are represented as unset fields in this message. If + # text is contained in a shape without a parent placeholder, unsetting these + # fields will revert the style to a value matching the defaults in the Slides + # editor. + # Corresponds to the JSON property `style` + # @return [Google::Apis::SlidesV1::TextStyle] + attr_accessor :style + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @type = args[:type] if args.key?(:type) + @content = args[:content] if args.key?(:content) + @style = args[:style] if args.key?(:style) + end + end + + # The result of creating a video. + class CreateVideoResponse + include Google::Apis::Core::Hashable + + # The object ID of the created video. + # Corresponds to the JSON property `objectId` + # @return [String] + attr_accessor :object_id_prop + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + end + end + + # Deletes text from a shape or a table cell. + class DeleteTextRequest + include Google::Apis::Core::Hashable + + # A location of a single table cell within a table. + # Corresponds to the JSON property `cellLocation` + # @return [Google::Apis::SlidesV1::TableCellLocation] + attr_accessor :cell_location + + # The object ID of the shape or table from which the text will be deleted. + # Corresponds to the JSON property `objectId` + # @return [String] + attr_accessor :object_id_prop + + # Specifies a contiguous range of an indexed collection, such as characters in + # text. + # Corresponds to the JSON property `textRange` + # @return [Google::Apis::SlidesV1::Range] + attr_accessor :text_range + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @cell_location = args[:cell_location] if args.key?(:cell_location) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + @text_range = args[:text_range] if args.key?(:text_range) + end + end + + # Updates the transform of a page element. + class UpdatePageElementTransformRequest + include Google::Apis::Core::Hashable + + # The object ID of the page element to update. + # Corresponds to the JSON property `objectId` + # @return [String] + attr_accessor :object_id_prop + + # AffineTransform uses a 3x3 matrix with an implied last row of [ 0 0 1 ] + # to transform source coordinates (x,y) into destination coordinates (x', y') + # according to: + # x' x = shear_y scale_y translate_y + # 1 [ 1 ] + # After transformation, + # x' = scale_x * x + shear_x * y + translate_x; + # y' = scale_y * y + shear_y * x + translate_y; + # This message is therefore composed of these six matrix elements. + # Corresponds to the JSON property `transform` + # @return [Google::Apis::SlidesV1::AffineTransform] + attr_accessor :transform + + # The apply mode of the transform update. + # Corresponds to the JSON property `applyMode` + # @return [String] + attr_accessor :apply_mode + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + @transform = args[:transform] if args.key?(:transform) + @apply_mode = args[:apply_mode] if args.key?(:apply_mode) + end + end + + # Deletes an object, either pages or + # page elements, from the + # presentation. + class DeleteObjectRequest + include Google::Apis::Core::Hashable + + # The object ID of the page or page element to delete. + # If after a delete operation a group contains + # only 1 or no page elements, the group is also deleted. + # If a placeholder is deleted on a layout, any empty inheriting shapes are + # also deleted. + # Corresponds to the JSON property `objectId` + # @return [String] + attr_accessor :object_id_prop + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + end + end + + # A magnitude in a single direction in the specified units. + class Dimension + include Google::Apis::Core::Hashable + + # The magnitude. + # Corresponds to the JSON property `magnitude` + # @return [Float] + attr_accessor :magnitude + + # The units for magnitude. + # Corresponds to the JSON property `unit` + # @return [String] + attr_accessor :unit + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @magnitude = args[:magnitude] if args.key?(:magnitude) + @unit = args[:unit] if args.key?(:unit) + end + end + + # A TextElement describes the content of a range of indices in the text content + # of a Shape or TableCell. + class TextElement + include Google::Apis::Core::Hashable + + # A TextElement kind that represents a run of text that all has the same + # styling. + # Corresponds to the JSON property `textRun` + # @return [Google::Apis::SlidesV1::TextRun] + attr_accessor :text_run + + # A TextElement kind that represents auto text. + # Corresponds to the JSON property `autoText` + # @return [Google::Apis::SlidesV1::AutoText] + attr_accessor :auto_text + + # A TextElement kind that represents the beginning of a new paragraph. + # Corresponds to the JSON property `paragraphMarker` + # @return [Google::Apis::SlidesV1::ParagraphMarker] + attr_accessor :paragraph_marker + + # The zero-based start index of this text element, in Unicode code units. + # Corresponds to the JSON property `startIndex` + # @return [Fixnum] + attr_accessor :start_index + + # The zero-based end index of this text element, exclusive, in Unicode code + # units. + # Corresponds to the JSON property `endIndex` + # @return [Fixnum] + attr_accessor :end_index + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @text_run = args[:text_run] if args.key?(:text_run) + @auto_text = args[:auto_text] if args.key?(:auto_text) + @paragraph_marker = args[:paragraph_marker] if args.key?(:paragraph_marker) + @start_index = args[:start_index] if args.key?(:start_index) + @end_index = args[:end_index] if args.key?(:end_index) + end + end + + # The fill of the line. + class LineFill + include Google::Apis::Core::Hashable + + # A solid color fill. The page or page element is filled entirely with the + # specified color value. + # If any field is unset, its value may be inherited from a parent placeholder + # if it exists. + # Corresponds to the JSON property `solidFill` + # @return [Google::Apis::SlidesV1::SolidFill] + attr_accessor :solid_fill + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @solid_fill = args[:solid_fill] if args.key?(:solid_fill) + end + end + + # The properties of the Video. + class VideoProperties + include Google::Apis::Core::Hashable + + # The outline of a PageElement. + # If these fields are unset, they may be inherited from a parent placeholder + # if it exists. If there is no parent, the fields will default to the value + # used for new page elements created in the Slides editor, which may depend on + # the page element kind. + # Corresponds to the JSON property `outline` + # @return [Google::Apis::SlidesV1::Outline] + attr_accessor :outline + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @outline = args[:outline] if args.key?(:outline) + end + end + + # Inserts rows into a table. + class InsertTableRowsRequest + include Google::Apis::Core::Hashable + + # The number of rows to be inserted. Maximum 20 per request. + # Corresponds to the JSON property `number` + # @return [Fixnum] + attr_accessor :number + + # A location of a single table cell within a table. + # Corresponds to the JSON property `cellLocation` + # @return [Google::Apis::SlidesV1::TableCellLocation] + attr_accessor :cell_location + + # The table to insert rows into. + # Corresponds to the JSON property `tableObjectId` + # @return [String] + attr_accessor :table_object_id + + # Whether to insert new rows below the reference cell location. + # - `True`: insert below the cell. + # - `False`: insert above the cell. + # Corresponds to the JSON property `insertBelow` + # @return [Boolean] + attr_accessor :insert_below + alias_method :insert_below?, :insert_below + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @number = args[:number] if args.key?(:number) + @cell_location = args[:cell_location] if args.key?(:cell_location) + @table_object_id = args[:table_object_id] if args.key?(:table_object_id) + @insert_below = args[:insert_below] if args.key?(:insert_below) + end + end + + # The properties of Page are only + # relevant for pages with page_type LAYOUT. + class LayoutProperties + include Google::Apis::Core::Hashable + + # The object ID of the master that this layout is based on. + # Corresponds to the JSON property `masterObjectId` + # @return [String] + attr_accessor :master_object_id + + # The name of the layout. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The human readable name of the layout in the presentation's locale. + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @master_object_id = args[:master_object_id] if args.key?(:master_object_id) + @name = args[:name] if args.key?(:name) + @display_name = args[:display_name] if args.key?(:display_name) + end + end + + # A Google Slides presentation. + class Presentation + include Google::Apis::Core::Hashable + + # The title of the presentation. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + # The layouts in the presentation. A layout is a template that determines + # how content is arranged and styled on the slides that inherit from that + # layout. + # Corresponds to the JSON property `layouts` + # @return [Array] + attr_accessor :layouts + + # The slide masters in the presentation. A slide master contains all common + # page elements and the common properties for a set of layouts. They serve + # three purposes: + # - Placeholder shapes on a master contain the default text styles and shape + # properties of all placeholder shapes on pages that use that master. + # - The master page properties define the common page properties inherited by + # its layouts. + # - Any other shapes on the master slide will appear on all slides using that + # master, regardless of their layout. + # Corresponds to the JSON property `masters` + # @return [Array] + attr_accessor :masters + + # The locale of the presentation, as an IETF BCP 47 language tag. + # Corresponds to the JSON property `locale` + # @return [String] + attr_accessor :locale + + # A width and height. + # Corresponds to the JSON property `pageSize` + # @return [Google::Apis::SlidesV1::Size] + attr_accessor :page_size + + # The ID of the presentation. + # Corresponds to the JSON property `presentationId` + # @return [String] + attr_accessor :presentation_id + + # The slides in the presentation. + # A slide inherits properties from a slide layout. + # Corresponds to the JSON property `slides` + # @return [Array] + attr_accessor :slides + + # The revision ID of the presentation. Can be used in update requests + # to assert that the presentation revision hasn't changed since the last + # read operation. Only populated if the user has edit access to the + # presentation. + # The format of the revision ID may change over time, so it should be treated + # opaquely. A returned revision ID is only guaranteed to be valid for 24 + # hours after it has been returned and cannot be shared across users. If the + # revision ID is unchanged between calls, then the presentation has not + # changed. Conversely, a changed ID (for the same presentation and user) + # usually means the presentation has been updated; however, a changed ID can + # also be due to internal factors such as ID format changes. + # Corresponds to the JSON property `revisionId` + # @return [String] + attr_accessor :revision_id + + # A page in a presentation. + # Corresponds to the JSON property `notesMaster` + # @return [Google::Apis::SlidesV1::Page] + attr_accessor :notes_master + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @title = args[:title] if args.key?(:title) + @layouts = args[:layouts] if args.key?(:layouts) + @masters = args[:masters] if args.key?(:masters) + @locale = args[:locale] if args.key?(:locale) + @page_size = args[:page_size] if args.key?(:page_size) + @presentation_id = args[:presentation_id] if args.key?(:presentation_id) + @slides = args[:slides] if args.key?(:slides) + @revision_id = args[:revision_id] if args.key?(:revision_id) + @notes_master = args[:notes_master] if args.key?(:notes_master) + end + end + + # The properties of the Line. + # When unset, these fields default to values that match the appearance of + # new lines created in the Slides editor. + class LineProperties + include Google::Apis::Core::Hashable + + # The style of the arrow at the beginning of the line. + # Corresponds to the JSON property `startArrow` + # @return [String] + attr_accessor :start_arrow + + # The style of the arrow at the end of the line. + # Corresponds to the JSON property `endArrow` + # @return [String] + attr_accessor :end_arrow + + # A magnitude in a single direction in the specified units. + # Corresponds to the JSON property `weight` + # @return [Google::Apis::SlidesV1::Dimension] + attr_accessor :weight + + # The fill of the line. + # Corresponds to the JSON property `lineFill` + # @return [Google::Apis::SlidesV1::LineFill] + attr_accessor :line_fill + + # A hypertext link. + # Corresponds to the JSON property `link` + # @return [Google::Apis::SlidesV1::Link] + attr_accessor :link + + # The dash style of the line. + # Corresponds to the JSON property `dashStyle` + # @return [String] + attr_accessor :dash_style + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @start_arrow = args[:start_arrow] if args.key?(:start_arrow) + @end_arrow = args[:end_arrow] if args.key?(:end_arrow) + @weight = args[:weight] if args.key?(:weight) + @line_fill = args[:line_fill] if args.key?(:line_fill) + @link = args[:link] if args.key?(:link) + @dash_style = args[:dash_style] if args.key?(:dash_style) + end + end + + # A themeable solid color value. + class OpaqueColor + include Google::Apis::Core::Hashable + + # An opaque theme color. + # Corresponds to the JSON property `themeColor` + # @return [String] + attr_accessor :theme_color + + # An RGB color. + # Corresponds to the JSON property `rgbColor` + # @return [Google::Apis::SlidesV1::RgbColor] + attr_accessor :rgb_color + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @theme_color = args[:theme_color] if args.key?(:theme_color) + @rgb_color = args[:rgb_color] if args.key?(:rgb_color) + end + end + + # The properties of the Image. + class ImageProperties + include Google::Apis::Core::Hashable + + # The brightness effect of the image. The value should be in the interval + # [-1.0, 1.0], where 0 means no effect. This property is read-only. + # Corresponds to the JSON property `brightness` + # @return [Float] + attr_accessor :brightness + + # The transparency effect of the image. The value should be in the interval + # [0.0, 1.0], where 0 means no effect and 1 means completely transparent. + # This property is read-only. + # Corresponds to the JSON property `transparency` + # @return [Float] + attr_accessor :transparency + + # The shadow properties of a page element. + # If these fields are unset, they may be inherited from a parent placeholder + # if it exists. If there is no parent, the fields will default to the value + # used for new page elements created in the Slides editor, which may depend on + # the page element kind. + # Corresponds to the JSON property `shadow` + # @return [Google::Apis::SlidesV1::Shadow] + attr_accessor :shadow + + # A hypertext link. + # Corresponds to the JSON property `link` + # @return [Google::Apis::SlidesV1::Link] + attr_accessor :link + + # The contrast effect of the image. The value should be in the interval + # [-1.0, 1.0], where 0 means no effect. This property is read-only. + # Corresponds to the JSON property `contrast` + # @return [Float] + attr_accessor :contrast + + # A recolor effect applied on an image. + # Corresponds to the JSON property `recolor` + # @return [Google::Apis::SlidesV1::Recolor] + attr_accessor :recolor + + # The crop properties of an object enclosed in a container. For example, an + # Image. + # The crop properties is represented by the offsets of four edges which define + # a crop rectangle. The offsets are measured in percentage from the + # corresponding edges of the object's original bounding rectangle towards + # inside, relative to the object's original dimensions. + # - If the offset is in the interval (0, 1), the corresponding edge of crop + # rectangle is positioned inside of the object's original bounding rectangle. + # - If the offset is negative or greater than 1, the corresponding edge of crop + # rectangle is positioned outside of the object's original bounding rectangle. + # - If the left edge of the crop rectangle is on the right side of its right + # edge, the object will be flipped horizontally. + # - If the top edge of the crop rectangle is below its bottom edge, the object + # will be flipped vertically. + # - If all offsets and rotation angle is 0, the object is not cropped. + # After cropping, the content in the crop rectangle will be stretched to fit + # its container. + # Corresponds to the JSON property `cropProperties` + # @return [Google::Apis::SlidesV1::CropProperties] + attr_accessor :crop_properties + + # The outline of a PageElement. + # If these fields are unset, they may be inherited from a parent placeholder + # if it exists. If there is no parent, the fields will default to the value + # used for new page elements created in the Slides editor, which may depend on + # the page element kind. + # Corresponds to the JSON property `outline` + # @return [Google::Apis::SlidesV1::Outline] + attr_accessor :outline + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @brightness = args[:brightness] if args.key?(:brightness) + @transparency = args[:transparency] if args.key?(:transparency) + @shadow = args[:shadow] if args.key?(:shadow) + @link = args[:link] if args.key?(:link) + @contrast = args[:contrast] if args.key?(:contrast) + @recolor = args[:recolor] if args.key?(:recolor) + @crop_properties = args[:crop_properties] if args.key?(:crop_properties) + @outline = args[:outline] if args.key?(:outline) + end + end + + # The result of replacing shapes with an image. + class ReplaceAllShapesWithImageResponse + include Google::Apis::Core::Hashable + + # The number of shapes replaced with images. + # Corresponds to the JSON property `occurrencesChanged` + # @return [Fixnum] + attr_accessor :occurrences_changed + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @occurrences_changed = args[:occurrences_changed] if args.key?(:occurrences_changed) + end + end + + # A PageElement kind representing a + # line, curved connector, or bent connector. + class Line + include Google::Apis::Core::Hashable + + # The properties of the Line. + # When unset, these fields default to values that match the appearance of + # new lines created in the Slides editor. + # Corresponds to the JSON property `lineProperties` + # @return [Google::Apis::SlidesV1::LineProperties] + attr_accessor :line_properties + + # The type of the line. + # Corresponds to the JSON property `lineType` + # @return [String] + attr_accessor :line_type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @line_properties = args[:line_properties] if args.key?(:line_properties) + @line_type = args[:line_type] if args.key?(:line_type) + end + end + + # Creates an embedded Google Sheets chart. + # NOTE: Chart creation requires at least one of the spreadsheets.readonly, + # spreadsheets, drive.readonly, or drive OAuth scopes. + class CreateSheetsChartRequest + include Google::Apis::Core::Hashable + + # Common properties for a page element. + # Note: When you initially create a + # PageElement, the API may modify + # the values of both `size` and `transform`, but the + # visual size will be unchanged. + # Corresponds to the JSON property `elementProperties` + # @return [Google::Apis::SlidesV1::PageElementProperties] + attr_accessor :element_properties + + # The ID of the Google Sheets spreadsheet that contains the chart. + # Corresponds to the JSON property `spreadsheetId` + # @return [String] + attr_accessor :spreadsheet_id + + # The mode with which the chart is linked to the source spreadsheet. When + # not specified, the chart will be an image that is not linked. + # Corresponds to the JSON property `linkingMode` + # @return [String] + attr_accessor :linking_mode + + # The ID of the specific chart in the Google Sheets spreadsheet. + # Corresponds to the JSON property `chartId` + # @return [Fixnum] + attr_accessor :chart_id + + # A user-supplied object ID. + # If specified, the ID must be unique among all pages and page elements in + # the presentation. The ID should start with a word character [a-zA-Z0-9_] + # and then followed by any number of the following characters [a-zA-Z0-9_-:]. + # The length of the ID should not be less than 5 or greater than 50. + # If empty, a unique identifier will be generated. + # Corresponds to the JSON property `objectId` + # @return [String] + attr_accessor :object_id_prop + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @element_properties = args[:element_properties] if args.key?(:element_properties) + @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) + @linking_mode = args[:linking_mode] if args.key?(:linking_mode) + @chart_id = args[:chart_id] if args.key?(:chart_id) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + end + end + + # Response message from a batch update. + class BatchUpdatePresentationResponse + include Google::Apis::Core::Hashable + + # The reply of the updates. This maps 1:1 with the updates, although + # replies to some requests may be empty. + # Corresponds to the JSON property `replies` + # @return [Array] + attr_accessor :replies + + # The presentation the updates were applied to. + # Corresponds to the JSON property `presentationId` + # @return [String] + attr_accessor :presentation_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @replies = args[:replies] if args.key?(:replies) + @presentation_id = args[:presentation_id] if args.key?(:presentation_id) + end + end + + # The result of creating an image. + class CreateImageResponse + include Google::Apis::Core::Hashable + + # The object ID of the created image. + # Corresponds to the JSON property `objectId` + # @return [String] + attr_accessor :object_id_prop + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + end + end + + # The properties of Page that are only + # relevant for pages with page_type SLIDE. + class SlideProperties + include Google::Apis::Core::Hashable + + # The object ID of the layout that this slide is based on. + # Corresponds to the JSON property `layoutObjectId` + # @return [String] + attr_accessor :layout_object_id + + # The object ID of the master that this slide is based on. + # Corresponds to the JSON property `masterObjectId` + # @return [String] + attr_accessor :master_object_id + + # A page in a presentation. + # Corresponds to the JSON property `notesPage` + # @return [Google::Apis::SlidesV1::Page] + attr_accessor :notes_page + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @layout_object_id = args[:layout_object_id] if args.key?(:layout_object_id) + @master_object_id = args[:master_object_id] if args.key?(:master_object_id) + @notes_page = args[:notes_page] if args.key?(:notes_page) + end + end + + # A single response from an update. + class Response + include Google::Apis::Core::Hashable + + # The result of creating an image. + # Corresponds to the JSON property `createImage` + # @return [Google::Apis::SlidesV1::CreateImageResponse] + attr_accessor :create_image + + # The result of creating a video. + # Corresponds to the JSON property `createVideo` + # @return [Google::Apis::SlidesV1::CreateVideoResponse] + attr_accessor :create_video + + # The result of replacing shapes with a Google Sheets chart. + # Corresponds to the JSON property `replaceAllShapesWithSheetsChart` + # @return [Google::Apis::SlidesV1::ReplaceAllShapesWithSheetsChartResponse] + attr_accessor :replace_all_shapes_with_sheets_chart + + # The result of creating an embedded Google Sheets chart. + # Corresponds to the JSON property `createSheetsChart` + # @return [Google::Apis::SlidesV1::CreateSheetsChartResponse] + attr_accessor :create_sheets_chart + + # The result of replacing shapes with an image. + # Corresponds to the JSON property `replaceAllShapesWithImage` + # @return [Google::Apis::SlidesV1::ReplaceAllShapesWithImageResponse] + attr_accessor :replace_all_shapes_with_image + + # The result of creating a table. + # Corresponds to the JSON property `createTable` + # @return [Google::Apis::SlidesV1::CreateTableResponse] + attr_accessor :create_table + + # The result of replacing text. + # Corresponds to the JSON property `replaceAllText` + # @return [Google::Apis::SlidesV1::ReplaceAllTextResponse] + attr_accessor :replace_all_text + + # The result of creating a slide. + # Corresponds to the JSON property `createSlide` + # @return [Google::Apis::SlidesV1::CreateSlideResponse] + attr_accessor :create_slide + + # The result of creating a shape. + # Corresponds to the JSON property `createShape` + # @return [Google::Apis::SlidesV1::CreateShapeResponse] + attr_accessor :create_shape + + # The response of duplicating an object. + # Corresponds to the JSON property `duplicateObject` + # @return [Google::Apis::SlidesV1::DuplicateObjectResponse] + attr_accessor :duplicate_object + + # The result of creating a line. + # Corresponds to the JSON property `createLine` + # @return [Google::Apis::SlidesV1::CreateLineResponse] + attr_accessor :create_line + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @create_image = args[:create_image] if args.key?(:create_image) + @create_video = args[:create_video] if args.key?(:create_video) + @replace_all_shapes_with_sheets_chart = args[:replace_all_shapes_with_sheets_chart] if args.key?(:replace_all_shapes_with_sheets_chart) + @create_sheets_chart = args[:create_sheets_chart] if args.key?(:create_sheets_chart) + @replace_all_shapes_with_image = args[:replace_all_shapes_with_image] if args.key?(:replace_all_shapes_with_image) + @create_table = args[:create_table] if args.key?(:create_table) + @replace_all_text = args[:replace_all_text] if args.key?(:replace_all_text) + @create_slide = args[:create_slide] if args.key?(:create_slide) + @create_shape = args[:create_shape] if args.key?(:create_shape) + @duplicate_object = args[:duplicate_object] if args.key?(:duplicate_object) + @create_line = args[:create_line] if args.key?(:create_line) + end + end + + # A criteria that matches a specific string of text in a shape or table. + class SubstringMatchCriteria + include Google::Apis::Core::Hashable + + # The text to search for in the shape or table. + # Corresponds to the JSON property `text` + # @return [String] + attr_accessor :text + + # Indicates whether the search should respect case: + # - `True`: the search is case sensitive. + # - `False`: the search is case insensitive. + # Corresponds to the JSON property `matchCase` + # @return [Boolean] + attr_accessor :match_case + alias_method :match_case?, :match_case + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @text = args[:text] if args.key?(:text) + @match_case = args[:match_case] if args.key?(:match_case) + end + end + + # Slide layout reference. This may reference either: + # - A predefined layout + # - One of the layouts in the presentation. + class LayoutReference + include Google::Apis::Core::Hashable + + # Layout ID: the object ID of one of the layouts in the presentation. + # Corresponds to the JSON property `layoutId` + # @return [String] + attr_accessor :layout_id + + # Predefined layout. + # Corresponds to the JSON property `predefinedLayout` + # @return [String] + attr_accessor :predefined_layout + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @layout_id = args[:layout_id] if args.key?(:layout_id) + @predefined_layout = args[:predefined_layout] if args.key?(:predefined_layout) + end + end + + # A TextElement kind that represents a run of text that all has the same + # styling. + class TextRun + include Google::Apis::Core::Hashable + + # Represents the styling that can be applied to a TextRun. + # If this text is contained in a shape with a parent placeholder, then these + # text styles may be + # inherited from the parent. Which text styles are inherited depend on the + # nesting level of lists: + # * A text run in a paragraph that is not in a list will inherit its text style + # from the the newline character in the paragraph at the 0 nesting level of + # the list inside the parent placeholder. + # * A text run in a paragraph that is in a list will inherit its text style + # from the newline character in the paragraph at its corresponding nesting + # level of the list inside the parent placeholder. + # Inherited text styles are represented as unset fields in this message. If + # text is contained in a shape without a parent placeholder, unsetting these + # fields will revert the style to a value matching the defaults in the Slides + # editor. + # Corresponds to the JSON property `style` + # @return [Google::Apis::SlidesV1::TextStyle] + attr_accessor :style + + # The text of this run. + # Corresponds to the JSON property `content` + # @return [String] + attr_accessor :content + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @style = args[:style] if args.key?(:style) + @content = args[:content] if args.key?(:content) + end + end + + # A table range represents a reference to a subset of a table. + # It's important to note that the cells specified by a table range do not + # necessarily form a rectangle. For example, let's say we have a 3 x 3 table + # where all the cells of the last row are merged together. The table looks + # like this: + # + # [ ] + # A table range with location = (0, 0), row span = 3 and column span = 2 + # specifies the following cells: + # x x + # [ x ] + class TableRange + include Google::Apis::Core::Hashable + + # A location of a single table cell within a table. + # Corresponds to the JSON property `location` + # @return [Google::Apis::SlidesV1::TableCellLocation] + attr_accessor :location + + # The row span of the table range. + # Corresponds to the JSON property `rowSpan` + # @return [Fixnum] + attr_accessor :row_span + + # The column span of the table range. + # Corresponds to the JSON property `columnSpan` + # @return [Fixnum] + attr_accessor :column_span + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @location = args[:location] if args.key?(:location) + @row_span = args[:row_span] if args.key?(:row_span) + @column_span = args[:column_span] if args.key?(:column_span) + end + end + + # The result of creating a table. + class CreateTableResponse + include Google::Apis::Core::Hashable + + # The object ID of the created table. + # Corresponds to the JSON property `objectId` + # @return [String] + attr_accessor :object_id_prop + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + end + end + + # Creates a new table. + class CreateTableRequest + include Google::Apis::Core::Hashable + + # Number of rows in the table. + # Corresponds to the JSON property `rows` + # @return [Fixnum] + attr_accessor :rows + + # A user-supplied object ID. + # If you specify an ID, it must be unique among all pages and page elements + # in the presentation. The ID must start with an alphanumeric character or an + # underscore (matches regex `[a-zA-Z0-9_]`); remaining characters + # may include those as well as a hyphen or colon (matches regex + # `[a-zA-Z0-9_-:]`). + # The length of the ID must not be less than 5 or greater than 50. + # If you don't specify an ID, a unique one is generated. + # Corresponds to the JSON property `objectId` + # @return [String] + attr_accessor :object_id_prop + + # Number of columns in the table. + # Corresponds to the JSON property `columns` + # @return [Fixnum] + attr_accessor :columns + + # Common properties for a page element. + # Note: When you initially create a + # PageElement, the API may modify + # the values of both `size` and `transform`, but the + # visual size will be unchanged. + # Corresponds to the JSON property `elementProperties` + # @return [Google::Apis::SlidesV1::PageElementProperties] + attr_accessor :element_properties + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @rows = args[:rows] if args.key?(:rows) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + @columns = args[:columns] if args.key?(:columns) + @element_properties = args[:element_properties] if args.key?(:element_properties) + end + end + + # A PageElement kind representing a + # table. + class Table + include Google::Apis::Core::Hashable + + # Number of rows in the table. + # Corresponds to the JSON property `rows` + # @return [Fixnum] + attr_accessor :rows + + # Properties of each column. + # Corresponds to the JSON property `tableColumns` + # @return [Array] + attr_accessor :table_columns + + # Number of columns in the table. + # Corresponds to the JSON property `columns` + # @return [Fixnum] + attr_accessor :columns + + # Properties and contents of each row. + # Cells that span multiple rows are contained in only one of these rows and + # have a row_span greater + # than 1. + # Corresponds to the JSON property `tableRows` + # @return [Array] + attr_accessor :table_rows + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @rows = args[:rows] if args.key?(:rows) + @table_columns = args[:table_columns] if args.key?(:table_columns) + @columns = args[:columns] if args.key?(:columns) + @table_rows = args[:table_rows] if args.key?(:table_rows) + end + end + + # The page background fill. + class PageBackgroundFill + include Google::Apis::Core::Hashable + + # The background fill property state. + # Updating the the fill on a page will implicitly update this field to + # `RENDERED`, unless another value is specified in the same request. To + # have no fill on a page, set this field to `NOT_RENDERED`. In this case, + # any other fill fields set in the same request will be ignored. + # Corresponds to the JSON property `propertyState` + # @return [String] + attr_accessor :property_state + + # The stretched picture fill. The page or page element is filled entirely with + # the specified picture. The picture is stretched to fit its container. + # Corresponds to the JSON property `stretchedPictureFill` + # @return [Google::Apis::SlidesV1::StretchedPictureFill] + attr_accessor :stretched_picture_fill + + # A solid color fill. The page or page element is filled entirely with the + # specified color value. + # If any field is unset, its value may be inherited from a parent placeholder + # if it exists. + # Corresponds to the JSON property `solidFill` + # @return [Google::Apis::SlidesV1::SolidFill] + attr_accessor :solid_fill + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @property_state = args[:property_state] if args.key?(:property_state) + @stretched_picture_fill = args[:stretched_picture_fill] if args.key?(:stretched_picture_fill) + @solid_fill = args[:solid_fill] if args.key?(:solid_fill) + end + end + + # A PageElement kind representing + # a linked chart embedded from Google Sheets. + class SheetsChart + include Google::Apis::Core::Hashable + + # The properties of the SheetsChart. + # Corresponds to the JSON property `sheetsChartProperties` + # @return [Google::Apis::SlidesV1::SheetsChartProperties] + attr_accessor :sheets_chart_properties + + # The URL of an image of the embedded chart, with a default lifetime of 30 + # minutes. This URL is tagged with the account of the requester. Anyone with + # the URL effectively accesses the image as the original requester. Access to + # the image may be lost if the presentation's sharing settings change. + # Corresponds to the JSON property `contentUrl` + # @return [String] + attr_accessor :content_url + + # The ID of the Google Sheets spreadsheet that contains the source chart. + # Corresponds to the JSON property `spreadsheetId` + # @return [String] + attr_accessor :spreadsheet_id + + # The ID of the specific chart in the Google Sheets spreadsheet that is + # embedded. + # Corresponds to the JSON property `chartId` + # @return [Fixnum] + attr_accessor :chart_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @sheets_chart_properties = args[:sheets_chart_properties] if args.key?(:sheets_chart_properties) + @content_url = args[:content_url] if args.key?(:content_url) + @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) + @chart_id = args[:chart_id] if args.key?(:chart_id) + end + end + + # A solid color fill. The page or page element is filled entirely with the + # specified color value. + # If any field is unset, its value may be inherited from a parent placeholder + # if it exists. + class SolidFill + include Google::Apis::Core::Hashable + + # The fraction of this `color` that should be applied to the pixel. + # That is, the final pixel color is defined by the equation: + # pixel color = alpha * (color) + (1.0 - alpha) * (background color) + # This means that a value of 1.0 corresponds to a solid color, whereas + # a value of 0.0 corresponds to a completely transparent color. + # Corresponds to the JSON property `alpha` + # @return [Float] + attr_accessor :alpha + + # A themeable solid color value. + # Corresponds to the JSON property `color` + # @return [Google::Apis::SlidesV1::OpaqueColor] + attr_accessor :color + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @alpha = args[:alpha] if args.key?(:alpha) + @color = args[:color] if args.key?(:color) + end + end + + # A pair mapping a theme color type to the concrete color it represents. + class ThemeColorPair + include Google::Apis::Core::Hashable + + # The type of the theme color. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # An RGB color. + # Corresponds to the JSON property `color` + # @return [Google::Apis::SlidesV1::RgbColor] + attr_accessor :color + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @type = args[:type] if args.key?(:type) + @color = args[:color] if args.key?(:color) + end + end + + # A color that can either be fully opaque or fully transparent. + class OptionalColor + include Google::Apis::Core::Hashable + + # A themeable solid color value. + # Corresponds to the JSON property `opaqueColor` + # @return [Google::Apis::SlidesV1::OpaqueColor] + attr_accessor :opaque_color + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @opaque_color = args[:opaque_color] if args.key?(:opaque_color) + end + end + + # Common properties for a page element. + # Note: When you initially create a + # PageElement, the API may modify + # the values of both `size` and `transform`, but the + # visual size will be unchanged. + class PageElementProperties + include Google::Apis::Core::Hashable + + # AffineTransform uses a 3x3 matrix with an implied last row of [ 0 0 1 ] + # to transform source coordinates (x,y) into destination coordinates (x', y') + # according to: + # x' x = shear_y scale_y translate_y + # 1 [ 1 ] + # After transformation, + # x' = scale_x * x + shear_x * y + translate_x; + # y' = scale_y * y + shear_y * x + translate_y; + # This message is therefore composed of these six matrix elements. + # Corresponds to the JSON property `transform` + # @return [Google::Apis::SlidesV1::AffineTransform] + attr_accessor :transform + + # The object ID of the page where the element is located. + # Corresponds to the JSON property `pageObjectId` + # @return [String] + attr_accessor :page_object_id + + # A width and height. + # Corresponds to the JSON property `size` + # @return [Google::Apis::SlidesV1::Size] + attr_accessor :size + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @transform = args[:transform] if args.key?(:transform) + @page_object_id = args[:page_object_id] if args.key?(:page_object_id) + @size = args[:size] if args.key?(:size) + end + end + + # The properties of the SheetsChart. + class SheetsChartProperties + include Google::Apis::Core::Hashable + + # The properties of the Image. + # Corresponds to the JSON property `chartImageProperties` + # @return [Google::Apis::SlidesV1::ImageProperties] + attr_accessor :chart_image_properties + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @chart_image_properties = args[:chart_image_properties] if args.key?(:chart_image_properties) + end + end + + # The stretched picture fill. The page or page element is filled entirely with + # the specified picture. The picture is stretched to fit its container. + class StretchedPictureFill + include Google::Apis::Core::Hashable + + # Reading the content_url: + # An URL to a picture with a default lifetime of 30 minutes. + # This URL is tagged with the account of the requester. Anyone with the URL + # effectively accesses the picture as the original requester. Access to the + # picture may be lost if the presentation's sharing settings change. + # Writing the content_url: + # The picture is fetched once at insertion time and a copy is stored for + # display inside the presentation. Pictures must be less than 50MB in size, + # cannot exceed 25 megapixels, and must be in either in PNG, JPEG, or GIF + # format. + # Corresponds to the JSON property `contentUrl` + # @return [String] + attr_accessor :content_url + + # A width and height. + # Corresponds to the JSON property `size` + # @return [Google::Apis::SlidesV1::Size] + attr_accessor :size + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @content_url = args[:content_url] if args.key?(:content_url) + @size = args[:size] if args.key?(:size) + end + end + + # Update the styling of text in a Shape or + # Table. + class UpdateTextStyleRequest + include Google::Apis::Core::Hashable + + # A location of a single table cell within a table. + # Corresponds to the JSON property `cellLocation` + # @return [Google::Apis::SlidesV1::TableCellLocation] + attr_accessor :cell_location + + # Represents the styling that can be applied to a TextRun. + # If this text is contained in a shape with a parent placeholder, then these + # text styles may be + # inherited from the parent. Which text styles are inherited depend on the + # nesting level of lists: + # * A text run in a paragraph that is not in a list will inherit its text style + # from the the newline character in the paragraph at the 0 nesting level of + # the list inside the parent placeholder. + # * A text run in a paragraph that is in a list will inherit its text style + # from the newline character in the paragraph at its corresponding nesting + # level of the list inside the parent placeholder. + # Inherited text styles are represented as unset fields in this message. If + # text is contained in a shape without a parent placeholder, unsetting these + # fields will revert the style to a value matching the defaults in the Slides + # editor. + # Corresponds to the JSON property `style` + # @return [Google::Apis::SlidesV1::TextStyle] + attr_accessor :style + + # The fields that should be updated. + # At least one field must be specified. The root `style` is implied and + # should not be specified. A single `"*"` can be used as short-hand for + # listing every field. + # For example, to update the text style to bold, set `fields` to `"bold"`. + # To reset a property to its default value, include its field name in the + # field mask but leave the field itself unset. + # Corresponds to the JSON property `fields` + # @return [String] + attr_accessor :fields + + # The object ID of the shape or table with the text to be styled. + # Corresponds to the JSON property `objectId` + # @return [String] + attr_accessor :object_id_prop + + # Specifies a contiguous range of an indexed collection, such as characters in + # text. + # Corresponds to the JSON property `textRange` + # @return [Google::Apis::SlidesV1::Range] + attr_accessor :text_range + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @cell_location = args[:cell_location] if args.key?(:cell_location) + @style = args[:style] if args.key?(:style) + @fields = args[:fields] if args.key?(:fields) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + @text_range = args[:text_range] if args.key?(:text_range) + end + end + + # Deletes a column from a table. + class DeleteTableColumnRequest + include Google::Apis::Core::Hashable + + # A location of a single table cell within a table. + # Corresponds to the JSON property `cellLocation` + # @return [Google::Apis::SlidesV1::TableCellLocation] + attr_accessor :cell_location + + # The table to delete columns from. + # Corresponds to the JSON property `tableObjectId` + # @return [String] + attr_accessor :table_object_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @cell_location = args[:cell_location] if args.key?(:cell_location) + @table_object_id = args[:table_object_id] if args.key?(:table_object_id) + end + end + + # A List describes the look and feel of bullets belonging to paragraphs + # associated with a list. A paragraph that is part of a list has an implicit + # reference to that list's ID. + class List + include Google::Apis::Core::Hashable + + # A map of nesting levels to the properties of bullets at the associated + # level. A list has at most nine levels of nesting, so the possible values + # for the keys of this map are 0 through 8, inclusive. + # Corresponds to the JSON property `nestingLevel` + # @return [Hash] + attr_accessor :nesting_level + + # The ID of the list. + # Corresponds to the JSON property `listId` + # @return [String] + attr_accessor :list_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @nesting_level = args[:nesting_level] if args.key?(:nesting_level) + @list_id = args[:list_id] if args.key?(:list_id) + end + end + + # Represents a font family and weight used to style a TextRun. + class WeightedFontFamily + include Google::Apis::Core::Hashable + + # The font family of the text. + # The font family can be any font from the Font menu in Slides or from + # [Google Fonts] (https://fonts.google.com/). If the font name is + # unrecognized, the text is rendered in `Arial`. + # Corresponds to the JSON property `fontFamily` + # @return [String] + attr_accessor :font_family + + # The rendered weight of the text. This field can have any value that is a + # multiple of `100` between `100` and `900`, inclusive. This range + # corresponds to the numerical values described in the CSS 2.1 + # Specification, [section 15.6](https://www.w3.org/TR/CSS21/fonts.html#font- + # boldness), + # with non-numerical values disallowed. Weights greater than or equal to + # `700` are considered bold, and weights less than `700`are not bold. The + # default value is `400` ("normal"). + # Corresponds to the JSON property `weight` + # @return [Fixnum] + attr_accessor :weight + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @font_family = args[:font_family] if args.key?(:font_family) + @weight = args[:weight] if args.key?(:weight) + end + end + + # A visual element rendered on a page. + class PageElement + include Google::Apis::Core::Hashable + + # A width and height. + # Corresponds to the JSON property `size` + # @return [Google::Apis::SlidesV1::Size] + attr_accessor :size + + # A PageElement kind representing + # a linked chart embedded from Google Sheets. + # Corresponds to the JSON property `sheetsChart` + # @return [Google::Apis::SlidesV1::SheetsChart] + attr_accessor :sheets_chart + + # The title of the page element. Combined with description to display alt + # text. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + # A PageElement kind representing a + # video. + # Corresponds to the JSON property `video` + # @return [Google::Apis::SlidesV1::Video] + attr_accessor :video + + # A PageElement kind representing + # word art. + # Corresponds to the JSON property `wordArt` + # @return [Google::Apis::SlidesV1::WordArt] + attr_accessor :word_art + + # A PageElement kind representing a + # table. + # Corresponds to the JSON property `table` + # @return [Google::Apis::SlidesV1::Table] + attr_accessor :table + + # AffineTransform uses a 3x3 matrix with an implied last row of [ 0 0 1 ] + # to transform source coordinates (x,y) into destination coordinates (x', y') + # according to: + # x' x = shear_y scale_y translate_y + # 1 [ 1 ] + # After transformation, + # x' = scale_x * x + shear_x * y + translate_x; + # y' = scale_y * y + shear_y * x + translate_y; + # This message is therefore composed of these six matrix elements. + # Corresponds to the JSON property `transform` + # @return [Google::Apis::SlidesV1::AffineTransform] + attr_accessor :transform + + # The object ID for this page element. Object IDs used by + # google.apps.slides.v1.Page and + # google.apps.slides.v1.PageElement share the same namespace. + # Corresponds to the JSON property `objectId` + # @return [String] + attr_accessor :object_id_prop + + # A PageElement kind representing a + # generic shape that does not have a more specific classification. + # Corresponds to the JSON property `shape` + # @return [Google::Apis::SlidesV1::Shape] + attr_accessor :shape + + # A PageElement kind representing a + # line, curved connector, or bent connector. + # Corresponds to the JSON property `line` + # @return [Google::Apis::SlidesV1::Line] + attr_accessor :line + + # The description of the page element. Combined with title to display alt + # text. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # A PageElement kind representing a + # joined collection of PageElements. + # Corresponds to the JSON property `elementGroup` + # @return [Google::Apis::SlidesV1::Group] + attr_accessor :element_group + + # A PageElement kind representing an + # image. + # Corresponds to the JSON property `image` + # @return [Google::Apis::SlidesV1::Image] + attr_accessor :image + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @size = args[:size] if args.key?(:size) + @sheets_chart = args[:sheets_chart] if args.key?(:sheets_chart) + @title = args[:title] if args.key?(:title) + @video = args[:video] if args.key?(:video) + @word_art = args[:word_art] if args.key?(:word_art) + @table = args[:table] if args.key?(:table) + @transform = args[:transform] if args.key?(:transform) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + @shape = args[:shape] if args.key?(:shape) + @line = args[:line] if args.key?(:line) + @description = args[:description] if args.key?(:description) + @element_group = args[:element_group] if args.key?(:element_group) + @image = args[:image] if args.key?(:image) + end + end + + # Creates an image. + class CreateImageRequest + include Google::Apis::Core::Hashable + + # A user-supplied object ID. + # If you specify an ID, it must be unique among all pages and page elements + # in the presentation. The ID must start with an alphanumeric character or an + # underscore (matches regex `[a-zA-Z0-9_]`); remaining characters + # may include those as well as a hyphen or colon (matches regex + # `[a-zA-Z0-9_-:]`). + # The length of the ID must not be less than 5 or greater than 50. + # If you don't specify an ID, a unique one is generated. + # Corresponds to the JSON property `objectId` + # @return [String] + attr_accessor :object_id_prop + + # Common properties for a page element. + # Note: When you initially create a + # PageElement, the API may modify + # the values of both `size` and `transform`, but the + # visual size will be unchanged. + # Corresponds to the JSON property `elementProperties` + # @return [Google::Apis::SlidesV1::PageElementProperties] + attr_accessor :element_properties + + # The image URL. + # The image is fetched once at insertion time and a copy is stored for + # display inside the presentation. Images must be less than 50MB in size, + # cannot exceed 25 megapixels, and must be in either in PNG, JPEG, or GIF + # format. + # Corresponds to the JSON property `url` + # @return [String] + attr_accessor :url + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + @element_properties = args[:element_properties] if args.key?(:element_properties) + @url = args[:url] if args.key?(:url) + end + end + + # Creates bullets for all of the paragraphs that overlap with the given + # text index range. + # The nesting level of each paragraph will be determined by counting leading + # tabs in front of each paragraph. To avoid excess space between the bullet and + # the corresponding paragraph, these leading tabs are removed by this request. + # This may change the indices of parts of the text. + # If the paragraph immediately before paragraphs being updated is in a list + # with a matching preset, the paragraphs being updated are added to that + # preceding list. + class CreateParagraphBulletsRequest + include Google::Apis::Core::Hashable + + # The kinds of bullet glyphs to be used. Defaults to the + # `BULLET_DISC_CIRCLE_SQUARE` preset. + # Corresponds to the JSON property `bulletPreset` + # @return [String] + attr_accessor :bullet_preset + + # A location of a single table cell within a table. + # Corresponds to the JSON property `cellLocation` + # @return [Google::Apis::SlidesV1::TableCellLocation] + attr_accessor :cell_location + + # The object ID of the shape or table containing the text to add bullets to. + # Corresponds to the JSON property `objectId` + # @return [String] + attr_accessor :object_id_prop + + # Specifies a contiguous range of an indexed collection, such as characters in + # text. + # Corresponds to the JSON property `textRange` + # @return [Google::Apis::SlidesV1::Range] + attr_accessor :text_range + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @bullet_preset = args[:bullet_preset] if args.key?(:bullet_preset) + @cell_location = args[:cell_location] if args.key?(:cell_location) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + @text_range = args[:text_range] if args.key?(:text_range) + end + end + + # A width and height. + class Size + include Google::Apis::Core::Hashable + + # A magnitude in a single direction in the specified units. + # Corresponds to the JSON property `height` + # @return [Google::Apis::SlidesV1::Dimension] + attr_accessor :height + + # A magnitude in a single direction in the specified units. + # Corresponds to the JSON property `width` + # @return [Google::Apis::SlidesV1::Dimension] + attr_accessor :width + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @height = args[:height] if args.key?(:height) + @width = args[:width] if args.key?(:width) + end + end + + # Represents the styling that can be applied to a TextRun. + # If this text is contained in a shape with a parent placeholder, then these + # text styles may be + # inherited from the parent. Which text styles are inherited depend on the + # nesting level of lists: + # * A text run in a paragraph that is not in a list will inherit its text style + # from the the newline character in the paragraph at the 0 nesting level of + # the list inside the parent placeholder. + # * A text run in a paragraph that is in a list will inherit its text style + # from the newline character in the paragraph at its corresponding nesting + # level of the list inside the parent placeholder. + # Inherited text styles are represented as unset fields in this message. If + # text is contained in a shape without a parent placeholder, unsetting these + # fields will revert the style to a value matching the defaults in the Slides + # editor. + class TextStyle + include Google::Apis::Core::Hashable + + # A color that can either be fully opaque or fully transparent. + # Corresponds to the JSON property `backgroundColor` + # @return [Google::Apis::SlidesV1::OptionalColor] + attr_accessor :background_color + + # Whether or not the text is underlined. + # Corresponds to the JSON property `underline` + # @return [Boolean] + attr_accessor :underline + alias_method :underline?, :underline + + # A hypertext link. + # Corresponds to the JSON property `link` + # @return [Google::Apis::SlidesV1::Link] + attr_accessor :link + + # Whether or not the text is rendered as bold. + # Corresponds to the JSON property `bold` + # @return [Boolean] + attr_accessor :bold + alias_method :bold?, :bold + + # A color that can either be fully opaque or fully transparent. + # Corresponds to the JSON property `foregroundColor` + # @return [Google::Apis::SlidesV1::OptionalColor] + attr_accessor :foreground_color + + # The font family of the text. + # The font family can be any font from the Font menu in Slides or from + # [Google Fonts] (https://fonts.google.com/). If the font name is + # unrecognized, the text is rendered in `Arial`. + # Some fonts can affect the weight of the text. If an update request + # specifies values for both `font_family` and `bold`, the explicitly-set + # `bold` value is used. + # Corresponds to the JSON property `fontFamily` + # @return [String] + attr_accessor :font_family + + # Whether or not the text is italicized. + # Corresponds to the JSON property `italic` + # @return [Boolean] + attr_accessor :italic + alias_method :italic?, :italic + + # Whether or not the text is struck through. + # Corresponds to the JSON property `strikethrough` + # @return [Boolean] + attr_accessor :strikethrough + alias_method :strikethrough?, :strikethrough + + # A magnitude in a single direction in the specified units. + # Corresponds to the JSON property `fontSize` + # @return [Google::Apis::SlidesV1::Dimension] + attr_accessor :font_size + + # The text's vertical offset from its normal position. + # Text with `SUPERSCRIPT` or `SUBSCRIPT` baseline offsets is automatically + # rendered in a smaller font size, computed based on the `font_size` field. + # The `font_size` itself is not affected by changes in this field. + # Corresponds to the JSON property `baselineOffset` + # @return [String] + attr_accessor :baseline_offset + + # Represents a font family and weight used to style a TextRun. + # Corresponds to the JSON property `weightedFontFamily` + # @return [Google::Apis::SlidesV1::WeightedFontFamily] + attr_accessor :weighted_font_family + + # Whether or not the text is in small capital letters. + # Corresponds to the JSON property `smallCaps` + # @return [Boolean] + attr_accessor :small_caps + alias_method :small_caps?, :small_caps + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @background_color = args[:background_color] if args.key?(:background_color) + @underline = args[:underline] if args.key?(:underline) + @link = args[:link] if args.key?(:link) + @bold = args[:bold] if args.key?(:bold) + @foreground_color = args[:foreground_color] if args.key?(:foreground_color) + @font_family = args[:font_family] if args.key?(:font_family) + @italic = args[:italic] if args.key?(:italic) + @strikethrough = args[:strikethrough] if args.key?(:strikethrough) + @font_size = args[:font_size] if args.key?(:font_size) + @baseline_offset = args[:baseline_offset] if args.key?(:baseline_offset) + @weighted_font_family = args[:weighted_font_family] if args.key?(:weighted_font_family) + @small_caps = args[:small_caps] if args.key?(:small_caps) + end + end + + # Update the properties of a Video. + class UpdateVideoPropertiesRequest + include Google::Apis::Core::Hashable + + # The object ID of the video the updates are applied to. + # Corresponds to the JSON property `objectId` + # @return [String] + attr_accessor :object_id_prop + + # The properties of the Video. + # Corresponds to the JSON property `videoProperties` + # @return [Google::Apis::SlidesV1::VideoProperties] + attr_accessor :video_properties + + # The fields that should be updated. + # At least one field must be specified. The root `videoProperties` is + # implied and should not be specified. A single `"*"` can be used as + # short-hand for listing every field. + # For example to update the video outline color, set `fields` to + # `"outline.outlineFill.solidFill.color"`. + # To reset a property to its default value, include its field name in the + # field mask but leave the field itself unset. + # Corresponds to the JSON property `fields` + # @return [String] + attr_accessor :fields + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + @video_properties = args[:video_properties] if args.key?(:video_properties) + @fields = args[:fields] if args.key?(:fields) + end + end + + # A single kind of update to apply to a presentation. + class Request + include Google::Apis::Core::Hashable + + # Replaces all shapes that match the given criteria with the provided image. + # Corresponds to the JSON property `replaceAllShapesWithImage` + # @return [Google::Apis::SlidesV1::ReplaceAllShapesWithImageRequest] + attr_accessor :replace_all_shapes_with_image + + # Replaces all instances of text matching a criteria with replace text. + # Corresponds to the JSON property `replaceAllText` + # @return [Google::Apis::SlidesV1::ReplaceAllTextRequest] + attr_accessor :replace_all_text + + # Update the properties of an Image. + # Corresponds to the JSON property `updateImageProperties` + # @return [Google::Apis::SlidesV1::UpdateImagePropertiesRequest] + attr_accessor :update_image_properties + + # Inserts rows into a table. + # Corresponds to the JSON property `insertTableRows` + # @return [Google::Apis::SlidesV1::InsertTableRowsRequest] + attr_accessor :insert_table_rows + + # Creates a new slide. + # Corresponds to the JSON property `createSlide` + # @return [Google::Apis::SlidesV1::CreateSlideRequest] + attr_accessor :create_slide + + # Updates the properties of a Line. + # Corresponds to the JSON property `updateLineProperties` + # @return [Google::Apis::SlidesV1::UpdateLinePropertiesRequest] + attr_accessor :update_line_properties + + # Updates the position of slides in the presentation. + # Corresponds to the JSON property `updateSlidesPosition` + # @return [Google::Apis::SlidesV1::UpdateSlidesPositionRequest] + attr_accessor :update_slides_position + + # Deletes a row from a table. + # Corresponds to the JSON property `deleteTableRow` + # @return [Google::Apis::SlidesV1::DeleteTableRowRequest] + attr_accessor :delete_table_row + + # Update the properties of a Shape. + # Corresponds to the JSON property `updateShapeProperties` + # @return [Google::Apis::SlidesV1::UpdateShapePropertiesRequest] + attr_accessor :update_shape_properties + + # Inserts text into a shape or a table cell. + # Corresponds to the JSON property `insertText` + # @return [Google::Apis::SlidesV1::InsertTextRequest] + attr_accessor :insert_text + + # Deletes text from a shape or a table cell. + # Corresponds to the JSON property `deleteText` + # @return [Google::Apis::SlidesV1::DeleteTextRequest] + attr_accessor :delete_text + + # Updates the properties of a Page. + # Corresponds to the JSON property `updatePageProperties` + # @return [Google::Apis::SlidesV1::UpdatePagePropertiesRequest] + attr_accessor :update_page_properties + + # Deletes bullets from all of the paragraphs that overlap with the given text + # index range. + # The nesting level of each paragraph will be visually preserved by adding + # indent to the start of the corresponding paragraph. + # Corresponds to the JSON property `deleteParagraphBullets` + # @return [Google::Apis::SlidesV1::DeleteParagraphBulletsRequest] + attr_accessor :delete_paragraph_bullets + + # Creates a new shape. + # Corresponds to the JSON property `createShape` + # @return [Google::Apis::SlidesV1::CreateShapeRequest] + attr_accessor :create_shape + + # Inserts columns into a table. + # Other columns in the table will be resized to fit the new column. + # Corresponds to the JSON property `insertTableColumns` + # @return [Google::Apis::SlidesV1::InsertTableColumnsRequest] + attr_accessor :insert_table_columns + + # Refreshes an embedded Google Sheets chart by replacing it with the latest + # version of the chart from Google Sheets. + # NOTE: Refreshing charts requires at least one of the spreadsheets.readonly, + # spreadsheets, drive.readonly, or drive OAuth scopes. + # Corresponds to the JSON property `refreshSheetsChart` + # @return [Google::Apis::SlidesV1::RefreshSheetsChartRequest] + attr_accessor :refresh_sheets_chart + + # Creates a new table. + # Corresponds to the JSON property `createTable` + # @return [Google::Apis::SlidesV1::CreateTableRequest] + attr_accessor :create_table + + # Update the properties of a TableCell. + # Corresponds to the JSON property `updateTableCellProperties` + # @return [Google::Apis::SlidesV1::UpdateTableCellPropertiesRequest] + attr_accessor :update_table_cell_properties + + # Deletes an object, either pages or + # page elements, from the + # presentation. + # Corresponds to the JSON property `deleteObject` + # @return [Google::Apis::SlidesV1::DeleteObjectRequest] + attr_accessor :delete_object + + # Updates the styling for all of the paragraphs within a Shape or Table that + # overlap with the given text index range. + # Corresponds to the JSON property `updateParagraphStyle` + # @return [Google::Apis::SlidesV1::UpdateParagraphStyleRequest] + attr_accessor :update_paragraph_style + + # Duplicates a slide or page element. + # When duplicating a slide, the duplicate slide will be created immediately + # following the specified slide. When duplicating a page element, the duplicate + # will be placed on the same page at the same position as the original. + # Corresponds to the JSON property `duplicateObject` + # @return [Google::Apis::SlidesV1::DuplicateObjectRequest] + attr_accessor :duplicate_object + + # Deletes a column from a table. + # Corresponds to the JSON property `deleteTableColumn` + # @return [Google::Apis::SlidesV1::DeleteTableColumnRequest] + attr_accessor :delete_table_column + + # Update the properties of a Video. + # Corresponds to the JSON property `updateVideoProperties` + # @return [Google::Apis::SlidesV1::UpdateVideoPropertiesRequest] + attr_accessor :update_video_properties + + # Creates a line. + # Corresponds to the JSON property `createLine` + # @return [Google::Apis::SlidesV1::CreateLineRequest] + attr_accessor :create_line + + # Creates an image. + # Corresponds to the JSON property `createImage` + # @return [Google::Apis::SlidesV1::CreateImageRequest] + attr_accessor :create_image + + # Creates bullets for all of the paragraphs that overlap with the given + # text index range. + # The nesting level of each paragraph will be determined by counting leading + # tabs in front of each paragraph. To avoid excess space between the bullet and + # the corresponding paragraph, these leading tabs are removed by this request. + # This may change the indices of parts of the text. + # If the paragraph immediately before paragraphs being updated is in a list + # with a matching preset, the paragraphs being updated are added to that + # preceding list. + # Corresponds to the JSON property `createParagraphBullets` + # @return [Google::Apis::SlidesV1::CreateParagraphBulletsRequest] + attr_accessor :create_paragraph_bullets + + # Creates a video. + # Corresponds to the JSON property `createVideo` + # @return [Google::Apis::SlidesV1::CreateVideoRequest] + attr_accessor :create_video + + # Replaces all shapes that match the given criteria with the provided Google + # Sheets chart. The chart will be scaled and centered to fit within the bounds + # of the original shape. + # NOTE: Replacing shapes with a chart requires at least one of the + # spreadsheets.readonly, spreadsheets, drive.readonly, or drive OAuth scopes. + # Corresponds to the JSON property `replaceAllShapesWithSheetsChart` + # @return [Google::Apis::SlidesV1::ReplaceAllShapesWithSheetsChartRequest] + attr_accessor :replace_all_shapes_with_sheets_chart + + # Creates an embedded Google Sheets chart. + # NOTE: Chart creation requires at least one of the spreadsheets.readonly, + # spreadsheets, drive.readonly, or drive OAuth scopes. + # Corresponds to the JSON property `createSheetsChart` + # @return [Google::Apis::SlidesV1::CreateSheetsChartRequest] + attr_accessor :create_sheets_chart + + # Updates the transform of a page element. + # Corresponds to the JSON property `updatePageElementTransform` + # @return [Google::Apis::SlidesV1::UpdatePageElementTransformRequest] + attr_accessor :update_page_element_transform + + # Update the styling of text in a Shape or + # Table. + # Corresponds to the JSON property `updateTextStyle` + # @return [Google::Apis::SlidesV1::UpdateTextStyleRequest] + attr_accessor :update_text_style + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @replace_all_shapes_with_image = args[:replace_all_shapes_with_image] if args.key?(:replace_all_shapes_with_image) + @replace_all_text = args[:replace_all_text] if args.key?(:replace_all_text) + @update_image_properties = args[:update_image_properties] if args.key?(:update_image_properties) + @insert_table_rows = args[:insert_table_rows] if args.key?(:insert_table_rows) + @create_slide = args[:create_slide] if args.key?(:create_slide) + @update_line_properties = args[:update_line_properties] if args.key?(:update_line_properties) + @update_slides_position = args[:update_slides_position] if args.key?(:update_slides_position) + @delete_table_row = args[:delete_table_row] if args.key?(:delete_table_row) + @update_shape_properties = args[:update_shape_properties] if args.key?(:update_shape_properties) + @insert_text = args[:insert_text] if args.key?(:insert_text) + @delete_text = args[:delete_text] if args.key?(:delete_text) + @update_page_properties = args[:update_page_properties] if args.key?(:update_page_properties) + @delete_paragraph_bullets = args[:delete_paragraph_bullets] if args.key?(:delete_paragraph_bullets) + @create_shape = args[:create_shape] if args.key?(:create_shape) + @insert_table_columns = args[:insert_table_columns] if args.key?(:insert_table_columns) + @refresh_sheets_chart = args[:refresh_sheets_chart] if args.key?(:refresh_sheets_chart) + @create_table = args[:create_table] if args.key?(:create_table) + @update_table_cell_properties = args[:update_table_cell_properties] if args.key?(:update_table_cell_properties) + @delete_object = args[:delete_object] if args.key?(:delete_object) + @update_paragraph_style = args[:update_paragraph_style] if args.key?(:update_paragraph_style) + @duplicate_object = args[:duplicate_object] if args.key?(:duplicate_object) + @delete_table_column = args[:delete_table_column] if args.key?(:delete_table_column) + @update_video_properties = args[:update_video_properties] if args.key?(:update_video_properties) + @create_line = args[:create_line] if args.key?(:create_line) + @create_image = args[:create_image] if args.key?(:create_image) + @create_paragraph_bullets = args[:create_paragraph_bullets] if args.key?(:create_paragraph_bullets) + @create_video = args[:create_video] if args.key?(:create_video) + @replace_all_shapes_with_sheets_chart = args[:replace_all_shapes_with_sheets_chart] if args.key?(:replace_all_shapes_with_sheets_chart) + @create_sheets_chart = args[:create_sheets_chart] if args.key?(:create_sheets_chart) + @update_page_element_transform = args[:update_page_element_transform] if args.key?(:update_page_element_transform) + @update_text_style = args[:update_text_style] if args.key?(:update_text_style) + end + end + + # Update the properties of an Image. + class UpdateImagePropertiesRequest + include Google::Apis::Core::Hashable + + # The fields that should be updated. + # At least one field must be specified. The root `imageProperties` is + # implied and should not be specified. A single `"*"` can be used as + # short-hand for listing every field. + # For example to update the image outline color, set `fields` to + # `"outline.outlineFill.solidFill.color"`. + # To reset a property to its default value, include its field name in the + # field mask but leave the field itself unset. + # Corresponds to the JSON property `fields` + # @return [String] + attr_accessor :fields + + # The properties of the Image. + # Corresponds to the JSON property `imageProperties` + # @return [Google::Apis::SlidesV1::ImageProperties] + attr_accessor :image_properties + + # The object ID of the image the updates are applied to. + # Corresponds to the JSON property `objectId` + # @return [String] + attr_accessor :object_id_prop + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @fields = args[:fields] if args.key?(:fields) + @image_properties = args[:image_properties] if args.key?(:image_properties) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + end + end + + # Styles that apply to a whole paragraph. + # If this text is contained in a shape with a parent placeholder, then these + # paragraph styles may be + # inherited from the parent. Which paragraph styles are inherited depend on the + # nesting level of lists: + # * A paragraph not in a list will inherit its paragraph style from the + # paragraph at the 0 nesting level of the list inside the parent placeholder. + # * A paragraph in a list will inherit its paragraph style from the paragraph + # at its corresponding nesting level of the list inside the parent + # placeholder. + # Inherited paragraph styles are represented as unset fields in this message. + class ParagraphStyle + include Google::Apis::Core::Hashable + + # A magnitude in a single direction in the specified units. + # Corresponds to the JSON property `spaceBelow` + # @return [Google::Apis::SlidesV1::Dimension] + attr_accessor :space_below + + # The text direction of this paragraph. If unset, the value defaults to + # LEFT_TO_RIGHT since + # text direction is not inherited. + # Corresponds to the JSON property `direction` + # @return [String] + attr_accessor :direction + + # A magnitude in a single direction in the specified units. + # Corresponds to the JSON property `indentEnd` + # @return [Google::Apis::SlidesV1::Dimension] + attr_accessor :indent_end + + # The spacing mode for the paragraph. + # Corresponds to the JSON property `spacingMode` + # @return [String] + attr_accessor :spacing_mode + + # A magnitude in a single direction in the specified units. + # Corresponds to the JSON property `indentStart` + # @return [Google::Apis::SlidesV1::Dimension] + attr_accessor :indent_start + + # A magnitude in a single direction in the specified units. + # Corresponds to the JSON property `spaceAbove` + # @return [Google::Apis::SlidesV1::Dimension] + attr_accessor :space_above + + # A magnitude in a single direction in the specified units. + # Corresponds to the JSON property `indentFirstLine` + # @return [Google::Apis::SlidesV1::Dimension] + attr_accessor :indent_first_line + + # The amount of space between lines, as a percentage of normal, where normal + # is represented as 100.0. If unset, the value is inherited from the parent. + # Corresponds to the JSON property `lineSpacing` + # @return [Float] + attr_accessor :line_spacing + + # The text alignment for this paragraph. + # Corresponds to the JSON property `alignment` + # @return [String] + attr_accessor :alignment + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @space_below = args[:space_below] if args.key?(:space_below) + @direction = args[:direction] if args.key?(:direction) + @indent_end = args[:indent_end] if args.key?(:indent_end) + @spacing_mode = args[:spacing_mode] if args.key?(:spacing_mode) + @indent_start = args[:indent_start] if args.key?(:indent_start) + @space_above = args[:space_above] if args.key?(:space_above) + @indent_first_line = args[:indent_first_line] if args.key?(:indent_first_line) + @line_spacing = args[:line_spacing] if args.key?(:line_spacing) + @alignment = args[:alignment] if args.key?(:alignment) + end + end + + # The result of replacing shapes with a Google Sheets chart. + class ReplaceAllShapesWithSheetsChartResponse + include Google::Apis::Core::Hashable + + # The number of shapes replaced with charts. + # Corresponds to the JSON property `occurrencesChanged` + # @return [Fixnum] + attr_accessor :occurrences_changed + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @occurrences_changed = args[:occurrences_changed] if args.key?(:occurrences_changed) + end + end + + # The properties of the TableCell. + class TableCellProperties + include Google::Apis::Core::Hashable + + # The table cell background fill. + # Corresponds to the JSON property `tableCellBackgroundFill` + # @return [Google::Apis::SlidesV1::TableCellBackgroundFill] + attr_accessor :table_cell_background_fill + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @table_cell_background_fill = args[:table_cell_background_fill] if args.key?(:table_cell_background_fill) + end + end + + # Refreshes an embedded Google Sheets chart by replacing it with the latest + # version of the chart from Google Sheets. + # NOTE: Refreshing charts requires at least one of the spreadsheets.readonly, + # spreadsheets, drive.readonly, or drive OAuth scopes. + class RefreshSheetsChartRequest + include Google::Apis::Core::Hashable + + # The object ID of the chart to refresh. + # Corresponds to the JSON property `objectId` + # @return [String] + attr_accessor :object_id_prop + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + end + end + + # The outline of a PageElement. + # If these fields are unset, they may be inherited from a parent placeholder + # if it exists. If there is no parent, the fields will default to the value + # used for new page elements created in the Slides editor, which may depend on + # the page element kind. + class Outline + include Google::Apis::Core::Hashable + + # The fill of the outline. + # Corresponds to the JSON property `outlineFill` + # @return [Google::Apis::SlidesV1::OutlineFill] + attr_accessor :outline_fill + + # A magnitude in a single direction in the specified units. + # Corresponds to the JSON property `weight` + # @return [Google::Apis::SlidesV1::Dimension] + attr_accessor :weight + + # The dash style of the outline. + # Corresponds to the JSON property `dashStyle` + # @return [String] + attr_accessor :dash_style + + # The outline property state. + # Updating the the outline on a page element will implicitly update this + # field to`RENDERED`, unless another value is specified in the same request. + # To have no outline on a page element, set this field to `NOT_RENDERED`. In + # this case, any other outline fields set in the same request will be + # ignored. + # Corresponds to the JSON property `propertyState` + # @return [String] + attr_accessor :property_state + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @outline_fill = args[:outline_fill] if args.key?(:outline_fill) + @weight = args[:weight] if args.key?(:weight) + @dash_style = args[:dash_style] if args.key?(:dash_style) + @property_state = args[:property_state] if args.key?(:property_state) + end + end + + # Properties of each column in a table. + class TableColumnProperties + include Google::Apis::Core::Hashable + + # A magnitude in a single direction in the specified units. + # Corresponds to the JSON property `columnWidth` + # @return [Google::Apis::SlidesV1::Dimension] + attr_accessor :column_width + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @column_width = args[:column_width] if args.key?(:column_width) + end + end + + # The properties of a Shape. + # If the shape is a placeholder shape as determined by the + # placeholder field, then these + # properties may be inherited from a parent placeholder shape. + # Determining the rendered value of the property depends on the corresponding + # property_state field value. + class ShapeProperties + include Google::Apis::Core::Hashable + + # The shape background fill. + # Corresponds to the JSON property `shapeBackgroundFill` + # @return [Google::Apis::SlidesV1::ShapeBackgroundFill] + attr_accessor :shape_background_fill + + # The shadow properties of a page element. + # If these fields are unset, they may be inherited from a parent placeholder + # if it exists. If there is no parent, the fields will default to the value + # used for new page elements created in the Slides editor, which may depend on + # the page element kind. + # Corresponds to the JSON property `shadow` + # @return [Google::Apis::SlidesV1::Shadow] + attr_accessor :shadow + + # A hypertext link. + # Corresponds to the JSON property `link` + # @return [Google::Apis::SlidesV1::Link] + attr_accessor :link + + # The outline of a PageElement. + # If these fields are unset, they may be inherited from a parent placeholder + # if it exists. If there is no parent, the fields will default to the value + # used for new page elements created in the Slides editor, which may depend on + # the page element kind. + # Corresponds to the JSON property `outline` + # @return [Google::Apis::SlidesV1::Outline] + attr_accessor :outline + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @shape_background_fill = args[:shape_background_fill] if args.key?(:shape_background_fill) + @shadow = args[:shadow] if args.key?(:shadow) + @link = args[:link] if args.key?(:link) + @outline = args[:outline] if args.key?(:outline) + end + end + + # The properties of Page that are only + # relevant for pages with page_type NOTES. + class NotesProperties + include Google::Apis::Core::Hashable + + # The object ID of the shape on this notes page that contains the speaker + # notes for the corresponding slide. + # The actual shape may not always exist on the notes page. Inserting text + # using this object ID will automatically create the shape. In this case, the + # actual shape may have different object ID. The `GetPresentation` or + # `GetPage` action will always return the latest object ID. + # Corresponds to the JSON property `speakerNotesObjectId` + # @return [String] + attr_accessor :speaker_notes_object_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @speaker_notes_object_id = args[:speaker_notes_object_id] if args.key?(:speaker_notes_object_id) + end + end + + # Properties and contents of each row in a table. + class TableRow + include Google::Apis::Core::Hashable + + # A magnitude in a single direction in the specified units. + # Corresponds to the JSON property `rowHeight` + # @return [Google::Apis::SlidesV1::Dimension] + attr_accessor :row_height + + # Properties and contents of each cell. + # Cells that span multiple columns are represented only once with a + # column_span greater + # than 1. As a result, the length of this collection does not always match + # the number of columns of the entire table. + # Corresponds to the JSON property `tableCells` + # @return [Array] + attr_accessor :table_cells + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @row_height = args[:row_height] if args.key?(:row_height) + @table_cells = args[:table_cells] if args.key?(:table_cells) + end + end + + # Update the properties of a TableCell. + class UpdateTableCellPropertiesRequest + include Google::Apis::Core::Hashable + + # The fields that should be updated. + # At least one field must be specified. The root `tableCellProperties` is + # implied and should not be specified. A single `"*"` can be used as + # short-hand for listing every field. + # For example to update the table cell background solid fill color, set + # `fields` to `"tableCellBackgroundFill.solidFill.color"`. + # To reset a property to its default value, include its field name in the + # field mask but leave the field itself unset. + # Corresponds to the JSON property `fields` + # @return [String] + attr_accessor :fields + + # The object ID of the table. + # Corresponds to the JSON property `objectId` + # @return [String] + attr_accessor :object_id_prop + + # A table range represents a reference to a subset of a table. + # It's important to note that the cells specified by a table range do not + # necessarily form a rectangle. For example, let's say we have a 3 x 3 table + # where all the cells of the last row are merged together. The table looks + # like this: + # + # [ ] + # A table range with location = (0, 0), row span = 3 and column span = 2 + # specifies the following cells: + # x x + # [ x ] + # Corresponds to the JSON property `tableRange` + # @return [Google::Apis::SlidesV1::TableRange] + attr_accessor :table_range + + # The properties of the TableCell. + # Corresponds to the JSON property `tableCellProperties` + # @return [Google::Apis::SlidesV1::TableCellProperties] + attr_accessor :table_cell_properties + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @fields = args[:fields] if args.key?(:fields) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + @table_range = args[:table_range] if args.key?(:table_range) + @table_cell_properties = args[:table_cell_properties] if args.key?(:table_cell_properties) + end + end + + # Creates a new slide. + class CreateSlideRequest + include Google::Apis::Core::Hashable + + # An optional list of object ID mappings from the placeholder(s) on the layout + # to the placeholder(s) + # that will be created on the new slide from that specified layout. Can only + # be used when `slide_layout_reference` is specified. + # Corresponds to the JSON property `placeholderIdMappings` + # @return [Array] + attr_accessor :placeholder_id_mappings + + # Slide layout reference. This may reference either: + # - A predefined layout + # - One of the layouts in the presentation. + # Corresponds to the JSON property `slideLayoutReference` + # @return [Google::Apis::SlidesV1::LayoutReference] + attr_accessor :slide_layout_reference + + # A user-supplied object ID. + # If you specify an ID, it must be unique among all pages and page elements + # in the presentation. The ID must start with an alphanumeric character or an + # underscore (matches regex `[a-zA-Z0-9_]`); remaining characters + # may include those as well as a hyphen or colon (matches regex + # `[a-zA-Z0-9_-:]`). + # The length of the ID must not be less than 5 or greater than 50. + # If you don't specify an ID, a unique one is generated. + # Corresponds to the JSON property `objectId` + # @return [String] + attr_accessor :object_id_prop + + # The optional zero-based index indicating where to insert the slides. + # If you don't specify an index, the new slide is created at the end. + # Corresponds to the JSON property `insertionIndex` + # @return [Fixnum] + attr_accessor :insertion_index + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @placeholder_id_mappings = args[:placeholder_id_mappings] if args.key?(:placeholder_id_mappings) + @slide_layout_reference = args[:slide_layout_reference] if args.key?(:slide_layout_reference) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + @insertion_index = args[:insertion_index] if args.key?(:insertion_index) + end + end + + # Request message for PresentationsService.BatchUpdatePresentation. + class BatchUpdatePresentationRequest + include Google::Apis::Core::Hashable + + # Provides control over how write requests are executed. + # Corresponds to the JSON property `writeControl` + # @return [Google::Apis::SlidesV1::WriteControl] + attr_accessor :write_control + + # A list of updates to apply to the presentation. + # Corresponds to the JSON property `requests` + # @return [Array] + attr_accessor :requests + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @write_control = args[:write_control] if args.key?(:write_control) + @requests = args[:requests] if args.key?(:requests) + end + end + + # The general text content. The text must reside in a compatible shape (e.g. + # text box or rectangle) or a table cell in a page. + class TextContent + include Google::Apis::Core::Hashable + + # The text contents broken down into its component parts, including styling + # information. This property is read-only. + # Corresponds to the JSON property `textElements` + # @return [Array] + attr_accessor :text_elements + + # The bulleted lists contained in this text, keyed by list ID. + # Corresponds to the JSON property `lists` + # @return [Hash] + attr_accessor :lists + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @text_elements = args[:text_elements] if args.key?(:text_elements) + @lists = args[:lists] if args.key?(:lists) + end + end + + # The result of creating an embedded Google Sheets chart. + class CreateSheetsChartResponse + include Google::Apis::Core::Hashable + + # The object ID of the created chart. + # Corresponds to the JSON property `objectId` + # @return [String] + attr_accessor :object_id_prop + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + end + end + # Provides control over how write requests are executed. class WriteControl include Google::Apis::Core::Hashable @@ -119,11 +3092,6 @@ module Google class Thumbnail include Google::Apis::Core::Hashable - # The positive height in pixels of the thumbnail image. - # Corresponds to the JSON property `height` - # @return [Fixnum] - attr_accessor :height - # The content URL of the thumbnail image. # The URL to the image has a default lifetime of 30 minutes. # This URL is tagged with the account of the requester. Anyone with the URL @@ -140,15 +3108,20 @@ module Google # @return [Fixnum] attr_accessor :width + # The positive height in pixels of the thumbnail image. + # Corresponds to the JSON property `height` + # @return [Fixnum] + attr_accessor :height + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @height = args[:height] if args.key?(:height) @content_url = args[:content_url] if args.key?(:content_url) @width = args[:width] if args.key?(:width) + @height = args[:height] if args.key?(:height) end end @@ -157,11 +3130,6 @@ module Google class InsertTableColumnsRequest include Google::Apis::Core::Hashable - # The number of columns to be inserted. Maximum 20 per request. - # Corresponds to the JSON property `number` - # @return [Fixnum] - attr_accessor :number - # A location of a single table cell within a table. # Corresponds to the JSON property `cellLocation` # @return [Google::Apis::SlidesV1::TableCellLocation] @@ -180,16 +3148,21 @@ module Google # @return [String] attr_accessor :table_object_id + # The number of columns to be inserted. Maximum 20 per request. + # Corresponds to the JSON property `number` + # @return [Fixnum] + attr_accessor :number + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @number = args[:number] if args.key?(:number) @cell_location = args[:cell_location] if args.key?(:cell_location) @insert_right = args[:insert_right] if args.key?(:insert_right) @table_object_id = args[:table_object_id] if args.key?(:table_object_id) + @number = args[:number] if args.key?(:number) end end @@ -392,11 +3365,6 @@ module Google class RgbColor include Google::Apis::Core::Hashable - # The red component of the color, from 0.0 to 1.0. - # Corresponds to the JSON property `red` - # @return [Float] - attr_accessor :red - # The green component of the color, from 0.0 to 1.0. # Corresponds to the JSON property `green` # @return [Float] @@ -407,15 +3375,20 @@ module Google # @return [Float] attr_accessor :blue + # The red component of the color, from 0.0 to 1.0. + # Corresponds to the JSON property `red` + # @return [Float] + attr_accessor :red + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @red = args[:red] if args.key?(:red) @green = args[:green] if args.key?(:green) @blue = args[:blue] if args.key?(:blue) + @red = args[:red] if args.key?(:red) end end @@ -569,24 +3542,24 @@ module Google class PageProperties include Google::Apis::Core::Hashable - # The palette of predefined colors for a page. - # Corresponds to the JSON property `colorScheme` - # @return [Google::Apis::SlidesV1::ColorScheme] - attr_accessor :color_scheme - # The page background fill. # Corresponds to the JSON property `pageBackgroundFill` # @return [Google::Apis::SlidesV1::PageBackgroundFill] attr_accessor :page_background_fill + # The palette of predefined colors for a page. + # Corresponds to the JSON property `colorScheme` + # @return [Google::Apis::SlidesV1::ColorScheme] + attr_accessor :color_scheme + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @color_scheme = args[:color_scheme] if args.key?(:color_scheme) @page_background_fill = args[:page_background_fill] if args.key?(:page_background_fill) + @color_scheme = args[:color_scheme] if args.key?(:color_scheme) end end @@ -628,12 +3601,6 @@ module Google class TableCell include Google::Apis::Core::Hashable - # The general text content. The text must reside in a compatible shape (e.g. - # text box or rectangle) or a table cell in a page. - # Corresponds to the JSON property `text` - # @return [Google::Apis::SlidesV1::TextContent] - attr_accessor :text - # The properties of the TableCell. # Corresponds to the JSON property `tableCellProperties` # @return [Google::Apis::SlidesV1::TableCellProperties] @@ -654,17 +3621,23 @@ module Google # @return [Fixnum] attr_accessor :column_span + # The general text content. The text must reside in a compatible shape (e.g. + # text box or rectangle) or a table cell in a page. + # Corresponds to the JSON property `text` + # @return [Google::Apis::SlidesV1::TextContent] + attr_accessor :text + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @text = args[:text] if args.key?(:text) @table_cell_properties = args[:table_cell_properties] if args.key?(:table_cell_properties) @location = args[:location] if args.key?(:location) @row_span = args[:row_span] if args.key?(:row_span) @column_span = args[:column_span] if args.key?(:column_span) + @text = args[:text] if args.key?(:text) end end @@ -672,13 +3645,6 @@ module Google class UpdateLinePropertiesRequest include Google::Apis::Core::Hashable - # The properties of the Line. - # When unset, these fields default to values that match the appearance of - # new lines created in the Slides editor. - # Corresponds to the JSON property `lineProperties` - # @return [Google::Apis::SlidesV1::LineProperties] - attr_accessor :line_properties - # The fields that should be updated. # At least one field must be specified. The root `lineProperties` is # implied and should not be specified. A single `"*"` can be used as @@ -696,44 +3662,22 @@ module Google # @return [String] attr_accessor :object_id_prop + # The properties of the Line. + # When unset, these fields default to values that match the appearance of + # new lines created in the Slides editor. + # Corresponds to the JSON property `lineProperties` + # @return [Google::Apis::SlidesV1::LineProperties] + attr_accessor :line_properties + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @line_properties = args[:line_properties] if args.key?(:line_properties) @fields = args[:fields] if args.key?(:fields) @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) - end - end - - # Updates the position of slides in the presentation. - class UpdateSlidesPositionRequest - include Google::Apis::Core::Hashable - - # The index where the slides should be inserted, based on the slide - # arrangement before the move takes place. Must be between zero and the - # number of slides in the presentation, inclusive. - # Corresponds to the JSON property `insertionIndex` - # @return [Fixnum] - attr_accessor :insertion_index - - # The IDs of the slides in the presentation that should be moved. - # The slides in this list must be in existing presentation order, without - # duplicates. - # Corresponds to the JSON property `slideObjectIds` - # @return [Array] - attr_accessor :slide_object_ids - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @insertion_index = args[:insertion_index] if args.key?(:insertion_index) - @slide_object_ids = args[:slide_object_ids] if args.key?(:slide_object_ids) + @line_properties = args[:line_properties] if args.key?(:line_properties) end end @@ -769,6 +3713,35 @@ module Google end end + # Updates the position of slides in the presentation. + class UpdateSlidesPositionRequest + include Google::Apis::Core::Hashable + + # The index where the slides should be inserted, based on the slide + # arrangement before the move takes place. Must be between zero and the + # number of slides in the presentation, inclusive. + # Corresponds to the JSON property `insertionIndex` + # @return [Fixnum] + attr_accessor :insertion_index + + # The IDs of the slides in the presentation that should be moved. + # The slides in this list must be in existing presentation order, without + # duplicates. + # Corresponds to the JSON property `slideObjectIds` + # @return [Array] + attr_accessor :slide_object_ids + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @insertion_index = args[:insertion_index] if args.key?(:insertion_index) + @slide_object_ids = args[:slide_object_ids] if args.key?(:slide_object_ids) + end + end + # Updates the properties of a Page. class UpdatePagePropertiesRequest include Google::Apis::Core::Hashable @@ -835,6 +3808,13 @@ module Google class Placeholder include Google::Apis::Core::Hashable + # The object ID of this shape's parent placeholder. + # If unset, the parent placeholder shape does not exist, so the shape does + # not inherit properties from any other shape. + # Corresponds to the JSON property `parentObjectId` + # @return [String] + attr_accessor :parent_object_id + # The index of the placeholder. If the same placeholder types are present in # the same page, they would have different index values. # Corresponds to the JSON property `index` @@ -846,22 +3826,15 @@ module Google # @return [String] attr_accessor :type - # The object ID of this shape's parent placeholder. - # If unset, the parent placeholder shape does not exist, so the shape does - # not inherit properties from any other shape. - # Corresponds to the JSON property `parentObjectId` - # @return [String] - attr_accessor :parent_object_id - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @parent_object_id = args[:parent_object_id] if args.key?(:parent_object_id) @index = args[:index] if args.key?(:index) @type = args[:type] if args.key?(:type) - @parent_object_id = args[:parent_object_id] if args.key?(:parent_object_id) end end @@ -917,6 +3890,14 @@ module Google # @return [String] attr_accessor :replace_text + # If non-empty, limits the matches to page elements only on the given pages. + # Returns a 400 bad request error if given the page object ID of a + # notes master, + # or if a page with that object ID doesn't exist in the presentation. + # Corresponds to the JSON property `pageObjectIds` + # @return [Array] + attr_accessor :page_object_ids + # A criteria that matches a specific string of text in a shape or table. # Corresponds to the JSON property `containsText` # @return [Google::Apis::SlidesV1::SubstringMatchCriteria] @@ -929,6 +3910,7 @@ module Google # Update properties of this object def update!(**args) @replace_text = args[:replace_text] if args.key?(:replace_text) + @page_object_ids = args[:page_object_ids] if args.key?(:page_object_ids) @contains_text = args[:contains_text] if args.key?(:contains_text) end end @@ -937,6 +3919,43 @@ module Google class Page include Google::Apis::Core::Hashable + # The properties of Page are only + # relevant for pages with page_type LAYOUT. + # Corresponds to the JSON property `layoutProperties` + # @return [Google::Apis::SlidesV1::LayoutProperties] + attr_accessor :layout_properties + + # The page elements rendered on the page. + # Corresponds to the JSON property `pageElements` + # @return [Array] + attr_accessor :page_elements + + # The properties of Page that are only + # relevant for pages with page_type NOTES. + # Corresponds to the JSON property `notesProperties` + # @return [Google::Apis::SlidesV1::NotesProperties] + attr_accessor :notes_properties + + # The type of the page. + # Corresponds to the JSON property `pageType` + # @return [String] + attr_accessor :page_type + + # The properties of Page that are only + # relevant for pages with page_type SLIDE. + # Corresponds to the JSON property `slideProperties` + # @return [Google::Apis::SlidesV1::SlideProperties] + attr_accessor :slide_properties + + # The properties of the Page. + # The page will inherit properties from the parent page. Depending on the page + # type the hierarchy is defined in either + # SlideProperties or + # LayoutProperties. + # Corresponds to the JSON property `pageProperties` + # @return [Google::Apis::SlidesV1::PageProperties] + attr_accessor :page_properties + # The object ID for this page. Object IDs used by # Page and # PageElement share the same namespace. @@ -959,57 +3978,20 @@ module Google # @return [String] attr_accessor :revision_id - # The properties of Page are only - # relevant for pages with page_type LAYOUT. - # Corresponds to the JSON property `layoutProperties` - # @return [Google::Apis::SlidesV1::LayoutProperties] - attr_accessor :layout_properties - - # The type of the page. - # Corresponds to the JSON property `pageType` - # @return [String] - attr_accessor :page_type - - # The page elements rendered on the page. - # Corresponds to the JSON property `pageElements` - # @return [Array] - attr_accessor :page_elements - - # The properties of Page that are only - # relevant for pages with page_type NOTES. - # Corresponds to the JSON property `notesProperties` - # @return [Google::Apis::SlidesV1::NotesProperties] - attr_accessor :notes_properties - - # The properties of the Page. - # The page will inherit properties from the parent page. Depending on the page - # type the hierarchy is defined in either - # SlideProperties or - # LayoutProperties. - # Corresponds to the JSON property `pageProperties` - # @return [Google::Apis::SlidesV1::PageProperties] - attr_accessor :page_properties - - # The properties of Page that are only - # relevant for pages with page_type SLIDE. - # Corresponds to the JSON property `slideProperties` - # @return [Google::Apis::SlidesV1::SlideProperties] - attr_accessor :slide_properties - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) - @revision_id = args[:revision_id] if args.key?(:revision_id) @layout_properties = args[:layout_properties] if args.key?(:layout_properties) - @page_type = args[:page_type] if args.key?(:page_type) @page_elements = args[:page_elements] if args.key?(:page_elements) @notes_properties = args[:notes_properties] if args.key?(:notes_properties) - @page_properties = args[:page_properties] if args.key?(:page_properties) + @page_type = args[:page_type] if args.key?(:page_type) @slide_properties = args[:slide_properties] if args.key?(:slide_properties) + @page_properties = args[:page_properties] if args.key?(:page_properties) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + @revision_id = args[:revision_id] if args.key?(:revision_id) end end @@ -1017,6 +3999,14 @@ module Google class ShapeBackgroundFill include Google::Apis::Core::Hashable + # A solid color fill. The page or page element is filled entirely with the + # specified color value. + # If any field is unset, its value may be inherited from a parent placeholder + # if it exists. + # Corresponds to the JSON property `solidFill` + # @return [Google::Apis::SlidesV1::SolidFill] + attr_accessor :solid_fill + # The background fill property state. # Updating the the fill on a shape will implicitly update this field to # `RENDERED`, unless another value is specified in the same request. To @@ -1026,22 +4016,14 @@ module Google # @return [String] attr_accessor :property_state - # A solid color fill. The page or page element is filled entirely with the - # specified color value. - # If any field is unset, its value may be inherited from a parent placeholder - # if it exists. - # Corresponds to the JSON property `solidFill` - # @return [Google::Apis::SlidesV1::SolidFill] - attr_accessor :solid_fill - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @property_state = args[:property_state] if args.key?(:property_state) @solid_fill = args[:solid_fill] if args.key?(:solid_fill) + @property_state = args[:property_state] if args.key?(:property_state) end end @@ -1065,6 +4047,19 @@ module Google class CropProperties include Google::Apis::Core::Hashable + # The offset specifies the bottom edge of the crop rectangle that is located + # above the original bounding rectangle bottom edge, relative to the object's + # original height. + # Corresponds to the JSON property `bottomOffset` + # @return [Float] + attr_accessor :bottom_offset + + # The rotation angle of the crop window around its center, in radians. + # Rotation angle is applied after the offset. + # Corresponds to the JSON property `angle` + # @return [Float] + attr_accessor :angle + # The offset specifies the top edge of the crop rectangle that is located # below the original bounding rectangle top edge, relative to the object's # original height. @@ -1086,30 +4081,17 @@ module Google # @return [Float] attr_accessor :right_offset - # The offset specifies the bottom edge of the crop rectangle that is located - # above the original bounding rectangle bottom edge, relative to the object's - # original height. - # Corresponds to the JSON property `bottomOffset` - # @return [Float] - attr_accessor :bottom_offset - - # The rotation angle of the crop window around its center, in radians. - # Rotation angle is applied after the offset. - # Corresponds to the JSON property `angle` - # @return [Float] - attr_accessor :angle - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @bottom_offset = args[:bottom_offset] if args.key?(:bottom_offset) + @angle = args[:angle] if args.key?(:angle) @top_offset = args[:top_offset] if args.key?(:top_offset) @left_offset = args[:left_offset] if args.key?(:left_offset) @right_offset = args[:right_offset] if args.key?(:right_offset) - @bottom_offset = args[:bottom_offset] if args.key?(:bottom_offset) - @angle = args[:angle] if args.key?(:angle) end end @@ -1142,6 +4124,15 @@ module Google # @return [Fixnum] attr_accessor :chart_id + # If non-empty, limits the matches to page elements only on the given pages. + # Returns a 400 bad request error if given the page object ID of a + # notes page or a + # notes master, or if a + # page with that object ID doesn't exist in the presentation. + # Corresponds to the JSON property `pageObjectIds` + # @return [Array] + attr_accessor :page_object_ids + def initialize(**args) update!(**args) end @@ -1152,6 +4143,7 @@ module Google @linking_mode = args[:linking_mode] if args.key?(:linking_mode) @contains_text = args[:contains_text] if args.key?(:contains_text) @chart_id = args[:chart_id] if args.key?(:chart_id) + @page_object_ids = args[:page_object_ids] if args.key?(:page_object_ids) end end @@ -1161,13 +4153,13 @@ module Google include Google::Apis::Core::Hashable # The optional zero-based index of the beginning of the collection. - # Required for `SPECIFIC_RANGE` and `FROM_START_INDEX` ranges. + # Required for `FIXED_RANGE` and `FROM_START_INDEX` ranges. # Corresponds to the JSON property `startIndex` # @return [Fixnum] attr_accessor :start_index # The optional zero-based index of the end of the collection. - # Required for `SPECIFIC_RANGE` delete mode. + # Required for `FIXED_RANGE` ranges. # Corresponds to the JSON property `endIndex` # @return [Fixnum] attr_accessor :end_index @@ -1300,6 +4292,15 @@ module Google # @return [Google::Apis::SlidesV1::SubstringMatchCriteria] attr_accessor :contains_text + # If non-empty, limits the matches to page elements only on the given pages. + # Returns a 400 bad request error if given the page object ID of a + # notes page or a + # notes master, or if a + # page with that object ID doesn't exist in the presentation. + # Corresponds to the JSON property `pageObjectIds` + # @return [Array] + attr_accessor :page_object_ids + # The image URL. # The image is fetched once at insertion time and a copy is stored for # display inside the presentation. Images must be less than 50MB in size, @@ -1321,6 +4322,7 @@ module Google # Update properties of this object def update!(**args) @contains_text = args[:contains_text] if args.key?(:contains_text) + @page_object_ids = args[:page_object_ids] if args.key?(:page_object_ids) @image_url = args[:image_url] if args.key?(:image_url) @replace_method = args[:replace_method] if args.key?(:replace_method) end @@ -1334,12 +4336,6 @@ module Google class Shadow include Google::Apis::Core::Hashable - # Whether the shadow should rotate with the shape. - # Corresponds to the JSON property `rotateWithShape` - # @return [Boolean] - attr_accessor :rotate_with_shape - alias_method :rotate_with_shape?, :rotate_with_shape - # The shadow property state. # Updating the the shadow on a page element will implicitly update this field # to `RENDERED`, unless another value is specified in the same request. To @@ -1354,6 +4350,11 @@ module Google # @return [Google::Apis::SlidesV1::Dimension] attr_accessor :blur_radius + # The type of the shadow. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + # AffineTransform uses a 3x3 matrix with an implied last row of [ 0 0 1 ] # to transform source coordinates (x,y) into destination coordinates (x', y') # according to: @@ -1367,11 +4368,6 @@ module Google # @return [Google::Apis::SlidesV1::AffineTransform] attr_accessor :transform - # The type of the shadow. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - # The alignment point of the shadow, that sets the origin for translate, # scale and skew of the shadow. # Corresponds to the JSON property `alignment` @@ -1388,20 +4384,26 @@ module Google # @return [Google::Apis::SlidesV1::OpaqueColor] attr_accessor :color + # Whether the shadow should rotate with the shape. + # Corresponds to the JSON property `rotateWithShape` + # @return [Boolean] + attr_accessor :rotate_with_shape + alias_method :rotate_with_shape?, :rotate_with_shape + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @rotate_with_shape = args[:rotate_with_shape] if args.key?(:rotate_with_shape) @property_state = args[:property_state] if args.key?(:property_state) @blur_radius = args[:blur_radius] if args.key?(:blur_radius) - @transform = args[:transform] if args.key?(:transform) @type = args[:type] if args.key?(:type) + @transform = args[:transform] if args.key?(:transform) @alignment = args[:alignment] if args.key?(:alignment) @alpha = args[:alpha] if args.key?(:alpha) @color = args[:color] if args.key?(:color) + @rotate_with_shape = args[:rotate_with_shape] if args.key?(:rotate_with_shape) end end @@ -1434,6 +4436,11 @@ module Google class Bullet include Google::Apis::Core::Hashable + # The ID of the list this paragraph belongs to. + # Corresponds to the JSON property `listId` + # @return [String] + attr_accessor :list_id + # The rendered bullet glyph for this paragraph. # Corresponds to the JSON property `glyph` # @return [String] @@ -1463,21 +4470,16 @@ module Google # @return [Google::Apis::SlidesV1::TextStyle] attr_accessor :bullet_style - # The ID of the list this paragraph belongs to. - # Corresponds to the JSON property `listId` - # @return [String] - attr_accessor :list_id - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @list_id = args[:list_id] if args.key?(:list_id) @glyph = args[:glyph] if args.key?(:glyph) @nesting_level = args[:nesting_level] if args.key?(:nesting_level) @bullet_style = args[:bullet_style] if args.key?(:bullet_style) - @list_id = args[:list_id] if args.key?(:list_id) end end @@ -1502,2979 +4504,6 @@ module Google @solid_fill = args[:solid_fill] if args.key?(:solid_fill) end end - - # The result of creating a line. - class CreateLineResponse - include Google::Apis::Core::Hashable - - # The object ID of the created line. - # Corresponds to the JSON property `objectId` - # @return [String] - attr_accessor :object_id_prop - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) - end - end - - # A location of a single table cell within a table. - class TableCellLocation - include Google::Apis::Core::Hashable - - # The 0-based row index. - # Corresponds to the JSON property `rowIndex` - # @return [Fixnum] - attr_accessor :row_index - - # The 0-based column index. - # Corresponds to the JSON property `columnIndex` - # @return [Fixnum] - attr_accessor :column_index - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @row_index = args[:row_index] if args.key?(:row_index) - @column_index = args[:column_index] if args.key?(:column_index) - end - end - - # The result of replacing text. - class ReplaceAllTextResponse - include Google::Apis::Core::Hashable - - # The number of occurrences changed by replacing all text. - # Corresponds to the JSON property `occurrencesChanged` - # @return [Fixnum] - attr_accessor :occurrences_changed - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @occurrences_changed = args[:occurrences_changed] if args.key?(:occurrences_changed) - end - end - - # Updates the styling for all of the paragraphs within a Shape or Table that - # overlap with the given text index range. - class UpdateParagraphStyleRequest - include Google::Apis::Core::Hashable - - # The object ID of the shape or table with the text to be styled. - # Corresponds to the JSON property `objectId` - # @return [String] - attr_accessor :object_id_prop - - # Specifies a contiguous range of an indexed collection, such as characters in - # text. - # Corresponds to the JSON property `textRange` - # @return [Google::Apis::SlidesV1::Range] - attr_accessor :text_range - - # A location of a single table cell within a table. - # Corresponds to the JSON property `cellLocation` - # @return [Google::Apis::SlidesV1::TableCellLocation] - attr_accessor :cell_location - - # Styles that apply to a whole paragraph. - # If this text is contained in a shape with a parent placeholder, then these - # paragraph styles may be - # inherited from the parent. Which paragraph styles are inherited depend on the - # nesting level of lists: - # * A paragraph not in a list will inherit its paragraph style from the - # paragraph at the 0 nesting level of the list inside the parent placeholder. - # * A paragraph in a list will inherit its paragraph style from the paragraph - # at its corresponding nesting level of the list inside the parent - # placeholder. - # Inherited paragraph styles are represented as unset fields in this message. - # Corresponds to the JSON property `style` - # @return [Google::Apis::SlidesV1::ParagraphStyle] - attr_accessor :style - - # The fields that should be updated. - # At least one field must be specified. The root `style` is implied and - # should not be specified. A single `"*"` can be used as short-hand for - # listing every field. - # For example, to update the paragraph alignment, set `fields` to - # `"alignment"`. - # To reset a property to its default value, include its field name in the - # field mask but leave the field itself unset. - # Corresponds to the JSON property `fields` - # @return [String] - attr_accessor :fields - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) - @text_range = args[:text_range] if args.key?(:text_range) - @cell_location = args[:cell_location] if args.key?(:cell_location) - @style = args[:style] if args.key?(:style) - @fields = args[:fields] if args.key?(:fields) - end - end - - # The palette of predefined colors for a page. - class ColorScheme - include Google::Apis::Core::Hashable - - # The ThemeColorType and corresponding concrete color pairs. - # Corresponds to the JSON property `colors` - # @return [Array] - attr_accessor :colors - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @colors = args[:colors] if args.key?(:colors) - end - end - - # A PageElement kind representing a - # generic shape that does not have a more specific classification. - class Shape - include Google::Apis::Core::Hashable - - # The type of the shape. - # Corresponds to the JSON property `shapeType` - # @return [String] - attr_accessor :shape_type - - # The general text content. The text must reside in a compatible shape (e.g. - # text box or rectangle) or a table cell in a page. - # Corresponds to the JSON property `text` - # @return [Google::Apis::SlidesV1::TextContent] - attr_accessor :text - - # The placeholder information that uniquely identifies a placeholder shape. - # Corresponds to the JSON property `placeholder` - # @return [Google::Apis::SlidesV1::Placeholder] - attr_accessor :placeholder - - # The properties of a Shape. - # If the shape is a placeholder shape as determined by the - # placeholder field, then these - # properties may be inherited from a parent placeholder shape. - # Determining the rendered value of the property depends on the corresponding - # property_state field value. - # Corresponds to the JSON property `shapeProperties` - # @return [Google::Apis::SlidesV1::ShapeProperties] - attr_accessor :shape_properties - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @shape_type = args[:shape_type] if args.key?(:shape_type) - @text = args[:text] if args.key?(:text) - @placeholder = args[:placeholder] if args.key?(:placeholder) - @shape_properties = args[:shape_properties] if args.key?(:shape_properties) - end - end - - # A PageElement kind representing an - # image. - class Image - include Google::Apis::Core::Hashable - - # The properties of the Image. - # Corresponds to the JSON property `imageProperties` - # @return [Google::Apis::SlidesV1::ImageProperties] - attr_accessor :image_properties - - # An URL to an image with a default lifetime of 30 minutes. - # This URL is tagged with the account of the requester. Anyone with the URL - # effectively accesses the image as the original requester. Access to the - # image may be lost if the presentation's sharing settings change. - # Corresponds to the JSON property `contentUrl` - # @return [String] - attr_accessor :content_url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @image_properties = args[:image_properties] if args.key?(:image_properties) - @content_url = args[:content_url] if args.key?(:content_url) - end - end - - # Inserts text into a shape or a table cell. - class InsertTextRequest - include Google::Apis::Core::Hashable - - # The object ID of the shape or table where the text will be inserted. - # Corresponds to the JSON property `objectId` - # @return [String] - attr_accessor :object_id_prop - - # The text to be inserted. - # Inserting a newline character will implicitly create a new - # ParagraphMarker at that index. - # The paragraph style of the new paragraph will be copied from the paragraph - # at the current insertion index, including lists and bullets. - # Text styles for inserted text will be determined automatically, generally - # preserving the styling of neighboring text. In most cases, the text will be - # added to the TextRun that exists at the - # insertion index. - # Some control characters (U+0000-U+0008, U+000C-U+001F) and characters - # from the Unicode Basic Multilingual Plane Private Use Area (U+E000-U+F8FF) - # will be stripped out of the inserted text. - # Corresponds to the JSON property `text` - # @return [String] - attr_accessor :text - - # The index where the text will be inserted, in Unicode code units, based - # on TextElement indexes. - # The index is zero-based and is computed from the start of the string. - # The index may be adjusted to prevent insertions inside Unicode grapheme - # clusters. In these cases, the text will be inserted immediately after the - # grapheme cluster. - # Corresponds to the JSON property `insertionIndex` - # @return [Fixnum] - attr_accessor :insertion_index - - # A location of a single table cell within a table. - # Corresponds to the JSON property `cellLocation` - # @return [Google::Apis::SlidesV1::TableCellLocation] - attr_accessor :cell_location - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) - @text = args[:text] if args.key?(:text) - @insertion_index = args[:insertion_index] if args.key?(:insertion_index) - @cell_location = args[:cell_location] if args.key?(:cell_location) - end - end - - # AffineTransform uses a 3x3 matrix with an implied last row of [ 0 0 1 ] - # to transform source coordinates (x,y) into destination coordinates (x', y') - # according to: - # x' x = shear_y scale_y translate_y - # 1 [ 1 ] - # After transformation, - # x' = scale_x * x + shear_x * y + translate_x; - # y' = scale_y * y + shear_y * x + translate_y; - # This message is therefore composed of these six matrix elements. - class AffineTransform - include Google::Apis::Core::Hashable - - # The units for translate elements. - # Corresponds to the JSON property `unit` - # @return [String] - attr_accessor :unit - - # The X coordinate scaling element. - # Corresponds to the JSON property `scaleX` - # @return [Float] - attr_accessor :scale_x - - # The X coordinate shearing element. - # Corresponds to the JSON property `shearX` - # @return [Float] - attr_accessor :shear_x - - # The Y coordinate scaling element. - # Corresponds to the JSON property `scaleY` - # @return [Float] - attr_accessor :scale_y - - # The Y coordinate translation element. - # Corresponds to the JSON property `translateY` - # @return [Float] - attr_accessor :translate_y - - # The X coordinate translation element. - # Corresponds to the JSON property `translateX` - # @return [Float] - attr_accessor :translate_x - - # The Y coordinate shearing element. - # Corresponds to the JSON property `shearY` - # @return [Float] - attr_accessor :shear_y - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @unit = args[:unit] if args.key?(:unit) - @scale_x = args[:scale_x] if args.key?(:scale_x) - @shear_x = args[:shear_x] if args.key?(:shear_x) - @scale_y = args[:scale_y] if args.key?(:scale_y) - @translate_y = args[:translate_y] if args.key?(:translate_y) - @translate_x = args[:translate_x] if args.key?(:translate_x) - @shear_y = args[:shear_y] if args.key?(:shear_y) - end - end - - # A TextElement kind that represents auto text. - class AutoText - include Google::Apis::Core::Hashable - - # Represents the styling that can be applied to a TextRun. - # If this text is contained in a shape with a parent placeholder, then these - # text styles may be - # inherited from the parent. Which text styles are inherited depend on the - # nesting level of lists: - # * A text run in a paragraph that is not in a list will inherit its text style - # from the the newline character in the paragraph at the 0 nesting level of - # the list inside the parent placeholder. - # * A text run in a paragraph that is in a list will inherit its text style - # from the newline character in the paragraph at its corresponding nesting - # level of the list inside the parent placeholder. - # Inherited text styles are represented as unset fields in this message. If - # text is contained in a shape without a parent placeholder, unsetting these - # fields will revert the style to a value matching the defaults in the Slides - # editor. - # Corresponds to the JSON property `style` - # @return [Google::Apis::SlidesV1::TextStyle] - attr_accessor :style - - # The type of this auto text. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # The rendered content of this auto text, if available. - # Corresponds to the JSON property `content` - # @return [String] - attr_accessor :content - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @style = args[:style] if args.key?(:style) - @type = args[:type] if args.key?(:type) - @content = args[:content] if args.key?(:content) - end - end - - # The result of creating a video. - class CreateVideoResponse - include Google::Apis::Core::Hashable - - # The object ID of the created video. - # Corresponds to the JSON property `objectId` - # @return [String] - attr_accessor :object_id_prop - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) - end - end - - # Updates the transform of a page element. - class UpdatePageElementTransformRequest - include Google::Apis::Core::Hashable - - # The apply mode of the transform update. - # Corresponds to the JSON property `applyMode` - # @return [String] - attr_accessor :apply_mode - - # The object ID of the page element to update. - # Corresponds to the JSON property `objectId` - # @return [String] - attr_accessor :object_id_prop - - # AffineTransform uses a 3x3 matrix with an implied last row of [ 0 0 1 ] - # to transform source coordinates (x,y) into destination coordinates (x', y') - # according to: - # x' x = shear_y scale_y translate_y - # 1 [ 1 ] - # After transformation, - # x' = scale_x * x + shear_x * y + translate_x; - # y' = scale_y * y + shear_y * x + translate_y; - # This message is therefore composed of these six matrix elements. - # Corresponds to the JSON property `transform` - # @return [Google::Apis::SlidesV1::AffineTransform] - attr_accessor :transform - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @apply_mode = args[:apply_mode] if args.key?(:apply_mode) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) - @transform = args[:transform] if args.key?(:transform) - end - end - - # Deletes text from a shape or a table cell. - class DeleteTextRequest - include Google::Apis::Core::Hashable - - # The object ID of the shape or table from which the text will be deleted. - # Corresponds to the JSON property `objectId` - # @return [String] - attr_accessor :object_id_prop - - # Specifies a contiguous range of an indexed collection, such as characters in - # text. - # Corresponds to the JSON property `textRange` - # @return [Google::Apis::SlidesV1::Range] - attr_accessor :text_range - - # A location of a single table cell within a table. - # Corresponds to the JSON property `cellLocation` - # @return [Google::Apis::SlidesV1::TableCellLocation] - attr_accessor :cell_location - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) - @text_range = args[:text_range] if args.key?(:text_range) - @cell_location = args[:cell_location] if args.key?(:cell_location) - end - end - - # Deletes an object, either pages or - # page elements, from the - # presentation. - class DeleteObjectRequest - include Google::Apis::Core::Hashable - - # The object ID of the page or page element to delete. - # If after a delete operation a group contains - # only 1 or no page elements, the group is also deleted. - # If a placeholder is deleted on a layout, any empty inheriting shapes are - # also deleted. - # Corresponds to the JSON property `objectId` - # @return [String] - attr_accessor :object_id_prop - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) - end - end - - # A TextElement describes the content of a range of indices in the text content - # of a Shape or TableCell. - class TextElement - include Google::Apis::Core::Hashable - - # A TextElement kind that represents auto text. - # Corresponds to the JSON property `autoText` - # @return [Google::Apis::SlidesV1::AutoText] - attr_accessor :auto_text - - # A TextElement kind that represents the beginning of a new paragraph. - # Corresponds to the JSON property `paragraphMarker` - # @return [Google::Apis::SlidesV1::ParagraphMarker] - attr_accessor :paragraph_marker - - # The zero-based start index of this text element, in Unicode code units. - # Corresponds to the JSON property `startIndex` - # @return [Fixnum] - attr_accessor :start_index - - # The zero-based end index of this text element, exclusive, in Unicode code - # units. - # Corresponds to the JSON property `endIndex` - # @return [Fixnum] - attr_accessor :end_index - - # A TextElement kind that represents a run of text that all has the same - # styling. - # Corresponds to the JSON property `textRun` - # @return [Google::Apis::SlidesV1::TextRun] - attr_accessor :text_run - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @auto_text = args[:auto_text] if args.key?(:auto_text) - @paragraph_marker = args[:paragraph_marker] if args.key?(:paragraph_marker) - @start_index = args[:start_index] if args.key?(:start_index) - @end_index = args[:end_index] if args.key?(:end_index) - @text_run = args[:text_run] if args.key?(:text_run) - end - end - - # A magnitude in a single direction in the specified units. - class Dimension - include Google::Apis::Core::Hashable - - # The magnitude. - # Corresponds to the JSON property `magnitude` - # @return [Float] - attr_accessor :magnitude - - # The units for magnitude. - # Corresponds to the JSON property `unit` - # @return [String] - attr_accessor :unit - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @magnitude = args[:magnitude] if args.key?(:magnitude) - @unit = args[:unit] if args.key?(:unit) - end - end - - # The fill of the line. - class LineFill - include Google::Apis::Core::Hashable - - # A solid color fill. The page or page element is filled entirely with the - # specified color value. - # If any field is unset, its value may be inherited from a parent placeholder - # if it exists. - # Corresponds to the JSON property `solidFill` - # @return [Google::Apis::SlidesV1::SolidFill] - attr_accessor :solid_fill - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @solid_fill = args[:solid_fill] if args.key?(:solid_fill) - end - end - - # The properties of the Video. - class VideoProperties - include Google::Apis::Core::Hashable - - # The outline of a PageElement. - # If these fields are unset, they may be inherited from a parent placeholder - # if it exists. If there is no parent, the fields will default to the value - # used for new page elements created in the Slides editor, which may depend on - # the page element kind. - # Corresponds to the JSON property `outline` - # @return [Google::Apis::SlidesV1::Outline] - attr_accessor :outline - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @outline = args[:outline] if args.key?(:outline) - end - end - - # Inserts rows into a table. - class InsertTableRowsRequest - include Google::Apis::Core::Hashable - - # The table to insert rows into. - # Corresponds to the JSON property `tableObjectId` - # @return [String] - attr_accessor :table_object_id - - # Whether to insert new rows below the reference cell location. - # - `True`: insert below the cell. - # - `False`: insert above the cell. - # Corresponds to the JSON property `insertBelow` - # @return [Boolean] - attr_accessor :insert_below - alias_method :insert_below?, :insert_below - - # The number of rows to be inserted. Maximum 20 per request. - # Corresponds to the JSON property `number` - # @return [Fixnum] - attr_accessor :number - - # A location of a single table cell within a table. - # Corresponds to the JSON property `cellLocation` - # @return [Google::Apis::SlidesV1::TableCellLocation] - attr_accessor :cell_location - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @table_object_id = args[:table_object_id] if args.key?(:table_object_id) - @insert_below = args[:insert_below] if args.key?(:insert_below) - @number = args[:number] if args.key?(:number) - @cell_location = args[:cell_location] if args.key?(:cell_location) - end - end - - # The properties of Page are only - # relevant for pages with page_type LAYOUT. - class LayoutProperties - include Google::Apis::Core::Hashable - - # The object ID of the master that this layout is based on. - # Corresponds to the JSON property `masterObjectId` - # @return [String] - attr_accessor :master_object_id - - # The name of the layout. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The human readable name of the layout in the presentation's locale. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @master_object_id = args[:master_object_id] if args.key?(:master_object_id) - @name = args[:name] if args.key?(:name) - @display_name = args[:display_name] if args.key?(:display_name) - end - end - - # A Google Slides presentation. - class Presentation - include Google::Apis::Core::Hashable - - # The ID of the presentation. - # Corresponds to the JSON property `presentationId` - # @return [String] - attr_accessor :presentation_id - - # The slides in the presentation. - # A slide inherits properties from a slide layout. - # Corresponds to the JSON property `slides` - # @return [Array] - attr_accessor :slides - - # The revision ID of the presentation. Can be used in update requests - # to assert that the presentation revision hasn't changed since the last - # read operation. Only populated if the user has edit access to the - # presentation. - # The format of the revision ID may change over time, so it should be treated - # opaquely. A returned revision ID is only guaranteed to be valid for 24 - # hours after it has been returned and cannot be shared across users. If the - # revision ID is unchanged between calls, then the presentation has not - # changed. Conversely, a changed ID (for the same presentation and user) - # usually means the presentation has been updated; however, a changed ID can - # also be due to internal factors such as ID format changes. - # Corresponds to the JSON property `revisionId` - # @return [String] - attr_accessor :revision_id - - # A page in a presentation. - # Corresponds to the JSON property `notesMaster` - # @return [Google::Apis::SlidesV1::Page] - attr_accessor :notes_master - - # The layouts in the presentation. A layout is a template that determines - # how content is arranged and styled on the slides that inherit from that - # layout. - # Corresponds to the JSON property `layouts` - # @return [Array] - attr_accessor :layouts - - # The title of the presentation. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # The locale of the presentation, as an IETF BCP 47 language tag. - # Corresponds to the JSON property `locale` - # @return [String] - attr_accessor :locale - - # The slide masters in the presentation. A slide master contains all common - # page elements and the common properties for a set of layouts. They serve - # three purposes: - # - Placeholder shapes on a master contain the default text styles and shape - # properties of all placeholder shapes on pages that use that master. - # - The master page properties define the common page properties inherited by - # its layouts. - # - Any other shapes on the master slide will appear on all slides using that - # master, regardless of their layout. - # Corresponds to the JSON property `masters` - # @return [Array] - attr_accessor :masters - - # A width and height. - # Corresponds to the JSON property `pageSize` - # @return [Google::Apis::SlidesV1::Size] - attr_accessor :page_size - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @presentation_id = args[:presentation_id] if args.key?(:presentation_id) - @slides = args[:slides] if args.key?(:slides) - @revision_id = args[:revision_id] if args.key?(:revision_id) - @notes_master = args[:notes_master] if args.key?(:notes_master) - @layouts = args[:layouts] if args.key?(:layouts) - @title = args[:title] if args.key?(:title) - @locale = args[:locale] if args.key?(:locale) - @masters = args[:masters] if args.key?(:masters) - @page_size = args[:page_size] if args.key?(:page_size) - end - end - - # The properties of the Line. - # When unset, these fields default to values that match the appearance of - # new lines created in the Slides editor. - class LineProperties - include Google::Apis::Core::Hashable - - # A hypertext link. - # Corresponds to the JSON property `link` - # @return [Google::Apis::SlidesV1::Link] - attr_accessor :link - - # The dash style of the line. - # Corresponds to the JSON property `dashStyle` - # @return [String] - attr_accessor :dash_style - - # The style of the arrow at the beginning of the line. - # Corresponds to the JSON property `startArrow` - # @return [String] - attr_accessor :start_arrow - - # The style of the arrow at the end of the line. - # Corresponds to the JSON property `endArrow` - # @return [String] - attr_accessor :end_arrow - - # A magnitude in a single direction in the specified units. - # Corresponds to the JSON property `weight` - # @return [Google::Apis::SlidesV1::Dimension] - attr_accessor :weight - - # The fill of the line. - # Corresponds to the JSON property `lineFill` - # @return [Google::Apis::SlidesV1::LineFill] - attr_accessor :line_fill - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @link = args[:link] if args.key?(:link) - @dash_style = args[:dash_style] if args.key?(:dash_style) - @start_arrow = args[:start_arrow] if args.key?(:start_arrow) - @end_arrow = args[:end_arrow] if args.key?(:end_arrow) - @weight = args[:weight] if args.key?(:weight) - @line_fill = args[:line_fill] if args.key?(:line_fill) - end - end - - # A themeable solid color value. - class OpaqueColor - include Google::Apis::Core::Hashable - - # An RGB color. - # Corresponds to the JSON property `rgbColor` - # @return [Google::Apis::SlidesV1::RgbColor] - attr_accessor :rgb_color - - # An opaque theme color. - # Corresponds to the JSON property `themeColor` - # @return [String] - attr_accessor :theme_color - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @rgb_color = args[:rgb_color] if args.key?(:rgb_color) - @theme_color = args[:theme_color] if args.key?(:theme_color) - end - end - - # The properties of the Image. - class ImageProperties - include Google::Apis::Core::Hashable - - # The brightness effect of the image. The value should be in the interval - # [-1.0, 1.0], where 0 means no effect. This property is read-only. - # Corresponds to the JSON property `brightness` - # @return [Float] - attr_accessor :brightness - - # The transparency effect of the image. The value should be in the interval - # [0.0, 1.0], where 0 means no effect and 1 means completely transparent. - # This property is read-only. - # Corresponds to the JSON property `transparency` - # @return [Float] - attr_accessor :transparency - - # The shadow properties of a page element. - # If these fields are unset, they may be inherited from a parent placeholder - # if it exists. If there is no parent, the fields will default to the value - # used for new page elements created in the Slides editor, which may depend on - # the page element kind. - # Corresponds to the JSON property `shadow` - # @return [Google::Apis::SlidesV1::Shadow] - attr_accessor :shadow - - # A hypertext link. - # Corresponds to the JSON property `link` - # @return [Google::Apis::SlidesV1::Link] - attr_accessor :link - - # The contrast effect of the image. The value should be in the interval - # [-1.0, 1.0], where 0 means no effect. This property is read-only. - # Corresponds to the JSON property `contrast` - # @return [Float] - attr_accessor :contrast - - # A recolor effect applied on an image. - # Corresponds to the JSON property `recolor` - # @return [Google::Apis::SlidesV1::Recolor] - attr_accessor :recolor - - # The crop properties of an object enclosed in a container. For example, an - # Image. - # The crop properties is represented by the offsets of four edges which define - # a crop rectangle. The offsets are measured in percentage from the - # corresponding edges of the object's original bounding rectangle towards - # inside, relative to the object's original dimensions. - # - If the offset is in the interval (0, 1), the corresponding edge of crop - # rectangle is positioned inside of the object's original bounding rectangle. - # - If the offset is negative or greater than 1, the corresponding edge of crop - # rectangle is positioned outside of the object's original bounding rectangle. - # - If the left edge of the crop rectangle is on the right side of its right - # edge, the object will be flipped horizontally. - # - If the top edge of the crop rectangle is below its bottom edge, the object - # will be flipped vertically. - # - If all offsets and rotation angle is 0, the object is not cropped. - # After cropping, the content in the crop rectangle will be stretched to fit - # its container. - # Corresponds to the JSON property `cropProperties` - # @return [Google::Apis::SlidesV1::CropProperties] - attr_accessor :crop_properties - - # The outline of a PageElement. - # If these fields are unset, they may be inherited from a parent placeholder - # if it exists. If there is no parent, the fields will default to the value - # used for new page elements created in the Slides editor, which may depend on - # the page element kind. - # Corresponds to the JSON property `outline` - # @return [Google::Apis::SlidesV1::Outline] - attr_accessor :outline - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @brightness = args[:brightness] if args.key?(:brightness) - @transparency = args[:transparency] if args.key?(:transparency) - @shadow = args[:shadow] if args.key?(:shadow) - @link = args[:link] if args.key?(:link) - @contrast = args[:contrast] if args.key?(:contrast) - @recolor = args[:recolor] if args.key?(:recolor) - @crop_properties = args[:crop_properties] if args.key?(:crop_properties) - @outline = args[:outline] if args.key?(:outline) - end - end - - # The result of replacing shapes with an image. - class ReplaceAllShapesWithImageResponse - include Google::Apis::Core::Hashable - - # The number of shapes replaced with images. - # Corresponds to the JSON property `occurrencesChanged` - # @return [Fixnum] - attr_accessor :occurrences_changed - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @occurrences_changed = args[:occurrences_changed] if args.key?(:occurrences_changed) - end - end - - # A PageElement kind representing a - # line, curved connector, or bent connector. - class Line - include Google::Apis::Core::Hashable - - # The type of the line. - # Corresponds to the JSON property `lineType` - # @return [String] - attr_accessor :line_type - - # The properties of the Line. - # When unset, these fields default to values that match the appearance of - # new lines created in the Slides editor. - # Corresponds to the JSON property `lineProperties` - # @return [Google::Apis::SlidesV1::LineProperties] - attr_accessor :line_properties - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @line_type = args[:line_type] if args.key?(:line_type) - @line_properties = args[:line_properties] if args.key?(:line_properties) - end - end - - # Response message from a batch update. - class BatchUpdatePresentationResponse - include Google::Apis::Core::Hashable - - # The reply of the updates. This maps 1:1 with the updates, although - # replies to some requests may be empty. - # Corresponds to the JSON property `replies` - # @return [Array] - attr_accessor :replies - - # The presentation the updates were applied to. - # Corresponds to the JSON property `presentationId` - # @return [String] - attr_accessor :presentation_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @replies = args[:replies] if args.key?(:replies) - @presentation_id = args[:presentation_id] if args.key?(:presentation_id) - end - end - - # Creates an embedded Google Sheets chart. - # NOTE: Chart creation requires at least one of the spreadsheets.readonly, - # spreadsheets, drive.readonly, or drive OAuth scopes. - class CreateSheetsChartRequest - include Google::Apis::Core::Hashable - - # A user-supplied object ID. - # If specified, the ID must be unique among all pages and page elements in - # the presentation. The ID should start with a word character [a-zA-Z0-9_] - # and then followed by any number of the following characters [a-zA-Z0-9_-:]. - # The length of the ID should not be less than 5 or greater than 50. - # If empty, a unique identifier will be generated. - # Corresponds to the JSON property `objectId` - # @return [String] - attr_accessor :object_id_prop - - # Common properties for a page element. - # Note: When you initially create a - # PageElement, the API may modify - # the values of both `size` and `transform`, but the - # visual size will be unchanged. - # Corresponds to the JSON property `elementProperties` - # @return [Google::Apis::SlidesV1::PageElementProperties] - attr_accessor :element_properties - - # The ID of the Google Sheets spreadsheet that contains the chart. - # Corresponds to the JSON property `spreadsheetId` - # @return [String] - attr_accessor :spreadsheet_id - - # The mode with which the chart is linked to the source spreadsheet. When - # not specified, the chart will be an image that is not linked. - # Corresponds to the JSON property `linkingMode` - # @return [String] - attr_accessor :linking_mode - - # The ID of the specific chart in the Google Sheets spreadsheet. - # Corresponds to the JSON property `chartId` - # @return [Fixnum] - attr_accessor :chart_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) - @element_properties = args[:element_properties] if args.key?(:element_properties) - @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) - @linking_mode = args[:linking_mode] if args.key?(:linking_mode) - @chart_id = args[:chart_id] if args.key?(:chart_id) - end - end - - # The result of creating an image. - class CreateImageResponse - include Google::Apis::Core::Hashable - - # The object ID of the created image. - # Corresponds to the JSON property `objectId` - # @return [String] - attr_accessor :object_id_prop - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) - end - end - - # The properties of Page that are only - # relevant for pages with page_type SLIDE. - class SlideProperties - include Google::Apis::Core::Hashable - - # The object ID of the layout that this slide is based on. - # Corresponds to the JSON property `layoutObjectId` - # @return [String] - attr_accessor :layout_object_id - - # The object ID of the master that this slide is based on. - # Corresponds to the JSON property `masterObjectId` - # @return [String] - attr_accessor :master_object_id - - # A page in a presentation. - # Corresponds to the JSON property `notesPage` - # @return [Google::Apis::SlidesV1::Page] - attr_accessor :notes_page - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @layout_object_id = args[:layout_object_id] if args.key?(:layout_object_id) - @master_object_id = args[:master_object_id] if args.key?(:master_object_id) - @notes_page = args[:notes_page] if args.key?(:notes_page) - end - end - - # A single response from an update. - class Response - include Google::Apis::Core::Hashable - - # The result of replacing shapes with an image. - # Corresponds to the JSON property `replaceAllShapesWithImage` - # @return [Google::Apis::SlidesV1::ReplaceAllShapesWithImageResponse] - attr_accessor :replace_all_shapes_with_image - - # The result of creating a table. - # Corresponds to the JSON property `createTable` - # @return [Google::Apis::SlidesV1::CreateTableResponse] - attr_accessor :create_table - - # The result of replacing text. - # Corresponds to the JSON property `replaceAllText` - # @return [Google::Apis::SlidesV1::ReplaceAllTextResponse] - attr_accessor :replace_all_text - - # The result of creating a slide. - # Corresponds to the JSON property `createSlide` - # @return [Google::Apis::SlidesV1::CreateSlideResponse] - attr_accessor :create_slide - - # The response of duplicating an object. - # Corresponds to the JSON property `duplicateObject` - # @return [Google::Apis::SlidesV1::DuplicateObjectResponse] - attr_accessor :duplicate_object - - # The result of creating a shape. - # Corresponds to the JSON property `createShape` - # @return [Google::Apis::SlidesV1::CreateShapeResponse] - attr_accessor :create_shape - - # The result of creating a line. - # Corresponds to the JSON property `createLine` - # @return [Google::Apis::SlidesV1::CreateLineResponse] - attr_accessor :create_line - - # The result of creating an image. - # Corresponds to the JSON property `createImage` - # @return [Google::Apis::SlidesV1::CreateImageResponse] - attr_accessor :create_image - - # The result of creating a video. - # Corresponds to the JSON property `createVideo` - # @return [Google::Apis::SlidesV1::CreateVideoResponse] - attr_accessor :create_video - - # The result of creating an embedded Google Sheets chart. - # Corresponds to the JSON property `createSheetsChart` - # @return [Google::Apis::SlidesV1::CreateSheetsChartResponse] - attr_accessor :create_sheets_chart - - # The result of replacing shapes with a Google Sheets chart. - # Corresponds to the JSON property `replaceAllShapesWithSheetsChart` - # @return [Google::Apis::SlidesV1::ReplaceAllShapesWithSheetsChartResponse] - attr_accessor :replace_all_shapes_with_sheets_chart - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @replace_all_shapes_with_image = args[:replace_all_shapes_with_image] if args.key?(:replace_all_shapes_with_image) - @create_table = args[:create_table] if args.key?(:create_table) - @replace_all_text = args[:replace_all_text] if args.key?(:replace_all_text) - @create_slide = args[:create_slide] if args.key?(:create_slide) - @duplicate_object = args[:duplicate_object] if args.key?(:duplicate_object) - @create_shape = args[:create_shape] if args.key?(:create_shape) - @create_line = args[:create_line] if args.key?(:create_line) - @create_image = args[:create_image] if args.key?(:create_image) - @create_video = args[:create_video] if args.key?(:create_video) - @create_sheets_chart = args[:create_sheets_chart] if args.key?(:create_sheets_chart) - @replace_all_shapes_with_sheets_chart = args[:replace_all_shapes_with_sheets_chart] if args.key?(:replace_all_shapes_with_sheets_chart) - end - end - - # A criteria that matches a specific string of text in a shape or table. - class SubstringMatchCriteria - include Google::Apis::Core::Hashable - - # The text to search for in the shape or table. - # Corresponds to the JSON property `text` - # @return [String] - attr_accessor :text - - # Indicates whether the search should respect case: - # - `True`: the search is case sensitive. - # - `False`: the search is case insensitive. - # Corresponds to the JSON property `matchCase` - # @return [Boolean] - attr_accessor :match_case - alias_method :match_case?, :match_case - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @text = args[:text] if args.key?(:text) - @match_case = args[:match_case] if args.key?(:match_case) - end - end - - # A TextElement kind that represents a run of text that all has the same - # styling. - class TextRun - include Google::Apis::Core::Hashable - - # The text of this run. - # Corresponds to the JSON property `content` - # @return [String] - attr_accessor :content - - # Represents the styling that can be applied to a TextRun. - # If this text is contained in a shape with a parent placeholder, then these - # text styles may be - # inherited from the parent. Which text styles are inherited depend on the - # nesting level of lists: - # * A text run in a paragraph that is not in a list will inherit its text style - # from the the newline character in the paragraph at the 0 nesting level of - # the list inside the parent placeholder. - # * A text run in a paragraph that is in a list will inherit its text style - # from the newline character in the paragraph at its corresponding nesting - # level of the list inside the parent placeholder. - # Inherited text styles are represented as unset fields in this message. If - # text is contained in a shape without a parent placeholder, unsetting these - # fields will revert the style to a value matching the defaults in the Slides - # editor. - # Corresponds to the JSON property `style` - # @return [Google::Apis::SlidesV1::TextStyle] - attr_accessor :style - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @content = args[:content] if args.key?(:content) - @style = args[:style] if args.key?(:style) - end - end - - # Slide layout reference. This may reference either: - # - A predefined layout - # - One of the layouts in the presentation. - class LayoutReference - include Google::Apis::Core::Hashable - - # Predefined layout. - # Corresponds to the JSON property `predefinedLayout` - # @return [String] - attr_accessor :predefined_layout - - # Layout ID: the object ID of one of the layouts in the presentation. - # Corresponds to the JSON property `layoutId` - # @return [String] - attr_accessor :layout_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @predefined_layout = args[:predefined_layout] if args.key?(:predefined_layout) - @layout_id = args[:layout_id] if args.key?(:layout_id) - end - end - - # A table range represents a reference to a subset of a table. - # It's important to note that the cells specified by a table range do not - # necessarily form a rectangle. For example, let's say we have a 3 x 3 table - # where all the cells of the last row are merged together. The table looks - # like this: - # - # [ ] - # A table range with location = (0, 0), row span = 3 and column span = 2 - # specifies the following cells: - # x x - # [ x ] - class TableRange - include Google::Apis::Core::Hashable - - # The column span of the table range. - # Corresponds to the JSON property `columnSpan` - # @return [Fixnum] - attr_accessor :column_span - - # A location of a single table cell within a table. - # Corresponds to the JSON property `location` - # @return [Google::Apis::SlidesV1::TableCellLocation] - attr_accessor :location - - # The row span of the table range. - # Corresponds to the JSON property `rowSpan` - # @return [Fixnum] - attr_accessor :row_span - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @column_span = args[:column_span] if args.key?(:column_span) - @location = args[:location] if args.key?(:location) - @row_span = args[:row_span] if args.key?(:row_span) - end - end - - # Creates a new table. - class CreateTableRequest - include Google::Apis::Core::Hashable - - # Number of rows in the table. - # Corresponds to the JSON property `rows` - # @return [Fixnum] - attr_accessor :rows - - # A user-supplied object ID. - # If you specify an ID, it must be unique among all pages and page elements - # in the presentation. The ID must start with an alphanumeric character or an - # underscore (matches regex `[a-zA-Z0-9_]`); remaining characters - # may include those as well as a hyphen or colon (matches regex - # `[a-zA-Z0-9_-:]`). - # The length of the ID must not be less than 5 or greater than 50. - # If you don't specify an ID, a unique one is generated. - # Corresponds to the JSON property `objectId` - # @return [String] - attr_accessor :object_id_prop - - # Number of columns in the table. - # Corresponds to the JSON property `columns` - # @return [Fixnum] - attr_accessor :columns - - # Common properties for a page element. - # Note: When you initially create a - # PageElement, the API may modify - # the values of both `size` and `transform`, but the - # visual size will be unchanged. - # Corresponds to the JSON property `elementProperties` - # @return [Google::Apis::SlidesV1::PageElementProperties] - attr_accessor :element_properties - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @rows = args[:rows] if args.key?(:rows) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) - @columns = args[:columns] if args.key?(:columns) - @element_properties = args[:element_properties] if args.key?(:element_properties) - end - end - - # The result of creating a table. - class CreateTableResponse - include Google::Apis::Core::Hashable - - # The object ID of the created table. - # Corresponds to the JSON property `objectId` - # @return [String] - attr_accessor :object_id_prop - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) - end - end - - # A PageElement kind representing a - # table. - class Table - include Google::Apis::Core::Hashable - - # Number of columns in the table. - # Corresponds to the JSON property `columns` - # @return [Fixnum] - attr_accessor :columns - - # Properties and contents of each row. - # Cells that span multiple rows are contained in only one of these rows and - # have a row_span greater - # than 1. - # Corresponds to the JSON property `tableRows` - # @return [Array] - attr_accessor :table_rows - - # Number of rows in the table. - # Corresponds to the JSON property `rows` - # @return [Fixnum] - attr_accessor :rows - - # Properties of each column. - # Corresponds to the JSON property `tableColumns` - # @return [Array] - attr_accessor :table_columns - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @columns = args[:columns] if args.key?(:columns) - @table_rows = args[:table_rows] if args.key?(:table_rows) - @rows = args[:rows] if args.key?(:rows) - @table_columns = args[:table_columns] if args.key?(:table_columns) - end - end - - # The page background fill. - class PageBackgroundFill - include Google::Apis::Core::Hashable - - # The background fill property state. - # Updating the the fill on a page will implicitly update this field to - # `RENDERED`, unless another value is specified in the same request. To - # have no fill on a page, set this field to `NOT_RENDERED`. In this case, - # any other fill fields set in the same request will be ignored. - # Corresponds to the JSON property `propertyState` - # @return [String] - attr_accessor :property_state - - # The stretched picture fill. The page or page element is filled entirely with - # the specified picture. The picture is stretched to fit its container. - # Corresponds to the JSON property `stretchedPictureFill` - # @return [Google::Apis::SlidesV1::StretchedPictureFill] - attr_accessor :stretched_picture_fill - - # A solid color fill. The page or page element is filled entirely with the - # specified color value. - # If any field is unset, its value may be inherited from a parent placeholder - # if it exists. - # Corresponds to the JSON property `solidFill` - # @return [Google::Apis::SlidesV1::SolidFill] - attr_accessor :solid_fill - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @property_state = args[:property_state] if args.key?(:property_state) - @stretched_picture_fill = args[:stretched_picture_fill] if args.key?(:stretched_picture_fill) - @solid_fill = args[:solid_fill] if args.key?(:solid_fill) - end - end - - # A PageElement kind representing - # a linked chart embedded from Google Sheets. - class SheetsChart - include Google::Apis::Core::Hashable - - # The properties of the SheetsChart. - # Corresponds to the JSON property `sheetsChartProperties` - # @return [Google::Apis::SlidesV1::SheetsChartProperties] - attr_accessor :sheets_chart_properties - - # The URL of an image of the embedded chart, with a default lifetime of 30 - # minutes. This URL is tagged with the account of the requester. Anyone with - # the URL effectively accesses the image as the original requester. Access to - # the image may be lost if the presentation's sharing settings change. - # Corresponds to the JSON property `contentUrl` - # @return [String] - attr_accessor :content_url - - # The ID of the Google Sheets spreadsheet that contains the source chart. - # Corresponds to the JSON property `spreadsheetId` - # @return [String] - attr_accessor :spreadsheet_id - - # The ID of the specific chart in the Google Sheets spreadsheet that is - # embedded. - # Corresponds to the JSON property `chartId` - # @return [Fixnum] - attr_accessor :chart_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @sheets_chart_properties = args[:sheets_chart_properties] if args.key?(:sheets_chart_properties) - @content_url = args[:content_url] if args.key?(:content_url) - @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) - @chart_id = args[:chart_id] if args.key?(:chart_id) - end - end - - # A solid color fill. The page or page element is filled entirely with the - # specified color value. - # If any field is unset, its value may be inherited from a parent placeholder - # if it exists. - class SolidFill - include Google::Apis::Core::Hashable - - # The fraction of this `color` that should be applied to the pixel. - # That is, the final pixel color is defined by the equation: - # pixel color = alpha * (color) + (1.0 - alpha) * (background color) - # This means that a value of 1.0 corresponds to a solid color, whereas - # a value of 0.0 corresponds to a completely transparent color. - # Corresponds to the JSON property `alpha` - # @return [Float] - attr_accessor :alpha - - # A themeable solid color value. - # Corresponds to the JSON property `color` - # @return [Google::Apis::SlidesV1::OpaqueColor] - attr_accessor :color - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @alpha = args[:alpha] if args.key?(:alpha) - @color = args[:color] if args.key?(:color) - end - end - - # A pair mapping a theme color type to the concrete color it represents. - class ThemeColorPair - include Google::Apis::Core::Hashable - - # An RGB color. - # Corresponds to the JSON property `color` - # @return [Google::Apis::SlidesV1::RgbColor] - attr_accessor :color - - # The type of the theme color. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @color = args[:color] if args.key?(:color) - @type = args[:type] if args.key?(:type) - end - end - - # A color that can either be fully opaque or fully transparent. - class OptionalColor - include Google::Apis::Core::Hashable - - # A themeable solid color value. - # Corresponds to the JSON property `opaqueColor` - # @return [Google::Apis::SlidesV1::OpaqueColor] - attr_accessor :opaque_color - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @opaque_color = args[:opaque_color] if args.key?(:opaque_color) - end - end - - # Common properties for a page element. - # Note: When you initially create a - # PageElement, the API may modify - # the values of both `size` and `transform`, but the - # visual size will be unchanged. - class PageElementProperties - include Google::Apis::Core::Hashable - - # AffineTransform uses a 3x3 matrix with an implied last row of [ 0 0 1 ] - # to transform source coordinates (x,y) into destination coordinates (x', y') - # according to: - # x' x = shear_y scale_y translate_y - # 1 [ 1 ] - # After transformation, - # x' = scale_x * x + shear_x * y + translate_x; - # y' = scale_y * y + shear_y * x + translate_y; - # This message is therefore composed of these six matrix elements. - # Corresponds to the JSON property `transform` - # @return [Google::Apis::SlidesV1::AffineTransform] - attr_accessor :transform - - # The object ID of the page where the element is located. - # Corresponds to the JSON property `pageObjectId` - # @return [String] - attr_accessor :page_object_id - - # A width and height. - # Corresponds to the JSON property `size` - # @return [Google::Apis::SlidesV1::Size] - attr_accessor :size - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @transform = args[:transform] if args.key?(:transform) - @page_object_id = args[:page_object_id] if args.key?(:page_object_id) - @size = args[:size] if args.key?(:size) - end - end - - # The properties of the SheetsChart. - class SheetsChartProperties - include Google::Apis::Core::Hashable - - # The properties of the Image. - # Corresponds to the JSON property `chartImageProperties` - # @return [Google::Apis::SlidesV1::ImageProperties] - attr_accessor :chart_image_properties - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @chart_image_properties = args[:chart_image_properties] if args.key?(:chart_image_properties) - end - end - - # The stretched picture fill. The page or page element is filled entirely with - # the specified picture. The picture is stretched to fit its container. - class StretchedPictureFill - include Google::Apis::Core::Hashable - - # Reading the content_url: - # An URL to a picture with a default lifetime of 30 minutes. - # This URL is tagged with the account of the requester. Anyone with the URL - # effectively accesses the picture as the original requester. Access to the - # picture may be lost if the presentation's sharing settings change. - # Writing the content_url: - # The picture is fetched once at insertion time and a copy is stored for - # display inside the presentation. Pictures must be less than 50MB in size, - # cannot exceed 25 megapixels, and must be in either in PNG, JPEG, or GIF - # format. - # Corresponds to the JSON property `contentUrl` - # @return [String] - attr_accessor :content_url - - # A width and height. - # Corresponds to the JSON property `size` - # @return [Google::Apis::SlidesV1::Size] - attr_accessor :size - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @content_url = args[:content_url] if args.key?(:content_url) - @size = args[:size] if args.key?(:size) - end - end - - # Deletes a column from a table. - class DeleteTableColumnRequest - include Google::Apis::Core::Hashable - - # A location of a single table cell within a table. - # Corresponds to the JSON property `cellLocation` - # @return [Google::Apis::SlidesV1::TableCellLocation] - attr_accessor :cell_location - - # The table to delete columns from. - # Corresponds to the JSON property `tableObjectId` - # @return [String] - attr_accessor :table_object_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @cell_location = args[:cell_location] if args.key?(:cell_location) - @table_object_id = args[:table_object_id] if args.key?(:table_object_id) - end - end - - # Update the styling of text in a Shape or - # Table. - class UpdateTextStyleRequest - include Google::Apis::Core::Hashable - - # The object ID of the shape or table with the text to be styled. - # Corresponds to the JSON property `objectId` - # @return [String] - attr_accessor :object_id_prop - - # Specifies a contiguous range of an indexed collection, such as characters in - # text. - # Corresponds to the JSON property `textRange` - # @return [Google::Apis::SlidesV1::Range] - attr_accessor :text_range - - # A location of a single table cell within a table. - # Corresponds to the JSON property `cellLocation` - # @return [Google::Apis::SlidesV1::TableCellLocation] - attr_accessor :cell_location - - # Represents the styling that can be applied to a TextRun. - # If this text is contained in a shape with a parent placeholder, then these - # text styles may be - # inherited from the parent. Which text styles are inherited depend on the - # nesting level of lists: - # * A text run in a paragraph that is not in a list will inherit its text style - # from the the newline character in the paragraph at the 0 nesting level of - # the list inside the parent placeholder. - # * A text run in a paragraph that is in a list will inherit its text style - # from the newline character in the paragraph at its corresponding nesting - # level of the list inside the parent placeholder. - # Inherited text styles are represented as unset fields in this message. If - # text is contained in a shape without a parent placeholder, unsetting these - # fields will revert the style to a value matching the defaults in the Slides - # editor. - # Corresponds to the JSON property `style` - # @return [Google::Apis::SlidesV1::TextStyle] - attr_accessor :style - - # The fields that should be updated. - # At least one field must be specified. The root `style` is implied and - # should not be specified. A single `"*"` can be used as short-hand for - # listing every field. - # For example, to update the text style to bold, set `fields` to `"bold"`. - # To reset a property to its default value, include its field name in the - # field mask but leave the field itself unset. - # Corresponds to the JSON property `fields` - # @return [String] - attr_accessor :fields - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) - @text_range = args[:text_range] if args.key?(:text_range) - @cell_location = args[:cell_location] if args.key?(:cell_location) - @style = args[:style] if args.key?(:style) - @fields = args[:fields] if args.key?(:fields) - end - end - - # A List describes the look and feel of bullets belonging to paragraphs - # associated with a list. A paragraph that is part of a list has an implicit - # reference to that list's ID. - class List - include Google::Apis::Core::Hashable - - # The ID of the list. - # Corresponds to the JSON property `listId` - # @return [String] - attr_accessor :list_id - - # A map of nesting levels to the properties of bullets at the associated - # level. A list has at most nine levels of nesting, so the possible values - # for the keys of this map are 0 through 8, inclusive. - # Corresponds to the JSON property `nestingLevel` - # @return [Hash] - attr_accessor :nesting_level - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @list_id = args[:list_id] if args.key?(:list_id) - @nesting_level = args[:nesting_level] if args.key?(:nesting_level) - end - end - - # Represents a font family and weight used to style a TextRun. - class WeightedFontFamily - include Google::Apis::Core::Hashable - - # The font family of the text. - # The font family can be any font from the Font menu in Slides or from - # [Google Fonts] (https://fonts.google.com/). If the font name is - # unrecognized, the text is rendered in `Arial`. - # Corresponds to the JSON property `fontFamily` - # @return [String] - attr_accessor :font_family - - # The rendered weight of the text. This field can have any value that is a - # multiple of `100` between `100` and `900`, inclusive. This range - # corresponds to the numerical values described in the CSS 2.1 - # Specification, [section 15.6](https://www.w3.org/TR/CSS21/fonts.html#font- - # boldness), - # with non-numerical values disallowed. Weights greater than or equal to - # `700` are considered bold, and weights less than `700`are not bold. The - # default value is `400` ("normal"). - # Corresponds to the JSON property `weight` - # @return [Fixnum] - attr_accessor :weight - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @font_family = args[:font_family] if args.key?(:font_family) - @weight = args[:weight] if args.key?(:weight) - end - end - - # A visual element rendered on a page. - class PageElement - include Google::Apis::Core::Hashable - - # The title of the page element. Combined with description to display alt - # text. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # A PageElement kind representing - # a linked chart embedded from Google Sheets. - # Corresponds to the JSON property `sheetsChart` - # @return [Google::Apis::SlidesV1::SheetsChart] - attr_accessor :sheets_chart - - # A PageElement kind representing a - # video. - # Corresponds to the JSON property `video` - # @return [Google::Apis::SlidesV1::Video] - attr_accessor :video - - # A PageElement kind representing - # word art. - # Corresponds to the JSON property `wordArt` - # @return [Google::Apis::SlidesV1::WordArt] - attr_accessor :word_art - - # A PageElement kind representing a - # table. - # Corresponds to the JSON property `table` - # @return [Google::Apis::SlidesV1::Table] - attr_accessor :table - - # AffineTransform uses a 3x3 matrix with an implied last row of [ 0 0 1 ] - # to transform source coordinates (x,y) into destination coordinates (x', y') - # according to: - # x' x = shear_y scale_y translate_y - # 1 [ 1 ] - # After transformation, - # x' = scale_x * x + shear_x * y + translate_x; - # y' = scale_y * y + shear_y * x + translate_y; - # This message is therefore composed of these six matrix elements. - # Corresponds to the JSON property `transform` - # @return [Google::Apis::SlidesV1::AffineTransform] - attr_accessor :transform - - # The object ID for this page element. Object IDs used by - # google.apps.slides.v1.Page and - # google.apps.slides.v1.PageElement share the same namespace. - # Corresponds to the JSON property `objectId` - # @return [String] - attr_accessor :object_id_prop - - # A PageElement kind representing a - # generic shape that does not have a more specific classification. - # Corresponds to the JSON property `shape` - # @return [Google::Apis::SlidesV1::Shape] - attr_accessor :shape - - # A PageElement kind representing a - # line, curved connector, or bent connector. - # Corresponds to the JSON property `line` - # @return [Google::Apis::SlidesV1::Line] - attr_accessor :line - - # The description of the page element. Combined with title to display alt - # text. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # A PageElement kind representing a - # joined collection of PageElements. - # Corresponds to the JSON property `elementGroup` - # @return [Google::Apis::SlidesV1::Group] - attr_accessor :element_group - - # A PageElement kind representing an - # image. - # Corresponds to the JSON property `image` - # @return [Google::Apis::SlidesV1::Image] - attr_accessor :image - - # A width and height. - # Corresponds to the JSON property `size` - # @return [Google::Apis::SlidesV1::Size] - attr_accessor :size - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @title = args[:title] if args.key?(:title) - @sheets_chart = args[:sheets_chart] if args.key?(:sheets_chart) - @video = args[:video] if args.key?(:video) - @word_art = args[:word_art] if args.key?(:word_art) - @table = args[:table] if args.key?(:table) - @transform = args[:transform] if args.key?(:transform) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) - @shape = args[:shape] if args.key?(:shape) - @line = args[:line] if args.key?(:line) - @description = args[:description] if args.key?(:description) - @element_group = args[:element_group] if args.key?(:element_group) - @image = args[:image] if args.key?(:image) - @size = args[:size] if args.key?(:size) - end - end - - # Creates an image. - class CreateImageRequest - include Google::Apis::Core::Hashable - - # A user-supplied object ID. - # If you specify an ID, it must be unique among all pages and page elements - # in the presentation. The ID must start with an alphanumeric character or an - # underscore (matches regex `[a-zA-Z0-9_]`); remaining characters - # may include those as well as a hyphen or colon (matches regex - # `[a-zA-Z0-9_-:]`). - # The length of the ID must not be less than 5 or greater than 50. - # If you don't specify an ID, a unique one is generated. - # Corresponds to the JSON property `objectId` - # @return [String] - attr_accessor :object_id_prop - - # Common properties for a page element. - # Note: When you initially create a - # PageElement, the API may modify - # the values of both `size` and `transform`, but the - # visual size will be unchanged. - # Corresponds to the JSON property `elementProperties` - # @return [Google::Apis::SlidesV1::PageElementProperties] - attr_accessor :element_properties - - # The image URL. - # The image is fetched once at insertion time and a copy is stored for - # display inside the presentation. Images must be less than 50MB in size, - # cannot exceed 25 megapixels, and must be in either in PNG, JPEG, or GIF - # format. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) - @element_properties = args[:element_properties] if args.key?(:element_properties) - @url = args[:url] if args.key?(:url) - end - end - - # Creates bullets for all of the paragraphs that overlap with the given - # text index range. - # The nesting level of each paragraph will be determined by counting leading - # tabs in front of each paragraph. To avoid excess space between the bullet and - # the corresponding paragraph, these leading tabs are removed by this request. - # This may change the indices of parts of the text. - # If the paragraph immediately before paragraphs being updated is in a list - # with a matching preset, the paragraphs being updated are added to that - # preceding list. - class CreateParagraphBulletsRequest - include Google::Apis::Core::Hashable - - # The kinds of bullet glyphs to be used. Defaults to the - # `BULLET_DISC_CIRCLE_SQUARE` preset. - # Corresponds to the JSON property `bulletPreset` - # @return [String] - attr_accessor :bullet_preset - - # A location of a single table cell within a table. - # Corresponds to the JSON property `cellLocation` - # @return [Google::Apis::SlidesV1::TableCellLocation] - attr_accessor :cell_location - - # The object ID of the shape or table containing the text to add bullets to. - # Corresponds to the JSON property `objectId` - # @return [String] - attr_accessor :object_id_prop - - # Specifies a contiguous range of an indexed collection, such as characters in - # text. - # Corresponds to the JSON property `textRange` - # @return [Google::Apis::SlidesV1::Range] - attr_accessor :text_range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @bullet_preset = args[:bullet_preset] if args.key?(:bullet_preset) - @cell_location = args[:cell_location] if args.key?(:cell_location) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) - @text_range = args[:text_range] if args.key?(:text_range) - end - end - - # A width and height. - class Size - include Google::Apis::Core::Hashable - - # A magnitude in a single direction in the specified units. - # Corresponds to the JSON property `width` - # @return [Google::Apis::SlidesV1::Dimension] - attr_accessor :width - - # A magnitude in a single direction in the specified units. - # Corresponds to the JSON property `height` - # @return [Google::Apis::SlidesV1::Dimension] - attr_accessor :height - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @width = args[:width] if args.key?(:width) - @height = args[:height] if args.key?(:height) - end - end - - # Represents the styling that can be applied to a TextRun. - # If this text is contained in a shape with a parent placeholder, then these - # text styles may be - # inherited from the parent. Which text styles are inherited depend on the - # nesting level of lists: - # * A text run in a paragraph that is not in a list will inherit its text style - # from the the newline character in the paragraph at the 0 nesting level of - # the list inside the parent placeholder. - # * A text run in a paragraph that is in a list will inherit its text style - # from the newline character in the paragraph at its corresponding nesting - # level of the list inside the parent placeholder. - # Inherited text styles are represented as unset fields in this message. If - # text is contained in a shape without a parent placeholder, unsetting these - # fields will revert the style to a value matching the defaults in the Slides - # editor. - class TextStyle - include Google::Apis::Core::Hashable - - # Whether or not the text is in small capital letters. - # Corresponds to the JSON property `smallCaps` - # @return [Boolean] - attr_accessor :small_caps - alias_method :small_caps?, :small_caps - - # A color that can either be fully opaque or fully transparent. - # Corresponds to the JSON property `backgroundColor` - # @return [Google::Apis::SlidesV1::OptionalColor] - attr_accessor :background_color - - # Whether or not the text is underlined. - # Corresponds to the JSON property `underline` - # @return [Boolean] - attr_accessor :underline - alias_method :underline?, :underline - - # A hypertext link. - # Corresponds to the JSON property `link` - # @return [Google::Apis::SlidesV1::Link] - attr_accessor :link - - # A color that can either be fully opaque or fully transparent. - # Corresponds to the JSON property `foregroundColor` - # @return [Google::Apis::SlidesV1::OptionalColor] - attr_accessor :foreground_color - - # Whether or not the text is rendered as bold. - # Corresponds to the JSON property `bold` - # @return [Boolean] - attr_accessor :bold - alias_method :bold?, :bold - - # The font family of the text. - # The font family can be any font from the Font menu in Slides or from - # [Google Fonts] (https://fonts.google.com/). If the font name is - # unrecognized, the text is rendered in `Arial`. - # Some fonts can affect the weight of the text. If an update request - # specifies values for both `font_family` and `bold`, the explicitly-set - # `bold` value is used. - # Corresponds to the JSON property `fontFamily` - # @return [String] - attr_accessor :font_family - - # Whether or not the text is italicized. - # Corresponds to the JSON property `italic` - # @return [Boolean] - attr_accessor :italic - alias_method :italic?, :italic - - # Whether or not the text is struck through. - # Corresponds to the JSON property `strikethrough` - # @return [Boolean] - attr_accessor :strikethrough - alias_method :strikethrough?, :strikethrough - - # A magnitude in a single direction in the specified units. - # Corresponds to the JSON property `fontSize` - # @return [Google::Apis::SlidesV1::Dimension] - attr_accessor :font_size - - # The text's vertical offset from its normal position. - # Text with `SUPERSCRIPT` or `SUBSCRIPT` baseline offsets is automatically - # rendered in a smaller font size, computed based on the `font_size` field. - # The `font_size` itself is not affected by changes in this field. - # Corresponds to the JSON property `baselineOffset` - # @return [String] - attr_accessor :baseline_offset - - # Represents a font family and weight used to style a TextRun. - # Corresponds to the JSON property `weightedFontFamily` - # @return [Google::Apis::SlidesV1::WeightedFontFamily] - attr_accessor :weighted_font_family - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @small_caps = args[:small_caps] if args.key?(:small_caps) - @background_color = args[:background_color] if args.key?(:background_color) - @underline = args[:underline] if args.key?(:underline) - @link = args[:link] if args.key?(:link) - @foreground_color = args[:foreground_color] if args.key?(:foreground_color) - @bold = args[:bold] if args.key?(:bold) - @font_family = args[:font_family] if args.key?(:font_family) - @italic = args[:italic] if args.key?(:italic) - @strikethrough = args[:strikethrough] if args.key?(:strikethrough) - @font_size = args[:font_size] if args.key?(:font_size) - @baseline_offset = args[:baseline_offset] if args.key?(:baseline_offset) - @weighted_font_family = args[:weighted_font_family] if args.key?(:weighted_font_family) - end - end - - # Update the properties of a Video. - class UpdateVideoPropertiesRequest - include Google::Apis::Core::Hashable - - # The object ID of the video the updates are applied to. - # Corresponds to the JSON property `objectId` - # @return [String] - attr_accessor :object_id_prop - - # The properties of the Video. - # Corresponds to the JSON property `videoProperties` - # @return [Google::Apis::SlidesV1::VideoProperties] - attr_accessor :video_properties - - # The fields that should be updated. - # At least one field must be specified. The root `videoProperties` is - # implied and should not be specified. A single `"*"` can be used as - # short-hand for listing every field. - # For example to update the video outline color, set `fields` to - # `"outline.outlineFill.solidFill.color"`. - # To reset a property to its default value, include its field name in the - # field mask but leave the field itself unset. - # Corresponds to the JSON property `fields` - # @return [String] - attr_accessor :fields - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) - @video_properties = args[:video_properties] if args.key?(:video_properties) - @fields = args[:fields] if args.key?(:fields) - end - end - - # A single kind of update to apply to a presentation. - class Request - include Google::Apis::Core::Hashable - - # Replaces all shapes that match the given criteria with the provided image. - # Corresponds to the JSON property `replaceAllShapesWithImage` - # @return [Google::Apis::SlidesV1::ReplaceAllShapesWithImageRequest] - attr_accessor :replace_all_shapes_with_image - - # Replaces all instances of text matching a criteria with replace text. - # Corresponds to the JSON property `replaceAllText` - # @return [Google::Apis::SlidesV1::ReplaceAllTextRequest] - attr_accessor :replace_all_text - - # Update the properties of an Image. - # Corresponds to the JSON property `updateImageProperties` - # @return [Google::Apis::SlidesV1::UpdateImagePropertiesRequest] - attr_accessor :update_image_properties - - # Inserts rows into a table. - # Corresponds to the JSON property `insertTableRows` - # @return [Google::Apis::SlidesV1::InsertTableRowsRequest] - attr_accessor :insert_table_rows - - # Creates a new slide. - # Corresponds to the JSON property `createSlide` - # @return [Google::Apis::SlidesV1::CreateSlideRequest] - attr_accessor :create_slide - - # Updates the properties of a Line. - # Corresponds to the JSON property `updateLineProperties` - # @return [Google::Apis::SlidesV1::UpdateLinePropertiesRequest] - attr_accessor :update_line_properties - - # Updates the position of slides in the presentation. - # Corresponds to the JSON property `updateSlidesPosition` - # @return [Google::Apis::SlidesV1::UpdateSlidesPositionRequest] - attr_accessor :update_slides_position - - # Deletes a row from a table. - # Corresponds to the JSON property `deleteTableRow` - # @return [Google::Apis::SlidesV1::DeleteTableRowRequest] - attr_accessor :delete_table_row - - # Update the properties of a Shape. - # Corresponds to the JSON property `updateShapeProperties` - # @return [Google::Apis::SlidesV1::UpdateShapePropertiesRequest] - attr_accessor :update_shape_properties - - # Inserts text into a shape or a table cell. - # Corresponds to the JSON property `insertText` - # @return [Google::Apis::SlidesV1::InsertTextRequest] - attr_accessor :insert_text - - # Deletes text from a shape or a table cell. - # Corresponds to the JSON property `deleteText` - # @return [Google::Apis::SlidesV1::DeleteTextRequest] - attr_accessor :delete_text - - # Updates the properties of a Page. - # Corresponds to the JSON property `updatePageProperties` - # @return [Google::Apis::SlidesV1::UpdatePagePropertiesRequest] - attr_accessor :update_page_properties - - # Deletes bullets from all of the paragraphs that overlap with the given text - # index range. - # The nesting level of each paragraph will be visually preserved by adding - # indent to the start of the corresponding paragraph. - # Corresponds to the JSON property `deleteParagraphBullets` - # @return [Google::Apis::SlidesV1::DeleteParagraphBulletsRequest] - attr_accessor :delete_paragraph_bullets - - # Creates a new shape. - # Corresponds to the JSON property `createShape` - # @return [Google::Apis::SlidesV1::CreateShapeRequest] - attr_accessor :create_shape - - # Inserts columns into a table. - # Other columns in the table will be resized to fit the new column. - # Corresponds to the JSON property `insertTableColumns` - # @return [Google::Apis::SlidesV1::InsertTableColumnsRequest] - attr_accessor :insert_table_columns - - # Refreshes an embedded Google Sheets chart by replacing it with the latest - # version of the chart from Google Sheets. - # NOTE: Refreshing charts requires at least one of the spreadsheets.readonly, - # spreadsheets, drive.readonly, or drive OAuth scopes. - # Corresponds to the JSON property `refreshSheetsChart` - # @return [Google::Apis::SlidesV1::RefreshSheetsChartRequest] - attr_accessor :refresh_sheets_chart - - # Creates a new table. - # Corresponds to the JSON property `createTable` - # @return [Google::Apis::SlidesV1::CreateTableRequest] - attr_accessor :create_table - - # Update the properties of a TableCell. - # Corresponds to the JSON property `updateTableCellProperties` - # @return [Google::Apis::SlidesV1::UpdateTableCellPropertiesRequest] - attr_accessor :update_table_cell_properties - - # Deletes an object, either pages or - # page elements, from the - # presentation. - # Corresponds to the JSON property `deleteObject` - # @return [Google::Apis::SlidesV1::DeleteObjectRequest] - attr_accessor :delete_object - - # Updates the styling for all of the paragraphs within a Shape or Table that - # overlap with the given text index range. - # Corresponds to the JSON property `updateParagraphStyle` - # @return [Google::Apis::SlidesV1::UpdateParagraphStyleRequest] - attr_accessor :update_paragraph_style - - # Duplicates a slide or page element. - # When duplicating a slide, the duplicate slide will be created immediately - # following the specified slide. When duplicating a page element, the duplicate - # will be placed on the same page at the same position as the original. - # Corresponds to the JSON property `duplicateObject` - # @return [Google::Apis::SlidesV1::DuplicateObjectRequest] - attr_accessor :duplicate_object - - # Deletes a column from a table. - # Corresponds to the JSON property `deleteTableColumn` - # @return [Google::Apis::SlidesV1::DeleteTableColumnRequest] - attr_accessor :delete_table_column - - # Creates a line. - # Corresponds to the JSON property `createLine` - # @return [Google::Apis::SlidesV1::CreateLineRequest] - attr_accessor :create_line - - # Update the properties of a Video. - # Corresponds to the JSON property `updateVideoProperties` - # @return [Google::Apis::SlidesV1::UpdateVideoPropertiesRequest] - attr_accessor :update_video_properties - - # Creates an image. - # Corresponds to the JSON property `createImage` - # @return [Google::Apis::SlidesV1::CreateImageRequest] - attr_accessor :create_image - - # Creates bullets for all of the paragraphs that overlap with the given - # text index range. - # The nesting level of each paragraph will be determined by counting leading - # tabs in front of each paragraph. To avoid excess space between the bullet and - # the corresponding paragraph, these leading tabs are removed by this request. - # This may change the indices of parts of the text. - # If the paragraph immediately before paragraphs being updated is in a list - # with a matching preset, the paragraphs being updated are added to that - # preceding list. - # Corresponds to the JSON property `createParagraphBullets` - # @return [Google::Apis::SlidesV1::CreateParagraphBulletsRequest] - attr_accessor :create_paragraph_bullets - - # Creates a video. - # Corresponds to the JSON property `createVideo` - # @return [Google::Apis::SlidesV1::CreateVideoRequest] - attr_accessor :create_video - - # Replaces all shapes that match the given criteria with the provided Google - # Sheets chart. The chart will be scaled and centered to fit within the bounds - # of the original shape. - # NOTE: Replacing shapes with a chart requires at least one of the - # spreadsheets.readonly, spreadsheets, drive.readonly, or drive OAuth scopes. - # Corresponds to the JSON property `replaceAllShapesWithSheetsChart` - # @return [Google::Apis::SlidesV1::ReplaceAllShapesWithSheetsChartRequest] - attr_accessor :replace_all_shapes_with_sheets_chart - - # Creates an embedded Google Sheets chart. - # NOTE: Chart creation requires at least one of the spreadsheets.readonly, - # spreadsheets, drive.readonly, or drive OAuth scopes. - # Corresponds to the JSON property `createSheetsChart` - # @return [Google::Apis::SlidesV1::CreateSheetsChartRequest] - attr_accessor :create_sheets_chart - - # Updates the transform of a page element. - # Corresponds to the JSON property `updatePageElementTransform` - # @return [Google::Apis::SlidesV1::UpdatePageElementTransformRequest] - attr_accessor :update_page_element_transform - - # Update the styling of text in a Shape or - # Table. - # Corresponds to the JSON property `updateTextStyle` - # @return [Google::Apis::SlidesV1::UpdateTextStyleRequest] - attr_accessor :update_text_style - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @replace_all_shapes_with_image = args[:replace_all_shapes_with_image] if args.key?(:replace_all_shapes_with_image) - @replace_all_text = args[:replace_all_text] if args.key?(:replace_all_text) - @update_image_properties = args[:update_image_properties] if args.key?(:update_image_properties) - @insert_table_rows = args[:insert_table_rows] if args.key?(:insert_table_rows) - @create_slide = args[:create_slide] if args.key?(:create_slide) - @update_line_properties = args[:update_line_properties] if args.key?(:update_line_properties) - @update_slides_position = args[:update_slides_position] if args.key?(:update_slides_position) - @delete_table_row = args[:delete_table_row] if args.key?(:delete_table_row) - @update_shape_properties = args[:update_shape_properties] if args.key?(:update_shape_properties) - @insert_text = args[:insert_text] if args.key?(:insert_text) - @delete_text = args[:delete_text] if args.key?(:delete_text) - @update_page_properties = args[:update_page_properties] if args.key?(:update_page_properties) - @delete_paragraph_bullets = args[:delete_paragraph_bullets] if args.key?(:delete_paragraph_bullets) - @create_shape = args[:create_shape] if args.key?(:create_shape) - @insert_table_columns = args[:insert_table_columns] if args.key?(:insert_table_columns) - @refresh_sheets_chart = args[:refresh_sheets_chart] if args.key?(:refresh_sheets_chart) - @create_table = args[:create_table] if args.key?(:create_table) - @update_table_cell_properties = args[:update_table_cell_properties] if args.key?(:update_table_cell_properties) - @delete_object = args[:delete_object] if args.key?(:delete_object) - @update_paragraph_style = args[:update_paragraph_style] if args.key?(:update_paragraph_style) - @duplicate_object = args[:duplicate_object] if args.key?(:duplicate_object) - @delete_table_column = args[:delete_table_column] if args.key?(:delete_table_column) - @create_line = args[:create_line] if args.key?(:create_line) - @update_video_properties = args[:update_video_properties] if args.key?(:update_video_properties) - @create_image = args[:create_image] if args.key?(:create_image) - @create_paragraph_bullets = args[:create_paragraph_bullets] if args.key?(:create_paragraph_bullets) - @create_video = args[:create_video] if args.key?(:create_video) - @replace_all_shapes_with_sheets_chart = args[:replace_all_shapes_with_sheets_chart] if args.key?(:replace_all_shapes_with_sheets_chart) - @create_sheets_chart = args[:create_sheets_chart] if args.key?(:create_sheets_chart) - @update_page_element_transform = args[:update_page_element_transform] if args.key?(:update_page_element_transform) - @update_text_style = args[:update_text_style] if args.key?(:update_text_style) - end - end - - # Update the properties of an Image. - class UpdateImagePropertiesRequest - include Google::Apis::Core::Hashable - - # The fields that should be updated. - # At least one field must be specified. The root `imageProperties` is - # implied and should not be specified. A single `"*"` can be used as - # short-hand for listing every field. - # For example to update the image outline color, set `fields` to - # `"outline.outlineFill.solidFill.color"`. - # To reset a property to its default value, include its field name in the - # field mask but leave the field itself unset. - # Corresponds to the JSON property `fields` - # @return [String] - attr_accessor :fields - - # The properties of the Image. - # Corresponds to the JSON property `imageProperties` - # @return [Google::Apis::SlidesV1::ImageProperties] - attr_accessor :image_properties - - # The object ID of the image the updates are applied to. - # Corresponds to the JSON property `objectId` - # @return [String] - attr_accessor :object_id_prop - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @fields = args[:fields] if args.key?(:fields) - @image_properties = args[:image_properties] if args.key?(:image_properties) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) - end - end - - # Styles that apply to a whole paragraph. - # If this text is contained in a shape with a parent placeholder, then these - # paragraph styles may be - # inherited from the parent. Which paragraph styles are inherited depend on the - # nesting level of lists: - # * A paragraph not in a list will inherit its paragraph style from the - # paragraph at the 0 nesting level of the list inside the parent placeholder. - # * A paragraph in a list will inherit its paragraph style from the paragraph - # at its corresponding nesting level of the list inside the parent - # placeholder. - # Inherited paragraph styles are represented as unset fields in this message. - class ParagraphStyle - include Google::Apis::Core::Hashable - - # A magnitude in a single direction in the specified units. - # Corresponds to the JSON property `spaceBelow` - # @return [Google::Apis::SlidesV1::Dimension] - attr_accessor :space_below - - # The text direction of this paragraph. If unset, the value defaults to - # LEFT_TO_RIGHT since - # text direction is not inherited. - # Corresponds to the JSON property `direction` - # @return [String] - attr_accessor :direction - - # The spacing mode for the paragraph. - # Corresponds to the JSON property `spacingMode` - # @return [String] - attr_accessor :spacing_mode - - # A magnitude in a single direction in the specified units. - # Corresponds to the JSON property `indentEnd` - # @return [Google::Apis::SlidesV1::Dimension] - attr_accessor :indent_end - - # A magnitude in a single direction in the specified units. - # Corresponds to the JSON property `indentStart` - # @return [Google::Apis::SlidesV1::Dimension] - attr_accessor :indent_start - - # A magnitude in a single direction in the specified units. - # Corresponds to the JSON property `spaceAbove` - # @return [Google::Apis::SlidesV1::Dimension] - attr_accessor :space_above - - # The text alignment for this paragraph. - # Corresponds to the JSON property `alignment` - # @return [String] - attr_accessor :alignment - - # The amount of space between lines, as a percentage of normal, where normal - # is represented as 100.0. If unset, the value is inherited from the parent. - # Corresponds to the JSON property `lineSpacing` - # @return [Float] - attr_accessor :line_spacing - - # A magnitude in a single direction in the specified units. - # Corresponds to the JSON property `indentFirstLine` - # @return [Google::Apis::SlidesV1::Dimension] - attr_accessor :indent_first_line - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @space_below = args[:space_below] if args.key?(:space_below) - @direction = args[:direction] if args.key?(:direction) - @spacing_mode = args[:spacing_mode] if args.key?(:spacing_mode) - @indent_end = args[:indent_end] if args.key?(:indent_end) - @indent_start = args[:indent_start] if args.key?(:indent_start) - @space_above = args[:space_above] if args.key?(:space_above) - @alignment = args[:alignment] if args.key?(:alignment) - @line_spacing = args[:line_spacing] if args.key?(:line_spacing) - @indent_first_line = args[:indent_first_line] if args.key?(:indent_first_line) - end - end - - # The result of replacing shapes with a Google Sheets chart. - class ReplaceAllShapesWithSheetsChartResponse - include Google::Apis::Core::Hashable - - # The number of shapes replaced with charts. - # Corresponds to the JSON property `occurrencesChanged` - # @return [Fixnum] - attr_accessor :occurrences_changed - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @occurrences_changed = args[:occurrences_changed] if args.key?(:occurrences_changed) - end - end - - # The properties of the TableCell. - class TableCellProperties - include Google::Apis::Core::Hashable - - # The table cell background fill. - # Corresponds to the JSON property `tableCellBackgroundFill` - # @return [Google::Apis::SlidesV1::TableCellBackgroundFill] - attr_accessor :table_cell_background_fill - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @table_cell_background_fill = args[:table_cell_background_fill] if args.key?(:table_cell_background_fill) - end - end - - # Refreshes an embedded Google Sheets chart by replacing it with the latest - # version of the chart from Google Sheets. - # NOTE: Refreshing charts requires at least one of the spreadsheets.readonly, - # spreadsheets, drive.readonly, or drive OAuth scopes. - class RefreshSheetsChartRequest - include Google::Apis::Core::Hashable - - # The object ID of the chart to refresh. - # Corresponds to the JSON property `objectId` - # @return [String] - attr_accessor :object_id_prop - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) - end - end - - # The outline of a PageElement. - # If these fields are unset, they may be inherited from a parent placeholder - # if it exists. If there is no parent, the fields will default to the value - # used for new page elements created in the Slides editor, which may depend on - # the page element kind. - class Outline - include Google::Apis::Core::Hashable - - # The fill of the outline. - # Corresponds to the JSON property `outlineFill` - # @return [Google::Apis::SlidesV1::OutlineFill] - attr_accessor :outline_fill - - # A magnitude in a single direction in the specified units. - # Corresponds to the JSON property `weight` - # @return [Google::Apis::SlidesV1::Dimension] - attr_accessor :weight - - # The dash style of the outline. - # Corresponds to the JSON property `dashStyle` - # @return [String] - attr_accessor :dash_style - - # The outline property state. - # Updating the the outline on a page element will implicitly update this - # field to`RENDERED`, unless another value is specified in the same request. - # To have no outline on a page element, set this field to `NOT_RENDERED`. In - # this case, any other outline fields set in the same request will be - # ignored. - # Corresponds to the JSON property `propertyState` - # @return [String] - attr_accessor :property_state - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @outline_fill = args[:outline_fill] if args.key?(:outline_fill) - @weight = args[:weight] if args.key?(:weight) - @dash_style = args[:dash_style] if args.key?(:dash_style) - @property_state = args[:property_state] if args.key?(:property_state) - end - end - - # The properties of Page that are only - # relevant for pages with page_type NOTES. - class NotesProperties - include Google::Apis::Core::Hashable - - # The object ID of the shape on this notes page that contains the speaker - # notes for the corresponding slide. - # The actual shape may not always exist on the notes page. Inserting text - # using this object ID will automatically create the shape. In this case, the - # actual shape may have different object ID. The `GetPresentation` or - # `GetPage` action will always return the latest object ID. - # Corresponds to the JSON property `speakerNotesObjectId` - # @return [String] - attr_accessor :speaker_notes_object_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @speaker_notes_object_id = args[:speaker_notes_object_id] if args.key?(:speaker_notes_object_id) - end - end - - # The properties of a Shape. - # If the shape is a placeholder shape as determined by the - # placeholder field, then these - # properties may be inherited from a parent placeholder shape. - # Determining the rendered value of the property depends on the corresponding - # property_state field value. - class ShapeProperties - include Google::Apis::Core::Hashable - - # A hypertext link. - # Corresponds to the JSON property `link` - # @return [Google::Apis::SlidesV1::Link] - attr_accessor :link - - # The outline of a PageElement. - # If these fields are unset, they may be inherited from a parent placeholder - # if it exists. If there is no parent, the fields will default to the value - # used for new page elements created in the Slides editor, which may depend on - # the page element kind. - # Corresponds to the JSON property `outline` - # @return [Google::Apis::SlidesV1::Outline] - attr_accessor :outline - - # The shape background fill. - # Corresponds to the JSON property `shapeBackgroundFill` - # @return [Google::Apis::SlidesV1::ShapeBackgroundFill] - attr_accessor :shape_background_fill - - # The shadow properties of a page element. - # If these fields are unset, they may be inherited from a parent placeholder - # if it exists. If there is no parent, the fields will default to the value - # used for new page elements created in the Slides editor, which may depend on - # the page element kind. - # Corresponds to the JSON property `shadow` - # @return [Google::Apis::SlidesV1::Shadow] - attr_accessor :shadow - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @link = args[:link] if args.key?(:link) - @outline = args[:outline] if args.key?(:outline) - @shape_background_fill = args[:shape_background_fill] if args.key?(:shape_background_fill) - @shadow = args[:shadow] if args.key?(:shadow) - end - end - - # Properties of each column in a table. - class TableColumnProperties - include Google::Apis::Core::Hashable - - # A magnitude in a single direction in the specified units. - # Corresponds to the JSON property `columnWidth` - # @return [Google::Apis::SlidesV1::Dimension] - attr_accessor :column_width - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @column_width = args[:column_width] if args.key?(:column_width) - end - end - - # Properties and contents of each row in a table. - class TableRow - include Google::Apis::Core::Hashable - - # A magnitude in a single direction in the specified units. - # Corresponds to the JSON property `rowHeight` - # @return [Google::Apis::SlidesV1::Dimension] - attr_accessor :row_height - - # Properties and contents of each cell. - # Cells that span multiple columns are represented only once with a - # column_span greater - # than 1. As a result, the length of this collection does not always match - # the number of columns of the entire table. - # Corresponds to the JSON property `tableCells` - # @return [Array] - attr_accessor :table_cells - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @row_height = args[:row_height] if args.key?(:row_height) - @table_cells = args[:table_cells] if args.key?(:table_cells) - end - end - - # Update the properties of a TableCell. - class UpdateTableCellPropertiesRequest - include Google::Apis::Core::Hashable - - # The fields that should be updated. - # At least one field must be specified. The root `tableCellProperties` is - # implied and should not be specified. A single `"*"` can be used as - # short-hand for listing every field. - # For example to update the table cell background solid fill color, set - # `fields` to `"tableCellBackgroundFill.solidFill.color"`. - # To reset a property to its default value, include its field name in the - # field mask but leave the field itself unset. - # Corresponds to the JSON property `fields` - # @return [String] - attr_accessor :fields - - # The object ID of the table. - # Corresponds to the JSON property `objectId` - # @return [String] - attr_accessor :object_id_prop - - # A table range represents a reference to a subset of a table. - # It's important to note that the cells specified by a table range do not - # necessarily form a rectangle. For example, let's say we have a 3 x 3 table - # where all the cells of the last row are merged together. The table looks - # like this: - # - # [ ] - # A table range with location = (0, 0), row span = 3 and column span = 2 - # specifies the following cells: - # x x - # [ x ] - # Corresponds to the JSON property `tableRange` - # @return [Google::Apis::SlidesV1::TableRange] - attr_accessor :table_range - - # The properties of the TableCell. - # Corresponds to the JSON property `tableCellProperties` - # @return [Google::Apis::SlidesV1::TableCellProperties] - attr_accessor :table_cell_properties - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @fields = args[:fields] if args.key?(:fields) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) - @table_range = args[:table_range] if args.key?(:table_range) - @table_cell_properties = args[:table_cell_properties] if args.key?(:table_cell_properties) - end - end - - # Creates a new slide. - class CreateSlideRequest - include Google::Apis::Core::Hashable - - # Slide layout reference. This may reference either: - # - A predefined layout - # - One of the layouts in the presentation. - # Corresponds to the JSON property `slideLayoutReference` - # @return [Google::Apis::SlidesV1::LayoutReference] - attr_accessor :slide_layout_reference - - # A user-supplied object ID. - # If you specify an ID, it must be unique among all pages and page elements - # in the presentation. The ID must start with an alphanumeric character or an - # underscore (matches regex `[a-zA-Z0-9_]`); remaining characters - # may include those as well as a hyphen or colon (matches regex - # `[a-zA-Z0-9_-:]`). - # The length of the ID must not be less than 5 or greater than 50. - # If you don't specify an ID, a unique one is generated. - # Corresponds to the JSON property `objectId` - # @return [String] - attr_accessor :object_id_prop - - # The optional zero-based index indicating where to insert the slides. - # If you don't specify an index, the new slide is created at the end. - # Corresponds to the JSON property `insertionIndex` - # @return [Fixnum] - attr_accessor :insertion_index - - # An optional list of object ID mappings from the placeholder(s) on the layout - # to the placeholder(s) - # that will be created on the new slide from that specified layout. Can only - # be used when `slide_layout_reference` is specified. - # Corresponds to the JSON property `placeholderIdMappings` - # @return [Array] - attr_accessor :placeholder_id_mappings - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @slide_layout_reference = args[:slide_layout_reference] if args.key?(:slide_layout_reference) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) - @insertion_index = args[:insertion_index] if args.key?(:insertion_index) - @placeholder_id_mappings = args[:placeholder_id_mappings] if args.key?(:placeholder_id_mappings) - end - end - - # Request message for PresentationsService.BatchUpdatePresentation. - class BatchUpdatePresentationRequest - include Google::Apis::Core::Hashable - - # Provides control over how write requests are executed. - # Corresponds to the JSON property `writeControl` - # @return [Google::Apis::SlidesV1::WriteControl] - attr_accessor :write_control - - # A list of updates to apply to the presentation. - # Corresponds to the JSON property `requests` - # @return [Array] - attr_accessor :requests - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @write_control = args[:write_control] if args.key?(:write_control) - @requests = args[:requests] if args.key?(:requests) - end - end - - # The general text content. The text must reside in a compatible shape (e.g. - # text box or rectangle) or a table cell in a page. - class TextContent - include Google::Apis::Core::Hashable - - # The bulleted lists contained in this text, keyed by list ID. - # Corresponds to the JSON property `lists` - # @return [Hash] - attr_accessor :lists - - # The text contents broken down into its component parts, including styling - # information. This property is read-only. - # Corresponds to the JSON property `textElements` - # @return [Array] - attr_accessor :text_elements - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @lists = args[:lists] if args.key?(:lists) - @text_elements = args[:text_elements] if args.key?(:text_elements) - end - end - - # The result of creating an embedded Google Sheets chart. - class CreateSheetsChartResponse - include Google::Apis::Core::Hashable - - # The object ID of the created chart. - # Corresponds to the JSON property `objectId` - # @return [String] - attr_accessor :object_id_prop - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) - end - end end end end diff --git a/generated/google/apis/slides_v1/representations.rb b/generated/google/apis/slides_v1/representations.rb index 4d1f8200b..769560424 100644 --- a/generated/google/apis/slides_v1/representations.rb +++ b/generated/google/apis/slides_v1/representations.rb @@ -22,241 +22,7 @@ module Google module Apis module SlidesV1 - class WriteControl - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DeleteParagraphBulletsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ParagraphMarker - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Thumbnail - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class InsertTableColumnsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class LayoutPlaceholderIdMapping - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateShapePropertiesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class WordArt - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Recolor - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Link - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CreateShapeResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class RgbColor - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CreateLineRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CreateSlideResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CreateShapeRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Video - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class PageProperties - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class NestingLevel - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class TableCell - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateLinePropertiesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateSlidesPositionRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class TableCellBackgroundFill - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdatePagePropertiesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Group - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Placeholder - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DuplicateObjectRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ReplaceAllTextRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Page - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ShapeBackgroundFill - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CropProperties - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ReplaceAllShapesWithSheetsChartRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Range - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ColorStop - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CreateVideoRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DuplicateObjectResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ReplaceAllShapesWithImageRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Shadow - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DeleteTableRowRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Bullet - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class OutlineFill + class TableCellLocation class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -268,12 +34,6 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class TableCellLocation - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class ReplaceAllTextResponse class Representation < Google::Apis::Core::JsonRepresentation; end @@ -304,13 +64,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class InsertTextRequest + class AffineTransform class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class AffineTransform + class InsertTextRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -328,13 +88,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class UpdatePageElementTransformRequest + class DeleteTextRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class DeleteTextRequest + class UpdatePageElementTransformRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -346,13 +106,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class TextElement + class Dimension class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class Dimension + class TextElement class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -418,13 +178,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class BatchUpdatePresentationResponse + class CreateSheetsChartRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class CreateSheetsChartRequest + class BatchUpdatePresentationResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -454,13 +214,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class TextRun + class LayoutReference class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class LayoutReference + class TextRun class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -472,13 +232,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class CreateTableRequest + class CreateTableResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class CreateTableResponse + class CreateTableRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -538,13 +298,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class DeleteTableColumnRequest + class UpdateTextStyleRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class UpdateTextStyleRequest + class DeleteTableColumnRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -640,7 +400,7 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class NotesProperties + class TableColumnProperties class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -652,7 +412,7 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class TableColumnProperties + class NotesProperties class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -695,403 +455,243 @@ module Google end class WriteControl - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :required_revision_id, as: 'requiredRevisionId' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class DeleteParagraphBulletsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :object_id_prop, as: 'objectId' - property :text_range, as: 'textRange', class: Google::Apis::SlidesV1::Range, decorator: Google::Apis::SlidesV1::Range::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :cell_location, as: 'cellLocation', class: Google::Apis::SlidesV1::TableCellLocation, decorator: Google::Apis::SlidesV1::TableCellLocation::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class ParagraphMarker - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :style, as: 'style', class: Google::Apis::SlidesV1::ParagraphStyle, decorator: Google::Apis::SlidesV1::ParagraphStyle::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :bullet, as: 'bullet', class: Google::Apis::SlidesV1::Bullet, decorator: Google::Apis::SlidesV1::Bullet::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class Thumbnail - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :height, as: 'height' - property :content_url, as: 'contentUrl' - property :width, as: 'width' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class InsertTableColumnsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :number, as: 'number' - property :cell_location, as: 'cellLocation', class: Google::Apis::SlidesV1::TableCellLocation, decorator: Google::Apis::SlidesV1::TableCellLocation::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :insert_right, as: 'insertRight' - property :table_object_id, as: 'tableObjectId' - end + include Google::Apis::Core::JsonObjectSupport end class LayoutPlaceholderIdMapping - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :object_id_prop, as: 'objectId' - property :layout_placeholder, as: 'layoutPlaceholder', class: Google::Apis::SlidesV1::Placeholder, decorator: Google::Apis::SlidesV1::Placeholder::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :layout_placeholder_object_id, as: 'layoutPlaceholderObjectId' - end + include Google::Apis::Core::JsonObjectSupport end class UpdateShapePropertiesRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :fields, as: 'fields' - property :object_id_prop, as: 'objectId' - property :shape_properties, as: 'shapeProperties', class: Google::Apis::SlidesV1::ShapeProperties, decorator: Google::Apis::SlidesV1::ShapeProperties::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class WordArt - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :rendered_text, as: 'renderedText' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class Recolor - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :recolor_stops, as: 'recolorStops', class: Google::Apis::SlidesV1::ColorStop, decorator: Google::Apis::SlidesV1::ColorStop::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :name, as: 'name' - end + include Google::Apis::Core::JsonObjectSupport end class Link - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :page_object_id, as: 'pageObjectId' - property :url, as: 'url' - property :relative_link, as: 'relativeLink' - property :slide_index, as: 'slideIndex' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class CreateShapeResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :object_id_prop, as: 'objectId' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class RgbColor - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :red, as: 'red' - property :green, as: 'green' - property :blue, as: 'blue' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class CreateLineRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :object_id_prop, as: 'objectId' - property :element_properties, as: 'elementProperties', class: Google::Apis::SlidesV1::PageElementProperties, decorator: Google::Apis::SlidesV1::PageElementProperties::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :line_category, as: 'lineCategory' - end + include Google::Apis::Core::JsonObjectSupport end class CreateSlideResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :object_id_prop, as: 'objectId' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class CreateShapeRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :object_id_prop, as: 'objectId' - property :shape_type, as: 'shapeType' - property :element_properties, as: 'elementProperties', class: Google::Apis::SlidesV1::PageElementProperties, decorator: Google::Apis::SlidesV1::PageElementProperties::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class Video - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :source, as: 'source' - property :url, as: 'url' - property :id, as: 'id' - property :video_properties, as: 'videoProperties', class: Google::Apis::SlidesV1::VideoProperties, decorator: Google::Apis::SlidesV1::VideoProperties::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class PageProperties - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :color_scheme, as: 'colorScheme', class: Google::Apis::SlidesV1::ColorScheme, decorator: Google::Apis::SlidesV1::ColorScheme::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :page_background_fill, as: 'pageBackgroundFill', class: Google::Apis::SlidesV1::PageBackgroundFill, decorator: Google::Apis::SlidesV1::PageBackgroundFill::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class NestingLevel - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :bullet_style, as: 'bulletStyle', class: Google::Apis::SlidesV1::TextStyle, decorator: Google::Apis::SlidesV1::TextStyle::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class TableCell - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :text, as: 'text', class: Google::Apis::SlidesV1::TextContent, decorator: Google::Apis::SlidesV1::TextContent::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :table_cell_properties, as: 'tableCellProperties', class: Google::Apis::SlidesV1::TableCellProperties, decorator: Google::Apis::SlidesV1::TableCellProperties::Representation - - property :location, as: 'location', class: Google::Apis::SlidesV1::TableCellLocation, decorator: Google::Apis::SlidesV1::TableCellLocation::Representation - - property :row_span, as: 'rowSpan' - property :column_span, as: 'columnSpan' - end + include Google::Apis::Core::JsonObjectSupport end class UpdateLinePropertiesRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :line_properties, as: 'lineProperties', class: Google::Apis::SlidesV1::LineProperties, decorator: Google::Apis::SlidesV1::LineProperties::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :fields, as: 'fields' - property :object_id_prop, as: 'objectId' - end - end - - class UpdateSlidesPositionRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :insertion_index, as: 'insertionIndex' - collection :slide_object_ids, as: 'slideObjectIds' - end + include Google::Apis::Core::JsonObjectSupport end class TableCellBackgroundFill - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :solid_fill, as: 'solidFill', class: Google::Apis::SlidesV1::SolidFill, decorator: Google::Apis::SlidesV1::SolidFill::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :property_state, as: 'propertyState' - end + include Google::Apis::Core::JsonObjectSupport + end + + class UpdateSlidesPositionRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class UpdatePagePropertiesRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :fields, as: 'fields' - property :object_id_prop, as: 'objectId' - property :page_properties, as: 'pageProperties', class: Google::Apis::SlidesV1::PageProperties, decorator: Google::Apis::SlidesV1::PageProperties::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class Group - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :children, as: 'children', class: Google::Apis::SlidesV1::PageElement, decorator: Google::Apis::SlidesV1::PageElement::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class Placeholder - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :index, as: 'index' - property :type, as: 'type' - property :parent_object_id, as: 'parentObjectId' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class DuplicateObjectRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - hash :object_ids, as: 'objectIds' - property :object_id_prop, as: 'objectId' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ReplaceAllTextRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :replace_text, as: 'replaceText' - property :contains_text, as: 'containsText', class: Google::Apis::SlidesV1::SubstringMatchCriteria, decorator: Google::Apis::SlidesV1::SubstringMatchCriteria::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class Page - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :object_id_prop, as: 'objectId' - property :revision_id, as: 'revisionId' - property :layout_properties, as: 'layoutProperties', class: Google::Apis::SlidesV1::LayoutProperties, decorator: Google::Apis::SlidesV1::LayoutProperties::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :page_type, as: 'pageType' - collection :page_elements, as: 'pageElements', class: Google::Apis::SlidesV1::PageElement, decorator: Google::Apis::SlidesV1::PageElement::Representation - - property :notes_properties, as: 'notesProperties', class: Google::Apis::SlidesV1::NotesProperties, decorator: Google::Apis::SlidesV1::NotesProperties::Representation - - property :page_properties, as: 'pageProperties', class: Google::Apis::SlidesV1::PageProperties, decorator: Google::Apis::SlidesV1::PageProperties::Representation - - property :slide_properties, as: 'slideProperties', class: Google::Apis::SlidesV1::SlideProperties, decorator: Google::Apis::SlidesV1::SlideProperties::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class ShapeBackgroundFill - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :property_state, as: 'propertyState' - property :solid_fill, as: 'solidFill', class: Google::Apis::SlidesV1::SolidFill, decorator: Google::Apis::SlidesV1::SolidFill::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class CropProperties - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :top_offset, as: 'topOffset' - property :left_offset, as: 'leftOffset' - property :right_offset, as: 'rightOffset' - property :bottom_offset, as: 'bottomOffset' - property :angle, as: 'angle' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ReplaceAllShapesWithSheetsChartRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :spreadsheet_id, as: 'spreadsheetId' - property :linking_mode, as: 'linkingMode' - property :contains_text, as: 'containsText', class: Google::Apis::SlidesV1::SubstringMatchCriteria, decorator: Google::Apis::SlidesV1::SubstringMatchCriteria::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :chart_id, as: 'chartId' - end + include Google::Apis::Core::JsonObjectSupport end class Range - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :start_index, as: 'startIndex' - property :end_index, as: 'endIndex' - property :type, as: 'type' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ColorStop - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :alpha, as: 'alpha' - property :position, as: 'position' - property :color, as: 'color', class: Google::Apis::SlidesV1::OpaqueColor, decorator: Google::Apis::SlidesV1::OpaqueColor::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class CreateVideoRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :object_id_prop, as: 'objectId' - property :source, as: 'source' - property :element_properties, as: 'elementProperties', class: Google::Apis::SlidesV1::PageElementProperties, decorator: Google::Apis::SlidesV1::PageElementProperties::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :id, as: 'id' - end + include Google::Apis::Core::JsonObjectSupport end class DuplicateObjectResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :object_id_prop, as: 'objectId' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ReplaceAllShapesWithImageRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :contains_text, as: 'containsText', class: Google::Apis::SlidesV1::SubstringMatchCriteria, decorator: Google::Apis::SlidesV1::SubstringMatchCriteria::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :image_url, as: 'imageUrl' - property :replace_method, as: 'replaceMethod' - end + include Google::Apis::Core::JsonObjectSupport end class Shadow - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :rotate_with_shape, as: 'rotateWithShape' - property :property_state, as: 'propertyState' - property :blur_radius, as: 'blurRadius', class: Google::Apis::SlidesV1::Dimension, decorator: Google::Apis::SlidesV1::Dimension::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :transform, as: 'transform', class: Google::Apis::SlidesV1::AffineTransform, decorator: Google::Apis::SlidesV1::AffineTransform::Representation - - property :type, as: 'type' - property :alignment, as: 'alignment' - property :alpha, as: 'alpha' - property :color, as: 'color', class: Google::Apis::SlidesV1::OpaqueColor, decorator: Google::Apis::SlidesV1::OpaqueColor::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class DeleteTableRowRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :cell_location, as: 'cellLocation', class: Google::Apis::SlidesV1::TableCellLocation, decorator: Google::Apis::SlidesV1::TableCellLocation::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :table_object_id, as: 'tableObjectId' - end + include Google::Apis::Core::JsonObjectSupport end class Bullet - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :glyph, as: 'glyph' - property :nesting_level, as: 'nestingLevel' - property :bullet_style, as: 'bulletStyle', class: Google::Apis::SlidesV1::TextStyle, decorator: Google::Apis::SlidesV1::TextStyle::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :list_id, as: 'listId' - end + include Google::Apis::Core::JsonObjectSupport end class OutlineFill - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :solid_fill, as: 'solidFill', class: Google::Apis::SlidesV1::SolidFill, decorator: Google::Apis::SlidesV1::SolidFill::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class CreateLineResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :object_id_prop, as: 'objectId' - end + include Google::Apis::Core::JsonObjectSupport end class TableCellLocation @@ -1102,6 +702,13 @@ module Google end end + class CreateLineResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :object_id_prop, as: 'objectId' + end + end + class ReplaceAllTextResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1112,6 +719,7 @@ module Google class UpdateParagraphStyleRequest # @private class Representation < Google::Apis::Core::JsonRepresentation + property :fields, as: 'fields' property :object_id_prop, as: 'objectId' property :text_range, as: 'textRange', class: Google::Apis::SlidesV1::Range, decorator: Google::Apis::SlidesV1::Range::Representation @@ -1119,7 +727,6 @@ module Google property :style, as: 'style', class: Google::Apis::SlidesV1::ParagraphStyle, decorator: Google::Apis::SlidesV1::ParagraphStyle::Representation - property :fields, as: 'fields' end end @@ -1153,17 +760,6 @@ module Google end end - class InsertTextRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :object_id_prop, as: 'objectId' - property :text, as: 'text' - property :insertion_index, as: 'insertionIndex' - property :cell_location, as: 'cellLocation', class: Google::Apis::SlidesV1::TableCellLocation, decorator: Google::Apis::SlidesV1::TableCellLocation::Representation - - end - end - class AffineTransform # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1177,13 +773,24 @@ module Google end end + class InsertTextRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :cell_location, as: 'cellLocation', class: Google::Apis::SlidesV1::TableCellLocation, decorator: Google::Apis::SlidesV1::TableCellLocation::Representation + + property :object_id_prop, as: 'objectId' + property :text, as: 'text' + property :insertion_index, as: 'insertionIndex' + end + end + class AutoText # @private class Representation < Google::Apis::Core::JsonRepresentation - property :style, as: 'style', class: Google::Apis::SlidesV1::TextStyle, decorator: Google::Apis::SlidesV1::TextStyle::Representation - property :type, as: 'type' property :content, as: 'content' + property :style, as: 'style', class: Google::Apis::SlidesV1::TextStyle, decorator: Google::Apis::SlidesV1::TextStyle::Representation + end end @@ -1194,24 +801,24 @@ module Google end end - class UpdatePageElementTransformRequest + class DeleteTextRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :apply_mode, as: 'applyMode' + property :cell_location, as: 'cellLocation', class: Google::Apis::SlidesV1::TableCellLocation, decorator: Google::Apis::SlidesV1::TableCellLocation::Representation + property :object_id_prop, as: 'objectId' - property :transform, as: 'transform', class: Google::Apis::SlidesV1::AffineTransform, decorator: Google::Apis::SlidesV1::AffineTransform::Representation + property :text_range, as: 'textRange', class: Google::Apis::SlidesV1::Range, decorator: Google::Apis::SlidesV1::Range::Representation end end - class DeleteTextRequest + class UpdatePageElementTransformRequest # @private class Representation < Google::Apis::Core::JsonRepresentation property :object_id_prop, as: 'objectId' - property :text_range, as: 'textRange', class: Google::Apis::SlidesV1::Range, decorator: Google::Apis::SlidesV1::Range::Representation - - property :cell_location, as: 'cellLocation', class: Google::Apis::SlidesV1::TableCellLocation, decorator: Google::Apis::SlidesV1::TableCellLocation::Representation + property :transform, as: 'transform', class: Google::Apis::SlidesV1::AffineTransform, decorator: Google::Apis::SlidesV1::AffineTransform::Representation + property :apply_mode, as: 'applyMode' end end @@ -1222,25 +829,25 @@ module Google end end + class Dimension + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :magnitude, as: 'magnitude' + property :unit, as: 'unit' + end + end + class TextElement # @private class Representation < Google::Apis::Core::JsonRepresentation + property :text_run, as: 'textRun', class: Google::Apis::SlidesV1::TextRun, decorator: Google::Apis::SlidesV1::TextRun::Representation + property :auto_text, as: 'autoText', class: Google::Apis::SlidesV1::AutoText, decorator: Google::Apis::SlidesV1::AutoText::Representation property :paragraph_marker, as: 'paragraphMarker', class: Google::Apis::SlidesV1::ParagraphMarker, decorator: Google::Apis::SlidesV1::ParagraphMarker::Representation property :start_index, as: 'startIndex' property :end_index, as: 'endIndex' - property :text_run, as: 'textRun', class: Google::Apis::SlidesV1::TextRun, decorator: Google::Apis::SlidesV1::TextRun::Representation - - end - end - - class Dimension - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :magnitude, as: 'magnitude' - property :unit, as: 'unit' end end @@ -1263,11 +870,11 @@ module Google class InsertTableRowsRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :table_object_id, as: 'tableObjectId' - property :insert_below, as: 'insertBelow' property :number, as: 'number' property :cell_location, as: 'cellLocation', class: Google::Apis::SlidesV1::TableCellLocation, decorator: Google::Apis::SlidesV1::TableCellLocation::Representation + property :table_object_id, as: 'tableObjectId' + property :insert_below, as: 'insertBelow' end end @@ -1283,44 +890,44 @@ module Google class Presentation # @private class Representation < Google::Apis::Core::JsonRepresentation + property :title, as: 'title' + collection :layouts, as: 'layouts', class: Google::Apis::SlidesV1::Page, decorator: Google::Apis::SlidesV1::Page::Representation + + collection :masters, as: 'masters', class: Google::Apis::SlidesV1::Page, decorator: Google::Apis::SlidesV1::Page::Representation + + property :locale, as: 'locale' + property :page_size, as: 'pageSize', class: Google::Apis::SlidesV1::Size, decorator: Google::Apis::SlidesV1::Size::Representation + property :presentation_id, as: 'presentationId' collection :slides, as: 'slides', class: Google::Apis::SlidesV1::Page, decorator: Google::Apis::SlidesV1::Page::Representation property :revision_id, as: 'revisionId' property :notes_master, as: 'notesMaster', class: Google::Apis::SlidesV1::Page, decorator: Google::Apis::SlidesV1::Page::Representation - collection :layouts, as: 'layouts', class: Google::Apis::SlidesV1::Page, decorator: Google::Apis::SlidesV1::Page::Representation - - property :title, as: 'title' - property :locale, as: 'locale' - collection :masters, as: 'masters', class: Google::Apis::SlidesV1::Page, decorator: Google::Apis::SlidesV1::Page::Representation - - property :page_size, as: 'pageSize', class: Google::Apis::SlidesV1::Size, decorator: Google::Apis::SlidesV1::Size::Representation - end end class LineProperties # @private class Representation < Google::Apis::Core::JsonRepresentation - property :link, as: 'link', class: Google::Apis::SlidesV1::Link, decorator: Google::Apis::SlidesV1::Link::Representation - - property :dash_style, as: 'dashStyle' property :start_arrow, as: 'startArrow' property :end_arrow, as: 'endArrow' property :weight, as: 'weight', class: Google::Apis::SlidesV1::Dimension, decorator: Google::Apis::SlidesV1::Dimension::Representation property :line_fill, as: 'lineFill', class: Google::Apis::SlidesV1::LineFill, decorator: Google::Apis::SlidesV1::LineFill::Representation + property :link, as: 'link', class: Google::Apis::SlidesV1::Link, decorator: Google::Apis::SlidesV1::Link::Representation + + property :dash_style, as: 'dashStyle' end end class OpaqueColor # @private class Representation < Google::Apis::Core::JsonRepresentation + property :theme_color, as: 'themeColor' property :rgb_color, as: 'rgbColor', class: Google::Apis::SlidesV1::RgbColor, decorator: Google::Apis::SlidesV1::RgbColor::Representation - property :theme_color, as: 'themeColor' end end @@ -1353,9 +960,21 @@ module Google class Line # @private class Representation < Google::Apis::Core::JsonRepresentation - property :line_type, as: 'lineType' property :line_properties, as: 'lineProperties', class: Google::Apis::SlidesV1::LineProperties, decorator: Google::Apis::SlidesV1::LineProperties::Representation + property :line_type, as: 'lineType' + end + end + + class CreateSheetsChartRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :element_properties, as: 'elementProperties', class: Google::Apis::SlidesV1::PageElementProperties, decorator: Google::Apis::SlidesV1::PageElementProperties::Representation + + property :spreadsheet_id, as: 'spreadsheetId' + property :linking_mode, as: 'linkingMode' + property :chart_id, as: 'chartId' + property :object_id_prop, as: 'objectId' end end @@ -1368,18 +987,6 @@ module Google end end - class CreateSheetsChartRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :object_id_prop, as: 'objectId' - property :element_properties, as: 'elementProperties', class: Google::Apis::SlidesV1::PageElementProperties, decorator: Google::Apis::SlidesV1::PageElementProperties::Representation - - property :spreadsheet_id, as: 'spreadsheetId' - property :linking_mode, as: 'linkingMode' - property :chart_id, as: 'chartId' - end - end - class CreateImageResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1400,6 +1007,14 @@ module Google class Response # @private class Representation < Google::Apis::Core::JsonRepresentation + property :create_image, as: 'createImage', class: Google::Apis::SlidesV1::CreateImageResponse, decorator: Google::Apis::SlidesV1::CreateImageResponse::Representation + + property :create_video, as: 'createVideo', class: Google::Apis::SlidesV1::CreateVideoResponse, decorator: Google::Apis::SlidesV1::CreateVideoResponse::Representation + + property :replace_all_shapes_with_sheets_chart, as: 'replaceAllShapesWithSheetsChart', class: Google::Apis::SlidesV1::ReplaceAllShapesWithSheetsChartResponse, decorator: Google::Apis::SlidesV1::ReplaceAllShapesWithSheetsChartResponse::Representation + + property :create_sheets_chart, as: 'createSheetsChart', class: Google::Apis::SlidesV1::CreateSheetsChartResponse, decorator: Google::Apis::SlidesV1::CreateSheetsChartResponse::Representation + property :replace_all_shapes_with_image, as: 'replaceAllShapesWithImage', class: Google::Apis::SlidesV1::ReplaceAllShapesWithImageResponse, decorator: Google::Apis::SlidesV1::ReplaceAllShapesWithImageResponse::Representation property :create_table, as: 'createTable', class: Google::Apis::SlidesV1::CreateTableResponse, decorator: Google::Apis::SlidesV1::CreateTableResponse::Representation @@ -1408,20 +1023,12 @@ module Google property :create_slide, as: 'createSlide', class: Google::Apis::SlidesV1::CreateSlideResponse, decorator: Google::Apis::SlidesV1::CreateSlideResponse::Representation - property :duplicate_object, as: 'duplicateObject', class: Google::Apis::SlidesV1::DuplicateObjectResponse, decorator: Google::Apis::SlidesV1::DuplicateObjectResponse::Representation - property :create_shape, as: 'createShape', class: Google::Apis::SlidesV1::CreateShapeResponse, decorator: Google::Apis::SlidesV1::CreateShapeResponse::Representation + property :duplicate_object, as: 'duplicateObject', class: Google::Apis::SlidesV1::DuplicateObjectResponse, decorator: Google::Apis::SlidesV1::DuplicateObjectResponse::Representation + property :create_line, as: 'createLine', class: Google::Apis::SlidesV1::CreateLineResponse, decorator: Google::Apis::SlidesV1::CreateLineResponse::Representation - property :create_image, as: 'createImage', class: Google::Apis::SlidesV1::CreateImageResponse, decorator: Google::Apis::SlidesV1::CreateImageResponse::Representation - - property :create_video, as: 'createVideo', class: Google::Apis::SlidesV1::CreateVideoResponse, decorator: Google::Apis::SlidesV1::CreateVideoResponse::Representation - - property :create_sheets_chart, as: 'createSheetsChart', class: Google::Apis::SlidesV1::CreateSheetsChartResponse, decorator: Google::Apis::SlidesV1::CreateSheetsChartResponse::Representation - - property :replace_all_shapes_with_sheets_chart, as: 'replaceAllShapesWithSheetsChart', class: Google::Apis::SlidesV1::ReplaceAllShapesWithSheetsChartResponse, decorator: Google::Apis::SlidesV1::ReplaceAllShapesWithSheetsChartResponse::Representation - end end @@ -1433,30 +1040,37 @@ module Google end end - class TextRun - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :content, as: 'content' - property :style, as: 'style', class: Google::Apis::SlidesV1::TextStyle, decorator: Google::Apis::SlidesV1::TextStyle::Representation - - end - end - class LayoutReference # @private class Representation < Google::Apis::Core::JsonRepresentation - property :predefined_layout, as: 'predefinedLayout' property :layout_id, as: 'layoutId' + property :predefined_layout, as: 'predefinedLayout' + end + end + + class TextRun + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :style, as: 'style', class: Google::Apis::SlidesV1::TextStyle, decorator: Google::Apis::SlidesV1::TextStyle::Representation + + property :content, as: 'content' end end class TableRange # @private class Representation < Google::Apis::Core::JsonRepresentation - property :column_span, as: 'columnSpan' property :location, as: 'location', class: Google::Apis::SlidesV1::TableCellLocation, decorator: Google::Apis::SlidesV1::TableCellLocation::Representation property :row_span, as: 'rowSpan' + property :column_span, as: 'columnSpan' + end + end + + class CreateTableResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :object_id_prop, as: 'objectId' end end @@ -1471,22 +1085,15 @@ module Google end end - class CreateTableResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :object_id_prop, as: 'objectId' - end - end - class Table # @private class Representation < Google::Apis::Core::JsonRepresentation - property :columns, as: 'columns' - collection :table_rows, as: 'tableRows', class: Google::Apis::SlidesV1::TableRow, decorator: Google::Apis::SlidesV1::TableRow::Representation - property :rows, as: 'rows' collection :table_columns, as: 'tableColumns', class: Google::Apis::SlidesV1::TableColumnProperties, decorator: Google::Apis::SlidesV1::TableColumnProperties::Representation + property :columns, as: 'columns' + collection :table_rows, as: 'tableRows', class: Google::Apis::SlidesV1::TableRow, decorator: Google::Apis::SlidesV1::TableRow::Representation + end end @@ -1524,9 +1131,9 @@ module Google class ThemeColorPair # @private class Representation < Google::Apis::Core::JsonRepresentation + property :type, as: 'type' property :color, as: 'color', class: Google::Apis::SlidesV1::RgbColor, decorator: Google::Apis::SlidesV1::RgbColor::Representation - property :type, as: 'type' end end @@ -1566,6 +1173,20 @@ module Google end end + class UpdateTextStyleRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :cell_location, as: 'cellLocation', class: Google::Apis::SlidesV1::TableCellLocation, decorator: Google::Apis::SlidesV1::TableCellLocation::Representation + + property :style, as: 'style', class: Google::Apis::SlidesV1::TextStyle, decorator: Google::Apis::SlidesV1::TextStyle::Representation + + property :fields, as: 'fields' + property :object_id_prop, as: 'objectId' + property :text_range, as: 'textRange', class: Google::Apis::SlidesV1::Range, decorator: Google::Apis::SlidesV1::Range::Representation + + end + end + class DeleteTableColumnRequest # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1575,26 +1196,12 @@ module Google end end - class UpdateTextStyleRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :object_id_prop, as: 'objectId' - property :text_range, as: 'textRange', class: Google::Apis::SlidesV1::Range, decorator: Google::Apis::SlidesV1::Range::Representation - - property :cell_location, as: 'cellLocation', class: Google::Apis::SlidesV1::TableCellLocation, decorator: Google::Apis::SlidesV1::TableCellLocation::Representation - - property :style, as: 'style', class: Google::Apis::SlidesV1::TextStyle, decorator: Google::Apis::SlidesV1::TextStyle::Representation - - property :fields, as: 'fields' - end - end - class List # @private class Representation < Google::Apis::Core::JsonRepresentation - property :list_id, as: 'listId' hash :nesting_level, as: 'nestingLevel', class: Google::Apis::SlidesV1::NestingLevel, decorator: Google::Apis::SlidesV1::NestingLevel::Representation + property :list_id, as: 'listId' end end @@ -1609,9 +1216,11 @@ module Google class PageElement # @private class Representation < Google::Apis::Core::JsonRepresentation - property :title, as: 'title' + property :size, as: 'size', class: Google::Apis::SlidesV1::Size, decorator: Google::Apis::SlidesV1::Size::Representation + property :sheets_chart, as: 'sheetsChart', class: Google::Apis::SlidesV1::SheetsChart, decorator: Google::Apis::SlidesV1::SheetsChart::Representation + property :title, as: 'title' property :video, as: 'video', class: Google::Apis::SlidesV1::Video, decorator: Google::Apis::SlidesV1::Video::Representation property :word_art, as: 'wordArt', class: Google::Apis::SlidesV1::WordArt, decorator: Google::Apis::SlidesV1::WordArt::Representation @@ -1630,8 +1239,6 @@ module Google property :image, as: 'image', class: Google::Apis::SlidesV1::Image, decorator: Google::Apis::SlidesV1::Image::Representation - property :size, as: 'size', class: Google::Apis::SlidesV1::Size, decorator: Google::Apis::SlidesV1::Size::Representation - end end @@ -1660,25 +1267,24 @@ module Google class Size # @private class Representation < Google::Apis::Core::JsonRepresentation - property :width, as: 'width', class: Google::Apis::SlidesV1::Dimension, decorator: Google::Apis::SlidesV1::Dimension::Representation - property :height, as: 'height', class: Google::Apis::SlidesV1::Dimension, decorator: Google::Apis::SlidesV1::Dimension::Representation + property :width, as: 'width', class: Google::Apis::SlidesV1::Dimension, decorator: Google::Apis::SlidesV1::Dimension::Representation + end end class TextStyle # @private class Representation < Google::Apis::Core::JsonRepresentation - property :small_caps, as: 'smallCaps' property :background_color, as: 'backgroundColor', class: Google::Apis::SlidesV1::OptionalColor, decorator: Google::Apis::SlidesV1::OptionalColor::Representation property :underline, as: 'underline' property :link, as: 'link', class: Google::Apis::SlidesV1::Link, decorator: Google::Apis::SlidesV1::Link::Representation + property :bold, as: 'bold' property :foreground_color, as: 'foregroundColor', class: Google::Apis::SlidesV1::OptionalColor, decorator: Google::Apis::SlidesV1::OptionalColor::Representation - property :bold, as: 'bold' property :font_family, as: 'fontFamily' property :italic, as: 'italic' property :strikethrough, as: 'strikethrough' @@ -1687,6 +1293,7 @@ module Google property :baseline_offset, as: 'baselineOffset' property :weighted_font_family, as: 'weightedFontFamily', class: Google::Apis::SlidesV1::WeightedFontFamily, decorator: Google::Apis::SlidesV1::WeightedFontFamily::Representation + property :small_caps, as: 'smallCaps' end end @@ -1747,10 +1354,10 @@ module Google property :delete_table_column, as: 'deleteTableColumn', class: Google::Apis::SlidesV1::DeleteTableColumnRequest, decorator: Google::Apis::SlidesV1::DeleteTableColumnRequest::Representation - property :create_line, as: 'createLine', class: Google::Apis::SlidesV1::CreateLineRequest, decorator: Google::Apis::SlidesV1::CreateLineRequest::Representation - property :update_video_properties, as: 'updateVideoProperties', class: Google::Apis::SlidesV1::UpdateVideoPropertiesRequest, decorator: Google::Apis::SlidesV1::UpdateVideoPropertiesRequest::Representation + property :create_line, as: 'createLine', class: Google::Apis::SlidesV1::CreateLineRequest, decorator: Google::Apis::SlidesV1::CreateLineRequest::Representation + property :create_image, as: 'createImage', class: Google::Apis::SlidesV1::CreateImageRequest, decorator: Google::Apis::SlidesV1::CreateImageRequest::Representation property :create_paragraph_bullets, as: 'createParagraphBullets', class: Google::Apis::SlidesV1::CreateParagraphBulletsRequest, decorator: Google::Apis::SlidesV1::CreateParagraphBulletsRequest::Representation @@ -1784,17 +1391,17 @@ module Google property :space_below, as: 'spaceBelow', class: Google::Apis::SlidesV1::Dimension, decorator: Google::Apis::SlidesV1::Dimension::Representation property :direction, as: 'direction' - property :spacing_mode, as: 'spacingMode' property :indent_end, as: 'indentEnd', class: Google::Apis::SlidesV1::Dimension, decorator: Google::Apis::SlidesV1::Dimension::Representation + property :spacing_mode, as: 'spacingMode' property :indent_start, as: 'indentStart', class: Google::Apis::SlidesV1::Dimension, decorator: Google::Apis::SlidesV1::Dimension::Representation property :space_above, as: 'spaceAbove', class: Google::Apis::SlidesV1::Dimension, decorator: Google::Apis::SlidesV1::Dimension::Representation - property :alignment, as: 'alignment' - property :line_spacing, as: 'lineSpacing' property :indent_first_line, as: 'indentFirstLine', class: Google::Apis::SlidesV1::Dimension, decorator: Google::Apis::SlidesV1::Dimension::Representation + property :line_spacing, as: 'lineSpacing' + property :alignment, as: 'alignment' end end @@ -1832,32 +1439,32 @@ module Google end end - class NotesProperties + class TableColumnProperties # @private class Representation < Google::Apis::Core::JsonRepresentation - property :speaker_notes_object_id, as: 'speakerNotesObjectId' + property :column_width, as: 'columnWidth', class: Google::Apis::SlidesV1::Dimension, decorator: Google::Apis::SlidesV1::Dimension::Representation + end end class ShapeProperties # @private class Representation < Google::Apis::Core::JsonRepresentation - property :link, as: 'link', class: Google::Apis::SlidesV1::Link, decorator: Google::Apis::SlidesV1::Link::Representation - - property :outline, as: 'outline', class: Google::Apis::SlidesV1::Outline, decorator: Google::Apis::SlidesV1::Outline::Representation - property :shape_background_fill, as: 'shapeBackgroundFill', class: Google::Apis::SlidesV1::ShapeBackgroundFill, decorator: Google::Apis::SlidesV1::ShapeBackgroundFill::Representation property :shadow, as: 'shadow', class: Google::Apis::SlidesV1::Shadow, decorator: Google::Apis::SlidesV1::Shadow::Representation + property :link, as: 'link', class: Google::Apis::SlidesV1::Link, decorator: Google::Apis::SlidesV1::Link::Representation + + property :outline, as: 'outline', class: Google::Apis::SlidesV1::Outline, decorator: Google::Apis::SlidesV1::Outline::Representation + end end - class TableColumnProperties + class NotesProperties # @private class Representation < Google::Apis::Core::JsonRepresentation - property :column_width, as: 'columnWidth', class: Google::Apis::SlidesV1::Dimension, decorator: Google::Apis::SlidesV1::Dimension::Representation - + property :speaker_notes_object_id, as: 'speakerNotesObjectId' end end @@ -1886,12 +1493,12 @@ module Google class CreateSlideRequest # @private class Representation < Google::Apis::Core::JsonRepresentation + collection :placeholder_id_mappings, as: 'placeholderIdMappings', class: Google::Apis::SlidesV1::LayoutPlaceholderIdMapping, decorator: Google::Apis::SlidesV1::LayoutPlaceholderIdMapping::Representation + property :slide_layout_reference, as: 'slideLayoutReference', class: Google::Apis::SlidesV1::LayoutReference, decorator: Google::Apis::SlidesV1::LayoutReference::Representation property :object_id_prop, as: 'objectId' property :insertion_index, as: 'insertionIndex' - collection :placeholder_id_mappings, as: 'placeholderIdMappings', class: Google::Apis::SlidesV1::LayoutPlaceholderIdMapping, decorator: Google::Apis::SlidesV1::LayoutPlaceholderIdMapping::Representation - end end @@ -1908,10 +1515,10 @@ module Google class TextContent # @private class Representation < Google::Apis::Core::JsonRepresentation - hash :lists, as: 'lists', class: Google::Apis::SlidesV1::List, decorator: Google::Apis::SlidesV1::List::Representation - collection :text_elements, as: 'textElements', class: Google::Apis::SlidesV1::TextElement, decorator: Google::Apis::SlidesV1::TextElement::Representation + hash :lists, as: 'lists', class: Google::Apis::SlidesV1::List, decorator: Google::Apis::SlidesV1::List::Representation + end end @@ -1921,6 +1528,402 @@ module Google property :object_id_prop, as: 'objectId' end end + + class WriteControl + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :required_revision_id, as: 'requiredRevisionId' + end + end + + class DeleteParagraphBulletsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :object_id_prop, as: 'objectId' + property :text_range, as: 'textRange', class: Google::Apis::SlidesV1::Range, decorator: Google::Apis::SlidesV1::Range::Representation + + property :cell_location, as: 'cellLocation', class: Google::Apis::SlidesV1::TableCellLocation, decorator: Google::Apis::SlidesV1::TableCellLocation::Representation + + end + end + + class ParagraphMarker + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :style, as: 'style', class: Google::Apis::SlidesV1::ParagraphStyle, decorator: Google::Apis::SlidesV1::ParagraphStyle::Representation + + property :bullet, as: 'bullet', class: Google::Apis::SlidesV1::Bullet, decorator: Google::Apis::SlidesV1::Bullet::Representation + + end + end + + class Thumbnail + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :content_url, as: 'contentUrl' + property :width, as: 'width' + property :height, as: 'height' + end + end + + class InsertTableColumnsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :cell_location, as: 'cellLocation', class: Google::Apis::SlidesV1::TableCellLocation, decorator: Google::Apis::SlidesV1::TableCellLocation::Representation + + property :insert_right, as: 'insertRight' + property :table_object_id, as: 'tableObjectId' + property :number, as: 'number' + end + end + + class LayoutPlaceholderIdMapping + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :object_id_prop, as: 'objectId' + property :layout_placeholder, as: 'layoutPlaceholder', class: Google::Apis::SlidesV1::Placeholder, decorator: Google::Apis::SlidesV1::Placeholder::Representation + + property :layout_placeholder_object_id, as: 'layoutPlaceholderObjectId' + end + end + + class UpdateShapePropertiesRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :fields, as: 'fields' + property :object_id_prop, as: 'objectId' + property :shape_properties, as: 'shapeProperties', class: Google::Apis::SlidesV1::ShapeProperties, decorator: Google::Apis::SlidesV1::ShapeProperties::Representation + + end + end + + class WordArt + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :rendered_text, as: 'renderedText' + end + end + + class Recolor + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :recolor_stops, as: 'recolorStops', class: Google::Apis::SlidesV1::ColorStop, decorator: Google::Apis::SlidesV1::ColorStop::Representation + + property :name, as: 'name' + end + end + + class Link + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :page_object_id, as: 'pageObjectId' + property :url, as: 'url' + property :relative_link, as: 'relativeLink' + property :slide_index, as: 'slideIndex' + end + end + + class CreateShapeResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :object_id_prop, as: 'objectId' + end + end + + class RgbColor + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :green, as: 'green' + property :blue, as: 'blue' + property :red, as: 'red' + end + end + + class CreateLineRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :object_id_prop, as: 'objectId' + property :element_properties, as: 'elementProperties', class: Google::Apis::SlidesV1::PageElementProperties, decorator: Google::Apis::SlidesV1::PageElementProperties::Representation + + property :line_category, as: 'lineCategory' + end + end + + class CreateSlideResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :object_id_prop, as: 'objectId' + end + end + + class CreateShapeRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :object_id_prop, as: 'objectId' + property :shape_type, as: 'shapeType' + property :element_properties, as: 'elementProperties', class: Google::Apis::SlidesV1::PageElementProperties, decorator: Google::Apis::SlidesV1::PageElementProperties::Representation + + end + end + + class Video + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :source, as: 'source' + property :url, as: 'url' + property :id, as: 'id' + property :video_properties, as: 'videoProperties', class: Google::Apis::SlidesV1::VideoProperties, decorator: Google::Apis::SlidesV1::VideoProperties::Representation + + end + end + + class PageProperties + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :page_background_fill, as: 'pageBackgroundFill', class: Google::Apis::SlidesV1::PageBackgroundFill, decorator: Google::Apis::SlidesV1::PageBackgroundFill::Representation + + property :color_scheme, as: 'colorScheme', class: Google::Apis::SlidesV1::ColorScheme, decorator: Google::Apis::SlidesV1::ColorScheme::Representation + + end + end + + class NestingLevel + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :bullet_style, as: 'bulletStyle', class: Google::Apis::SlidesV1::TextStyle, decorator: Google::Apis::SlidesV1::TextStyle::Representation + + end + end + + class TableCell + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :table_cell_properties, as: 'tableCellProperties', class: Google::Apis::SlidesV1::TableCellProperties, decorator: Google::Apis::SlidesV1::TableCellProperties::Representation + + property :location, as: 'location', class: Google::Apis::SlidesV1::TableCellLocation, decorator: Google::Apis::SlidesV1::TableCellLocation::Representation + + property :row_span, as: 'rowSpan' + property :column_span, as: 'columnSpan' + property :text, as: 'text', class: Google::Apis::SlidesV1::TextContent, decorator: Google::Apis::SlidesV1::TextContent::Representation + + end + end + + class UpdateLinePropertiesRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :fields, as: 'fields' + property :object_id_prop, as: 'objectId' + property :line_properties, as: 'lineProperties', class: Google::Apis::SlidesV1::LineProperties, decorator: Google::Apis::SlidesV1::LineProperties::Representation + + end + end + + class TableCellBackgroundFill + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :solid_fill, as: 'solidFill', class: Google::Apis::SlidesV1::SolidFill, decorator: Google::Apis::SlidesV1::SolidFill::Representation + + property :property_state, as: 'propertyState' + end + end + + class UpdateSlidesPositionRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :insertion_index, as: 'insertionIndex' + collection :slide_object_ids, as: 'slideObjectIds' + end + end + + class UpdatePagePropertiesRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :fields, as: 'fields' + property :object_id_prop, as: 'objectId' + property :page_properties, as: 'pageProperties', class: Google::Apis::SlidesV1::PageProperties, decorator: Google::Apis::SlidesV1::PageProperties::Representation + + end + end + + class Group + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :children, as: 'children', class: Google::Apis::SlidesV1::PageElement, decorator: Google::Apis::SlidesV1::PageElement::Representation + + end + end + + class Placeholder + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :parent_object_id, as: 'parentObjectId' + property :index, as: 'index' + property :type, as: 'type' + end + end + + class DuplicateObjectRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + hash :object_ids, as: 'objectIds' + property :object_id_prop, as: 'objectId' + end + end + + class ReplaceAllTextRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :replace_text, as: 'replaceText' + collection :page_object_ids, as: 'pageObjectIds' + property :contains_text, as: 'containsText', class: Google::Apis::SlidesV1::SubstringMatchCriteria, decorator: Google::Apis::SlidesV1::SubstringMatchCriteria::Representation + + end + end + + class Page + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :layout_properties, as: 'layoutProperties', class: Google::Apis::SlidesV1::LayoutProperties, decorator: Google::Apis::SlidesV1::LayoutProperties::Representation + + collection :page_elements, as: 'pageElements', class: Google::Apis::SlidesV1::PageElement, decorator: Google::Apis::SlidesV1::PageElement::Representation + + property :notes_properties, as: 'notesProperties', class: Google::Apis::SlidesV1::NotesProperties, decorator: Google::Apis::SlidesV1::NotesProperties::Representation + + property :page_type, as: 'pageType' + property :slide_properties, as: 'slideProperties', class: Google::Apis::SlidesV1::SlideProperties, decorator: Google::Apis::SlidesV1::SlideProperties::Representation + + property :page_properties, as: 'pageProperties', class: Google::Apis::SlidesV1::PageProperties, decorator: Google::Apis::SlidesV1::PageProperties::Representation + + property :object_id_prop, as: 'objectId' + property :revision_id, as: 'revisionId' + end + end + + class ShapeBackgroundFill + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :solid_fill, as: 'solidFill', class: Google::Apis::SlidesV1::SolidFill, decorator: Google::Apis::SlidesV1::SolidFill::Representation + + property :property_state, as: 'propertyState' + end + end + + class CropProperties + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :bottom_offset, as: 'bottomOffset' + property :angle, as: 'angle' + property :top_offset, as: 'topOffset' + property :left_offset, as: 'leftOffset' + property :right_offset, as: 'rightOffset' + end + end + + class ReplaceAllShapesWithSheetsChartRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :spreadsheet_id, as: 'spreadsheetId' + property :linking_mode, as: 'linkingMode' + property :contains_text, as: 'containsText', class: Google::Apis::SlidesV1::SubstringMatchCriteria, decorator: Google::Apis::SlidesV1::SubstringMatchCriteria::Representation + + property :chart_id, as: 'chartId' + collection :page_object_ids, as: 'pageObjectIds' + end + end + + class Range + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :start_index, as: 'startIndex' + property :end_index, as: 'endIndex' + property :type, as: 'type' + end + end + + class ColorStop + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :alpha, as: 'alpha' + property :position, as: 'position' + property :color, as: 'color', class: Google::Apis::SlidesV1::OpaqueColor, decorator: Google::Apis::SlidesV1::OpaqueColor::Representation + + end + end + + class CreateVideoRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :object_id_prop, as: 'objectId' + property :source, as: 'source' + property :element_properties, as: 'elementProperties', class: Google::Apis::SlidesV1::PageElementProperties, decorator: Google::Apis::SlidesV1::PageElementProperties::Representation + + property :id, as: 'id' + end + end + + class DuplicateObjectResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :object_id_prop, as: 'objectId' + end + end + + class ReplaceAllShapesWithImageRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :contains_text, as: 'containsText', class: Google::Apis::SlidesV1::SubstringMatchCriteria, decorator: Google::Apis::SlidesV1::SubstringMatchCriteria::Representation + + collection :page_object_ids, as: 'pageObjectIds' + property :image_url, as: 'imageUrl' + property :replace_method, as: 'replaceMethod' + end + end + + class Shadow + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :property_state, as: 'propertyState' + property :blur_radius, as: 'blurRadius', class: Google::Apis::SlidesV1::Dimension, decorator: Google::Apis::SlidesV1::Dimension::Representation + + property :type, as: 'type' + property :transform, as: 'transform', class: Google::Apis::SlidesV1::AffineTransform, decorator: Google::Apis::SlidesV1::AffineTransform::Representation + + property :alignment, as: 'alignment' + property :alpha, as: 'alpha' + property :color, as: 'color', class: Google::Apis::SlidesV1::OpaqueColor, decorator: Google::Apis::SlidesV1::OpaqueColor::Representation + + property :rotate_with_shape, as: 'rotateWithShape' + end + end + + class DeleteTableRowRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :cell_location, as: 'cellLocation', class: Google::Apis::SlidesV1::TableCellLocation, decorator: Google::Apis::SlidesV1::TableCellLocation::Representation + + property :table_object_id, as: 'tableObjectId' + end + end + + class Bullet + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :list_id, as: 'listId' + property :glyph, as: 'glyph' + property :nesting_level, as: 'nestingLevel' + property :bullet_style, as: 'bulletStyle', class: Google::Apis::SlidesV1::TextStyle, decorator: Google::Apis::SlidesV1::TextStyle::Representation + + end + end + + class OutlineFill + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :solid_fill, as: 'solidFill', class: Google::Apis::SlidesV1::SolidFill, decorator: Google::Apis::SlidesV1::SolidFill::Representation + + end + end end end end diff --git a/generated/google/apis/slides_v1/service.rb b/generated/google/apis/slides_v1/service.rb index 0003aea10..97f09ebd5 100644 --- a/generated/google/apis/slides_v1/service.rb +++ b/generated/google/apis/slides_v1/service.rb @@ -50,11 +50,11 @@ module Google # Gets the latest version of the specified presentation. # @param [String] presentation_id # The ID of the presentation to retrieve. + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -67,13 +67,13 @@ 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 get_presentation(presentation_id, quota_user: nil, fields: nil, options: nil, &block) + def get_presentation(presentation_id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/presentations/{+presentationId}', options) command.response_representation = Google::Apis::SlidesV1::Presentation::Representation command.response_class = Google::Apis::SlidesV1::Presentation command.params['presentationId'] = presentation_id unless presentation_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -81,11 +81,11 @@ module Google # fields in the request are ignored. # Returns the created presentation. # @param [Google::Apis::SlidesV1::Presentation] presentation_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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -98,14 +98,14 @@ 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 create_presentation(presentation_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def create_presentation(presentation_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/presentations', options) command.request_representation = Google::Apis::SlidesV1::Presentation::Representation command.request_object = presentation_object command.response_representation = Google::Apis::SlidesV1::Presentation::Representation command.response_class = Google::Apis::SlidesV1::Presentation - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -129,11 +129,11 @@ module Google # @param [String] presentation_id # The presentation to apply the updates to. # @param [Google::Apis::SlidesV1::BatchUpdatePresentationRequest] batch_update_presentation_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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -146,15 +146,48 @@ 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 batch_update_presentation(presentation_id, batch_update_presentation_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def batch_update_presentation(presentation_id, batch_update_presentation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/presentations/{presentationId}:batchUpdate', options) command.request_representation = Google::Apis::SlidesV1::BatchUpdatePresentationRequest::Representation command.request_object = batch_update_presentation_request_object command.response_representation = Google::Apis::SlidesV1::BatchUpdatePresentationResponse::Representation command.response_class = Google::Apis::SlidesV1::BatchUpdatePresentationResponse command.params['presentationId'] = presentation_id unless presentation_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets the latest version of the specified page in the presentation. + # @param [String] presentation_id + # The ID of the presentation to retrieve. + # @param [String] page_object_id + # The object ID of the page to retrieve. + # @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::SlidesV1::Page] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SlidesV1::Page] + # + # @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_presentation_page(presentation_id, page_object_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/presentations/{presentationId}/pages/{pageObjectId}', options) + command.response_representation = Google::Apis::SlidesV1::Page::Representation + command.response_class = Google::Apis::SlidesV1::Page + command.params['presentationId'] = presentation_id unless presentation_id.nil? + command.params['pageObjectId'] = page_object_id unless page_object_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -171,11 +204,11 @@ module Google # The optional thumbnail image size. # If you don't specify the size, the server chooses a default size of the # image. + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -188,7 +221,7 @@ 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 get_presentation_page_thumbnail(presentation_id, page_object_id, thumbnail_properties_mime_type: nil, thumbnail_properties_thumbnail_size: nil, quota_user: nil, fields: nil, options: nil, &block) + def get_presentation_page_thumbnail(presentation_id, page_object_id, thumbnail_properties_mime_type: nil, thumbnail_properties_thumbnail_size: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/presentations/{presentationId}/pages/{pageObjectId}/thumbnail', options) command.response_representation = Google::Apis::SlidesV1::Thumbnail::Representation command.response_class = Google::Apis::SlidesV1::Thumbnail @@ -196,41 +229,8 @@ module Google command.params['pageObjectId'] = page_object_id unless page_object_id.nil? command.query['thumbnailProperties.mimeType'] = thumbnail_properties_mime_type unless thumbnail_properties_mime_type.nil? command.query['thumbnailProperties.thumbnailSize'] = thumbnail_properties_thumbnail_size unless thumbnail_properties_thumbnail_size.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Gets the latest version of the specified page in the presentation. - # @param [String] presentation_id - # The ID of the presentation to retrieve. - # @param [String] page_object_id - # The object ID of the page to retrieve. - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SlidesV1::Page] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SlidesV1::Page] - # - # @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_presentation_page(presentation_id, page_object_id, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/presentations/{presentationId}/pages/{pageObjectId}', options) - command.response_representation = Google::Apis::SlidesV1::Page::Representation - command.response_class = Google::Apis::SlidesV1::Page - command.params['presentationId'] = presentation_id unless presentation_id.nil? - command.params['pageObjectId'] = page_object_id unless page_object_id.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end diff --git a/generated/google/apis/sourcerepo_v1.rb b/generated/google/apis/sourcerepo_v1.rb index 00d81fc45..3721a7a72 100644 --- a/generated/google/apis/sourcerepo_v1.rb +++ b/generated/google/apis/sourcerepo_v1.rb @@ -22,10 +22,10 @@ module Google # # Access source code repositories hosted by Google. # - # @see https://cloud.google.com/eap/cloud-repositories/cloud-sourcerepo-api + # @see https://cloud.google.com/source-repositories/docs/apis module SourcerepoV1 VERSION = 'V1' - REVISION = '20170410' + REVISION = '20170502' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/sourcerepo_v1/classes.rb b/generated/google/apis/sourcerepo_v1/classes.rb index 8befd4afa..9b853c67d 100644 --- a/generated/google/apis/sourcerepo_v1/classes.rb +++ b/generated/google/apis/sourcerepo_v1/classes.rb @@ -22,388 +22,23 @@ module Google module Apis module SourcerepoV1 - # 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] - 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 - - # 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). - class Policy - include Google::Apis::Core::Hashable - - # `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 - - # - # Corresponds to the JSON property `iamOwned` - # @return [Boolean] - attr_accessor :iam_owned - alias_method :iam_owned?, :iam_owned - - # If more than one rule is specified, the rules are applied in the following - # manner: - # - All matching LOG rules are always applied. - # - If any DENY/DENY_WITH_LOG rule matches, permission is denied. - # Logging will be applied if one or more matching rule requires logging. - # - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is - # granted. - # Logging will be applied if one or more matching rule requires logging. - # - Otherwise, if no rule applies, permission is denied. - # Corresponds to the JSON property `rules` - # @return [Array] - attr_accessor :rules - - # Version of the `Policy`. The default version is 0. - # Corresponds to the JSON property `version` - # @return [Fixnum] - attr_accessor :version - - # Specifies cloud audit logging configuration for this policy. - # Corresponds to the JSON property `auditConfigs` - # @return [Array] - attr_accessor :audit_configs - - # Associates a list of `members` to a `role`. - # Multiple `bindings` must not be specified for the same `role`. - # `bindings` with no members will result in an error. - # Corresponds to the JSON property `bindings` - # @return [Array] - attr_accessor :bindings - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @etag = args[:etag] if args.key?(:etag) - @iam_owned = args[:iam_owned] if args.key?(:iam_owned) - @rules = args[:rules] if args.key?(:rules) - @version = args[:version] if args.key?(:version) - @audit_configs = args[:audit_configs] if args.key?(:audit_configs) - @bindings = args[:bindings] if args.key?(:bindings) - end - end - - # Write a Data Access (Gin) log - class DataAccessOptions - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # 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 AuditConifg 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 - # AuditConfig 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] - attr_accessor :audit_log_configs - - # - # Corresponds to the JSON property `exemptedMembers` - # @return [Array] - 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. - # 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) - @exempted_members = args[:exempted_members] if args.key?(:exempted_members) - @service = args[:service] if args.key?(:service) - 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). - # Corresponds to the JSON property `policy` - # @return [Google::Apis::SourcerepoV1::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 - - # Write a Cloud Audit log - class CloudAuditOptions - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - 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] - 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 - - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # service Foo ` - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # ` - # The JSON representation for `Empty` is empty JSON object ````. - class Empty - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # Configuration to automatically mirror a repository from another - # hosting service, for example GitHub or BitBucket. - class MirrorConfig - include Google::Apis::Core::Hashable - - # ID of the SSH deploy key at the other hosting service. - # Removing this key from the other service would deauthorize - # Google Cloud Source Repositories from mirroring. - # Corresponds to the JSON property `deployKeyId` - # @return [String] - attr_accessor :deploy_key_id - - # URL of the main repository at the other hosting service. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - # ID of the webhook listening to updates to trigger mirroring. - # Removing this webook from the other hosting service will stop - # Google Cloud Source Repositories from receiving notifications, - # and thereby disabling mirroring. - # Corresponds to the JSON property `webhookId` - # @return [String] - attr_accessor :webhook_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @deploy_key_id = args[:deploy_key_id] if args.key?(:deploy_key_id) - @url = args[:url] if args.key?(:url) - @webhook_id = args[:webhook_id] if args.key?(:webhook_id) - end - end - # A repository (or repo) is a Git repository storing versioned source content. class Repo include Google::Apis::Core::Hashable + # Configuration to automatically mirror a repository from another + # hosting service, for example GitHub or BitBucket. + # Corresponds to the JSON property `mirrorConfig` + # @return [Google::Apis::SourcerepoV1::MirrorConfig] + attr_accessor :mirror_config + # URL to clone the repository from Google Cloud Source Repositories. # Corresponds to the JSON property `url` # @return [String] attr_accessor :url - # The size in bytes of the repo. + # The disk usage of the repo, in bytes. + # Only returned by GetRepo. # Corresponds to the JSON property `size` # @return [Fixnum] attr_accessor :size @@ -414,61 +49,16 @@ module Google # @return [String] attr_accessor :name - # Configuration to automatically mirror a repository from another - # hosting service, for example GitHub or BitBucket. - # Corresponds to the JSON property `mirrorConfig` - # @return [Google::Apis::SourcerepoV1::MirrorConfig] - attr_accessor :mirror_config - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @mirror_config = args[:mirror_config] if args.key?(:mirror_config) @url = args[:url] if args.key?(:url) @size = args[:size] if args.key?(:size) @name = args[:name] if args.key?(:name) - @mirror_config = args[:mirror_config] if args.key?(:mirror_config) - 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] - 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 for ListRepos. - class ListReposResponse - include Google::Apis::Core::Hashable - - # The listed repos. - # Corresponds to the JSON property `repos` - # @return [Array] - attr_accessor :repos - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @repos = args[:repos] if args.key?(:repos) end end @@ -476,17 +66,17 @@ module Google class Condition include Google::Apis::Core::Hashable - # DEPRECATED. Use 'values' instead. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - # Trusted attributes supplied by any service that owns resources and uses # the IAM system for access control. # Corresponds to the JSON property `sys` # @return [String] attr_accessor :sys + # DEPRECATED. Use 'values' instead. + # Corresponds to the JSON property `value` + # @return [String] + attr_accessor :value + # Trusted attributes supplied by the IAM system. # Corresponds to the JSON property `iam` # @return [String] @@ -513,8 +103,8 @@ module Google # Update properties of this object def update!(**args) - @value = args[:value] if args.key?(:value) @sys = args[:sys] if args.key?(:sys) + @value = args[:value] if args.key?(:value) @iam = args[:iam] if args.key?(:iam) @values = args[:values] if args.key?(:values) @op = args[:op] if args.key?(:op) @@ -522,6 +112,53 @@ module Google end end + # Response for ListRepos. + class ListReposResponse + include Google::Apis::Core::Hashable + + # If non-empty, additional repositories exist within the project. These + # can be retrieved by including this value in the next ListReposRequest's + # page_token field. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The listed repos. + # Corresponds to the JSON property `repos` + # @return [Array] + attr_accessor :repos + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @repos = args[:repos] if args.key?(:repos) + 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] + 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 + # Options for counters class CounterOptions include Google::Apis::Core::Hashable @@ -656,6 +293,11 @@ module Google class LogConfig include Google::Apis::Core::Hashable + # Write a Data Access (Gin) log + # Corresponds to the JSON property `dataAccess` + # @return [Google::Apis::SourcerepoV1::DataAccessOptions] + attr_accessor :data_access + # Write a Cloud Audit log # Corresponds to the JSON property `cloudAudit` # @return [Google::Apis::SourcerepoV1::CloudAuditOptions] @@ -666,10 +308,29 @@ module Google # @return [Google::Apis::SourcerepoV1::CounterOptions] attr_accessor :counter - # Write a Data Access (Gin) log - # Corresponds to the JSON property `dataAccess` - # @return [Google::Apis::SourcerepoV1::DataAccessOptions] - attr_accessor :data_access + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @data_access = args[:data_access] if args.key?(:data_access) + @cloud_audit = args[:cloud_audit] if args.key?(:cloud_audit) + @counter = args[:counter] if args.key?(:counter) + 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] + attr_accessor :permissions def initialize(**args) update!(**args) @@ -677,9 +338,357 @@ module Google # Update properties of this object def update!(**args) - @cloud_audit = args[:cloud_audit] if args.key?(:cloud_audit) - @counter = args[:counter] if args.key?(:counter) - @data_access = args[:data_access] if args.key?(:data_access) + @permissions = args[:permissions] if args.key?(:permissions) + 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). + class Policy + include Google::Apis::Core::Hashable + + # Associates a list of `members` to a `role`. + # Multiple `bindings` must not be specified for the same `role`. + # `bindings` with no members will result in an error. + # Corresponds to the JSON property `bindings` + # @return [Array] + 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 + + # + # Corresponds to the JSON property `iamOwned` + # @return [Boolean] + attr_accessor :iam_owned + alias_method :iam_owned?, :iam_owned + + # If more than one rule is specified, the rules are applied in the following + # manner: + # - All matching LOG rules are always applied. + # - If any DENY/DENY_WITH_LOG rule matches, permission is denied. + # Logging will be applied if one or more matching rule requires logging. + # - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is + # granted. + # Logging will be applied if one or more matching rule requires logging. + # - Otherwise, if no rule applies, permission is denied. + # Corresponds to the JSON property `rules` + # @return [Array] + attr_accessor :rules + + # Version of the `Policy`. The default version is 0. + # Corresponds to the JSON property `version` + # @return [Fixnum] + attr_accessor :version + + # Specifies cloud audit logging configuration for this policy. + # Corresponds to the JSON property `auditConfigs` + # @return [Array] + attr_accessor :audit_configs + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @bindings = args[:bindings] if args.key?(:bindings) + @etag = args[:etag] if args.key?(:etag) + @iam_owned = args[:iam_owned] if args.key?(:iam_owned) + @rules = args[:rules] if args.key?(:rules) + @version = args[:version] if args.key?(:version) + @audit_configs = args[:audit_configs] if args.key?(:audit_configs) + end + end + + # Write a Data Access (Gin) log + class DataAccessOptions + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # 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 + # AuditConfig 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 + + # 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 + + # The configuration for logging of each type of permission. + # Next ID: 4 + # Corresponds to the JSON property `auditLogConfigs` + # @return [Array] + attr_accessor :audit_log_configs + + # + # Corresponds to the JSON property `exemptedMembers` + # @return [Array] + attr_accessor :exempted_members + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @service = args[:service] if args.key?(:service) + @audit_log_configs = args[:audit_log_configs] if args.key?(:audit_log_configs) + @exempted_members = args[:exempted_members] if args.key?(:exempted_members) + 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). + # Corresponds to the JSON property `policy` + # @return [Google::Apis::SourcerepoV1::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 + + # Write a Cloud Audit log + class CloudAuditOptions + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + 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] + 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 + + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # service Foo ` + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # ` + # The JSON representation for `Empty` is empty JSON object ````. + class Empty + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Configuration to automatically mirror a repository from another + # hosting service, for example GitHub or BitBucket. + class MirrorConfig + include Google::Apis::Core::Hashable + + # ID of the webhook listening to updates to trigger mirroring. + # Removing this webook from the other hosting service will stop + # Google Cloud Source Repositories from receiving notifications, + # and thereby disabling mirroring. + # Corresponds to the JSON property `webhookId` + # @return [String] + attr_accessor :webhook_id + + # ID of the SSH deploy key at the other hosting service. + # Removing this key from the other service would deauthorize + # Google Cloud Source Repositories from mirroring. + # Corresponds to the JSON property `deployKeyId` + # @return [String] + attr_accessor :deploy_key_id + + # URL of the main repository at the other hosting service. + # Corresponds to the JSON property `url` + # @return [String] + attr_accessor :url + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @webhook_id = args[:webhook_id] if args.key?(:webhook_id) + @deploy_key_id = args[:deploy_key_id] if args.key?(:deploy_key_id) + @url = args[:url] if args.key?(:url) end end end diff --git a/generated/google/apis/sourcerepo_v1/representations.rb b/generated/google/apis/sourcerepo_v1/representations.rb index b9eb85c41..61c5a56d1 100644 --- a/generated/google/apis/sourcerepo_v1/representations.rb +++ b/generated/google/apis/sourcerepo_v1/representations.rb @@ -22,67 +22,13 @@ module Google module Apis module SourcerepoV1 - class TestIamPermissionsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Policy - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DataAccessOptions - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AuditConfig - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SetIamPolicyRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CloudAuditOptions - 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 Empty - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class MirrorConfig - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class Repo class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class TestIamPermissionsResponse + class Condition class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -94,7 +40,7 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class Condition + class TestIamPermissionsResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -125,88 +71,87 @@ module Google end class TestIamPermissionsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :permissions, as: 'permissions' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class Policy - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :etag, :base64 => true, as: 'etag' - property :iam_owned, as: 'iamOwned' - collection :rules, as: 'rules', class: Google::Apis::SourcerepoV1::Rule, decorator: Google::Apis::SourcerepoV1::Rule::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :version, as: 'version' - collection :audit_configs, as: 'auditConfigs', class: Google::Apis::SourcerepoV1::AuditConfig, decorator: Google::Apis::SourcerepoV1::AuditConfig::Representation - - collection :bindings, as: 'bindings', class: Google::Apis::SourcerepoV1::Binding, decorator: Google::Apis::SourcerepoV1::Binding::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class DataAccessOptions - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class AuditConfig - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :audit_log_configs, as: 'auditLogConfigs', class: Google::Apis::SourcerepoV1::AuditLogConfig, decorator: Google::Apis::SourcerepoV1::AuditLogConfig::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - collection :exempted_members, as: 'exemptedMembers' - property :service, as: 'service' - end + include Google::Apis::Core::JsonObjectSupport end class SetIamPolicyRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :policy, as: 'policy', class: Google::Apis::SourcerepoV1::Policy, decorator: Google::Apis::SourcerepoV1::Policy::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :update_mask, as: 'updateMask' - end + include Google::Apis::Core::JsonObjectSupport end class CloudAuditOptions - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class Binding - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :members, as: 'members' - property :role, as: 'role' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class Empty - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class MirrorConfig - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :deploy_key_id, as: 'deployKeyId' - property :url, as: 'url' - property :webhook_id, as: 'webhookId' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class Repo # @private class Representation < Google::Apis::Core::JsonRepresentation + property :mirror_config, as: 'mirrorConfig', class: Google::Apis::SourcerepoV1::MirrorConfig, decorator: Google::Apis::SourcerepoV1::MirrorConfig::Representation + property :url, as: 'url' property :size, :numeric_string => true, as: 'size' property :name, as: 'name' - property :mirror_config, as: 'mirrorConfig', class: Google::Apis::SourcerepoV1::MirrorConfig, decorator: Google::Apis::SourcerepoV1::MirrorConfig::Representation + end + end + + class Condition + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :sys, as: 'sys' + property :value, as: 'value' + property :iam, as: 'iam' + collection :values, as: 'values' + property :op, as: 'op' + property :svc, as: 'svc' + end + end + + class ListReposResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :repos, as: 'repos', class: Google::Apis::SourcerepoV1::Repo, decorator: Google::Apis::SourcerepoV1::Repo::Representation end end @@ -218,26 +163,6 @@ module Google end end - class ListReposResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :repos, as: 'repos', class: Google::Apis::SourcerepoV1::Repo, decorator: Google::Apis::SourcerepoV1::Repo::Representation - - end - end - - class Condition - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :value, as: 'value' - property :sys, as: 'sys' - property :iam, as: 'iam' - collection :values, as: 'values' - property :op, as: 'op' - property :svc, as: 'svc' - end - end - class CounterOptions # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -272,12 +197,88 @@ module Google class LogConfig # @private class Representation < Google::Apis::Core::JsonRepresentation + property :data_access, as: 'dataAccess', class: Google::Apis::SourcerepoV1::DataAccessOptions, decorator: Google::Apis::SourcerepoV1::DataAccessOptions::Representation + property :cloud_audit, as: 'cloudAudit', class: Google::Apis::SourcerepoV1::CloudAuditOptions, decorator: Google::Apis::SourcerepoV1::CloudAuditOptions::Representation property :counter, as: 'counter', class: Google::Apis::SourcerepoV1::CounterOptions, decorator: Google::Apis::SourcerepoV1::CounterOptions::Representation - property :data_access, as: 'dataAccess', class: Google::Apis::SourcerepoV1::DataAccessOptions, decorator: Google::Apis::SourcerepoV1::DataAccessOptions::Representation + end + end + class TestIamPermissionsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :permissions, as: 'permissions' + end + end + + class Policy + # @private + class Representation < Google::Apis::Core::JsonRepresentation + 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' + collection :rules, as: 'rules', class: Google::Apis::SourcerepoV1::Rule, decorator: Google::Apis::SourcerepoV1::Rule::Representation + + property :version, as: 'version' + collection :audit_configs, as: 'auditConfigs', class: Google::Apis::SourcerepoV1::AuditConfig, decorator: Google::Apis::SourcerepoV1::AuditConfig::Representation + + end + end + + class DataAccessOptions + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class AuditConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :service, as: 'service' + collection :audit_log_configs, as: 'auditLogConfigs', class: Google::Apis::SourcerepoV1::AuditLogConfig, decorator: Google::Apis::SourcerepoV1::AuditLogConfig::Representation + + collection :exempted_members, as: 'exemptedMembers' + end + end + + class SetIamPolicyRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :policy, as: 'policy', class: Google::Apis::SourcerepoV1::Policy, decorator: Google::Apis::SourcerepoV1::Policy::Representation + + property :update_mask, as: 'updateMask' + end + end + + class CloudAuditOptions + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class Binding + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :members, as: 'members' + property :role, as: 'role' + end + end + + class Empty + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class MirrorConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :webhook_id, as: 'webhookId' + property :deploy_key_id, as: 'deployKeyId' + property :url, as: 'url' end end end diff --git a/generated/google/apis/sourcerepo_v1/service.rb b/generated/google/apis/sourcerepo_v1/service.rb index d652a5335..80c834573 100644 --- a/generated/google/apis/sourcerepo_v1/service.rb +++ b/generated/google/apis/sourcerepo_v1/service.rb @@ -30,7 +30,7 @@ module Google # Sourcerepo = Google::Apis::SourcerepoV1 # Alias the module # service = Sourcerepo::CloudSourceRepositoriesService.new # - # @see https://cloud.google.com/eap/cloud-repositories/cloud-sourcerepo-api + # @see https://cloud.google.com/source-repositories/docs/apis class CloudSourceRepositoriesService < Google::Apis::Core::BaseService # @return [String] # API key. Your API key identifies your project and provides you with API access, @@ -51,11 +51,11 @@ module Google # @param [String] name # The name of the repo to delete. Values are of the form # `projects//repos/`. + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -68,13 +68,13 @@ 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 delete_project_repo(name, quota_user: nil, fields: nil, options: nil, &block) + def delete_project_repo(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', options) command.response_representation = Google::Apis::SourcerepoV1::Empty::Representation command.response_class = Google::Apis::SourcerepoV1::Empty command.params['name'] = name unless name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -82,11 +82,18 @@ module Google # @param [String] name # The project ID whose repos should be listed. Values are of the form # `projects/`. + # @param [String] page_token + # Resume listing repositories where a prior ListReposResponse + # left off. This is an opaque token that must be obtained from + # a recent, prior ListReposResponse's next_page_token field. + # @param [Fixnum] page_size + # Maximum number of repositories to return; between 1 and 500. + # If not set or zero, defaults to 100 at the server. + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -99,48 +106,15 @@ 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_project_repos(name, quota_user: nil, fields: nil, options: nil, &block) + def list_project_repos(name, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}/repos', options) command.response_representation = Google::Apis::SourcerepoV1::ListReposResponse::Representation command.response_class = Google::Apis::SourcerepoV1::ListReposResponse command.params['name'] = name unless name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Sets the access control policy on the specified resource. Replaces any - # existing policy. - # @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::SourcerepoV1::SetIamPolicyRequest] set_iam_policy_request_object - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SourcerepoV1::Policy] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SourcerepoV1::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_repo_iam_policy(resource, set_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options) - command.request_representation = Google::Apis::SourcerepoV1::SetIamPolicyRequest::Representation - command.request_object = set_iam_policy_request_object - command.response_representation = Google::Apis::SourcerepoV1::Policy::Representation - command.response_class = Google::Apis::SourcerepoV1::Policy - command.params['resource'] = resource unless resource.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -151,11 +125,11 @@ module Google # The project in which to create the repo. Values are of the form # `projects/`. # @param [Google::Apis::SourcerepoV1::Repo] repo_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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -168,29 +142,29 @@ 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 create_project_repo(parent, repo_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def create_project_repo(parent, repo_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/repos', options) command.request_representation = Google::Apis::SourcerepoV1::Repo::Representation command.request_object = repo_object command.response_representation = Google::Apis::SourcerepoV1::Repo::Representation command.response_class = Google::Apis::SourcerepoV1::Repo command.params['parent'] = parent unless parent.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end - # Gets the access control policy for a resource. - # Returns an empty policy if the resource exists and does not have a policy - # set. + # Sets the access control policy on the specified resource. Replaces any + # existing policy. # @param [String] resource - # REQUIRED: The resource for which the policy is being requested. + # REQUIRED: The resource for which the policy is being specified. # See the operation documentation for the appropriate value for this field. + # @param [Google::Apis::SourcerepoV1::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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -203,13 +177,48 @@ 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 get_project_repo_iam_policy(resource, quota_user: nil, fields: nil, options: nil, &block) + def set_repo_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::SourcerepoV1::SetIamPolicyRequest::Representation + command.request_object = set_iam_policy_request_object + command.response_representation = Google::Apis::SourcerepoV1::Policy::Representation + command.response_class = Google::Apis::SourcerepoV1::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 + + # Gets the access control policy for a resource. + # Returns an empty policy if the resource exists and does not have a policy + # set. + # @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::SourcerepoV1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SourcerepoV1::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_project_repo_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::SourcerepoV1::Policy::Representation command.response_class = Google::Apis::SourcerepoV1::Policy command.params['resource'] = resource unless resource.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -217,11 +226,11 @@ module Google # @param [String] name # The name of the requested repository. Values are of the form # `projects//repos/`. + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -234,13 +243,13 @@ 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 get_project_repo(name, quota_user: nil, fields: nil, options: nil, &block) + def get_project_repo(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', options) command.response_representation = Google::Apis::SourcerepoV1::Repo::Representation command.response_class = Google::Apis::SourcerepoV1::Repo command.params['name'] = name unless name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -251,11 +260,11 @@ module Google # 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::SourcerepoV1::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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -268,15 +277,15 @@ 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 test_repo_iam_permissions(resource, test_iam_permissions_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def test_repo_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::SourcerepoV1::TestIamPermissionsRequest::Representation command.request_object = test_iam_permissions_request_object command.response_representation = Google::Apis::SourcerepoV1::TestIamPermissionsResponse::Representation command.response_class = Google::Apis::SourcerepoV1::TestIamPermissionsResponse command.params['resource'] = resource unless resource.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end diff --git a/generated/google/apis/spanner_v1/classes.rb b/generated/google/apis/spanner_v1/classes.rb index 376ed1d62..0febcc740 100644 --- a/generated/google/apis/spanner_v1/classes.rb +++ b/generated/google/apis/spanner_v1/classes.rb @@ -22,10 +22,1810 @@ module Google module Apis module SpannerV1 + # A Cloud Spanner database. + class Database + include Google::Apis::Core::Hashable + + # Output only. The current database state. + # Corresponds to the JSON property `state` + # @return [String] + attr_accessor :state + + # Required. The name of the database. Values are of the form + # `projects//instances//databases/`, + # where `` is as specified in the `CREATE DATABASE` + # statement. This name can be passed to other API methods to + # identify the database. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @state = args[:state] if args.key?(:state) + @name = args[:name] if args.key?(:name) + end + end + + # An isolated set of Cloud Spanner resources on which databases can be hosted. + class Instance + include Google::Apis::Core::Hashable + + # Required. The descriptive name for this instance as it appears in UIs. + # Must be unique per project and between 4 and 30 characters in length. + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # Required. The number of nodes allocated to this instance. + # Corresponds to the JSON property `nodeCount` + # @return [Fixnum] + attr_accessor :node_count + + # Cloud Labels are a flexible and lightweight mechanism for organizing cloud + # resources into groups that reflect a customer's organizational needs and + # deployment strategies. Cloud Labels can be used to filter collections of + # resources. They can be used to control how resource metrics are aggregated. + # And they can be used as arguments to policy management rules (e.g. route, + # firewall, load balancing, etc.). + # * Label keys must be between 1 and 63 characters long and must conform to + # the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. + # * Label values must be between 0 and 63 characters long and must conform + # to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. + # * No more than 64 labels can be associated with a given resource. + # See https://goo.gl/xmQnxf for more information on and examples of labels. + # If you plan to use labels in your own code, please note that additional + # characters may be allowed in the future. And so you are advised to use an + # internal label representation, such as JSON, which doesn't rely upon + # specific characters being disallowed. For example, representing labels + # as the string: name + "_" + value would prove problematic if we were to + # allow "_" in a future release. + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # Required. The name of the instance's configuration. Values are of the form + # `projects//instanceConfigs/`. See + # also InstanceConfig and + # ListInstanceConfigs. + # Corresponds to the JSON property `config` + # @return [String] + attr_accessor :config + + # Output only. The current instance state. For + # CreateInstance, the state must be + # either omitted or set to `CREATING`. For + # UpdateInstance, the state must be + # either omitted or set to `READY`. + # Corresponds to the JSON property `state` + # @return [String] + attr_accessor :state + + # Required. A unique identifier for the instance, which cannot be changed + # after the instance is created. Values are of the form + # `projects//instances/a-z*[a-z0-9]`. The final + # segment of the name must be between 6 and 30 characters in length. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @display_name = args[:display_name] if args.key?(:display_name) + @node_count = args[:node_count] if args.key?(:node_count) + @labels = args[:labels] if args.key?(:labels) + @config = args[:config] if args.key?(:config) + @state = args[:state] if args.key?(:state) + @name = args[:name] if args.key?(:name) + 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). + # Corresponds to the JSON property `policy` + # @return [Google::Apis::SpannerV1::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 + + # The response for ListDatabases. + class ListDatabasesResponse + include Google::Apis::Core::Hashable + + # `next_page_token` can be sent in a subsequent + # ListDatabases call to fetch more + # of the matching databases. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # Databases that matched the request. + # Corresponds to the JSON property `databases` + # @return [Array] + attr_accessor :databases + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @databases = args[:databases] if args.key?(:databases) + end + end + + # The request for Rollback. + class RollbackRequest + include Google::Apis::Core::Hashable + + # Required. The transaction to roll back. + # Corresponds to the JSON property `transactionId` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :transaction_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @transaction_id = args[:transaction_id] if args.key?(:transaction_id) + end + end + + # A transaction. + class Transaction + include Google::Apis::Core::Hashable + + # For snapshot read-only transactions, the read timestamp chosen + # for the transaction. Not returned by default: see + # TransactionOptions.ReadOnly.return_read_timestamp. + # Corresponds to the JSON property `readTimestamp` + # @return [String] + attr_accessor :read_timestamp + + # `id` may be used to identify the transaction in subsequent + # Read, + # ExecuteSql, + # Commit, or + # Rollback calls. + # Single-use read-only transactions do not have IDs, because + # single-use transactions do not support multiple requests. + # Corresponds to the JSON property `id` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @read_timestamp = args[:read_timestamp] if args.key?(:read_timestamp) + @id = args[:id] if args.key?(:id) + end + end + + # Metadata type for the operation returned by + # UpdateDatabaseDdl. + class UpdateDatabaseDdlMetadata + include Google::Apis::Core::Hashable + + # The database being modified. + # Corresponds to the JSON property `database` + # @return [String] + attr_accessor :database + + # For an update this list contains all the statements. For an + # individual statement, this list contains only that statement. + # Corresponds to the JSON property `statements` + # @return [Array] + attr_accessor :statements + + # Reports the commit timestamps of all statements that have + # succeeded so far, where `commit_timestamps[i]` is the commit + # timestamp for the statement `statements[i]`. + # Corresponds to the JSON property `commitTimestamps` + # @return [Array] + attr_accessor :commit_timestamps + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @database = args[:database] if args.key?(:database) + @statements = args[:statements] if args.key?(:statements) + @commit_timestamps = args[:commit_timestamps] if args.key?(:commit_timestamps) + end + end + + # Options for counters + class CounterOptions + include Google::Apis::Core::Hashable + + # The metric to update. + # Corresponds to the JSON property `metric` + # @return [String] + attr_accessor :metric + + # The field value to attribute. + # Corresponds to the JSON property `field` + # @return [String] + attr_accessor :field + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @metric = args[:metric] if args.key?(:metric) + @field = args[:field] if args.key?(:field) + end + end + + # Contains an ordered list of nodes appearing in the query plan. + class QueryPlan + include Google::Apis::Core::Hashable + + # The nodes in the query plan. Plan nodes are returned in pre-order starting + # with the plan root. Each PlanNode's `id` corresponds to its index in + # `plan_nodes`. + # Corresponds to the JSON property `planNodes` + # @return [Array] + attr_accessor :plan_nodes + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @plan_nodes = args[:plan_nodes] if args.key?(:plan_nodes) + end + end + + # `StructType` defines the fields of a STRUCT type. + class StructType + include Google::Apis::Core::Hashable + + # The list of fields that make up this struct. Order is + # significant, because values of this struct type are represented as + # lists, where the order of field values matches the order of + # fields in the StructType. In turn, the order of fields + # matches the order of columns in a read request, or the order of + # fields in the `SELECT` clause of a query. + # Corresponds to the JSON property `fields` + # @return [Array] + attr_accessor :fields + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @fields = args[:fields] if args.key?(:fields) + end + end + + # Message representing a single field of a struct. + class Field + include Google::Apis::Core::Hashable + + # The name of the field. For reads, this is the column name. For + # SQL queries, it is the column alias (e.g., `"Word"` in the + # query `"SELECT 'hello' AS Word"`), or the column name (e.g., + # `"ColName"` in the query `"SELECT ColName FROM Table"`). Some + # columns might have an empty name (e.g., !"SELECT + # UPPER(ColName)"`). Note that a query result can contain + # multiple fields with the same name. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # `Type` indicates the type of a Cloud Spanner value, as might be stored in a + # table cell or returned from an SQL query. + # Corresponds to the JSON property `type` + # @return [Google::Apis::SpannerV1::Type] + attr_accessor :type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @name = args[:name] if args.key?(:name) + @type = args[:type] if args.key?(:type) + end + end + + # Additional statistics about a ResultSet or PartialResultSet. + class ResultSetStats + include Google::Apis::Core::Hashable + + # Aggregated statistics from the execution of the query. Only present when + # the query is profiled. For example, a query could return the statistics as + # follows: + # ` + # "rows_returned": "3", + # "elapsed_time": "1.22 secs", + # "cpu_time": "1.19 secs" + # ` + # Corresponds to the JSON property `queryStats` + # @return [Hash] + attr_accessor :query_stats + + # Contains an ordered list of nodes appearing in the query plan. + # Corresponds to the JSON property `queryPlan` + # @return [Google::Apis::SpannerV1::QueryPlan] + attr_accessor :query_plan + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @query_stats = args[:query_stats] if args.key?(:query_stats) + @query_plan = args[:query_plan] if args.key?(:query_plan) + end + end + + # Request message for `TestIamPermissions` method. + class TestIamPermissionsRequest + include Google::Apis::Core::Hashable + + # REQUIRED: The set of permissions to check for 'resource'. + # Permissions with wildcards (such as '*', 'spanner.*', 'spanner.instances.*') + # are not allowed. + # Corresponds to the JSON property `permissions` + # @return [Array] + 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 response for Commit. + class CommitResponse + include Google::Apis::Core::Hashable + + # The Cloud Spanner timestamp at which the transaction committed. + # Corresponds to the JSON property `commitTimestamp` + # @return [String] + attr_accessor :commit_timestamp + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @commit_timestamp = args[:commit_timestamp] if args.key?(:commit_timestamp) + end + end + + # `Type` indicates the type of a Cloud Spanner value, as might be stored in a + # table cell or returned from an SQL query. + class Type + include Google::Apis::Core::Hashable + + # Required. The TypeCode for this type. + # Corresponds to the JSON property `code` + # @return [String] + attr_accessor :code + + # `StructType` defines the fields of a STRUCT type. + # Corresponds to the JSON property `structType` + # @return [Google::Apis::SpannerV1::StructType] + attr_accessor :struct_type + + # `Type` indicates the type of a Cloud Spanner value, as might be stored in a + # table cell or returned from an SQL query. + # Corresponds to the JSON property `arrayElementType` + # @return [Google::Apis::SpannerV1::Type] + attr_accessor :array_element_type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @code = args[:code] if args.key?(:code) + @struct_type = args[:struct_type] if args.key?(:struct_type) + @array_element_type = args[:array_element_type] if args.key?(:array_element_type) + end + end + + # Node information for nodes appearing in a QueryPlan.plan_nodes. + class PlanNode + include Google::Apis::Core::Hashable + + # Attributes relevant to the node contained in a group of key-value pairs. + # For example, a Parameter Reference node could have the following + # information in its metadata: + # ` + # "parameter_reference": "param1", + # "parameter_type": "array" + # ` + # Corresponds to the JSON property `metadata` + # @return [Hash] + attr_accessor :metadata + + # The execution statistics associated with the node, contained in a group of + # key-value pairs. Only present if the plan was returned as a result of a + # profile query. For example, number of executions, number of rows/time per + # execution etc. + # Corresponds to the JSON property `executionStats` + # @return [Hash] + attr_accessor :execution_stats + + # Condensed representation of a node and its subtree. Only present for + # `SCALAR` PlanNode(s). + # Corresponds to the JSON property `shortRepresentation` + # @return [Google::Apis::SpannerV1::ShortRepresentation] + attr_accessor :short_representation + + # The `PlanNode`'s index in node list. + # Corresponds to the JSON property `index` + # @return [Fixnum] + attr_accessor :index + + # The display name for the node. + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # Used to determine the type of node. May be needed for visualizing + # different kinds of nodes differently. For example, If the node is a + # SCALAR node, it will have a condensed representation + # which can be used to directly embed a description of the node in its + # parent. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # List of child node `index`es and their relationship to this parent. + # Corresponds to the JSON property `childLinks` + # @return [Array] + attr_accessor :child_links + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @metadata = args[:metadata] if args.key?(:metadata) + @execution_stats = args[:execution_stats] if args.key?(:execution_stats) + @short_representation = args[:short_representation] if args.key?(:short_representation) + @index = args[:index] if args.key?(:index) + @display_name = args[:display_name] if args.key?(:display_name) + @kind = args[:kind] if args.key?(:kind) + @child_links = args[:child_links] if args.key?(:child_links) + end + end + + # Metadata type for the operation returned by + # CreateInstance. + class CreateInstanceMetadata + include Google::Apis::Core::Hashable + + # An isolated set of Cloud Spanner resources on which databases can be hosted. + # Corresponds to the JSON property `instance` + # @return [Google::Apis::SpannerV1::Instance] + attr_accessor :instance + + # The time at which the + # CreateInstance request was + # received. + # Corresponds to the JSON property `startTime` + # @return [String] + attr_accessor :start_time + + # The time at which this operation was cancelled. If set, this operation is + # in the process of undoing itself (which is guaranteed to succeed) and + # cannot be cancelled again. + # Corresponds to the JSON property `cancelTime` + # @return [String] + attr_accessor :cancel_time + + # The time at which this operation failed or was completed successfully. + # Corresponds to the JSON property `endTime` + # @return [String] + attr_accessor :end_time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @instance = args[:instance] if args.key?(:instance) + @start_time = args[:start_time] if args.key?(:start_time) + @cancel_time = args[:cancel_time] if args.key?(:cancel_time) + @end_time = args[:end_time] if args.key?(:end_time) + end + end + + # 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 AuditConifg 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 + # AuditConfig 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 + + # 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 + + # The configuration for logging of each type of permission. + # Next ID: 4 + # Corresponds to the JSON property `auditLogConfigs` + # @return [Array] + attr_accessor :audit_log_configs + + # + # Corresponds to the JSON property `exemptedMembers` + # @return [Array] + attr_accessor :exempted_members + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @service = args[:service] if args.key?(:service) + @audit_log_configs = args[:audit_log_configs] if args.key?(:audit_log_configs) + @exempted_members = args[:exempted_members] if args.key?(:exempted_members) + end + end + + # Metadata associated with a parent-child relationship appearing in a + # PlanNode. + class ChildLink + include Google::Apis::Core::Hashable + + # The type of the link. For example, in Hash Joins this could be used to + # distinguish between the build child and the probe child, or in the case + # of the child being an output variable, to represent the tag associated + # with the output variable. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # The node to which the link points. + # Corresponds to the JSON property `childIndex` + # @return [Fixnum] + attr_accessor :child_index + + # Only present if the child node is SCALAR and corresponds + # to an output variable of the parent node. The field carries the name of + # the output variable. + # For example, a `TableScan` operator that reads rows from a table will + # have child links to the `SCALAR` nodes representing the output variables + # created for each column that is read by the operator. The corresponding + # `variable` fields will be set to the variable names assigned to the + # columns. + # Corresponds to the JSON property `variable` + # @return [String] + attr_accessor :variable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @type = args[:type] if args.key?(:type) + @child_index = args[:child_index] if args.key?(:child_index) + @variable = args[:variable] if args.key?(:variable) + end + end + + # Write a Cloud Audit log + class CloudAuditOptions + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Arguments to delete operations. + class Delete + include Google::Apis::Core::Hashable + + # `KeySet` defines a collection of Cloud Spanner keys and/or key ranges. All + # the keys are expected to be in the same table or index. The keys need + # not be sorted in any particular way. + # If the same key is specified multiple times in the set (for example + # if two ranges, two keys, or a key and a range overlap), Cloud Spanner + # behaves as if the key were only specified once. + # Corresponds to the JSON property `keySet` + # @return [Google::Apis::SpannerV1::KeySet] + attr_accessor :key_set + + # Required. The table whose rows will be deleted. + # Corresponds to the JSON property `table` + # @return [String] + attr_accessor :table + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @key_set = args[:key_set] if args.key?(:key_set) + @table = args[:table] if args.key?(:table) + end + end + + # The response for ListInstanceConfigs. + class ListInstanceConfigsResponse + include Google::Apis::Core::Hashable + + # `next_page_token` can be sent in a subsequent + # ListInstanceConfigs call to + # fetch more of the matching instance configurations. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The list of requested instance configurations. + # Corresponds to the JSON property `instanceConfigs` + # @return [Array] + attr_accessor :instance_configs + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @instance_configs = args[:instance_configs] if args.key?(:instance_configs) + end + end + + # The request for BeginTransaction. + class BeginTransactionRequest + include Google::Apis::Core::Hashable + + # # Transactions + # Each session can have at most one active transaction at a time. After the + # active transaction is completed, the session can immediately be + # re-used for the next transaction. It is not necessary to create a + # new session for each transaction. + # # Transaction Modes + # Cloud Spanner supports two transaction modes: + # 1. Locking read-write. This type of transaction is the only way + # to write data into Cloud Spanner. These transactions rely on + # pessimistic locking and, if necessary, two-phase commit. + # Locking read-write transactions may abort, requiring the + # application to retry. + # 2. Snapshot read-only. This transaction type provides guaranteed + # consistency across several reads, but does not allow + # writes. Snapshot read-only transactions can be configured to + # read at timestamps in the past. Snapshot read-only + # transactions do not need to be committed. + # For transactions that only read, snapshot read-only transactions + # provide simpler semantics and are almost always faster. In + # particular, read-only transactions do not take locks, so they do + # not conflict with read-write transactions. As a consequence of not + # taking locks, they also do not abort, so retry loops are not needed. + # Transactions may only read/write data in a single database. They + # may, however, read/write data in different tables within that + # database. + # ## Locking Read-Write Transactions + # Locking transactions may be used to atomically read-modify-write + # data anywhere in a database. This type of transaction is externally + # consistent. + # Clients should attempt to minimize the amount of time a transaction + # is active. Faster transactions commit with higher probability + # and cause less contention. Cloud Spanner attempts to keep read locks + # active as long as the transaction continues to do reads, and the + # transaction has not been terminated by + # Commit or + # Rollback. Long periods of + # inactivity at the client may cause Cloud Spanner to release a + # transaction's locks and abort it. + # Reads performed within a transaction acquire locks on the data + # being read. Writes can only be done at commit time, after all reads + # have been completed. + # Conceptually, a read-write transaction consists of zero or more + # reads or SQL queries followed by + # Commit. At any time before + # Commit, the client can send a + # Rollback request to abort the + # transaction. + # ### Semantics + # Cloud Spanner can commit the transaction if all read locks it acquired + # are still valid at commit time, and it is able to acquire write + # locks for all writes. Cloud Spanner can abort the transaction for any + # reason. If a commit attempt returns `ABORTED`, Cloud Spanner guarantees + # that the transaction has not modified any user data in Cloud Spanner. + # Unless the transaction commits, Cloud Spanner makes no guarantees about + # how long the transaction's locks were held for. It is an error to + # use Cloud Spanner locks for any sort of mutual exclusion other than + # between Cloud Spanner transactions themselves. + # ### Retrying Aborted Transactions + # When a transaction aborts, the application can choose to retry the + # whole transaction again. To maximize the chances of successfully + # committing the retry, the client should execute the retry in the + # same session as the original attempt. The original session's lock + # priority increases with each consecutive abort, meaning that each + # attempt has a slightly better chance of success than the previous. + # Under some circumstances (e.g., many transactions attempting to + # modify the same row(s)), a transaction can abort many times in a + # short period before successfully committing. Thus, it is not a good + # idea to cap the number of retries a transaction can attempt; + # instead, it is better to limit the total amount of wall time spent + # retrying. + # ### Idle Transactions + # A transaction is considered idle if it has no outstanding reads or + # SQL queries and has not started a read or SQL query within the last 10 + # seconds. Idle transactions can be aborted by Cloud Spanner so that they + # don't hold on to locks indefinitely. In that case, the commit will + # fail with error `ABORTED`. + # If this behavior is undesirable, periodically executing a simple + # SQL query in the transaction (e.g., `SELECT 1`) prevents the + # transaction from becoming idle. + # ## Snapshot Read-Only Transactions + # Snapshot read-only transactions provides a simpler method than + # locking read-write transactions for doing several consistent + # reads. However, this type of transaction does not support writes. + # Snapshot transactions do not take locks. Instead, they work by + # choosing a Cloud Spanner timestamp, then executing all reads at that + # timestamp. Since they do not acquire locks, they do not block + # concurrent read-write transactions. + # Unlike locking read-write transactions, snapshot read-only + # transactions never abort. They can fail if the chosen read + # timestamp is garbage collected; however, the default garbage + # collection policy is generous enough that most applications do not + # need to worry about this in practice. + # Snapshot read-only transactions do not need to call + # Commit or + # Rollback (and in fact are not + # permitted to do so). + # To execute a snapshot transaction, the client specifies a timestamp + # bound, which tells Cloud Spanner how to choose a read timestamp. + # The types of timestamp bound are: + # - Strong (the default). + # - Bounded staleness. + # - Exact staleness. + # If the Cloud Spanner database to be read is geographically distributed, + # stale read-only transactions can execute more quickly than strong + # or read-write transaction, because they are able to execute far + # from the leader replica. + # Each type of timestamp bound is discussed in detail below. + # ### Strong + # Strong reads are guaranteed to see the effects of all transactions + # that have committed before the start of the read. Furthermore, all + # rows yielded by a single read are consistent with each other -- if + # any part of the read observes a transaction, all parts of the read + # see the transaction. + # Strong reads are not repeatable: two consecutive strong read-only + # transactions might return inconsistent results if there are + # concurrent writes. If consistency across reads is required, the + # reads should be executed within a transaction or at an exact read + # timestamp. + # See TransactionOptions.ReadOnly.strong. + # ### Exact Staleness + # These timestamp bounds execute reads at a user-specified + # timestamp. Reads at a timestamp are guaranteed to see a consistent + # prefix of the global transaction history: they observe + # modifications done by all transactions with a commit timestamp <= + # the read timestamp, and observe none of the modifications done by + # transactions with a larger commit timestamp. They will block until + # all conflicting transactions that may be assigned commit timestamps + # <= the read timestamp have finished. + # The timestamp can either be expressed as an absolute Cloud Spanner commit + # timestamp or a staleness relative to the current time. + # These modes do not require a "negotiation phase" to pick a + # timestamp. As a result, they execute slightly faster than the + # equivalent boundedly stale concurrency modes. On the other hand, + # boundedly stale reads usually return fresher results. + # See TransactionOptions.ReadOnly.read_timestamp and + # TransactionOptions.ReadOnly.exact_staleness. + # ### Bounded Staleness + # Bounded staleness modes allow Cloud Spanner to pick the read timestamp, + # subject to a user-provided staleness bound. Cloud Spanner chooses the + # newest timestamp within the staleness bound that allows execution + # of the reads at the closest available replica without blocking. + # All rows yielded are consistent with each other -- if any part of + # the read observes a transaction, all parts of the read see the + # transaction. Boundedly stale reads are not repeatable: two stale + # reads, even if they use the same staleness bound, can execute at + # different timestamps and thus return inconsistent results. + # Boundedly stale reads execute in two phases: the first phase + # negotiates a timestamp among all replicas needed to serve the + # read. In the second phase, reads are executed at the negotiated + # timestamp. + # As a result of the two phase execution, bounded staleness reads are + # usually a little slower than comparable exact staleness + # reads. However, they are typically able to return fresher + # results, and are more likely to execute at the closest replica. + # Because the timestamp negotiation requires up-front knowledge of + # which rows will be read, it can only be used with single-use + # read-only transactions. + # See TransactionOptions.ReadOnly.max_staleness and + # TransactionOptions.ReadOnly.min_read_timestamp. + # ### Old Read Timestamps and Garbage Collection + # Cloud Spanner continuously garbage collects deleted and overwritten data + # in the background to reclaim storage space. This process is known + # as "version GC". By default, version GC reclaims versions after they + # are one hour old. Because of this, Cloud Spanner cannot perform reads + # at read timestamps more than one hour in the past. This + # restriction also applies to in-progress reads and/or SQL queries whose + # timestamp become too old while executing. Reads and SQL queries with + # too-old read timestamps fail with the error `FAILED_PRECONDITION`. + # Corresponds to the JSON property `options` + # @return [Google::Apis::SpannerV1::TransactionOptions] + attr_accessor :options + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @options = args[:options] if args.key?(:options) + end + end + + # The request for Commit. + class CommitRequest + include Google::Apis::Core::Hashable + + # # Transactions + # Each session can have at most one active transaction at a time. After the + # active transaction is completed, the session can immediately be + # re-used for the next transaction. It is not necessary to create a + # new session for each transaction. + # # Transaction Modes + # Cloud Spanner supports two transaction modes: + # 1. Locking read-write. This type of transaction is the only way + # to write data into Cloud Spanner. These transactions rely on + # pessimistic locking and, if necessary, two-phase commit. + # Locking read-write transactions may abort, requiring the + # application to retry. + # 2. Snapshot read-only. This transaction type provides guaranteed + # consistency across several reads, but does not allow + # writes. Snapshot read-only transactions can be configured to + # read at timestamps in the past. Snapshot read-only + # transactions do not need to be committed. + # For transactions that only read, snapshot read-only transactions + # provide simpler semantics and are almost always faster. In + # particular, read-only transactions do not take locks, so they do + # not conflict with read-write transactions. As a consequence of not + # taking locks, they also do not abort, so retry loops are not needed. + # Transactions may only read/write data in a single database. They + # may, however, read/write data in different tables within that + # database. + # ## Locking Read-Write Transactions + # Locking transactions may be used to atomically read-modify-write + # data anywhere in a database. This type of transaction is externally + # consistent. + # Clients should attempt to minimize the amount of time a transaction + # is active. Faster transactions commit with higher probability + # and cause less contention. Cloud Spanner attempts to keep read locks + # active as long as the transaction continues to do reads, and the + # transaction has not been terminated by + # Commit or + # Rollback. Long periods of + # inactivity at the client may cause Cloud Spanner to release a + # transaction's locks and abort it. + # Reads performed within a transaction acquire locks on the data + # being read. Writes can only be done at commit time, after all reads + # have been completed. + # Conceptually, a read-write transaction consists of zero or more + # reads or SQL queries followed by + # Commit. At any time before + # Commit, the client can send a + # Rollback request to abort the + # transaction. + # ### Semantics + # Cloud Spanner can commit the transaction if all read locks it acquired + # are still valid at commit time, and it is able to acquire write + # locks for all writes. Cloud Spanner can abort the transaction for any + # reason. If a commit attempt returns `ABORTED`, Cloud Spanner guarantees + # that the transaction has not modified any user data in Cloud Spanner. + # Unless the transaction commits, Cloud Spanner makes no guarantees about + # how long the transaction's locks were held for. It is an error to + # use Cloud Spanner locks for any sort of mutual exclusion other than + # between Cloud Spanner transactions themselves. + # ### Retrying Aborted Transactions + # When a transaction aborts, the application can choose to retry the + # whole transaction again. To maximize the chances of successfully + # committing the retry, the client should execute the retry in the + # same session as the original attempt. The original session's lock + # priority increases with each consecutive abort, meaning that each + # attempt has a slightly better chance of success than the previous. + # Under some circumstances (e.g., many transactions attempting to + # modify the same row(s)), a transaction can abort many times in a + # short period before successfully committing. Thus, it is not a good + # idea to cap the number of retries a transaction can attempt; + # instead, it is better to limit the total amount of wall time spent + # retrying. + # ### Idle Transactions + # A transaction is considered idle if it has no outstanding reads or + # SQL queries and has not started a read or SQL query within the last 10 + # seconds. Idle transactions can be aborted by Cloud Spanner so that they + # don't hold on to locks indefinitely. In that case, the commit will + # fail with error `ABORTED`. + # If this behavior is undesirable, periodically executing a simple + # SQL query in the transaction (e.g., `SELECT 1`) prevents the + # transaction from becoming idle. + # ## Snapshot Read-Only Transactions + # Snapshot read-only transactions provides a simpler method than + # locking read-write transactions for doing several consistent + # reads. However, this type of transaction does not support writes. + # Snapshot transactions do not take locks. Instead, they work by + # choosing a Cloud Spanner timestamp, then executing all reads at that + # timestamp. Since they do not acquire locks, they do not block + # concurrent read-write transactions. + # Unlike locking read-write transactions, snapshot read-only + # transactions never abort. They can fail if the chosen read + # timestamp is garbage collected; however, the default garbage + # collection policy is generous enough that most applications do not + # need to worry about this in practice. + # Snapshot read-only transactions do not need to call + # Commit or + # Rollback (and in fact are not + # permitted to do so). + # To execute a snapshot transaction, the client specifies a timestamp + # bound, which tells Cloud Spanner how to choose a read timestamp. + # The types of timestamp bound are: + # - Strong (the default). + # - Bounded staleness. + # - Exact staleness. + # If the Cloud Spanner database to be read is geographically distributed, + # stale read-only transactions can execute more quickly than strong + # or read-write transaction, because they are able to execute far + # from the leader replica. + # Each type of timestamp bound is discussed in detail below. + # ### Strong + # Strong reads are guaranteed to see the effects of all transactions + # that have committed before the start of the read. Furthermore, all + # rows yielded by a single read are consistent with each other -- if + # any part of the read observes a transaction, all parts of the read + # see the transaction. + # Strong reads are not repeatable: two consecutive strong read-only + # transactions might return inconsistent results if there are + # concurrent writes. If consistency across reads is required, the + # reads should be executed within a transaction or at an exact read + # timestamp. + # See TransactionOptions.ReadOnly.strong. + # ### Exact Staleness + # These timestamp bounds execute reads at a user-specified + # timestamp. Reads at a timestamp are guaranteed to see a consistent + # prefix of the global transaction history: they observe + # modifications done by all transactions with a commit timestamp <= + # the read timestamp, and observe none of the modifications done by + # transactions with a larger commit timestamp. They will block until + # all conflicting transactions that may be assigned commit timestamps + # <= the read timestamp have finished. + # The timestamp can either be expressed as an absolute Cloud Spanner commit + # timestamp or a staleness relative to the current time. + # These modes do not require a "negotiation phase" to pick a + # timestamp. As a result, they execute slightly faster than the + # equivalent boundedly stale concurrency modes. On the other hand, + # boundedly stale reads usually return fresher results. + # See TransactionOptions.ReadOnly.read_timestamp and + # TransactionOptions.ReadOnly.exact_staleness. + # ### Bounded Staleness + # Bounded staleness modes allow Cloud Spanner to pick the read timestamp, + # subject to a user-provided staleness bound. Cloud Spanner chooses the + # newest timestamp within the staleness bound that allows execution + # of the reads at the closest available replica without blocking. + # All rows yielded are consistent with each other -- if any part of + # the read observes a transaction, all parts of the read see the + # transaction. Boundedly stale reads are not repeatable: two stale + # reads, even if they use the same staleness bound, can execute at + # different timestamps and thus return inconsistent results. + # Boundedly stale reads execute in two phases: the first phase + # negotiates a timestamp among all replicas needed to serve the + # read. In the second phase, reads are executed at the negotiated + # timestamp. + # As a result of the two phase execution, bounded staleness reads are + # usually a little slower than comparable exact staleness + # reads. However, they are typically able to return fresher + # results, and are more likely to execute at the closest replica. + # Because the timestamp negotiation requires up-front knowledge of + # which rows will be read, it can only be used with single-use + # read-only transactions. + # See TransactionOptions.ReadOnly.max_staleness and + # TransactionOptions.ReadOnly.min_read_timestamp. + # ### Old Read Timestamps and Garbage Collection + # Cloud Spanner continuously garbage collects deleted and overwritten data + # in the background to reclaim storage space. This process is known + # as "version GC". By default, version GC reclaims versions after they + # are one hour old. Because of this, Cloud Spanner cannot perform reads + # at read timestamps more than one hour in the past. This + # restriction also applies to in-progress reads and/or SQL queries whose + # timestamp become too old while executing. Reads and SQL queries with + # too-old read timestamps fail with the error `FAILED_PRECONDITION`. + # Corresponds to the JSON property `singleUseTransaction` + # @return [Google::Apis::SpannerV1::TransactionOptions] + attr_accessor :single_use_transaction + + # The mutations to be executed when this transaction commits. All + # mutations are applied atomically, in the order they appear in + # this list. + # Corresponds to the JSON property `mutations` + # @return [Array] + attr_accessor :mutations + + # Commit a previously-started transaction. + # Corresponds to the JSON property `transactionId` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :transaction_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @single_use_transaction = args[:single_use_transaction] if args.key?(:single_use_transaction) + @mutations = args[:mutations] if args.key?(:mutations) + @transaction_id = args[:transaction_id] if args.key?(:transaction_id) + 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] + 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 + + # Request message for `GetIamPolicy` method. + class GetIamPolicyRequest + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # A rule to be applied in a Policy. + class Rule + include Google::Apis::Core::Hashable + + # If one or more 'not_in' clauses are specified, the rule matches + # if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries. + # The format for in and not_in entries is the same as for members in a + # Binding (see google/iam/v1/policy.proto). + # Corresponds to the JSON property `notIn` + # @return [Array] + attr_accessor :not_in + + # Human-readable description of the rule. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # Additional restrictions that must be met + # Corresponds to the JSON property `conditions` + # @return [Array] + attr_accessor :conditions + + # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries + # that match the LOG action. + # Corresponds to the JSON property `logConfig` + # @return [Array] + attr_accessor :log_config + + # If one or more 'in' clauses are specified, the rule matches if + # the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries. + # Corresponds to the JSON property `in` + # @return [Array] + attr_accessor :in + + # A permission is a string of form '..' + # (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, + # and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs. + # Corresponds to the JSON property `permissions` + # @return [Array] + attr_accessor :permissions + + # Required + # Corresponds to the JSON property `action` + # @return [String] + attr_accessor :action + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @not_in = args[:not_in] if args.key?(:not_in) + @description = args[:description] if args.key?(:description) + @conditions = args[:conditions] if args.key?(:conditions) + @log_config = args[:log_config] if args.key?(:log_config) + @in = args[:in] if args.key?(:in) + @permissions = args[:permissions] if args.key?(:permissions) + @action = args[:action] if args.key?(:action) + end + end + + # Metadata type for the operation returned by + # CreateDatabase. + class CreateDatabaseMetadata + include Google::Apis::Core::Hashable + + # The database being created. + # Corresponds to the JSON property `database` + # @return [String] + attr_accessor :database + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @database = args[:database] if args.key?(:database) + end + end + + # Specifies what kind of log the caller must write + class LogConfig + include Google::Apis::Core::Hashable + + # Write a Data Access (Gin) log + # Corresponds to the JSON property `dataAccess` + # @return [Google::Apis::SpannerV1::DataAccessOptions] + attr_accessor :data_access + + # Write a Cloud Audit log + # Corresponds to the JSON property `cloudAudit` + # @return [Google::Apis::SpannerV1::CloudAuditOptions] + attr_accessor :cloud_audit + + # Options for counters + # Corresponds to the JSON property `counter` + # @return [Google::Apis::SpannerV1::CounterOptions] + attr_accessor :counter + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @data_access = args[:data_access] if args.key?(:data_access) + @cloud_audit = args[:cloud_audit] if args.key?(:cloud_audit) + @counter = args[:counter] if args.key?(:counter) + end + end + + # A session in the Cloud Spanner API. + class Session + include Google::Apis::Core::Hashable + + # Required. The name of the session. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @name = args[:name] if args.key?(:name) + end + end + + # KeyRange represents a range of rows in a table or index. + # A range has a start key and an end key. These keys can be open or + # closed, indicating if the range includes rows with that key. + # Keys are represented by lists, where the ith value in the list + # corresponds to the ith component of the table or index primary key. + # Individual values are encoded as described here. + # For example, consider the following table definition: + # CREATE TABLE UserEvents ( + # UserName STRING(MAX), + # EventDate STRING(10) + # ) PRIMARY KEY(UserName, EventDate); + # The following keys name rows in this table: + # "Bob", "2014-09-23" + # Since the `UserEvents` table's `PRIMARY KEY` clause names two + # columns, each `UserEvents` key has two elements; the first is the + # `UserName`, and the second is the `EventDate`. + # Key ranges with multiple components are interpreted + # lexicographically by component using the table or index key's declared + # sort order. For example, the following range returns all events for + # user `"Bob"` that occurred in the year 2015: + # "start_closed": ["Bob", "2015-01-01"] + # "end_closed": ["Bob", "2015-12-31"] + # Start and end keys can omit trailing key components. This affects the + # inclusion and exclusion of rows that exactly match the provided key + # components: if the key is closed, then rows that exactly match the + # provided components are included; if the key is open, then rows + # that exactly match are not included. + # For example, the following range includes all events for `"Bob"` that + # occurred during and after the year 2000: + # "start_closed": ["Bob", "2000-01-01"] + # "end_closed": ["Bob"] + # The next example retrieves all events for `"Bob"`: + # "start_closed": ["Bob"] + # "end_closed": ["Bob"] + # To retrieve events before the year 2000: + # "start_closed": ["Bob"] + # "end_open": ["Bob", "2000-01-01"] + # The following range includes all rows in the table: + # "start_closed": [] + # "end_closed": [] + # This range returns all users whose `UserName` begins with any + # character from A to C: + # "start_closed": ["A"] + # "end_open": ["D"] + # This range returns all users whose `UserName` begins with B: + # "start_closed": ["B"] + # "end_open": ["C"] + # Key ranges honor column sort order. For example, suppose a table is + # defined as follows: + # CREATE TABLE DescendingSortedTable ` + # Key INT64, + # ... + # ) PRIMARY KEY(Key DESC); + # The following range retrieves all rows with key values between 1 + # and 100 inclusive: + # "start_closed": ["100"] + # "end_closed": ["1"] + # Note that 100 is passed as the start, and 1 is passed as the end, + # because `Key` is a descending column in the schema. + class KeyRange + include Google::Apis::Core::Hashable + + # If the start is closed, then the range includes all rows whose + # first `len(start_closed)` key columns exactly match `start_closed`. + # Corresponds to the JSON property `startClosed` + # @return [Array] + attr_accessor :start_closed + + # If the start is open, then the range excludes rows whose first + # `len(start_open)` key columns exactly match `start_open`. + # Corresponds to the JSON property `startOpen` + # @return [Array] + attr_accessor :start_open + + # If the end is open, then the range excludes rows whose first + # `len(end_open)` key columns exactly match `end_open`. + # Corresponds to the JSON property `endOpen` + # @return [Array] + attr_accessor :end_open + + # If the end is closed, then the range includes all rows whose + # first `len(end_closed)` key columns exactly match `end_closed`. + # Corresponds to the JSON property `endClosed` + # @return [Array] + attr_accessor :end_closed + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @start_closed = args[:start_closed] if args.key?(:start_closed) + @start_open = args[:start_open] if args.key?(:start_open) + @end_open = args[:end_open] if args.key?(:end_open) + @end_closed = args[:end_closed] if args.key?(:end_closed) + end + end + + # The response for ListInstances. + class ListInstancesResponse + include Google::Apis::Core::Hashable + + # `next_page_token` can be sent in a subsequent + # ListInstances call to fetch more + # of the matching instances. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The list of requested instances. + # Corresponds to the JSON property `instances` + # @return [Array] + attr_accessor :instances + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @instances = args[:instances] if args.key?(:instances) + end + end + + # Condensed representation of a node and its subtree. Only present for + # `SCALAR` PlanNode(s). + class ShortRepresentation + include Google::Apis::Core::Hashable + + # A string representation of the expression subtree rooted at this node. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # A mapping of (subquery variable name) -> (subquery node id) for cases + # where the `description` string of this node references a `SCALAR` + # subquery contained in the expression subtree rooted at this node. The + # referenced `SCALAR` subquery may not necessarily be a direct child of + # this node. + # Corresponds to the JSON property `subqueries` + # @return [Hash] + attr_accessor :subqueries + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @description = args[:description] if args.key?(:description) + @subqueries = args[:subqueries] if args.key?(:subqueries) + end + end + + # A possible configuration for a Cloud Spanner instance. Configurations + # define the geographic placement of nodes and their replication. + class InstanceConfig + include Google::Apis::Core::Hashable + + # A unique identifier for the instance configuration. Values + # are of the form + # `projects//instanceConfigs/a-z*` + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The name of this instance configuration as it appears in UIs. + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @name = args[:name] if args.key?(:name) + @display_name = args[:display_name] if args.key?(:display_name) + end + end + + # The request for UpdateInstance. + class UpdateInstanceRequest + include Google::Apis::Core::Hashable + + # An isolated set of Cloud Spanner resources on which databases can be hosted. + # Corresponds to the JSON property `instance` + # @return [Google::Apis::SpannerV1::Instance] + attr_accessor :instance + + # Required. A mask specifying which fields in [][google.spanner.admin.instance. + # v1.UpdateInstanceRequest.instance] should be updated. + # The field mask must always be specified; this prevents any future fields in + # [][google.spanner.admin.instance.v1.Instance] from being erased accidentally + # by clients that do not know + # about them. + # Corresponds to the JSON property `fieldMask` + # @return [String] + attr_accessor :field_mask + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @instance = args[:instance] if args.key?(:instance) + @field_mask = args[:field_mask] if args.key?(:field_mask) + end + end + + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # service Foo ` + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # ` + # The JSON representation for `Empty` is empty JSON object ````. + class Empty + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # # Transactions + # Each session can have at most one active transaction at a time. After the + # active transaction is completed, the session can immediately be + # re-used for the next transaction. It is not necessary to create a + # new session for each transaction. + # # Transaction Modes + # Cloud Spanner supports two transaction modes: + # 1. Locking read-write. This type of transaction is the only way + # to write data into Cloud Spanner. These transactions rely on + # pessimistic locking and, if necessary, two-phase commit. + # Locking read-write transactions may abort, requiring the + # application to retry. + # 2. Snapshot read-only. This transaction type provides guaranteed + # consistency across several reads, but does not allow + # writes. Snapshot read-only transactions can be configured to + # read at timestamps in the past. Snapshot read-only + # transactions do not need to be committed. + # For transactions that only read, snapshot read-only transactions + # provide simpler semantics and are almost always faster. In + # particular, read-only transactions do not take locks, so they do + # not conflict with read-write transactions. As a consequence of not + # taking locks, they also do not abort, so retry loops are not needed. + # Transactions may only read/write data in a single database. They + # may, however, read/write data in different tables within that + # database. + # ## Locking Read-Write Transactions + # Locking transactions may be used to atomically read-modify-write + # data anywhere in a database. This type of transaction is externally + # consistent. + # Clients should attempt to minimize the amount of time a transaction + # is active. Faster transactions commit with higher probability + # and cause less contention. Cloud Spanner attempts to keep read locks + # active as long as the transaction continues to do reads, and the + # transaction has not been terminated by + # Commit or + # Rollback. Long periods of + # inactivity at the client may cause Cloud Spanner to release a + # transaction's locks and abort it. + # Reads performed within a transaction acquire locks on the data + # being read. Writes can only be done at commit time, after all reads + # have been completed. + # Conceptually, a read-write transaction consists of zero or more + # reads or SQL queries followed by + # Commit. At any time before + # Commit, the client can send a + # Rollback request to abort the + # transaction. + # ### Semantics + # Cloud Spanner can commit the transaction if all read locks it acquired + # are still valid at commit time, and it is able to acquire write + # locks for all writes. Cloud Spanner can abort the transaction for any + # reason. If a commit attempt returns `ABORTED`, Cloud Spanner guarantees + # that the transaction has not modified any user data in Cloud Spanner. + # Unless the transaction commits, Cloud Spanner makes no guarantees about + # how long the transaction's locks were held for. It is an error to + # use Cloud Spanner locks for any sort of mutual exclusion other than + # between Cloud Spanner transactions themselves. + # ### Retrying Aborted Transactions + # When a transaction aborts, the application can choose to retry the + # whole transaction again. To maximize the chances of successfully + # committing the retry, the client should execute the retry in the + # same session as the original attempt. The original session's lock + # priority increases with each consecutive abort, meaning that each + # attempt has a slightly better chance of success than the previous. + # Under some circumstances (e.g., many transactions attempting to + # modify the same row(s)), a transaction can abort many times in a + # short period before successfully committing. Thus, it is not a good + # idea to cap the number of retries a transaction can attempt; + # instead, it is better to limit the total amount of wall time spent + # retrying. + # ### Idle Transactions + # A transaction is considered idle if it has no outstanding reads or + # SQL queries and has not started a read or SQL query within the last 10 + # seconds. Idle transactions can be aborted by Cloud Spanner so that they + # don't hold on to locks indefinitely. In that case, the commit will + # fail with error `ABORTED`. + # If this behavior is undesirable, periodically executing a simple + # SQL query in the transaction (e.g., `SELECT 1`) prevents the + # transaction from becoming idle. + # ## Snapshot Read-Only Transactions + # Snapshot read-only transactions provides a simpler method than + # locking read-write transactions for doing several consistent + # reads. However, this type of transaction does not support writes. + # Snapshot transactions do not take locks. Instead, they work by + # choosing a Cloud Spanner timestamp, then executing all reads at that + # timestamp. Since they do not acquire locks, they do not block + # concurrent read-write transactions. + # Unlike locking read-write transactions, snapshot read-only + # transactions never abort. They can fail if the chosen read + # timestamp is garbage collected; however, the default garbage + # collection policy is generous enough that most applications do not + # need to worry about this in practice. + # Snapshot read-only transactions do not need to call + # Commit or + # Rollback (and in fact are not + # permitted to do so). + # To execute a snapshot transaction, the client specifies a timestamp + # bound, which tells Cloud Spanner how to choose a read timestamp. + # The types of timestamp bound are: + # - Strong (the default). + # - Bounded staleness. + # - Exact staleness. + # If the Cloud Spanner database to be read is geographically distributed, + # stale read-only transactions can execute more quickly than strong + # or read-write transaction, because they are able to execute far + # from the leader replica. + # Each type of timestamp bound is discussed in detail below. + # ### Strong + # Strong reads are guaranteed to see the effects of all transactions + # that have committed before the start of the read. Furthermore, all + # rows yielded by a single read are consistent with each other -- if + # any part of the read observes a transaction, all parts of the read + # see the transaction. + # Strong reads are not repeatable: two consecutive strong read-only + # transactions might return inconsistent results if there are + # concurrent writes. If consistency across reads is required, the + # reads should be executed within a transaction or at an exact read + # timestamp. + # See TransactionOptions.ReadOnly.strong. + # ### Exact Staleness + # These timestamp bounds execute reads at a user-specified + # timestamp. Reads at a timestamp are guaranteed to see a consistent + # prefix of the global transaction history: they observe + # modifications done by all transactions with a commit timestamp <= + # the read timestamp, and observe none of the modifications done by + # transactions with a larger commit timestamp. They will block until + # all conflicting transactions that may be assigned commit timestamps + # <= the read timestamp have finished. + # The timestamp can either be expressed as an absolute Cloud Spanner commit + # timestamp or a staleness relative to the current time. + # These modes do not require a "negotiation phase" to pick a + # timestamp. As a result, they execute slightly faster than the + # equivalent boundedly stale concurrency modes. On the other hand, + # boundedly stale reads usually return fresher results. + # See TransactionOptions.ReadOnly.read_timestamp and + # TransactionOptions.ReadOnly.exact_staleness. + # ### Bounded Staleness + # Bounded staleness modes allow Cloud Spanner to pick the read timestamp, + # subject to a user-provided staleness bound. Cloud Spanner chooses the + # newest timestamp within the staleness bound that allows execution + # of the reads at the closest available replica without blocking. + # All rows yielded are consistent with each other -- if any part of + # the read observes a transaction, all parts of the read see the + # transaction. Boundedly stale reads are not repeatable: two stale + # reads, even if they use the same staleness bound, can execute at + # different timestamps and thus return inconsistent results. + # Boundedly stale reads execute in two phases: the first phase + # negotiates a timestamp among all replicas needed to serve the + # read. In the second phase, reads are executed at the negotiated + # timestamp. + # As a result of the two phase execution, bounded staleness reads are + # usually a little slower than comparable exact staleness + # reads. However, they are typically able to return fresher + # results, and are more likely to execute at the closest replica. + # Because the timestamp negotiation requires up-front knowledge of + # which rows will be read, it can only be used with single-use + # read-only transactions. + # See TransactionOptions.ReadOnly.max_staleness and + # TransactionOptions.ReadOnly.min_read_timestamp. + # ### Old Read Timestamps and Garbage Collection + # Cloud Spanner continuously garbage collects deleted and overwritten data + # in the background to reclaim storage space. This process is known + # as "version GC". By default, version GC reclaims versions after they + # are one hour old. Because of this, Cloud Spanner cannot perform reads + # at read timestamps more than one hour in the past. This + # restriction also applies to in-progress reads and/or SQL queries whose + # timestamp become too old while executing. Reads and SQL queries with + # too-old read timestamps fail with the error `FAILED_PRECONDITION`. + class TransactionOptions + include Google::Apis::Core::Hashable + + # Options for read-write transactions. + # Corresponds to the JSON property `readWrite` + # @return [Google::Apis::SpannerV1::ReadWrite] + attr_accessor :read_write + + # Options for read-only transactions. + # Corresponds to the JSON property `readOnly` + # @return [Google::Apis::SpannerV1::ReadOnly] + attr_accessor :read_only + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @read_write = args[:read_write] if args.key?(:read_write) + @read_only = args[:read_only] if args.key?(:read_only) + end + end + + # The request for CreateDatabase. + class CreateDatabaseRequest + include Google::Apis::Core::Hashable + + # An optional list of DDL statements to run inside the newly created + # database. Statements can create tables, indexes, etc. These + # statements execute atomically with the creation of the database: + # if there is an error in any statement, the database is not created. + # Corresponds to the JSON property `extraStatements` + # @return [Array] + attr_accessor :extra_statements + + # Required. A `CREATE DATABASE` statement, which specifies the ID of the + # new database. The database ID must conform to the regular expression + # `a-z*[a-z0-9]` and be between 2 and 30 characters in length. + # If the database ID is a reserved word or if it contains a hyphen, the + # database ID must be enclosed in backticks (`` ` ``). + # Corresponds to the JSON property `createStatement` + # @return [String] + attr_accessor :create_statement + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @extra_statements = args[:extra_statements] if args.key?(:extra_statements) + @create_statement = args[:create_statement] if args.key?(:create_statement) + end + end + # The request for CreateInstance. class CreateInstanceRequest include Google::Apis::Core::Hashable + # An isolated set of Cloud Spanner resources on which databases can be hosted. + # Corresponds to the JSON property `instance` + # @return [Google::Apis::SpannerV1::Instance] + attr_accessor :instance + # Required. The ID of the instance to create. Valid identifiers are of the # form `a-z*[a-z0-9]` and must be between 6 and 30 characters in # length. @@ -33,19 +1833,14 @@ module Google # @return [String] attr_accessor :instance_id - # An isolated set of Cloud Spanner resources on which databases can be hosted. - # Corresponds to the JSON property `instance` - # @return [Google::Apis::SpannerV1::Instance] - attr_accessor :instance - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @instance_id = args[:instance_id] if args.key?(:instance_id) @instance = args[:instance] if args.key?(:instance) + @instance_id = args[:instance_id] if args.key?(:instance_id) end end @@ -53,17 +1848,6 @@ module Google class Condition include Google::Apis::Core::Hashable - # DEPRECATED. Use 'values' instead. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - # Trusted attributes supplied by any service that owns resources and uses - # the IAM system for access control. - # Corresponds to the JSON property `sys` - # @return [String] - attr_accessor :sys - # Trusted attributes supplied by the IAM system. # Corresponds to the JSON property `iam` # @return [String] @@ -84,18 +1868,29 @@ module Google # @return [String] attr_accessor :svc + # DEPRECATED. Use 'values' instead. + # Corresponds to the JSON property `value` + # @return [String] + attr_accessor :value + + # Trusted attributes supplied by any service that owns resources and uses + # the IAM system for access control. + # Corresponds to the JSON property `sys` + # @return [String] + attr_accessor :sys + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @value = args[:value] if args.key?(:value) - @sys = args[:sys] if args.key?(:sys) @iam = args[:iam] if args.key?(:iam) @values = args[:values] if args.key?(:values) @op = args[:op] if args.key?(:op) @svc = args[:svc] if args.key?(:svc) + @value = args[:value] if args.key?(:value) + @sys = args[:sys] if args.key?(:sys) end end @@ -146,22 +1941,6 @@ module Google class ReadOnly include Google::Apis::Core::Hashable - # Read at a timestamp where all previously committed transactions - # are visible. - # Corresponds to the JSON property `strong` - # @return [Boolean] - attr_accessor :strong - alias_method :strong?, :strong - - # Executes all reads at a timestamp >= `min_read_timestamp`. - # This is useful for requesting fresher data than some previous - # read, or data that is fresh enough to observe the effects of some - # previously committed transaction whose timestamp is known. - # Note that this option can only be used in single-use transactions. - # Corresponds to the JSON property `minReadTimestamp` - # @return [String] - attr_accessor :min_read_timestamp - # Read data at a timestamp >= `NOW - max_staleness` # seconds. Guarantees that all writes that have committed more # than the specified number of seconds ago are visible. Because @@ -209,18 +1988,34 @@ module Google # @return [String] attr_accessor :exact_staleness + # Read at a timestamp where all previously committed transactions + # are visible. + # Corresponds to the JSON property `strong` + # @return [Boolean] + attr_accessor :strong + alias_method :strong?, :strong + + # Executes all reads at a timestamp >= `min_read_timestamp`. + # This is useful for requesting fresher data than some previous + # read, or data that is fresh enough to observe the effects of some + # previously committed transaction whose timestamp is known. + # Note that this option can only be used in single-use transactions. + # Corresponds to the JSON property `minReadTimestamp` + # @return [String] + attr_accessor :min_read_timestamp + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @strong = args[:strong] if args.key?(:strong) - @min_read_timestamp = args[:min_read_timestamp] if args.key?(:min_read_timestamp) @max_staleness = args[:max_staleness] if args.key?(:max_staleness) @read_timestamp = args[:read_timestamp] if args.key?(:read_timestamp) @return_read_timestamp = args[:return_read_timestamp] if args.key?(:return_read_timestamp) @exact_staleness = args[:exact_staleness] if args.key?(:exact_staleness) + @strong = args[:strong] if args.key?(:strong) + @min_read_timestamp = args[:min_read_timestamp] if args.key?(:min_read_timestamp) end end @@ -229,6 +2024,21 @@ module Google class ExecuteSqlRequest include Google::Apis::Core::Hashable + # The SQL query string can contain parameter placeholders. A parameter + # placeholder consists of `'@'` followed by the parameter + # name. Parameter names consist of any combination of letters, + # numbers, and underscores. + # Parameters can appear anywhere that a literal value is expected. The same + # parameter name can be used more than once, for example: + # `"WHERE id > @msg_id AND id < @msg_id + 100"` + # It is an error to execute an SQL query with unbound parameters. + # Parameter values are specified using `params`, which is a JSON + # object whose keys are parameter names, and whose values are the + # corresponding parameter values. + # Corresponds to the JSON property `params` + # @return [Hash] + attr_accessor :params + # Used to control the amount of debugging information returned in # ResultSetStats. # Corresponds to the JSON property `queryMode` @@ -270,33 +2080,18 @@ module Google # @return [String] attr_accessor :sql - # The SQL query string can contain parameter placeholders. A parameter - # placeholder consists of `'@'` followed by the parameter - # name. Parameter names consist of any combination of letters, - # numbers, and underscores. - # Parameters can appear anywhere that a literal value is expected. The same - # parameter name can be used more than once, for example: - # `"WHERE id > @msg_id AND id < @msg_id + 100"` - # It is an error to execute an SQL query with unbound parameters. - # Parameter values are specified using `params`, which is a JSON - # object whose keys are parameter names, and whose values are the - # corresponding parameter values. - # Corresponds to the JSON property `params` - # @return [Hash] - attr_accessor :params - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @params = args[:params] if args.key?(:params) @query_mode = args[:query_mode] if args.key?(:query_mode) @transaction = args[:transaction] if args.key?(:transaction) @resume_token = args[:resume_token] if args.key?(:resume_token) @param_types = args[:param_types] if args.key?(:param_types) @sql = args[:sql] if args.key?(:sql) - @params = args[:params] if args.key?(:params) end end @@ -329,23 +2124,6 @@ module Google class Policy include Google::Apis::Core::Hashable - # Version of the `Policy`. The default version is 0. - # Corresponds to the JSON property `version` - # @return [Fixnum] - attr_accessor :version - - # Specifies cloud audit logging configuration for this policy. - # Corresponds to the JSON property `auditConfigs` - # @return [Array] - attr_accessor :audit_configs - - # Associates a list of `members` to a `role`. - # Multiple `bindings` must not be specified for the same `role`. - # `bindings` with no members will result in an error. - # Corresponds to the JSON property `bindings` - # @return [Array] - 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 @@ -379,18 +2157,35 @@ module Google # @return [Array] attr_accessor :rules + # Version of the `Policy`. The default version is 0. + # Corresponds to the JSON property `version` + # @return [Fixnum] + attr_accessor :version + + # Specifies cloud audit logging configuration for this policy. + # Corresponds to the JSON property `auditConfigs` + # @return [Array] + attr_accessor :audit_configs + + # Associates a list of `members` to a `role`. + # Multiple `bindings` must not be specified for the same `role`. + # `bindings` with no members will result in an error. + # Corresponds to the JSON property `bindings` + # @return [Array] + attr_accessor :bindings + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @version = args[:version] if args.key?(:version) - @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) @rules = args[:rules] if args.key?(:rules) + @version = args[:version] if args.key?(:version) + @audit_configs = args[:audit_configs] if args.key?(:audit_configs) + @bindings = args[:bindings] if args.key?(:bindings) end end @@ -399,6 +2194,31 @@ module Google class ReadRequest include Google::Apis::Core::Hashable + # The columns of table to be returned for each row matching + # this request. + # Corresponds to the JSON property `columns` + # @return [Array] + attr_accessor :columns + + # This message is used to select the transaction in which a + # Read or + # ExecuteSql call runs. + # See TransactionOptions for more information about transactions. + # Corresponds to the JSON property `transaction` + # @return [Google::Apis::SpannerV1::TransactionSelector] + attr_accessor :transaction + + # If this request is resuming a previously interrupted read, + # `resume_token` should be copied from the last + # PartialResultSet yielded before the interruption. Doing this + # enables the new read to resume where the last read left off. The + # rest of the request parameters must exactly match the request + # that yielded this token. + # Corresponds to the JSON property `resumeToken` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :resume_token + # Required. The name of the table in the database to be read. # Corresponds to the JSON property `table` # @return [String] @@ -427,44 +2247,19 @@ module Google # @return [Google::Apis::SpannerV1::KeySet] attr_accessor :key_set - # The columns of table to be returned for each row matching - # this request. - # Corresponds to the JSON property `columns` - # @return [Array] - attr_accessor :columns - - # This message is used to select the transaction in which a - # Read or - # ExecuteSql call runs. - # See TransactionOptions for more information about transactions. - # Corresponds to the JSON property `transaction` - # @return [Google::Apis::SpannerV1::TransactionSelector] - attr_accessor :transaction - - # If this request is resuming a previously interrupted read, - # `resume_token` should be copied from the last - # PartialResultSet yielded before the interruption. Doing this - # enables the new read to resume where the last read left off. The - # rest of the request parameters must exactly match the request - # that yielded this token. - # Corresponds to the JSON property `resumeToken` - # NOTE: Values are automatically base64 encoded/decoded in the client library. - # @return [String] - attr_accessor :resume_token - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @columns = args[:columns] if args.key?(:columns) + @transaction = args[:transaction] if args.key?(:transaction) + @resume_token = args[:resume_token] if args.key?(:resume_token) @table = args[:table] if args.key?(:table) @limit = args[:limit] if args.key?(:limit) @index = args[:index] if args.key?(:index) @key_set = args[:key_set] if args.key?(:key_set) - @columns = args[:columns] if args.key?(:columns) - @transaction = args[:transaction] if args.key?(:transaction) - @resume_token = args[:resume_token] if args.key?(:resume_token) end end @@ -473,6 +2268,11 @@ module Google class Write include Google::Apis::Core::Hashable + # Required. The table whose rows will be written. + # Corresponds to the JSON property `table` + # @return [String] + attr_accessor :table + # The names of the columns in table to be written. # The list of columns must contain enough columns to allow # Cloud Spanner to derive values for all primary key columns in the @@ -493,20 +2293,15 @@ module Google # @return [Array>] attr_accessor :values - # Required. The table whose rows will be written. - # Corresponds to the JSON property `table` - # @return [String] - attr_accessor :table - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @table = args[:table] if args.key?(:table) @columns = args[:columns] if args.key?(:columns) @values = args[:values] if args.key?(:values) - @table = args[:table] if args.key?(:table) end end @@ -541,6 +2336,13 @@ module Google class Operation include Google::Apis::Core::Hashable + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should have the format of `operations/some/unique/name`. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + # The `Status` type defines a logical error model that is suitable for different # programming environments, including REST APIs and RPC APIs. It is used by # [gRPC](https://github.com/grpc). The error model is designed to be: @@ -612,24 +2414,17 @@ module Google # @return [Hash] attr_accessor :response - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should have the format of `operations/some/unique/name`. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @name = args[:name] if args.key?(:name) @error = args[:error] if args.key?(:error) @metadata = args[:metadata] if args.key?(:metadata) @done = args[:done] if args.key?(:done) @response = args[:response] if args.key?(:response) - @name = args[:name] if args.key?(:name) end end @@ -675,6 +2470,12 @@ module Google class Status include Google::Apis::Core::Hashable + # A list of messages that carry the error details. There will be a + # common set of message types for APIs to use. + # Corresponds to the JSON property `details` + # @return [Array>] + attr_accessor :details + # The status code, which should be an enum value of google.rpc.Code. # Corresponds to the JSON property `code` # @return [Fixnum] @@ -687,21 +2488,15 @@ module Google # @return [String] attr_accessor :message - # A list of messages that carry the error details. There will be a - # common set of message types for APIs to use. - # Corresponds to the JSON property `details` - # @return [Array>] - attr_accessor :details - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @details = args[:details] if args.key?(:details) @code = args[:code] if args.key?(:code) @message = args[:message] if args.key?(:message) - @details = args[:details] if args.key?(:details) end end @@ -710,11 +2505,6 @@ module Google class ResultSet include Google::Apis::Core::Hashable - # Additional statistics about a ResultSet or PartialResultSet. - # Corresponds to the JSON property `stats` - # @return [Google::Apis::SpannerV1::ResultSetStats] - attr_accessor :stats - # Each element in `rows` is a row whose format is defined by # metadata.row_type. The ith element # in each row matches the ith field in @@ -730,15 +2520,60 @@ module Google # @return [Google::Apis::SpannerV1::ResultSetMetadata] attr_accessor :metadata + # Additional statistics about a ResultSet or PartialResultSet. + # Corresponds to the JSON property `stats` + # @return [Google::Apis::SpannerV1::ResultSetStats] + attr_accessor :stats + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @stats = args[:stats] if args.key?(:stats) @rows = args[:rows] if args.key?(:rows) @metadata = args[:metadata] if args.key?(:metadata) + @stats = args[:stats] if args.key?(:stats) + 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] + 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 @@ -797,52 +2632,17 @@ module Google 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] - 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 - # Partial results from a streaming read or SQL query. Streaming reads and # SQL queries better tolerate large result sets, large rows, and large # values, but are a little trickier to consume. class PartialResultSet include Google::Apis::Core::Hashable + # Additional statistics about a ResultSet or PartialResultSet. + # Corresponds to the JSON property `stats` + # @return [Google::Apis::SpannerV1::ResultSetStats] + attr_accessor :stats + # If true, then the final value in values is chunked, and must # be combined with more values from subsequent `PartialResultSet`s # to obtain a complete field value. @@ -929,47 +2729,17 @@ module Google # @return [String] attr_accessor :resume_token - # Additional statistics about a ResultSet or PartialResultSet. - # Corresponds to the JSON property `stats` - # @return [Google::Apis::SpannerV1::ResultSetStats] - attr_accessor :stats - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @stats = args[:stats] if args.key?(:stats) @chunked_value = args[:chunked_value] if args.key?(:chunked_value) @metadata = args[:metadata] if args.key?(:metadata) @values = args[:values] if args.key?(:values) @resume_token = args[:resume_token] if args.key?(:resume_token) - @stats = args[:stats] if args.key?(:stats) - end - end - - # The response message for Operations.ListOperations. - class ListOperationsResponse - include Google::Apis::Core::Hashable - - # A list of operations that matches the specified filter in the request. - # Corresponds to the JSON property `operations` - # @return [Array] - attr_accessor :operations - - # The standard List next-page token. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @operations = args[:operations] if args.key?(:operations) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) end end @@ -1014,19 +2784,44 @@ module Google end end - # Metadata about a ResultSet or PartialResultSet. - class ResultSetMetadata + # The response message for Operations.ListOperations. + class ListOperationsResponse include Google::Apis::Core::Hashable - # A transaction. - # Corresponds to the JSON property `transaction` - # @return [Google::Apis::SpannerV1::Transaction] - attr_accessor :transaction + # The standard List next-page token. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token - # `StructType` defines the fields of a STRUCT type. - # Corresponds to the JSON property `rowType` - # @return [Google::Apis::SpannerV1::StructType] - attr_accessor :row_type + # A list of operations that matches the specified filter in the request. + # Corresponds to the JSON property `operations` + # @return [Array] + attr_accessor :operations + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @operations = args[:operations] if args.key?(:operations) + end + end + + # Metadata about a ResultSet or PartialResultSet. + class ResultSetMetadata + include Google::Apis::Core::Hashable + + # `StructType` defines the fields of a STRUCT type. + # Corresponds to the JSON property `rowType` + # @return [Google::Apis::SpannerV1::StructType] + attr_accessor :row_type + + # A transaction. + # Corresponds to the JSON property `transaction` + # @return [Google::Apis::SpannerV1::Transaction] + attr_accessor :transaction def initialize(**args) update!(**args) @@ -1034,8 +2829,8 @@ module Google # Update properties of this object def update!(**args) - @transaction = args[:transaction] if args.key?(:transaction) @row_type = args[:row_type] if args.key?(:row_type) + @transaction = args[:transaction] if args.key?(:transaction) end end @@ -1408,6 +3203,49 @@ module Google end end + # `KeySet` defines a collection of Cloud Spanner keys and/or key ranges. All + # the keys are expected to be in the same table or index. The keys need + # not be sorted in any particular way. + # If the same key is specified multiple times in the set (for example + # if two ranges, two keys, or a key and a range overlap), Cloud Spanner + # behaves as if the key were only specified once. + class KeySet + include Google::Apis::Core::Hashable + + # A list of key ranges. See KeyRange for more information about + # key range specifications. + # Corresponds to the JSON property `ranges` + # @return [Array] + attr_accessor :ranges + + # A list of specific keys. Entries in `keys` should have exactly as + # many elements as there are columns in the primary or index key + # with which this `KeySet` is used. Individual key values are + # encoded as described here. + # Corresponds to the JSON property `keys` + # @return [Array>] + attr_accessor :keys + + # For convenience `all` can be set to `true` to indicate that this + # `KeySet` matches all keys in the table or index. Note that any keys + # specified in `keys` or `ranges` are only yielded once. + # Corresponds to the JSON property `all` + # @return [Boolean] + attr_accessor :all + alias_method :all?, :all + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @ranges = args[:ranges] if args.key?(:ranges) + @keys = args[:keys] if args.key?(:keys) + @all = args[:all] if args.key?(:all) + end + end + # A modification to one or more Cloud Spanner rows. Mutations can be # applied to a Cloud Spanner database by sending them in a # Commit call. @@ -1457,49 +3295,6 @@ module Google end end - # `KeySet` defines a collection of Cloud Spanner keys and/or key ranges. All - # the keys are expected to be in the same table or index. The keys need - # not be sorted in any particular way. - # If the same key is specified multiple times in the set (for example - # if two ranges, two keys, or a key and a range overlap), Cloud Spanner - # behaves as if the key were only specified once. - class KeySet - include Google::Apis::Core::Hashable - - # A list of key ranges. See KeyRange for more information about - # key range specifications. - # Corresponds to the JSON property `ranges` - # @return [Array] - attr_accessor :ranges - - # A list of specific keys. Entries in `keys` should have exactly as - # many elements as there are columns in the primary or index key - # with which this `KeySet` is used. Individual key values are - # encoded as described here. - # Corresponds to the JSON property `keys` - # @return [Array>] - attr_accessor :keys - - # For convenience `all` can be set to `true` to indicate that this - # `KeySet` matches all keys in the table or index. Note that any keys - # specified in `keys` or `ranges` are only yielded once. - # Corresponds to the JSON property `all` - # @return [Boolean] - attr_accessor :all - alias_method :all?, :all - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @ranges = args[:ranges] if args.key?(:ranges) - @keys = args[:keys] if args.key?(:keys) - @all = args[:all] if args.key?(:all) - end - end - # The response for GetDatabaseDdl. class GetDatabaseDdlResponse include Google::Apis::Core::Hashable @@ -1519,1801 +3314,6 @@ module Google @statements = args[:statements] if args.key?(:statements) end end - - # A Cloud Spanner database. - class Database - include Google::Apis::Core::Hashable - - # Output only. The current database state. - # Corresponds to the JSON property `state` - # @return [String] - attr_accessor :state - - # Required. The name of the database. Values are of the form - # `projects//instances//databases/`, - # where `` is as specified in the `CREATE DATABASE` - # statement. This name can be passed to other API methods to - # identify the database. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @state = args[:state] if args.key?(:state) - @name = args[:name] if args.key?(:name) - end - end - - # An isolated set of Cloud Spanner resources on which databases can be hosted. - class Instance - include Google::Apis::Core::Hashable - - # Cloud Labels are a flexible and lightweight mechanism for organizing cloud - # resources into groups that reflect a customer's organizational needs and - # deployment strategies. Cloud Labels can be used to filter collections of - # resources. They can be used to control how resource metrics are aggregated. - # And they can be used as arguments to policy management rules (e.g. route, - # firewall, load balancing, etc.). - # * Label keys must be between 1 and 63 characters long and must conform to - # the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. - # * Label values must be between 0 and 63 characters long and must conform - # to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. - # * No more than 64 labels can be associated with a given resource. - # See https://goo.gl/xmQnxf for more information on and examples of labels. - # If you plan to use labels in your own code, please note that additional - # characters may be allowed in the future. And so you are advised to use an - # internal label representation, such as JSON, which doesn't rely upon - # specific characters being disallowed. For example, representing labels - # as the string: name + "_" + value would prove problematic if we were to - # allow "_" in a future release. - # Corresponds to the JSON property `labels` - # @return [Hash] - attr_accessor :labels - - # Required. The name of the instance's configuration. Values are of the form - # `projects//instanceConfigs/`. See - # also InstanceConfig and - # ListInstanceConfigs. - # Corresponds to the JSON property `config` - # @return [String] - attr_accessor :config - - # Output only. The current instance state. For - # CreateInstance, the state must be - # either omitted or set to `CREATING`. For - # UpdateInstance, the state must be - # either omitted or set to `READY`. - # Corresponds to the JSON property `state` - # @return [String] - attr_accessor :state - - # Required. A unique identifier for the instance, which cannot be changed - # after the instance is created. Values are of the form - # `projects//instances/a-z*[a-z0-9]`. The final - # segment of the name must be between 6 and 30 characters in length. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Required. The descriptive name for this instance as it appears in UIs. - # Must be unique per project and between 4 and 30 characters in length. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # Required. The number of nodes allocated to this instance. - # Corresponds to the JSON property `nodeCount` - # @return [Fixnum] - attr_accessor :node_count - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @labels = args[:labels] if args.key?(:labels) - @config = args[:config] if args.key?(:config) - @state = args[:state] if args.key?(:state) - @name = args[:name] if args.key?(:name) - @display_name = args[:display_name] if args.key?(:display_name) - @node_count = args[:node_count] if args.key?(:node_count) - end - end - - # Request message for `SetIamPolicy` method. - class SetIamPolicyRequest - include Google::Apis::Core::Hashable - - # 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 - - # 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). - # Corresponds to the JSON property `policy` - # @return [Google::Apis::SpannerV1::Policy] - attr_accessor :policy - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @update_mask = args[:update_mask] if args.key?(:update_mask) - @policy = args[:policy] if args.key?(:policy) - end - end - - # The response for ListDatabases. - class ListDatabasesResponse - include Google::Apis::Core::Hashable - - # `next_page_token` can be sent in a subsequent - # ListDatabases call to fetch more - # of the matching databases. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # Databases that matched the request. - # Corresponds to the JSON property `databases` - # @return [Array] - attr_accessor :databases - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @databases = args[:databases] if args.key?(:databases) - end - end - - # The request for Rollback. - class RollbackRequest - include Google::Apis::Core::Hashable - - # Required. The transaction to roll back. - # Corresponds to the JSON property `transactionId` - # NOTE: Values are automatically base64 encoded/decoded in the client library. - # @return [String] - attr_accessor :transaction_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @transaction_id = args[:transaction_id] if args.key?(:transaction_id) - end - end - - # A transaction. - class Transaction - include Google::Apis::Core::Hashable - - # `id` may be used to identify the transaction in subsequent - # Read, - # ExecuteSql, - # Commit, or - # Rollback calls. - # Single-use read-only transactions do not have IDs, because - # single-use transactions do not support multiple requests. - # Corresponds to the JSON property `id` - # NOTE: Values are automatically base64 encoded/decoded in the client library. - # @return [String] - attr_accessor :id - - # For snapshot read-only transactions, the read timestamp chosen - # for the transaction. Not returned by default: see - # TransactionOptions.ReadOnly.return_read_timestamp. - # Corresponds to the JSON property `readTimestamp` - # @return [String] - attr_accessor :read_timestamp - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] if args.key?(:id) - @read_timestamp = args[:read_timestamp] if args.key?(:read_timestamp) - end - end - - # Metadata type for the operation returned by - # UpdateDatabaseDdl. - class UpdateDatabaseDdlMetadata - include Google::Apis::Core::Hashable - - # For an update this list contains all the statements. For an - # individual statement, this list contains only that statement. - # Corresponds to the JSON property `statements` - # @return [Array] - attr_accessor :statements - - # Reports the commit timestamps of all statements that have - # succeeded so far, where `commit_timestamps[i]` is the commit - # timestamp for the statement `statements[i]`. - # Corresponds to the JSON property `commitTimestamps` - # @return [Array] - attr_accessor :commit_timestamps - - # The database being modified. - # Corresponds to the JSON property `database` - # @return [String] - attr_accessor :database - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @statements = args[:statements] if args.key?(:statements) - @commit_timestamps = args[:commit_timestamps] if args.key?(:commit_timestamps) - @database = args[:database] if args.key?(:database) - end - end - - # Options for counters - class CounterOptions - include Google::Apis::Core::Hashable - - # The metric to update. - # Corresponds to the JSON property `metric` - # @return [String] - attr_accessor :metric - - # The field value to attribute. - # Corresponds to the JSON property `field` - # @return [String] - attr_accessor :field - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @metric = args[:metric] if args.key?(:metric) - @field = args[:field] if args.key?(:field) - end - end - - # Contains an ordered list of nodes appearing in the query plan. - class QueryPlan - include Google::Apis::Core::Hashable - - # The nodes in the query plan. Plan nodes are returned in pre-order starting - # with the plan root. Each PlanNode's `id` corresponds to its index in - # `plan_nodes`. - # Corresponds to the JSON property `planNodes` - # @return [Array] - attr_accessor :plan_nodes - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @plan_nodes = args[:plan_nodes] if args.key?(:plan_nodes) - end - end - - # `StructType` defines the fields of a STRUCT type. - class StructType - include Google::Apis::Core::Hashable - - # The list of fields that make up this struct. Order is - # significant, because values of this struct type are represented as - # lists, where the order of field values matches the order of - # fields in the StructType. In turn, the order of fields - # matches the order of columns in a read request, or the order of - # fields in the `SELECT` clause of a query. - # Corresponds to the JSON property `fields` - # @return [Array] - attr_accessor :fields - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @fields = args[:fields] if args.key?(:fields) - end - end - - # Message representing a single field of a struct. - class Field - include Google::Apis::Core::Hashable - - # The name of the field. For reads, this is the column name. For - # SQL queries, it is the column alias (e.g., `"Word"` in the - # query `"SELECT 'hello' AS Word"`), or the column name (e.g., - # `"ColName"` in the query `"SELECT ColName FROM Table"`). Some - # columns might have an empty name (e.g., !"SELECT - # UPPER(ColName)"`). Note that a query result can contain - # multiple fields with the same name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # `Type` indicates the type of a Cloud Spanner value, as might be stored in a - # table cell or returned from an SQL query. - # Corresponds to the JSON property `type` - # @return [Google::Apis::SpannerV1::Type] - attr_accessor :type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @name = args[:name] if args.key?(:name) - @type = args[:type] if args.key?(:type) - end - end - - # Additional statistics about a ResultSet or PartialResultSet. - class ResultSetStats - include Google::Apis::Core::Hashable - - # Aggregated statistics from the execution of the query. Only present when - # the query is profiled. For example, a query could return the statistics as - # follows: - # ` - # "rows_returned": "3", - # "elapsed_time": "1.22 secs", - # "cpu_time": "1.19 secs" - # ` - # Corresponds to the JSON property `queryStats` - # @return [Hash] - attr_accessor :query_stats - - # Contains an ordered list of nodes appearing in the query plan. - # Corresponds to the JSON property `queryPlan` - # @return [Google::Apis::SpannerV1::QueryPlan] - attr_accessor :query_plan - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @query_stats = args[:query_stats] if args.key?(:query_stats) - @query_plan = args[:query_plan] if args.key?(:query_plan) - end - end - - # Request message for `TestIamPermissions` method. - class TestIamPermissionsRequest - include Google::Apis::Core::Hashable - - # REQUIRED: The set of permissions to check for 'resource'. - # Permissions with wildcards (such as '*', 'spanner.*', 'spanner.instances.*') - # are not allowed. - # Corresponds to the JSON property `permissions` - # @return [Array] - 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 response for Commit. - class CommitResponse - include Google::Apis::Core::Hashable - - # The Cloud Spanner timestamp at which the transaction committed. - # Corresponds to the JSON property `commitTimestamp` - # @return [String] - attr_accessor :commit_timestamp - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @commit_timestamp = args[:commit_timestamp] if args.key?(:commit_timestamp) - end - end - - # `Type` indicates the type of a Cloud Spanner value, as might be stored in a - # table cell or returned from an SQL query. - class Type - include Google::Apis::Core::Hashable - - # `StructType` defines the fields of a STRUCT type. - # Corresponds to the JSON property `structType` - # @return [Google::Apis::SpannerV1::StructType] - attr_accessor :struct_type - - # `Type` indicates the type of a Cloud Spanner value, as might be stored in a - # table cell or returned from an SQL query. - # Corresponds to the JSON property `arrayElementType` - # @return [Google::Apis::SpannerV1::Type] - attr_accessor :array_element_type - - # Required. The TypeCode for this type. - # Corresponds to the JSON property `code` - # @return [String] - attr_accessor :code - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @struct_type = args[:struct_type] if args.key?(:struct_type) - @array_element_type = args[:array_element_type] if args.key?(:array_element_type) - @code = args[:code] if args.key?(:code) - end - end - - # Node information for nodes appearing in a QueryPlan.plan_nodes. - class PlanNode - include Google::Apis::Core::Hashable - - # Condensed representation of a node and its subtree. Only present for - # `SCALAR` PlanNode(s). - # Corresponds to the JSON property `shortRepresentation` - # @return [Google::Apis::SpannerV1::ShortRepresentation] - attr_accessor :short_representation - - # The `PlanNode`'s index in node list. - # Corresponds to the JSON property `index` - # @return [Fixnum] - attr_accessor :index - - # The display name for the node. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # Used to determine the type of node. May be needed for visualizing - # different kinds of nodes differently. For example, If the node is a - # SCALAR node, it will have a condensed representation - # which can be used to directly embed a description of the node in its - # parent. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # List of child node `index`es and their relationship to this parent. - # Corresponds to the JSON property `childLinks` - # @return [Array] - attr_accessor :child_links - - # Attributes relevant to the node contained in a group of key-value pairs. - # For example, a Parameter Reference node could have the following - # information in its metadata: - # ` - # "parameter_reference": "param1", - # "parameter_type": "array" - # ` - # Corresponds to the JSON property `metadata` - # @return [Hash] - attr_accessor :metadata - - # The execution statistics associated with the node, contained in a group of - # key-value pairs. Only present if the plan was returned as a result of a - # profile query. For example, number of executions, number of rows/time per - # execution etc. - # Corresponds to the JSON property `executionStats` - # @return [Hash] - attr_accessor :execution_stats - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @short_representation = args[:short_representation] if args.key?(:short_representation) - @index = args[:index] if args.key?(:index) - @display_name = args[:display_name] if args.key?(:display_name) - @kind = args[:kind] if args.key?(:kind) - @child_links = args[:child_links] if args.key?(:child_links) - @metadata = args[:metadata] if args.key?(:metadata) - @execution_stats = args[:execution_stats] if args.key?(:execution_stats) - end - end - - # Metadata type for the operation returned by - # CreateInstance. - class CreateInstanceMetadata - include Google::Apis::Core::Hashable - - # The time at which this operation was cancelled. If set, this operation is - # in the process of undoing itself (which is guaranteed to succeed) and - # cannot be cancelled again. - # Corresponds to the JSON property `cancelTime` - # @return [String] - attr_accessor :cancel_time - - # The time at which this operation failed or was completed successfully. - # Corresponds to the JSON property `endTime` - # @return [String] - attr_accessor :end_time - - # An isolated set of Cloud Spanner resources on which databases can be hosted. - # Corresponds to the JSON property `instance` - # @return [Google::Apis::SpannerV1::Instance] - attr_accessor :instance - - # The time at which the - # CreateInstance request was - # received. - # Corresponds to the JSON property `startTime` - # @return [String] - attr_accessor :start_time - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @cancel_time = args[:cancel_time] if args.key?(:cancel_time) - @end_time = args[:end_time] if args.key?(:end_time) - @instance = args[:instance] if args.key?(:instance) - @start_time = args[:start_time] if args.key?(:start_time) - end - end - - # 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 AuditConifg 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 - # AuditConfig 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] - attr_accessor :audit_log_configs - - # - # Corresponds to the JSON property `exemptedMembers` - # @return [Array] - 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. - # 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) - @exempted_members = args[:exempted_members] if args.key?(:exempted_members) - @service = args[:service] if args.key?(:service) - end - end - - # Metadata associated with a parent-child relationship appearing in a - # PlanNode. - class ChildLink - include Google::Apis::Core::Hashable - - # The type of the link. For example, in Hash Joins this could be used to - # distinguish between the build child and the probe child, or in the case - # of the child being an output variable, to represent the tag associated - # with the output variable. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # The node to which the link points. - # Corresponds to the JSON property `childIndex` - # @return [Fixnum] - attr_accessor :child_index - - # Only present if the child node is SCALAR and corresponds - # to an output variable of the parent node. The field carries the name of - # the output variable. - # For example, a `TableScan` operator that reads rows from a table will - # have child links to the `SCALAR` nodes representing the output variables - # created for each column that is read by the operator. The corresponding - # `variable` fields will be set to the variable names assigned to the - # columns. - # Corresponds to the JSON property `variable` - # @return [String] - attr_accessor :variable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @type = args[:type] if args.key?(:type) - @child_index = args[:child_index] if args.key?(:child_index) - @variable = args[:variable] if args.key?(:variable) - end - end - - # Write a Cloud Audit log - class CloudAuditOptions - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # Arguments to delete operations. - class Delete - include Google::Apis::Core::Hashable - - # Required. The table whose rows will be deleted. - # Corresponds to the JSON property `table` - # @return [String] - attr_accessor :table - - # `KeySet` defines a collection of Cloud Spanner keys and/or key ranges. All - # the keys are expected to be in the same table or index. The keys need - # not be sorted in any particular way. - # If the same key is specified multiple times in the set (for example - # if two ranges, two keys, or a key and a range overlap), Cloud Spanner - # behaves as if the key were only specified once. - # Corresponds to the JSON property `keySet` - # @return [Google::Apis::SpannerV1::KeySet] - attr_accessor :key_set - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @table = args[:table] if args.key?(:table) - @key_set = args[:key_set] if args.key?(:key_set) - end - end - - # The request for Commit. - class CommitRequest - include Google::Apis::Core::Hashable - - # # Transactions - # Each session can have at most one active transaction at a time. After the - # active transaction is completed, the session can immediately be - # re-used for the next transaction. It is not necessary to create a - # new session for each transaction. - # # Transaction Modes - # Cloud Spanner supports two transaction modes: - # 1. Locking read-write. This type of transaction is the only way - # to write data into Cloud Spanner. These transactions rely on - # pessimistic locking and, if necessary, two-phase commit. - # Locking read-write transactions may abort, requiring the - # application to retry. - # 2. Snapshot read-only. This transaction type provides guaranteed - # consistency across several reads, but does not allow - # writes. Snapshot read-only transactions can be configured to - # read at timestamps in the past. Snapshot read-only - # transactions do not need to be committed. - # For transactions that only read, snapshot read-only transactions - # provide simpler semantics and are almost always faster. In - # particular, read-only transactions do not take locks, so they do - # not conflict with read-write transactions. As a consequence of not - # taking locks, they also do not abort, so retry loops are not needed. - # Transactions may only read/write data in a single database. They - # may, however, read/write data in different tables within that - # database. - # ## Locking Read-Write Transactions - # Locking transactions may be used to atomically read-modify-write - # data anywhere in a database. This type of transaction is externally - # consistent. - # Clients should attempt to minimize the amount of time a transaction - # is active. Faster transactions commit with higher probability - # and cause less contention. Cloud Spanner attempts to keep read locks - # active as long as the transaction continues to do reads, and the - # transaction has not been terminated by - # Commit or - # Rollback. Long periods of - # inactivity at the client may cause Cloud Spanner to release a - # transaction's locks and abort it. - # Reads performed within a transaction acquire locks on the data - # being read. Writes can only be done at commit time, after all reads - # have been completed. - # Conceptually, a read-write transaction consists of zero or more - # reads or SQL queries followed by - # Commit. At any time before - # Commit, the client can send a - # Rollback request to abort the - # transaction. - # ### Semantics - # Cloud Spanner can commit the transaction if all read locks it acquired - # are still valid at commit time, and it is able to acquire write - # locks for all writes. Cloud Spanner can abort the transaction for any - # reason. If a commit attempt returns `ABORTED`, Cloud Spanner guarantees - # that the transaction has not modified any user data in Cloud Spanner. - # Unless the transaction commits, Cloud Spanner makes no guarantees about - # how long the transaction's locks were held for. It is an error to - # use Cloud Spanner locks for any sort of mutual exclusion other than - # between Cloud Spanner transactions themselves. - # ### Retrying Aborted Transactions - # When a transaction aborts, the application can choose to retry the - # whole transaction again. To maximize the chances of successfully - # committing the retry, the client should execute the retry in the - # same session as the original attempt. The original session's lock - # priority increases with each consecutive abort, meaning that each - # attempt has a slightly better chance of success than the previous. - # Under some circumstances (e.g., many transactions attempting to - # modify the same row(s)), a transaction can abort many times in a - # short period before successfully committing. Thus, it is not a good - # idea to cap the number of retries a transaction can attempt; - # instead, it is better to limit the total amount of wall time spent - # retrying. - # ### Idle Transactions - # A transaction is considered idle if it has no outstanding reads or - # SQL queries and has not started a read or SQL query within the last 10 - # seconds. Idle transactions can be aborted by Cloud Spanner so that they - # don't hold on to locks indefinitely. In that case, the commit will - # fail with error `ABORTED`. - # If this behavior is undesirable, periodically executing a simple - # SQL query in the transaction (e.g., `SELECT 1`) prevents the - # transaction from becoming idle. - # ## Snapshot Read-Only Transactions - # Snapshot read-only transactions provides a simpler method than - # locking read-write transactions for doing several consistent - # reads. However, this type of transaction does not support writes. - # Snapshot transactions do not take locks. Instead, they work by - # choosing a Cloud Spanner timestamp, then executing all reads at that - # timestamp. Since they do not acquire locks, they do not block - # concurrent read-write transactions. - # Unlike locking read-write transactions, snapshot read-only - # transactions never abort. They can fail if the chosen read - # timestamp is garbage collected; however, the default garbage - # collection policy is generous enough that most applications do not - # need to worry about this in practice. - # Snapshot read-only transactions do not need to call - # Commit or - # Rollback (and in fact are not - # permitted to do so). - # To execute a snapshot transaction, the client specifies a timestamp - # bound, which tells Cloud Spanner how to choose a read timestamp. - # The types of timestamp bound are: - # - Strong (the default). - # - Bounded staleness. - # - Exact staleness. - # If the Cloud Spanner database to be read is geographically distributed, - # stale read-only transactions can execute more quickly than strong - # or read-write transaction, because they are able to execute far - # from the leader replica. - # Each type of timestamp bound is discussed in detail below. - # ### Strong - # Strong reads are guaranteed to see the effects of all transactions - # that have committed before the start of the read. Furthermore, all - # rows yielded by a single read are consistent with each other -- if - # any part of the read observes a transaction, all parts of the read - # see the transaction. - # Strong reads are not repeatable: two consecutive strong read-only - # transactions might return inconsistent results if there are - # concurrent writes. If consistency across reads is required, the - # reads should be executed within a transaction or at an exact read - # timestamp. - # See TransactionOptions.ReadOnly.strong. - # ### Exact Staleness - # These timestamp bounds execute reads at a user-specified - # timestamp. Reads at a timestamp are guaranteed to see a consistent - # prefix of the global transaction history: they observe - # modifications done by all transactions with a commit timestamp <= - # the read timestamp, and observe none of the modifications done by - # transactions with a larger commit timestamp. They will block until - # all conflicting transactions that may be assigned commit timestamps - # <= the read timestamp have finished. - # The timestamp can either be expressed as an absolute Cloud Spanner commit - # timestamp or a staleness relative to the current time. - # These modes do not require a "negotiation phase" to pick a - # timestamp. As a result, they execute slightly faster than the - # equivalent boundedly stale concurrency modes. On the other hand, - # boundedly stale reads usually return fresher results. - # See TransactionOptions.ReadOnly.read_timestamp and - # TransactionOptions.ReadOnly.exact_staleness. - # ### Bounded Staleness - # Bounded staleness modes allow Cloud Spanner to pick the read timestamp, - # subject to a user-provided staleness bound. Cloud Spanner chooses the - # newest timestamp within the staleness bound that allows execution - # of the reads at the closest available replica without blocking. - # All rows yielded are consistent with each other -- if any part of - # the read observes a transaction, all parts of the read see the - # transaction. Boundedly stale reads are not repeatable: two stale - # reads, even if they use the same staleness bound, can execute at - # different timestamps and thus return inconsistent results. - # Boundedly stale reads execute in two phases: the first phase - # negotiates a timestamp among all replicas needed to serve the - # read. In the second phase, reads are executed at the negotiated - # timestamp. - # As a result of the two phase execution, bounded staleness reads are - # usually a little slower than comparable exact staleness - # reads. However, they are typically able to return fresher - # results, and are more likely to execute at the closest replica. - # Because the timestamp negotiation requires up-front knowledge of - # which rows will be read, it can only be used with single-use - # read-only transactions. - # See TransactionOptions.ReadOnly.max_staleness and - # TransactionOptions.ReadOnly.min_read_timestamp. - # ### Old Read Timestamps and Garbage Collection - # Cloud Spanner continuously garbage collects deleted and overwritten data - # in the background to reclaim storage space. This process is known - # as "version GC". By default, version GC reclaims versions after they - # are one hour old. Because of this, Cloud Spanner cannot perform reads - # at read timestamps more than one hour in the past. This - # restriction also applies to in-progress reads and/or SQL queries whose - # timestamp become too old while executing. Reads and SQL queries with - # too-old read timestamps fail with the error `FAILED_PRECONDITION`. - # Corresponds to the JSON property `singleUseTransaction` - # @return [Google::Apis::SpannerV1::TransactionOptions] - attr_accessor :single_use_transaction - - # The mutations to be executed when this transaction commits. All - # mutations are applied atomically, in the order they appear in - # this list. - # Corresponds to the JSON property `mutations` - # @return [Array] - attr_accessor :mutations - - # Commit a previously-started transaction. - # Corresponds to the JSON property `transactionId` - # NOTE: Values are automatically base64 encoded/decoded in the client library. - # @return [String] - attr_accessor :transaction_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @single_use_transaction = args[:single_use_transaction] if args.key?(:single_use_transaction) - @mutations = args[:mutations] if args.key?(:mutations) - @transaction_id = args[:transaction_id] if args.key?(:transaction_id) - end - end - - # The request for BeginTransaction. - class BeginTransactionRequest - include Google::Apis::Core::Hashable - - # # Transactions - # Each session can have at most one active transaction at a time. After the - # active transaction is completed, the session can immediately be - # re-used for the next transaction. It is not necessary to create a - # new session for each transaction. - # # Transaction Modes - # Cloud Spanner supports two transaction modes: - # 1. Locking read-write. This type of transaction is the only way - # to write data into Cloud Spanner. These transactions rely on - # pessimistic locking and, if necessary, two-phase commit. - # Locking read-write transactions may abort, requiring the - # application to retry. - # 2. Snapshot read-only. This transaction type provides guaranteed - # consistency across several reads, but does not allow - # writes. Snapshot read-only transactions can be configured to - # read at timestamps in the past. Snapshot read-only - # transactions do not need to be committed. - # For transactions that only read, snapshot read-only transactions - # provide simpler semantics and are almost always faster. In - # particular, read-only transactions do not take locks, so they do - # not conflict with read-write transactions. As a consequence of not - # taking locks, they also do not abort, so retry loops are not needed. - # Transactions may only read/write data in a single database. They - # may, however, read/write data in different tables within that - # database. - # ## Locking Read-Write Transactions - # Locking transactions may be used to atomically read-modify-write - # data anywhere in a database. This type of transaction is externally - # consistent. - # Clients should attempt to minimize the amount of time a transaction - # is active. Faster transactions commit with higher probability - # and cause less contention. Cloud Spanner attempts to keep read locks - # active as long as the transaction continues to do reads, and the - # transaction has not been terminated by - # Commit or - # Rollback. Long periods of - # inactivity at the client may cause Cloud Spanner to release a - # transaction's locks and abort it. - # Reads performed within a transaction acquire locks on the data - # being read. Writes can only be done at commit time, after all reads - # have been completed. - # Conceptually, a read-write transaction consists of zero or more - # reads or SQL queries followed by - # Commit. At any time before - # Commit, the client can send a - # Rollback request to abort the - # transaction. - # ### Semantics - # Cloud Spanner can commit the transaction if all read locks it acquired - # are still valid at commit time, and it is able to acquire write - # locks for all writes. Cloud Spanner can abort the transaction for any - # reason. If a commit attempt returns `ABORTED`, Cloud Spanner guarantees - # that the transaction has not modified any user data in Cloud Spanner. - # Unless the transaction commits, Cloud Spanner makes no guarantees about - # how long the transaction's locks were held for. It is an error to - # use Cloud Spanner locks for any sort of mutual exclusion other than - # between Cloud Spanner transactions themselves. - # ### Retrying Aborted Transactions - # When a transaction aborts, the application can choose to retry the - # whole transaction again. To maximize the chances of successfully - # committing the retry, the client should execute the retry in the - # same session as the original attempt. The original session's lock - # priority increases with each consecutive abort, meaning that each - # attempt has a slightly better chance of success than the previous. - # Under some circumstances (e.g., many transactions attempting to - # modify the same row(s)), a transaction can abort many times in a - # short period before successfully committing. Thus, it is not a good - # idea to cap the number of retries a transaction can attempt; - # instead, it is better to limit the total amount of wall time spent - # retrying. - # ### Idle Transactions - # A transaction is considered idle if it has no outstanding reads or - # SQL queries and has not started a read or SQL query within the last 10 - # seconds. Idle transactions can be aborted by Cloud Spanner so that they - # don't hold on to locks indefinitely. In that case, the commit will - # fail with error `ABORTED`. - # If this behavior is undesirable, periodically executing a simple - # SQL query in the transaction (e.g., `SELECT 1`) prevents the - # transaction from becoming idle. - # ## Snapshot Read-Only Transactions - # Snapshot read-only transactions provides a simpler method than - # locking read-write transactions for doing several consistent - # reads. However, this type of transaction does not support writes. - # Snapshot transactions do not take locks. Instead, they work by - # choosing a Cloud Spanner timestamp, then executing all reads at that - # timestamp. Since they do not acquire locks, they do not block - # concurrent read-write transactions. - # Unlike locking read-write transactions, snapshot read-only - # transactions never abort. They can fail if the chosen read - # timestamp is garbage collected; however, the default garbage - # collection policy is generous enough that most applications do not - # need to worry about this in practice. - # Snapshot read-only transactions do not need to call - # Commit or - # Rollback (and in fact are not - # permitted to do so). - # To execute a snapshot transaction, the client specifies a timestamp - # bound, which tells Cloud Spanner how to choose a read timestamp. - # The types of timestamp bound are: - # - Strong (the default). - # - Bounded staleness. - # - Exact staleness. - # If the Cloud Spanner database to be read is geographically distributed, - # stale read-only transactions can execute more quickly than strong - # or read-write transaction, because they are able to execute far - # from the leader replica. - # Each type of timestamp bound is discussed in detail below. - # ### Strong - # Strong reads are guaranteed to see the effects of all transactions - # that have committed before the start of the read. Furthermore, all - # rows yielded by a single read are consistent with each other -- if - # any part of the read observes a transaction, all parts of the read - # see the transaction. - # Strong reads are not repeatable: two consecutive strong read-only - # transactions might return inconsistent results if there are - # concurrent writes. If consistency across reads is required, the - # reads should be executed within a transaction or at an exact read - # timestamp. - # See TransactionOptions.ReadOnly.strong. - # ### Exact Staleness - # These timestamp bounds execute reads at a user-specified - # timestamp. Reads at a timestamp are guaranteed to see a consistent - # prefix of the global transaction history: they observe - # modifications done by all transactions with a commit timestamp <= - # the read timestamp, and observe none of the modifications done by - # transactions with a larger commit timestamp. They will block until - # all conflicting transactions that may be assigned commit timestamps - # <= the read timestamp have finished. - # The timestamp can either be expressed as an absolute Cloud Spanner commit - # timestamp or a staleness relative to the current time. - # These modes do not require a "negotiation phase" to pick a - # timestamp. As a result, they execute slightly faster than the - # equivalent boundedly stale concurrency modes. On the other hand, - # boundedly stale reads usually return fresher results. - # See TransactionOptions.ReadOnly.read_timestamp and - # TransactionOptions.ReadOnly.exact_staleness. - # ### Bounded Staleness - # Bounded staleness modes allow Cloud Spanner to pick the read timestamp, - # subject to a user-provided staleness bound. Cloud Spanner chooses the - # newest timestamp within the staleness bound that allows execution - # of the reads at the closest available replica without blocking. - # All rows yielded are consistent with each other -- if any part of - # the read observes a transaction, all parts of the read see the - # transaction. Boundedly stale reads are not repeatable: two stale - # reads, even if they use the same staleness bound, can execute at - # different timestamps and thus return inconsistent results. - # Boundedly stale reads execute in two phases: the first phase - # negotiates a timestamp among all replicas needed to serve the - # read. In the second phase, reads are executed at the negotiated - # timestamp. - # As a result of the two phase execution, bounded staleness reads are - # usually a little slower than comparable exact staleness - # reads. However, they are typically able to return fresher - # results, and are more likely to execute at the closest replica. - # Because the timestamp negotiation requires up-front knowledge of - # which rows will be read, it can only be used with single-use - # read-only transactions. - # See TransactionOptions.ReadOnly.max_staleness and - # TransactionOptions.ReadOnly.min_read_timestamp. - # ### Old Read Timestamps and Garbage Collection - # Cloud Spanner continuously garbage collects deleted and overwritten data - # in the background to reclaim storage space. This process is known - # as "version GC". By default, version GC reclaims versions after they - # are one hour old. Because of this, Cloud Spanner cannot perform reads - # at read timestamps more than one hour in the past. This - # restriction also applies to in-progress reads and/or SQL queries whose - # timestamp become too old while executing. Reads and SQL queries with - # too-old read timestamps fail with the error `FAILED_PRECONDITION`. - # Corresponds to the JSON property `options` - # @return [Google::Apis::SpannerV1::TransactionOptions] - attr_accessor :options - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @options = args[:options] if args.key?(:options) - end - end - - # The response for ListInstanceConfigs. - class ListInstanceConfigsResponse - include Google::Apis::Core::Hashable - - # `next_page_token` can be sent in a subsequent - # ListInstanceConfigs call to - # fetch more of the matching instance configurations. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # The list of requested instance configurations. - # Corresponds to the JSON property `instanceConfigs` - # @return [Array] - attr_accessor :instance_configs - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @instance_configs = args[:instance_configs] if args.key?(:instance_configs) - end - end - - # Request message for `GetIamPolicy` method. - class GetIamPolicyRequest - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - 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] - 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 - - # A rule to be applied in a Policy. - class Rule - include Google::Apis::Core::Hashable - - # If one or more 'not_in' clauses are specified, the rule matches - # if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries. - # The format for in and not_in entries is the same as for members in a - # Binding (see google/iam/v1/policy.proto). - # Corresponds to the JSON property `notIn` - # @return [Array] - attr_accessor :not_in - - # Human-readable description of the rule. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Additional restrictions that must be met - # Corresponds to the JSON property `conditions` - # @return [Array] - attr_accessor :conditions - - # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries - # that match the LOG action. - # Corresponds to the JSON property `logConfig` - # @return [Array] - attr_accessor :log_config - - # If one or more 'in' clauses are specified, the rule matches if - # the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries. - # Corresponds to the JSON property `in` - # @return [Array] - attr_accessor :in - - # A permission is a string of form '..' - # (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, - # and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs. - # Corresponds to the JSON property `permissions` - # @return [Array] - attr_accessor :permissions - - # Required - # Corresponds to the JSON property `action` - # @return [String] - attr_accessor :action - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @not_in = args[:not_in] if args.key?(:not_in) - @description = args[:description] if args.key?(:description) - @conditions = args[:conditions] if args.key?(:conditions) - @log_config = args[:log_config] if args.key?(:log_config) - @in = args[:in] if args.key?(:in) - @permissions = args[:permissions] if args.key?(:permissions) - @action = args[:action] if args.key?(:action) - end - end - - # Metadata type for the operation returned by - # CreateDatabase. - class CreateDatabaseMetadata - include Google::Apis::Core::Hashable - - # The database being created. - # Corresponds to the JSON property `database` - # @return [String] - attr_accessor :database - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @database = args[:database] if args.key?(:database) - end - end - - # Specifies what kind of log the caller must write - class LogConfig - include Google::Apis::Core::Hashable - - # Write a Data Access (Gin) log - # Corresponds to the JSON property `dataAccess` - # @return [Google::Apis::SpannerV1::DataAccessOptions] - attr_accessor :data_access - - # Write a Cloud Audit log - # Corresponds to the JSON property `cloudAudit` - # @return [Google::Apis::SpannerV1::CloudAuditOptions] - attr_accessor :cloud_audit - - # Options for counters - # Corresponds to the JSON property `counter` - # @return [Google::Apis::SpannerV1::CounterOptions] - attr_accessor :counter - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @data_access = args[:data_access] if args.key?(:data_access) - @cloud_audit = args[:cloud_audit] if args.key?(:cloud_audit) - @counter = args[:counter] if args.key?(:counter) - end - end - - # A session in the Cloud Spanner API. - class Session - include Google::Apis::Core::Hashable - - # Required. The name of the session. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @name = args[:name] if args.key?(:name) - end - end - - # The response for ListInstances. - class ListInstancesResponse - include Google::Apis::Core::Hashable - - # `next_page_token` can be sent in a subsequent - # ListInstances call to fetch more - # of the matching instances. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # The list of requested instances. - # Corresponds to the JSON property `instances` - # @return [Array] - attr_accessor :instances - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @instances = args[:instances] if args.key?(:instances) - end - end - - # KeyRange represents a range of rows in a table or index. - # A range has a start key and an end key. These keys can be open or - # closed, indicating if the range includes rows with that key. - # Keys are represented by lists, where the ith value in the list - # corresponds to the ith component of the table or index primary key. - # Individual values are encoded as described here. - # For example, consider the following table definition: - # CREATE TABLE UserEvents ( - # UserName STRING(MAX), - # EventDate STRING(10) - # ) PRIMARY KEY(UserName, EventDate); - # The following keys name rows in this table: - # "Bob", "2014-09-23" - # Since the `UserEvents` table's `PRIMARY KEY` clause names two - # columns, each `UserEvents` key has two elements; the first is the - # `UserName`, and the second is the `EventDate`. - # Key ranges with multiple components are interpreted - # lexicographically by component using the table or index key's declared - # sort order. For example, the following range returns all events for - # user `"Bob"` that occurred in the year 2015: - # "start_closed": ["Bob", "2015-01-01"] - # "end_closed": ["Bob", "2015-12-31"] - # Start and end keys can omit trailing key components. This affects the - # inclusion and exclusion of rows that exactly match the provided key - # components: if the key is closed, then rows that exactly match the - # provided components are included; if the key is open, then rows - # that exactly match are not included. - # For example, the following range includes all events for `"Bob"` that - # occurred during and after the year 2000: - # "start_closed": ["Bob", "2000-01-01"] - # "end_closed": ["Bob"] - # The next example retrieves all events for `"Bob"`: - # "start_closed": ["Bob"] - # "end_closed": ["Bob"] - # To retrieve events before the year 2000: - # "start_closed": ["Bob"] - # "end_open": ["Bob", "2000-01-01"] - # The following range includes all rows in the table: - # "start_closed": [] - # "end_closed": [] - # This range returns all users whose `UserName` begins with any - # character from A to C: - # "start_closed": ["A"] - # "end_open": ["D"] - # This range returns all users whose `UserName` begins with B: - # "start_closed": ["B"] - # "end_open": ["C"] - # Key ranges honor column sort order. For example, suppose a table is - # defined as follows: - # CREATE TABLE DescendingSortedTable ` - # Key INT64, - # ... - # ) PRIMARY KEY(Key DESC); - # The following range retrieves all rows with key values between 1 - # and 100 inclusive: - # "start_closed": ["100"] - # "end_closed": ["1"] - # Note that 100 is passed as the start, and 1 is passed as the end, - # because `Key` is a descending column in the schema. - class KeyRange - include Google::Apis::Core::Hashable - - # If the end is open, then the range excludes rows whose first - # `len(end_open)` key columns exactly match `end_open`. - # Corresponds to the JSON property `endOpen` - # @return [Array] - attr_accessor :end_open - - # If the end is closed, then the range includes all rows whose - # first `len(end_closed)` key columns exactly match `end_closed`. - # Corresponds to the JSON property `endClosed` - # @return [Array] - attr_accessor :end_closed - - # If the start is closed, then the range includes all rows whose - # first `len(start_closed)` key columns exactly match `start_closed`. - # Corresponds to the JSON property `startClosed` - # @return [Array] - attr_accessor :start_closed - - # If the start is open, then the range excludes rows whose first - # `len(start_open)` key columns exactly match `start_open`. - # Corresponds to the JSON property `startOpen` - # @return [Array] - attr_accessor :start_open - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @end_open = args[:end_open] if args.key?(:end_open) - @end_closed = args[:end_closed] if args.key?(:end_closed) - @start_closed = args[:start_closed] if args.key?(:start_closed) - @start_open = args[:start_open] if args.key?(:start_open) - end - end - - # Condensed representation of a node and its subtree. Only present for - # `SCALAR` PlanNode(s). - class ShortRepresentation - include Google::Apis::Core::Hashable - - # A string representation of the expression subtree rooted at this node. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # A mapping of (subquery variable name) -> (subquery node id) for cases - # where the `description` string of this node references a `SCALAR` - # subquery contained in the expression subtree rooted at this node. The - # referenced `SCALAR` subquery may not necessarily be a direct child of - # this node. - # Corresponds to the JSON property `subqueries` - # @return [Hash] - attr_accessor :subqueries - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @description = args[:description] if args.key?(:description) - @subqueries = args[:subqueries] if args.key?(:subqueries) - end - end - - # A possible configuration for a Cloud Spanner instance. Configurations - # define the geographic placement of nodes and their replication. - class InstanceConfig - include Google::Apis::Core::Hashable - - # A unique identifier for the instance configuration. Values - # are of the form - # `projects//instanceConfigs/a-z*` - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The name of this instance configuration as it appears in UIs. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @name = args[:name] if args.key?(:name) - @display_name = args[:display_name] if args.key?(:display_name) - end - end - - # The request for UpdateInstance. - class UpdateInstanceRequest - include Google::Apis::Core::Hashable - - # An isolated set of Cloud Spanner resources on which databases can be hosted. - # Corresponds to the JSON property `instance` - # @return [Google::Apis::SpannerV1::Instance] - attr_accessor :instance - - # Required. A mask specifying which fields in [][google.spanner.admin.instance. - # v1.UpdateInstanceRequest.instance] should be updated. - # The field mask must always be specified; this prevents any future fields in - # [][google.spanner.admin.instance.v1.Instance] from being erased accidentally - # by clients that do not know - # about them. - # Corresponds to the JSON property `fieldMask` - # @return [String] - attr_accessor :field_mask - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @instance = args[:instance] if args.key?(:instance) - @field_mask = args[:field_mask] if args.key?(:field_mask) - end - end - - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # service Foo ` - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # ` - # The JSON representation for `Empty` is empty JSON object ````. - class Empty - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # # Transactions - # Each session can have at most one active transaction at a time. After the - # active transaction is completed, the session can immediately be - # re-used for the next transaction. It is not necessary to create a - # new session for each transaction. - # # Transaction Modes - # Cloud Spanner supports two transaction modes: - # 1. Locking read-write. This type of transaction is the only way - # to write data into Cloud Spanner. These transactions rely on - # pessimistic locking and, if necessary, two-phase commit. - # Locking read-write transactions may abort, requiring the - # application to retry. - # 2. Snapshot read-only. This transaction type provides guaranteed - # consistency across several reads, but does not allow - # writes. Snapshot read-only transactions can be configured to - # read at timestamps in the past. Snapshot read-only - # transactions do not need to be committed. - # For transactions that only read, snapshot read-only transactions - # provide simpler semantics and are almost always faster. In - # particular, read-only transactions do not take locks, so they do - # not conflict with read-write transactions. As a consequence of not - # taking locks, they also do not abort, so retry loops are not needed. - # Transactions may only read/write data in a single database. They - # may, however, read/write data in different tables within that - # database. - # ## Locking Read-Write Transactions - # Locking transactions may be used to atomically read-modify-write - # data anywhere in a database. This type of transaction is externally - # consistent. - # Clients should attempt to minimize the amount of time a transaction - # is active. Faster transactions commit with higher probability - # and cause less contention. Cloud Spanner attempts to keep read locks - # active as long as the transaction continues to do reads, and the - # transaction has not been terminated by - # Commit or - # Rollback. Long periods of - # inactivity at the client may cause Cloud Spanner to release a - # transaction's locks and abort it. - # Reads performed within a transaction acquire locks on the data - # being read. Writes can only be done at commit time, after all reads - # have been completed. - # Conceptually, a read-write transaction consists of zero or more - # reads or SQL queries followed by - # Commit. At any time before - # Commit, the client can send a - # Rollback request to abort the - # transaction. - # ### Semantics - # Cloud Spanner can commit the transaction if all read locks it acquired - # are still valid at commit time, and it is able to acquire write - # locks for all writes. Cloud Spanner can abort the transaction for any - # reason. If a commit attempt returns `ABORTED`, Cloud Spanner guarantees - # that the transaction has not modified any user data in Cloud Spanner. - # Unless the transaction commits, Cloud Spanner makes no guarantees about - # how long the transaction's locks were held for. It is an error to - # use Cloud Spanner locks for any sort of mutual exclusion other than - # between Cloud Spanner transactions themselves. - # ### Retrying Aborted Transactions - # When a transaction aborts, the application can choose to retry the - # whole transaction again. To maximize the chances of successfully - # committing the retry, the client should execute the retry in the - # same session as the original attempt. The original session's lock - # priority increases with each consecutive abort, meaning that each - # attempt has a slightly better chance of success than the previous. - # Under some circumstances (e.g., many transactions attempting to - # modify the same row(s)), a transaction can abort many times in a - # short period before successfully committing. Thus, it is not a good - # idea to cap the number of retries a transaction can attempt; - # instead, it is better to limit the total amount of wall time spent - # retrying. - # ### Idle Transactions - # A transaction is considered idle if it has no outstanding reads or - # SQL queries and has not started a read or SQL query within the last 10 - # seconds. Idle transactions can be aborted by Cloud Spanner so that they - # don't hold on to locks indefinitely. In that case, the commit will - # fail with error `ABORTED`. - # If this behavior is undesirable, periodically executing a simple - # SQL query in the transaction (e.g., `SELECT 1`) prevents the - # transaction from becoming idle. - # ## Snapshot Read-Only Transactions - # Snapshot read-only transactions provides a simpler method than - # locking read-write transactions for doing several consistent - # reads. However, this type of transaction does not support writes. - # Snapshot transactions do not take locks. Instead, they work by - # choosing a Cloud Spanner timestamp, then executing all reads at that - # timestamp. Since they do not acquire locks, they do not block - # concurrent read-write transactions. - # Unlike locking read-write transactions, snapshot read-only - # transactions never abort. They can fail if the chosen read - # timestamp is garbage collected; however, the default garbage - # collection policy is generous enough that most applications do not - # need to worry about this in practice. - # Snapshot read-only transactions do not need to call - # Commit or - # Rollback (and in fact are not - # permitted to do so). - # To execute a snapshot transaction, the client specifies a timestamp - # bound, which tells Cloud Spanner how to choose a read timestamp. - # The types of timestamp bound are: - # - Strong (the default). - # - Bounded staleness. - # - Exact staleness. - # If the Cloud Spanner database to be read is geographically distributed, - # stale read-only transactions can execute more quickly than strong - # or read-write transaction, because they are able to execute far - # from the leader replica. - # Each type of timestamp bound is discussed in detail below. - # ### Strong - # Strong reads are guaranteed to see the effects of all transactions - # that have committed before the start of the read. Furthermore, all - # rows yielded by a single read are consistent with each other -- if - # any part of the read observes a transaction, all parts of the read - # see the transaction. - # Strong reads are not repeatable: two consecutive strong read-only - # transactions might return inconsistent results if there are - # concurrent writes. If consistency across reads is required, the - # reads should be executed within a transaction or at an exact read - # timestamp. - # See TransactionOptions.ReadOnly.strong. - # ### Exact Staleness - # These timestamp bounds execute reads at a user-specified - # timestamp. Reads at a timestamp are guaranteed to see a consistent - # prefix of the global transaction history: they observe - # modifications done by all transactions with a commit timestamp <= - # the read timestamp, and observe none of the modifications done by - # transactions with a larger commit timestamp. They will block until - # all conflicting transactions that may be assigned commit timestamps - # <= the read timestamp have finished. - # The timestamp can either be expressed as an absolute Cloud Spanner commit - # timestamp or a staleness relative to the current time. - # These modes do not require a "negotiation phase" to pick a - # timestamp. As a result, they execute slightly faster than the - # equivalent boundedly stale concurrency modes. On the other hand, - # boundedly stale reads usually return fresher results. - # See TransactionOptions.ReadOnly.read_timestamp and - # TransactionOptions.ReadOnly.exact_staleness. - # ### Bounded Staleness - # Bounded staleness modes allow Cloud Spanner to pick the read timestamp, - # subject to a user-provided staleness bound. Cloud Spanner chooses the - # newest timestamp within the staleness bound that allows execution - # of the reads at the closest available replica without blocking. - # All rows yielded are consistent with each other -- if any part of - # the read observes a transaction, all parts of the read see the - # transaction. Boundedly stale reads are not repeatable: two stale - # reads, even if they use the same staleness bound, can execute at - # different timestamps and thus return inconsistent results. - # Boundedly stale reads execute in two phases: the first phase - # negotiates a timestamp among all replicas needed to serve the - # read. In the second phase, reads are executed at the negotiated - # timestamp. - # As a result of the two phase execution, bounded staleness reads are - # usually a little slower than comparable exact staleness - # reads. However, they are typically able to return fresher - # results, and are more likely to execute at the closest replica. - # Because the timestamp negotiation requires up-front knowledge of - # which rows will be read, it can only be used with single-use - # read-only transactions. - # See TransactionOptions.ReadOnly.max_staleness and - # TransactionOptions.ReadOnly.min_read_timestamp. - # ### Old Read Timestamps and Garbage Collection - # Cloud Spanner continuously garbage collects deleted and overwritten data - # in the background to reclaim storage space. This process is known - # as "version GC". By default, version GC reclaims versions after they - # are one hour old. Because of this, Cloud Spanner cannot perform reads - # at read timestamps more than one hour in the past. This - # restriction also applies to in-progress reads and/or SQL queries whose - # timestamp become too old while executing. Reads and SQL queries with - # too-old read timestamps fail with the error `FAILED_PRECONDITION`. - class TransactionOptions - include Google::Apis::Core::Hashable - - # Options for read-write transactions. - # Corresponds to the JSON property `readWrite` - # @return [Google::Apis::SpannerV1::ReadWrite] - attr_accessor :read_write - - # Options for read-only transactions. - # Corresponds to the JSON property `readOnly` - # @return [Google::Apis::SpannerV1::ReadOnly] - attr_accessor :read_only - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @read_write = args[:read_write] if args.key?(:read_write) - @read_only = args[:read_only] if args.key?(:read_only) - end - end - - # The request for CreateDatabase. - class CreateDatabaseRequest - include Google::Apis::Core::Hashable - - # An optional list of DDL statements to run inside the newly created - # database. Statements can create tables, indexes, etc. These - # statements execute atomically with the creation of the database: - # if there is an error in any statement, the database is not created. - # Corresponds to the JSON property `extraStatements` - # @return [Array] - attr_accessor :extra_statements - - # Required. A `CREATE DATABASE` statement, which specifies the ID of the - # new database. The database ID must conform to the regular expression - # `a-z*[a-z0-9]` and be between 2 and 30 characters in length. - # If the database ID is a reserved word or if it contains a hyphen, the - # database ID must be enclosed in backticks (`` ` ``). - # Corresponds to the JSON property `createStatement` - # @return [String] - attr_accessor :create_statement - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @extra_statements = args[:extra_statements] if args.key?(:extra_statements) - @create_statement = args[:create_statement] if args.key?(:create_statement) - end - end end end end diff --git a/generated/google/apis/spanner_v1/representations.rb b/generated/google/apis/spanner_v1/representations.rb index ef2655dcc..d73072de2 100644 --- a/generated/google/apis/spanner_v1/representations.rb +++ b/generated/google/apis/spanner_v1/representations.rb @@ -22,144 +22,6 @@ module Google module Apis module SpannerV1 - class CreateInstanceRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Condition - 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 ReadOnly - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ExecuteSqlRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Policy - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ReadRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Write - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DataAccessOptions - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ReadWrite - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Operation - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Status - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ResultSet - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateDatabaseDdlRequest - 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 PartialResultSet - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListOperationsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateInstanceMetadata - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ResultSetMetadata - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class TransactionSelector - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Mutation - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class KeySet - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class GetDatabaseDdlResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class Database class Representation < Google::Apis::Core::JsonRepresentation; end @@ -286,7 +148,7 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class CommitRequest + class ListInstanceConfigsResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -298,13 +160,7 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class ListInstanceConfigsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class GetIamPolicyRequest + class CommitRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -316,6 +172,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class GetIamPolicyRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class Rule class Representation < Google::Apis::Core::JsonRepresentation; end @@ -340,13 +202,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class ListInstancesResponse + class KeyRange class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class KeyRange + class ListInstancesResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -389,256 +251,141 @@ module Google end class CreateInstanceRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :instance_id, as: 'instanceId' - property :instance, as: 'instance', class: Google::Apis::SpannerV1::Instance, decorator: Google::Apis::SpannerV1::Instance::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class Condition - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :value, as: 'value' - property :sys, as: 'sys' - property :iam, as: 'iam' - collection :values, as: 'values' - property :op, as: 'op' - property :svc, as: 'svc' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class AuditLogConfig - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :log_type, as: 'logType' - collection :exempted_members, as: 'exemptedMembers' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ReadOnly - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :strong, as: 'strong' - property :min_read_timestamp, as: 'minReadTimestamp' - property :max_staleness, as: 'maxStaleness' - property :read_timestamp, as: 'readTimestamp' - property :return_read_timestamp, as: 'returnReadTimestamp' - property :exact_staleness, as: 'exactStaleness' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ExecuteSqlRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :query_mode, as: 'queryMode' - property :transaction, as: 'transaction', class: Google::Apis::SpannerV1::TransactionSelector, decorator: Google::Apis::SpannerV1::TransactionSelector::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :resume_token, :base64 => true, as: 'resumeToken' - hash :param_types, as: 'paramTypes', class: Google::Apis::SpannerV1::Type, decorator: Google::Apis::SpannerV1::Type::Representation - - property :sql, as: 'sql' - hash :params, as: 'params' - end + include Google::Apis::Core::JsonObjectSupport end class Policy - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :version, as: 'version' - collection :audit_configs, as: 'auditConfigs', class: Google::Apis::SpannerV1::AuditConfig, decorator: Google::Apis::SpannerV1::AuditConfig::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - collection :bindings, as: 'bindings', class: Google::Apis::SpannerV1::Binding, decorator: Google::Apis::SpannerV1::Binding::Representation - - property :etag, :base64 => true, as: 'etag' - property :iam_owned, as: 'iamOwned' - collection :rules, as: 'rules', class: Google::Apis::SpannerV1::Rule, decorator: Google::Apis::SpannerV1::Rule::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class ReadRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :table, as: 'table' - property :limit, :numeric_string => true, as: 'limit' - property :index, as: 'index' - property :key_set, as: 'keySet', class: Google::Apis::SpannerV1::KeySet, decorator: Google::Apis::SpannerV1::KeySet::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - collection :columns, as: 'columns' - property :transaction, as: 'transaction', class: Google::Apis::SpannerV1::TransactionSelector, decorator: Google::Apis::SpannerV1::TransactionSelector::Representation - - property :resume_token, :base64 => true, as: 'resumeToken' - end + include Google::Apis::Core::JsonObjectSupport end class Write - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :columns, as: 'columns' - collection :values, as: 'values', :class => Array do - include Representable::JSON::Collection - items - end + class Representation < Google::Apis::Core::JsonRepresentation; end - property :table, as: 'table' - end + include Google::Apis::Core::JsonObjectSupport end class DataAccessOptions - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ReadWrite - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class Operation - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :error, as: 'error', class: Google::Apis::SpannerV1::Status, decorator: Google::Apis::SpannerV1::Status::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - hash :metadata, as: 'metadata' - property :done, as: 'done' - hash :response, as: 'response' - property :name, as: 'name' - end + include Google::Apis::Core::JsonObjectSupport end class Status - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :code, as: 'code' - property :message, as: 'message' - collection :details, as: 'details' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ResultSet - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :stats, as: 'stats', class: Google::Apis::SpannerV1::ResultSetStats, decorator: Google::Apis::SpannerV1::ResultSetStats::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - collection :rows, as: 'rows', :class => Array do - include Representable::JSON::Collection - items - end - - property :metadata, as: 'metadata', class: Google::Apis::SpannerV1::ResultSetMetadata, decorator: Google::Apis::SpannerV1::ResultSetMetadata::Representation - - end - end - - class UpdateDatabaseDdlRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :statements, as: 'statements' - property :operation_id, as: 'operationId' - end + include Google::Apis::Core::JsonObjectSupport end class Binding - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :members, as: 'members' - property :role, as: 'role' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UpdateDatabaseDdlRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class PartialResultSet - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :chunked_value, as: 'chunkedValue' - property :metadata, as: 'metadata', class: Google::Apis::SpannerV1::ResultSetMetadata, decorator: Google::Apis::SpannerV1::ResultSetMetadata::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - collection :values, as: 'values' - property :resume_token, :base64 => true, as: 'resumeToken' - property :stats, as: 'stats', class: Google::Apis::SpannerV1::ResultSetStats, decorator: Google::Apis::SpannerV1::ResultSetStats::Representation - - end - end - - class ListOperationsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :operations, as: 'operations', class: Google::Apis::SpannerV1::Operation, decorator: Google::Apis::SpannerV1::Operation::Representation - - property :next_page_token, as: 'nextPageToken' - end + include Google::Apis::Core::JsonObjectSupport end class UpdateInstanceMetadata - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :cancel_time, as: 'cancelTime' - property :end_time, as: 'endTime' - property :instance, as: 'instance', class: Google::Apis::SpannerV1::Instance, decorator: Google::Apis::SpannerV1::Instance::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :start_time, as: 'startTime' - end + include Google::Apis::Core::JsonObjectSupport + end + + class ListOperationsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ResultSetMetadata - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :transaction, as: 'transaction', class: Google::Apis::SpannerV1::Transaction, decorator: Google::Apis::SpannerV1::Transaction::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :row_type, as: 'rowType', class: Google::Apis::SpannerV1::StructType, decorator: Google::Apis::SpannerV1::StructType::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class TransactionSelector - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :single_use, as: 'singleUse', class: Google::Apis::SpannerV1::TransactionOptions, decorator: Google::Apis::SpannerV1::TransactionOptions::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :begin, as: 'begin', class: Google::Apis::SpannerV1::TransactionOptions, decorator: Google::Apis::SpannerV1::TransactionOptions::Representation - - property :id, :base64 => true, as: 'id' - end - end - - class Mutation - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :insert, as: 'insert', class: Google::Apis::SpannerV1::Write, decorator: Google::Apis::SpannerV1::Write::Representation - - property :insert_or_update, as: 'insertOrUpdate', class: Google::Apis::SpannerV1::Write, decorator: Google::Apis::SpannerV1::Write::Representation - - property :update, as: 'update', class: Google::Apis::SpannerV1::Write, decorator: Google::Apis::SpannerV1::Write::Representation - - property :replace, as: 'replace', class: Google::Apis::SpannerV1::Write, decorator: Google::Apis::SpannerV1::Write::Representation - - property :delete, as: 'delete', class: Google::Apis::SpannerV1::Delete, decorator: Google::Apis::SpannerV1::Delete::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class KeySet - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :ranges, as: 'ranges', class: Google::Apis::SpannerV1::KeyRange, decorator: Google::Apis::SpannerV1::KeyRange::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - collection :keys, as: 'keys', :class => Array do - include Representable::JSON::Collection - items + include Google::Apis::Core::JsonObjectSupport end - property :all, as: 'all' - end + class Mutation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class GetDatabaseDdlResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :statements, as: 'statements' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class Database @@ -652,21 +399,21 @@ module Google class Instance # @private class Representation < Google::Apis::Core::JsonRepresentation + property :display_name, as: 'displayName' + property :node_count, as: 'nodeCount' hash :labels, as: 'labels' property :config, as: 'config' property :state, as: 'state' property :name, as: 'name' - property :display_name, as: 'displayName' - property :node_count, as: 'nodeCount' end end class SetIamPolicyRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :update_mask, as: 'updateMask' property :policy, as: 'policy', class: Google::Apis::SpannerV1::Policy, decorator: Google::Apis::SpannerV1::Policy::Representation + property :update_mask, as: 'updateMask' end end @@ -689,17 +436,17 @@ module Google class Transaction # @private class Representation < Google::Apis::Core::JsonRepresentation - property :id, :base64 => true, as: 'id' property :read_timestamp, as: 'readTimestamp' + property :id, :base64 => true, as: 'id' end end class UpdateDatabaseDdlMetadata # @private class Representation < Google::Apis::Core::JsonRepresentation + property :database, as: 'database' collection :statements, as: 'statements' collection :commit_timestamps, as: 'commitTimestamps' - property :database, as: 'database' end end @@ -762,17 +509,19 @@ module Google class Type # @private class Representation < Google::Apis::Core::JsonRepresentation + property :code, as: 'code' property :struct_type, as: 'structType', class: Google::Apis::SpannerV1::StructType, decorator: Google::Apis::SpannerV1::StructType::Representation property :array_element_type, as: 'arrayElementType', class: Google::Apis::SpannerV1::Type, decorator: Google::Apis::SpannerV1::Type::Representation - property :code, as: 'code' end end class PlanNode # @private class Representation < Google::Apis::Core::JsonRepresentation + hash :metadata, as: 'metadata' + hash :execution_stats, as: 'executionStats' property :short_representation, as: 'shortRepresentation', class: Google::Apis::SpannerV1::ShortRepresentation, decorator: Google::Apis::SpannerV1::ShortRepresentation::Representation property :index, as: 'index' @@ -780,29 +529,27 @@ module Google property :kind, as: 'kind' collection :child_links, as: 'childLinks', class: Google::Apis::SpannerV1::ChildLink, decorator: Google::Apis::SpannerV1::ChildLink::Representation - hash :metadata, as: 'metadata' - hash :execution_stats, as: 'executionStats' end end class CreateInstanceMetadata # @private class Representation < Google::Apis::Core::JsonRepresentation - property :cancel_time, as: 'cancelTime' - property :end_time, as: 'endTime' property :instance, as: 'instance', class: Google::Apis::SpannerV1::Instance, decorator: Google::Apis::SpannerV1::Instance::Representation property :start_time, as: 'startTime' + property :cancel_time, as: 'cancelTime' + property :end_time, as: 'endTime' end end class AuditConfig # @private class Representation < Google::Apis::Core::JsonRepresentation + property :service, as: 'service' collection :audit_log_configs, as: 'auditLogConfigs', class: Google::Apis::SpannerV1::AuditLogConfig, decorator: Google::Apis::SpannerV1::AuditLogConfig::Representation collection :exempted_members, as: 'exemptedMembers' - property :service, as: 'service' end end @@ -824,9 +571,26 @@ module Google class Delete # @private class Representation < Google::Apis::Core::JsonRepresentation - property :table, as: 'table' property :key_set, as: 'keySet', class: Google::Apis::SpannerV1::KeySet, decorator: Google::Apis::SpannerV1::KeySet::Representation + property :table, as: 'table' + end + end + + class ListInstanceConfigsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :instance_configs, as: 'instanceConfigs', class: Google::Apis::SpannerV1::InstanceConfig, decorator: Google::Apis::SpannerV1::InstanceConfig::Representation + + end + end + + class BeginTransactionRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :options, as: 'options', class: Google::Apis::SpannerV1::TransactionOptions, decorator: Google::Apis::SpannerV1::TransactionOptions::Representation + end end @@ -841,20 +605,10 @@ module Google end end - class BeginTransactionRequest + class TestIamPermissionsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - property :options, as: 'options', class: Google::Apis::SpannerV1::TransactionOptions, decorator: Google::Apis::SpannerV1::TransactionOptions::Representation - - end - end - - class ListInstanceConfigsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - collection :instance_configs, as: 'instanceConfigs', class: Google::Apis::SpannerV1::InstanceConfig, decorator: Google::Apis::SpannerV1::InstanceConfig::Representation - + collection :permissions, as: 'permissions' end end @@ -864,13 +618,6 @@ module Google end end - class TestIamPermissionsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :permissions, as: 'permissions' - end - end - class Rule # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -912,6 +659,16 @@ module Google end end + class KeyRange + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :start_closed, as: 'startClosed' + collection :start_open, as: 'startOpen' + collection :end_open, as: 'endOpen' + collection :end_closed, as: 'endClosed' + end + end + class ListInstancesResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -921,16 +678,6 @@ module Google end end - class KeyRange - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :end_open, as: 'endOpen' - collection :end_closed, as: 'endClosed' - collection :start_closed, as: 'startClosed' - collection :start_open, as: 'startOpen' - end - end - class ShortRepresentation # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -979,6 +726,259 @@ module Google property :create_statement, as: 'createStatement' end end + + class CreateInstanceRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :instance, as: 'instance', class: Google::Apis::SpannerV1::Instance, decorator: Google::Apis::SpannerV1::Instance::Representation + + property :instance_id, as: 'instanceId' + end + end + + class Condition + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :iam, as: 'iam' + collection :values, as: 'values' + property :op, as: 'op' + property :svc, as: 'svc' + property :value, as: 'value' + property :sys, as: 'sys' + end + end + + class AuditLogConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :log_type, as: 'logType' + collection :exempted_members, as: 'exemptedMembers' + end + end + + class ReadOnly + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :max_staleness, as: 'maxStaleness' + property :read_timestamp, as: 'readTimestamp' + property :return_read_timestamp, as: 'returnReadTimestamp' + property :exact_staleness, as: 'exactStaleness' + property :strong, as: 'strong' + property :min_read_timestamp, as: 'minReadTimestamp' + end + end + + class ExecuteSqlRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + hash :params, as: 'params' + property :query_mode, as: 'queryMode' + property :transaction, as: 'transaction', class: Google::Apis::SpannerV1::TransactionSelector, decorator: Google::Apis::SpannerV1::TransactionSelector::Representation + + property :resume_token, :base64 => true, as: 'resumeToken' + hash :param_types, as: 'paramTypes', class: Google::Apis::SpannerV1::Type, decorator: Google::Apis::SpannerV1::Type::Representation + + property :sql, as: 'sql' + end + end + + class Policy + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :etag, :base64 => true, as: 'etag' + property :iam_owned, as: 'iamOwned' + collection :rules, as: 'rules', class: Google::Apis::SpannerV1::Rule, decorator: Google::Apis::SpannerV1::Rule::Representation + + property :version, as: 'version' + collection :audit_configs, as: 'auditConfigs', class: Google::Apis::SpannerV1::AuditConfig, decorator: Google::Apis::SpannerV1::AuditConfig::Representation + + collection :bindings, as: 'bindings', class: Google::Apis::SpannerV1::Binding, decorator: Google::Apis::SpannerV1::Binding::Representation + + end + end + + class ReadRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :columns, as: 'columns' + property :transaction, as: 'transaction', class: Google::Apis::SpannerV1::TransactionSelector, decorator: Google::Apis::SpannerV1::TransactionSelector::Representation + + property :resume_token, :base64 => true, as: 'resumeToken' + property :table, as: 'table' + property :limit, :numeric_string => true, as: 'limit' + property :index, as: 'index' + property :key_set, as: 'keySet', class: Google::Apis::SpannerV1::KeySet, decorator: Google::Apis::SpannerV1::KeySet::Representation + + end + end + + class Write + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :table, as: 'table' + collection :columns, as: 'columns' + collection :values, as: 'values', :class => Array do + include Representable::JSON::Collection + items + end + + end + end + + class DataAccessOptions + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class ReadWrite + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class Operation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :name, as: 'name' + property :error, as: 'error', class: Google::Apis::SpannerV1::Status, decorator: Google::Apis::SpannerV1::Status::Representation + + hash :metadata, as: 'metadata' + property :done, as: 'done' + hash :response, as: 'response' + end + end + + class Status + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :details, as: 'details' + property :code, as: 'code' + property :message, as: 'message' + end + end + + class ResultSet + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :rows, as: 'rows', :class => Array do + include Representable::JSON::Collection + items + end + + property :metadata, as: 'metadata', class: Google::Apis::SpannerV1::ResultSetMetadata, decorator: Google::Apis::SpannerV1::ResultSetMetadata::Representation + + property :stats, as: 'stats', class: Google::Apis::SpannerV1::ResultSetStats, decorator: Google::Apis::SpannerV1::ResultSetStats::Representation + + end + end + + class Binding + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :members, as: 'members' + property :role, as: 'role' + end + end + + class UpdateDatabaseDdlRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :statements, as: 'statements' + property :operation_id, as: 'operationId' + end + end + + class PartialResultSet + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :stats, as: 'stats', class: Google::Apis::SpannerV1::ResultSetStats, decorator: Google::Apis::SpannerV1::ResultSetStats::Representation + + property :chunked_value, as: 'chunkedValue' + property :metadata, as: 'metadata', class: Google::Apis::SpannerV1::ResultSetMetadata, decorator: Google::Apis::SpannerV1::ResultSetMetadata::Representation + + collection :values, as: 'values' + property :resume_token, :base64 => true, as: 'resumeToken' + end + end + + class UpdateInstanceMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :cancel_time, as: 'cancelTime' + property :end_time, as: 'endTime' + property :instance, as: 'instance', class: Google::Apis::SpannerV1::Instance, decorator: Google::Apis::SpannerV1::Instance::Representation + + property :start_time, as: 'startTime' + end + end + + class ListOperationsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :operations, as: 'operations', class: Google::Apis::SpannerV1::Operation, decorator: Google::Apis::SpannerV1::Operation::Representation + + end + end + + class ResultSetMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :row_type, as: 'rowType', class: Google::Apis::SpannerV1::StructType, decorator: Google::Apis::SpannerV1::StructType::Representation + + property :transaction, as: 'transaction', class: Google::Apis::SpannerV1::Transaction, decorator: Google::Apis::SpannerV1::Transaction::Representation + + end + end + + class TransactionSelector + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :single_use, as: 'singleUse', class: Google::Apis::SpannerV1::TransactionOptions, decorator: Google::Apis::SpannerV1::TransactionOptions::Representation + + property :begin, as: 'begin', class: Google::Apis::SpannerV1::TransactionOptions, decorator: Google::Apis::SpannerV1::TransactionOptions::Representation + + property :id, :base64 => true, as: 'id' + end + end + + class KeySet + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :ranges, as: 'ranges', class: Google::Apis::SpannerV1::KeyRange, decorator: Google::Apis::SpannerV1::KeyRange::Representation + + collection :keys, as: 'keys', :class => Array do + include Representable::JSON::Collection + items + end + + property :all, as: 'all' + end + end + + class Mutation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :insert, as: 'insert', class: Google::Apis::SpannerV1::Write, decorator: Google::Apis::SpannerV1::Write::Representation + + property :insert_or_update, as: 'insertOrUpdate', class: Google::Apis::SpannerV1::Write, decorator: Google::Apis::SpannerV1::Write::Representation + + property :update, as: 'update', class: Google::Apis::SpannerV1::Write, decorator: Google::Apis::SpannerV1::Write::Representation + + property :replace, as: 'replace', class: Google::Apis::SpannerV1::Write, decorator: Google::Apis::SpannerV1::Write::Representation + + property :delete, as: 'delete', class: Google::Apis::SpannerV1::Delete, decorator: Google::Apis::SpannerV1::Delete::Representation + + end + end + + class GetDatabaseDdlResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :statements, as: 'statements' + end + end end end end diff --git a/generated/google/apis/spanner_v1/service.rb b/generated/google/apis/spanner_v1/service.rb index cdd3a270d..c8bfdf9a2 100644 --- a/generated/google/apis/spanner_v1/service.rb +++ b/generated/google/apis/spanner_v1/service.rb @@ -48,10 +48,18 @@ module Google @batch_path = 'batch' end - # Gets information about a particular instance. - # @param [String] name - # Required. The name of the requested instance. Values are of the form - # `projects//instances/`. + # Lists the supported instance configurations for a given project. + # @param [String] parent + # Required. The name of the project for which a list of supported instance + # configurations is requested. Values are of the form + # `projects/`. + # @param [Fixnum] page_size + # Number of instance configurations to be returned in the response. If 0 or + # less, defaults to the server's maximum allowed page size. + # @param [String] page_token + # If non-empty, `page_token` should contain a + # next_page_token + # from a previous ListInstanceConfigsResponse. # @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. @@ -61,131 +69,57 @@ module Google # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SpannerV1::Instance] parsed result object + # @yieldparam result [Google::Apis::SpannerV1::ListInstanceConfigsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::SpannerV1::Instance] + # @return [Google::Apis::SpannerV1::ListInstanceConfigsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_project_instance(name, quota_user: nil, fields: nil, options: nil, &block) + def list_project_instance_configs(parent, page_size: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+parent}/instanceConfigs', options) + command.response_representation = Google::Apis::SpannerV1::ListInstanceConfigsResponse::Representation + command.response_class = Google::Apis::SpannerV1::ListInstanceConfigsResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Gets information about a particular instance configuration. + # @param [String] name + # Required. The name of the requested instance configuration. Values are of + # the form `projects//instanceConfigs/`. + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SpannerV1::InstanceConfig] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SpannerV1::InstanceConfig] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_instance_config(name, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', options) - command.response_representation = Google::Apis::SpannerV1::Instance::Representation - command.response_class = Google::Apis::SpannerV1::Instance + command.response_representation = Google::Apis::SpannerV1::InstanceConfig::Representation + command.response_class = Google::Apis::SpannerV1::InstanceConfig command.params['name'] = name unless name.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end - # Updates an instance, and begins allocating or releasing resources - # as requested. The returned long-running - # operation can be used to track the - # progress of updating the instance. If the named instance does not - # exist, returns `NOT_FOUND`. - # Immediately upon completion of this request: - # * For resource types for which a decrease in the instance's allocation - # has been requested, billing is based on the newly-requested level. - # Until completion of the returned operation: - # * Cancelling the operation sets its metadata's - # cancel_time, and begins - # restoring resources to their pre-request values. The operation - # is guaranteed to succeed at undoing all resource changes, - # after which point it terminates with a `CANCELLED` status. - # * All other attempts to modify the instance are rejected. - # * Reading the instance via the API continues to give the pre-request - # resource levels. - # Upon completion of the returned operation: - # * Billing begins for all successfully-allocated resources (some types - # may have lower than the requested levels). - # * All newly-reserved resources are available for serving the instance's - # tables. - # * The instance's new resource levels are readable via the API. - # The returned long-running operation will - # have a name of the format `/operations/` and - # can be used to track the instance modification. The - # metadata field type is - # UpdateInstanceMetadata. - # The response field type is - # Instance, if successful. - # Authorization requires `spanner.instances.update` permission on - # resource name. - # @param [String] name - # Required. A unique identifier for the instance, which cannot be changed - # after the instance is created. Values are of the form - # `projects//instances/a-z*[a-z0-9]`. The final - # segment of the name must be between 6 and 30 characters in length. - # @param [Google::Apis::SpannerV1::UpdateInstanceRequest] update_instance_request_object - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SpannerV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SpannerV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def patch_project_instance(name, update_instance_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:patch, 'v1/{+name}', options) - command.request_representation = Google::Apis::SpannerV1::UpdateInstanceRequest::Representation - command.request_object = update_instance_request_object - command.response_representation = Google::Apis::SpannerV1::Operation::Representation - command.response_class = Google::Apis::SpannerV1::Operation - command.params['name'] = name unless name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Returns permissions that the caller has on the specified instance resource. - # Attempting this RPC on a non-existent Cloud Spanner instance resource will - # result in a NOT_FOUND error if the user has `spanner.instances.list` - # permission on the containing Google Cloud Project. Otherwise returns an - # empty set of permissions. - # @param [String] resource - # REQUIRED: The Cloud Spanner resource for which permissions are being tested. - # The format is `projects//instances/` for instance - # resources and `projects//instances//databases/< - # database ID>` for database resources. - # @param [Google::Apis::SpannerV1::TestIamPermissionsRequest] test_iam_permissions_request_object - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SpannerV1::TestIamPermissionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SpannerV1::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_instance_iam_permissions(resource, test_iam_permissions_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options) - command.request_representation = Google::Apis::SpannerV1::TestIamPermissionsRequest::Representation - command.request_object = test_iam_permissions_request_object - command.response_representation = Google::Apis::SpannerV1::TestIamPermissionsResponse::Representation - command.response_class = Google::Apis::SpannerV1::TestIamPermissionsResponse - command.params['resource'] = resource unless resource.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - # Deletes an instance. # Immediately upon completion of the request: # * Billing ceases for all of the instance's reserved resources. @@ -227,6 +161,10 @@ module Google # @param [String] parent # Required. The name of the project for which a list of instances is # requested. Values are of the form `projects/`. + # @param [String] page_token + # If non-empty, `page_token` should contain a + # next_page_token from a + # previous ListInstancesResponse. # @param [Fixnum] page_size # Number of instances to be returned in the response. If 0 or less, defaults # to the server's maximum allowed page size. @@ -247,10 +185,6 @@ module Google # * name:howl labels.env:dev --> The instance's name contains "howl" and # it has the label "env" with its value # containing "dev". - # @param [String] page_token - # If non-empty, `page_token` should contain a - # next_page_token from a - # previous ListInstancesResponse. # @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. @@ -268,14 +202,14 @@ 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_project_instances(parent, page_size: nil, filter: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_project_instances(parent, page_token: nil, page_size: nil, filter: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/instances', options) command.response_representation = Google::Apis::SpannerV1::ListInstancesResponse::Representation command.response_class = Google::Apis::SpannerV1::ListInstancesResponse command.params['parent'] = parent unless parent.nil? + command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['filter'] = filter unless filter.nil? - command.query['pageToken'] = page_token unless page_token.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) @@ -419,17 +353,187 @@ module Google execute_or_queue_command(command, &block) end + # Gets information about a particular instance. + # @param [String] name + # Required. The name of the requested instance. Values are of the form + # `projects//instances/`. + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SpannerV1::Instance] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SpannerV1::Instance] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_instance(name, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}', options) + command.response_representation = Google::Apis::SpannerV1::Instance::Representation + command.response_class = Google::Apis::SpannerV1::Instance + command.params['name'] = name unless name.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Updates an instance, and begins allocating or releasing resources + # as requested. The returned long-running + # operation can be used to track the + # progress of updating the instance. If the named instance does not + # exist, returns `NOT_FOUND`. + # Immediately upon completion of this request: + # * For resource types for which a decrease in the instance's allocation + # has been requested, billing is based on the newly-requested level. + # Until completion of the returned operation: + # * Cancelling the operation sets its metadata's + # cancel_time, and begins + # restoring resources to their pre-request values. The operation + # is guaranteed to succeed at undoing all resource changes, + # after which point it terminates with a `CANCELLED` status. + # * All other attempts to modify the instance are rejected. + # * Reading the instance via the API continues to give the pre-request + # resource levels. + # Upon completion of the returned operation: + # * Billing begins for all successfully-allocated resources (some types + # may have lower than the requested levels). + # * All newly-reserved resources are available for serving the instance's + # tables. + # * The instance's new resource levels are readable via the API. + # The returned long-running operation will + # have a name of the format `/operations/` and + # can be used to track the instance modification. The + # metadata field type is + # UpdateInstanceMetadata. + # The response field type is + # Instance, if successful. + # Authorization requires `spanner.instances.update` permission on + # resource name. + # @param [String] name + # Required. A unique identifier for the instance, which cannot be changed + # after the instance is created. Values are of the form + # `projects//instances/a-z*[a-z0-9]`. The final + # segment of the name must be between 6 and 30 characters in length. + # @param [Google::Apis::SpannerV1::UpdateInstanceRequest] update_instance_request_object + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SpannerV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SpannerV1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def patch_project_instance(name, update_instance_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1/{+name}', options) + command.request_representation = Google::Apis::SpannerV1::UpdateInstanceRequest::Representation + command.request_object = update_instance_request_object + command.response_representation = Google::Apis::SpannerV1::Operation::Representation + command.response_class = Google::Apis::SpannerV1::Operation + command.params['name'] = name unless name.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Returns permissions that the caller has on the specified instance resource. + # Attempting this RPC on a non-existent Cloud Spanner instance resource will + # result in a NOT_FOUND error if the user has `spanner.instances.list` + # permission on the containing Google Cloud Project. Otherwise returns an + # empty set of permissions. + # @param [String] resource + # REQUIRED: The Cloud Spanner resource for which permissions are being tested. + # The format is `projects//instances/` for instance + # resources and `projects//instances//databases/< + # database ID>` for database resources. + # @param [Google::Apis::SpannerV1::TestIamPermissionsRequest] test_iam_permissions_request_object + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SpannerV1::TestIamPermissionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SpannerV1::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_instance_iam_permissions(resource, test_iam_permissions_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options) + command.request_representation = Google::Apis::SpannerV1::TestIamPermissionsRequest::Representation + command.request_object = test_iam_permissions_request_object + command.response_representation = Google::Apis::SpannerV1::TestIamPermissionsResponse::Representation + command.response_class = Google::Apis::SpannerV1::TestIamPermissionsResponse + command.params['resource'] = resource unless resource.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Returns the schema of a Cloud Spanner database as a list of formatted + # DDL statements. This method does not show pending schema updates, those may + # be queried using the Operations API. + # @param [String] database + # Required. The database whose schema we wish to get. + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SpannerV1::GetDatabaseDdlResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SpannerV1::GetDatabaseDdlResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_instance_database_ddl(database, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+database}/ddl', options) + command.response_representation = Google::Apis::SpannerV1::GetDatabaseDdlResponse::Representation + command.response_class = Google::Apis::SpannerV1::GetDatabaseDdlResponse + command.params['database'] = database unless database.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + # Lists Cloud Spanner databases. # @param [String] parent # Required. The instance whose databases should be listed. # Values are of the form `projects//instances/`. - # @param [Fixnum] page_size - # Number of databases to be returned in the response. If 0 or less, - # defaults to the server's maximum allowed page size. # @param [String] page_token # If non-empty, `page_token` should contain a # next_page_token from a # previous ListDatabasesResponse. + # @param [Fixnum] page_size + # Number of databases to be returned in the response. If 0 or less, + # defaults to the server's maximum allowed page size. # @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. @@ -447,13 +551,52 @@ 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_project_instance_databases(parent, page_size: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_project_instance_databases(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/databases', options) command.response_representation = Google::Apis::SpannerV1::ListDatabasesResponse::Representation command.response_class = Google::Apis::SpannerV1::ListDatabasesResponse command.params['parent'] = parent unless parent.nil? - command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Sets the access control policy on a database resource. Replaces any + # existing policy. + # Authorization requires `spanner.databases.setIamPolicy` permission on + # resource. + # @param [String] resource + # REQUIRED: The Cloud Spanner resource for which the policy is being set. The + # format is `projects//instances/` for instance + # resources and `projects//instances//databases/< + # database ID>` for databases resources. + # @param [Google::Apis::SpannerV1::SetIamPolicyRequest] set_iam_policy_request_object + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SpannerV1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SpannerV1::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_database_iam_policy(resource, set_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options) + command.request_representation = Google::Apis::SpannerV1::SetIamPolicyRequest::Representation + command.request_object = set_iam_policy_request_object + command.response_representation = Google::Apis::SpannerV1::Policy::Representation + command.response_class = Google::Apis::SpannerV1::Policy + command.params['resource'] = resource unless resource.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) @@ -500,45 +643,6 @@ module Google execute_or_queue_command(command, &block) end - # Sets the access control policy on a database resource. Replaces any - # existing policy. - # Authorization requires `spanner.databases.setIamPolicy` permission on - # resource. - # @param [String] resource - # REQUIRED: The Cloud Spanner resource for which the policy is being set. The - # format is `projects//instances/` for instance - # resources and `projects//instances//databases/< - # database ID>` for databases resources. - # @param [Google::Apis::SpannerV1::SetIamPolicyRequest] set_iam_policy_request_object - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SpannerV1::Policy] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SpannerV1::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_database_iam_policy(resource, set_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options) - command.request_representation = Google::Apis::SpannerV1::SetIamPolicyRequest::Representation - command.request_object = set_iam_policy_request_object - command.response_representation = Google::Apis::SpannerV1::Policy::Representation - command.response_class = Google::Apis::SpannerV1::Policy - command.params['resource'] = resource unless resource.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - # Gets the access control policy for a database resource. Returns an empty # policy if a database exists but does not have a policy set. # Authorization requires `spanner.databases.getIamPolicy` permission on @@ -718,50 +822,18 @@ module Google execute_or_queue_command(command, &block) end - # Returns the schema of a Cloud Spanner database as a list of formatted - # DDL statements. This method does not show pending schema updates, those may - # be queried using the Operations API. - # @param [String] database - # Required. The database whose schema we wish to get. - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SpannerV1::GetDatabaseDdlResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SpannerV1::GetDatabaseDdlResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_project_instance_database_ddl(database, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/{+database}/ddl', options) - command.response_representation = Google::Apis::SpannerV1::GetDatabaseDdlResponse::Representation - command.response_class = Google::Apis::SpannerV1::GetDatabaseDdlResponse - command.params['database'] = database unless database.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - # Lists operations that match the specified filter in the request. If the # server doesn't support this method, it returns `UNIMPLEMENTED`. # NOTE: the `name` binding below allows API services to override the binding # to use different resource name schemes, such as `users/*/operations`. # @param [String] name # The name of the operation collection. - # @param [Fixnum] page_size - # The standard list page size. # @param [String] filter # The standard list filter. # @param [String] page_token # The standard list page token. + # @param [Fixnum] page_size + # The standard list page size. # @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. @@ -779,14 +851,14 @@ 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_project_instance_database_operations(name, page_size: nil, filter: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_project_instance_database_operations(name, filter: nil, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', options) command.response_representation = Google::Apis::SpannerV1::ListOperationsResponse::Representation command.response_class = Google::Apis::SpannerV1::ListOperationsResponse command.params['name'] = name unless name.nil? - command.query['pageSize'] = page_size unless page_size.nil? command.query['filter'] = filter unless filter.nil? command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) @@ -896,46 +968,16 @@ module Google execute_or_queue_command(command, &block) end - # Gets a session. Returns `NOT_FOUND` if the session does not exist. - # This is mainly useful for determining whether a session is still - # alive. - # @param [String] name - # Required. The name of the session to retrieve. - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SpannerV1::Session] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SpannerV1::Session] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_project_instance_database_session(name, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/{+name}', options) - command.response_representation = Google::Apis::SpannerV1::Session::Representation - command.response_class = Google::Apis::SpannerV1::Session - command.params['name'] = name unless name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Like ExecuteSql, except returns the result - # set as a stream. Unlike ExecuteSql, there - # is no limit on the size of the returned result set. However, no - # individual row in the result set can exceed 100 MiB, and no - # column value can exceed 10 MiB. + # Commits a transaction. The request includes the mutations to be + # applied to rows in the database. + # `Commit` might return an `ABORTED` error. This can occur at any time; + # commonly, the cause is conflicts with concurrent + # transactions. However, it can also happen for a variety of other + # reasons. If `Commit` returns `ABORTED`, the caller should re-attempt + # the transaction from the beginning, re-using the same session. # @param [String] session - # Required. The session in which the SQL query should be performed. - # @param [Google::Apis::SpannerV1::ExecuteSqlRequest] execute_sql_request_object + # Required. The session in which the transaction to be committed is running. + # @param [Google::Apis::SpannerV1::CommitRequest] commit_request_object # @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. @@ -945,56 +987,26 @@ module Google # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SpannerV1::PartialResultSet] parsed result object + # @yieldparam result [Google::Apis::SpannerV1::CommitResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::SpannerV1::PartialResultSet] + # @return [Google::Apis::SpannerV1::CommitResponse] # # @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 execute_project_instance_database_session_streaming_sql(session, execute_sql_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+session}:executeStreamingSql', options) - command.request_representation = Google::Apis::SpannerV1::ExecuteSqlRequest::Representation - command.request_object = execute_sql_request_object - command.response_representation = Google::Apis::SpannerV1::PartialResultSet::Representation - command.response_class = Google::Apis::SpannerV1::PartialResultSet + def commit_session(session, commit_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+session}:commit', options) + command.request_representation = Google::Apis::SpannerV1::CommitRequest::Representation + command.request_object = commit_request_object + command.response_representation = Google::Apis::SpannerV1::CommitResponse::Representation + command.response_class = Google::Apis::SpannerV1::CommitResponse command.params['session'] = session unless session.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end - # Ends a session, releasing server resources associated with it. - # @param [String] name - # Required. The name of the session to delete. - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SpannerV1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SpannerV1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_project_instance_database_session(name, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1/{+name}', options) - command.response_representation = Google::Apis::SpannerV1::Empty::Representation - command.response_class = Google::Apis::SpannerV1::Empty - command.params['name'] = name unless name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - # Begins a new transaction. This step can often be skipped: # Read, ExecuteSql and # Commit can begin a new transaction as a @@ -1031,16 +1043,9 @@ module Google execute_or_queue_command(command, &block) end - # Commits a transaction. The request includes the mutations to be - # applied to rows in the database. - # `Commit` might return an `ABORTED` error. This can occur at any time; - # commonly, the cause is conflicts with concurrent - # transactions. However, it can also happen for a variety of other - # reasons. If `Commit` returns `ABORTED`, the caller should re-attempt - # the transaction from the beginning, re-using the same session. - # @param [String] session - # Required. The session in which the transaction to be committed is running. - # @param [Google::Apis::SpannerV1::CommitRequest] commit_request_object + # Ends a session, releasing server resources associated with it. + # @param [String] name + # Required. The name of the session to delete. # @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. @@ -1050,20 +1055,55 @@ module Google # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SpannerV1::CommitResponse] parsed result object + # @yieldparam result [Google::Apis::SpannerV1::Empty] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::SpannerV1::CommitResponse] + # @return [Google::Apis::SpannerV1::Empty] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def commit_session(session, commit_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+session}:commit', options) - command.request_representation = Google::Apis::SpannerV1::CommitRequest::Representation - command.request_object = commit_request_object - command.response_representation = Google::Apis::SpannerV1::CommitResponse::Representation - command.response_class = Google::Apis::SpannerV1::CommitResponse + def delete_project_instance_database_session(name, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/{+name}', options) + command.response_representation = Google::Apis::SpannerV1::Empty::Representation + command.response_class = Google::Apis::SpannerV1::Empty + command.params['name'] = name unless name.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Like ExecuteSql, except returns the result + # set as a stream. Unlike ExecuteSql, there + # is no limit on the size of the returned result set. However, no + # individual row in the result set can exceed 100 MiB, and no + # column value can exceed 10 MiB. + # @param [String] session + # Required. The session in which the SQL query should be performed. + # @param [Google::Apis::SpannerV1::ExecuteSqlRequest] execute_sql_request_object + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SpannerV1::PartialResultSet] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SpannerV1::PartialResultSet] + # + # @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 execute_project_instance_database_session_streaming_sql(session, execute_sql_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+session}:executeStreamingSql', options) + command.request_representation = Google::Apis::SpannerV1::ExecuteSqlRequest::Representation + command.request_object = execute_sql_request_object + command.response_representation = Google::Apis::SpannerV1::PartialResultSet::Representation + command.response_class = Google::Apis::SpannerV1::PartialResultSet command.params['session'] = session unless session.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? @@ -1111,6 +1151,43 @@ module Google execute_or_queue_command(command, &block) end + # Like Read, except returns the result set as a + # stream. Unlike Read, there is no limit on the + # size of the returned result set. However, no individual row in + # the result set can exceed 100 MiB, and no column value can exceed + # 10 MiB. + # @param [String] session + # Required. The session in which the read should be performed. + # @param [Google::Apis::SpannerV1::ReadRequest] read_request_object + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SpannerV1::PartialResultSet] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SpannerV1::PartialResultSet] + # + # @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 streaming_project_instance_database_session_read(session, read_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+session}:streamingRead', options) + command.request_representation = Google::Apis::SpannerV1::ReadRequest::Representation + command.request_object = read_request_object + command.response_representation = Google::Apis::SpannerV1::PartialResultSet::Representation + command.response_class = Google::Apis::SpannerV1::PartialResultSet + command.params['session'] = session unless session.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + # Rolls back a transaction, releasing any locks it holds. It is a good # idea to call this for any transaction that includes one or more # Read or ExecuteSql requests and @@ -1150,43 +1227,6 @@ module Google execute_or_queue_command(command, &block) end - # Like Read, except returns the result set as a - # stream. Unlike Read, there is no limit on the - # size of the returned result set. However, no individual row in - # the result set can exceed 100 MiB, and no column value can exceed - # 10 MiB. - # @param [String] session - # Required. The session in which the read should be performed. - # @param [Google::Apis::SpannerV1::ReadRequest] read_request_object - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SpannerV1::PartialResultSet] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SpannerV1::PartialResultSet] - # - # @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 streaming_project_instance_database_session_read(session, read_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+session}:streamingRead', options) - command.request_representation = Google::Apis::SpannerV1::ReadRequest::Representation - command.request_object = read_request_object - command.response_representation = Google::Apis::SpannerV1::PartialResultSet::Representation - command.response_class = Google::Apis::SpannerV1::PartialResultSet - command.params['session'] = session unless session.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - # Creates a new session. A session can be used to perform # transactions that read and/or modify data in a Cloud Spanner database. # Sessions are meant to be reused for many consecutive @@ -1275,6 +1315,112 @@ module Google execute_or_queue_command(command, &block) end + # Gets a session. Returns `NOT_FOUND` if the session does not exist. + # This is mainly useful for determining whether a session is still + # alive. + # @param [String] name + # Required. The name of the session to retrieve. + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SpannerV1::Session] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SpannerV1::Session] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_instance_database_session(name, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}', options) + command.response_representation = Google::Apis::SpannerV1::Session::Representation + command.response_class = Google::Apis::SpannerV1::Session + command.params['name'] = name unless name.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # NOTE: the `name` binding below allows API services to override the binding + # to use different resource name schemes, such as `users/*/operations`. + # @param [String] name + # The name of the operation collection. + # @param [String] page_token + # The standard list page token. + # @param [Fixnum] page_size + # The standard list page size. + # @param [String] filter + # The standard list filter. + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SpannerV1::ListOperationsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SpannerV1::ListOperationsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_instance_operations(name, page_token: nil, page_size: nil, filter: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}', options) + command.response_representation = Google::Apis::SpannerV1::ListOperationsResponse::Representation + command.response_class = Google::Apis::SpannerV1::ListOperationsResponse + command.params['name'] = name unless name.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['filter'] = filter unless filter.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # @param [String] name + # The name of the operation resource. + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SpannerV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SpannerV1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_instance_operation(name, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}', options) + command.response_representation = Google::Apis::SpannerV1::Operation::Representation + command.response_class = Google::Apis::SpannerV1::Operation + command.params['name'] = name unless name.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + # Starts asynchronous cancellation on a long-running operation. The server # makes a best effort to cancel the operation, but success is not # guaranteed. If the server doesn't support this method, it returns @@ -1346,152 +1492,6 @@ module Google command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end - - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # NOTE: the `name` binding below allows API services to override the binding - # to use different resource name schemes, such as `users/*/operations`. - # @param [String] name - # The name of the operation collection. - # @param [String] filter - # The standard list filter. - # @param [String] page_token - # The standard list page token. - # @param [Fixnum] page_size - # The standard list page size. - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SpannerV1::ListOperationsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SpannerV1::ListOperationsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_project_instance_operations(name, filter: nil, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/{+name}', options) - command.response_representation = Google::Apis::SpannerV1::ListOperationsResponse::Representation - command.response_class = Google::Apis::SpannerV1::ListOperationsResponse - command.params['name'] = name unless name.nil? - command.query['filter'] = filter unless filter.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # @param [String] name - # The name of the operation resource. - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SpannerV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SpannerV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_project_instance_operation(name, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/{+name}', options) - command.response_representation = Google::Apis::SpannerV1::Operation::Representation - command.response_class = Google::Apis::SpannerV1::Operation - command.params['name'] = name unless name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Lists the supported instance configurations for a given project. - # @param [String] parent - # Required. The name of the project for which a list of supported instance - # configurations is requested. Values are of the form - # `projects/`. - # @param [String] page_token - # If non-empty, `page_token` should contain a - # next_page_token - # from a previous ListInstanceConfigsResponse. - # @param [Fixnum] page_size - # Number of instance configurations to be returned in the response. If 0 or - # less, defaults to the server's maximum allowed page size. - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SpannerV1::ListInstanceConfigsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SpannerV1::ListInstanceConfigsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_project_instance_configs(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/{+parent}/instanceConfigs', options) - command.response_representation = Google::Apis::SpannerV1::ListInstanceConfigsResponse::Representation - command.response_class = Google::Apis::SpannerV1::ListInstanceConfigsResponse - command.params['parent'] = parent unless parent.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Gets information about a particular instance configuration. - # @param [String] name - # Required. The name of the requested instance configuration. Values are of - # the form `projects//instanceConfigs/`. - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SpannerV1::InstanceConfig] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SpannerV1::InstanceConfig] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_project_instance_config(name, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/{+name}', options) - command.response_representation = Google::Apis::SpannerV1::InstanceConfig::Representation - command.response_class = Google::Apis::SpannerV1::InstanceConfig - command.params['name'] = name unless name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end protected diff --git a/generated/google/apis/speech_v1beta1.rb b/generated/google/apis/speech_v1beta1.rb index 6696c2401..d7ec115c4 100644 --- a/generated/google/apis/speech_v1beta1.rb +++ b/generated/google/apis/speech_v1beta1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/speech/ module SpeechV1beta1 VERSION = 'V1beta1' - REVISION = '20170501' + REVISION = '20170522' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/speech_v1beta1/classes.rb b/generated/google/apis/speech_v1beta1/classes.rb index 6666dcc0e..4aabad119 100644 --- a/generated/google/apis/speech_v1beta1/classes.rb +++ b/generated/google/apis/speech_v1beta1/classes.rb @@ -22,6 +22,314 @@ module Google module Apis module SpeechV1beta1 + # The top-level message sent by the client for the `SyncRecognize` method. + class SyncRecognizeRequest + include Google::Apis::Core::Hashable + + # Provides information to the recognizer that specifies how to process the + # request. + # Corresponds to the JSON property `config` + # @return [Google::Apis::SpeechV1beta1::RecognitionConfig] + attr_accessor :config + + # Contains audio data in the encoding specified in the `RecognitionConfig`. + # Either `content` or `uri` must be supplied. Supplying both or neither + # returns google.rpc.Code.INVALID_ARGUMENT. See + # [audio limits](https://cloud.google.com/speech/limits#content). + # Corresponds to the JSON property `audio` + # @return [Google::Apis::SpeechV1beta1::RecognitionAudio] + attr_accessor :audio + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @config = args[:config] if args.key?(:config) + @audio = args[:audio] if args.key?(:audio) + end + end + + # The `Status` type defines a logical error model that is suitable for different + # programming environments, including REST APIs and RPC APIs. It is used by + # [gRPC](https://github.com/grpc). The error model is designed to be: + # - Simple to use and understand for most users + # - Flexible enough to meet unexpected needs + # # Overview + # The `Status` message contains three pieces of data: error code, error message, + # and error details. The error code should be an enum value of + # google.rpc.Code, but it may accept additional error codes if needed. The + # error message should be a developer-facing English message that helps + # developers *understand* and *resolve* the error. If a localized user-facing + # error message is needed, put the localized message in the error details or + # localize it in the client. The optional error details may contain arbitrary + # information about the error. There is a predefined set of error detail types + # in the package `google.rpc` that can be used for common error conditions. + # # Language mapping + # The `Status` message is the logical representation of the error model, but it + # is not necessarily the actual wire format. When the `Status` message is + # exposed in different client libraries and different wire protocols, it can be + # mapped differently. For example, it will likely be mapped to some exceptions + # in Java, but more likely mapped to some error codes in C. + # # Other uses + # The error model and the `Status` message can be used in a variety of + # environments, either with or without APIs, to provide a + # consistent developer experience across different environments. + # Example uses of this error model include: + # - Partial errors. If a service needs to return partial errors to the client, + # it may embed the `Status` in the normal response to indicate the partial + # errors. + # - Workflow errors. A typical workflow has multiple steps. Each step may + # have a `Status` message for error reporting. + # - Batch operations. If a client uses batch request and batch response, the + # `Status` message should be used directly inside batch response, one for + # each error sub-response. + # - Asynchronous operations. If an API call embeds asynchronous operation + # results in its response, the status of those operations should be + # represented directly using the `Status` message. + # - Logging. If some API errors are stored in logs, the message `Status` could + # be used directly after any stripping needed for security/privacy reasons. + class Status + include Google::Apis::Core::Hashable + + # A list of messages that carry the error details. There will be a + # common set of message types for APIs to use. + # Corresponds to the JSON property `details` + # @return [Array>] + attr_accessor :details + + # The status code, which should be an enum value of google.rpc.Code. + # Corresponds to the JSON property `code` + # @return [Fixnum] + attr_accessor :code + + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # google.rpc.Status.details field, or localized by the client. + # Corresponds to the JSON property `message` + # @return [String] + attr_accessor :message + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @details = args[:details] if args.key?(:details) + @code = args[:code] if args.key?(:code) + @message = args[:message] if args.key?(:message) + end + end + + # The only message returned to the client by `SyncRecognize`. method. It + # contains the result as zero or more sequential `SpeechRecognitionResult` + # messages. + class SyncRecognizeResponse + include Google::Apis::Core::Hashable + + # *Output-only* Sequential list of transcription results corresponding to + # sequential portions of audio. + # Corresponds to the JSON property `results` + # @return [Array] + attr_accessor :results + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @results = args[:results] if args.key?(:results) + end + end + + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # service Foo ` + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # ` + # The JSON representation for `Empty` is empty JSON object ````. + class Empty + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # The response message for Operations.ListOperations. + class ListOperationsResponse + include Google::Apis::Core::Hashable + + # The standard List next-page token. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # A list of operations that matches the specified filter in the request. + # Corresponds to the JSON property `operations` + # @return [Array] + attr_accessor :operations + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @operations = args[:operations] if args.key?(:operations) + end + end + + # Provides "hints" to the speech recognizer to favor specific words and phrases + # in the results. + class SpeechContext + include Google::Apis::Core::Hashable + + # *Optional* A list of strings containing words and phrases "hints" so that + # the speech recognition is more likely to recognize them. This can be used + # to improve the accuracy for specific words and phrases, for example, if + # specific commands are typically spoken by the user. This can also be used + # to add additional words to the vocabulary of the recognizer. See + # [usage limits](https://cloud.google.com/speech/limits#content). + # Corresponds to the JSON property `phrases` + # @return [Array] + attr_accessor :phrases + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @phrases = args[:phrases] if args.key?(:phrases) + end + end + + # Alternative hypotheses (a.k.a. n-best list). + class SpeechRecognitionAlternative + include Google::Apis::Core::Hashable + + # *Output-only* The confidence estimate between 0.0 and 1.0. A higher number + # indicates an estimated greater likelihood that the recognized words are + # correct. This field is typically provided only for the top hypothesis, and + # only for `is_final=true` results. Clients should not rely on the + # `confidence` field as it is not guaranteed to be accurate, or even set, in + # any of the results. + # The default of 0.0 is a sentinel value indicating `confidence` was not set. + # Corresponds to the JSON property `confidence` + # @return [Float] + attr_accessor :confidence + + # *Output-only* Transcript text representing the words that the user spoke. + # Corresponds to the JSON property `transcript` + # @return [String] + attr_accessor :transcript + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @confidence = args[:confidence] if args.key?(:confidence) + @transcript = args[:transcript] if args.key?(:transcript) + end + end + + # A speech recognition result corresponding to a portion of the audio. + class SpeechRecognitionResult + include Google::Apis::Core::Hashable + + # *Output-only* May contain one or more recognition hypotheses (up to the + # maximum specified in `max_alternatives`). + # Corresponds to the JSON property `alternatives` + # @return [Array] + attr_accessor :alternatives + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @alternatives = args[:alternatives] if args.key?(:alternatives) + end + end + + # Contains audio data in the encoding specified in the `RecognitionConfig`. + # Either `content` or `uri` must be supplied. Supplying both or neither + # returns google.rpc.Code.INVALID_ARGUMENT. See + # [audio limits](https://cloud.google.com/speech/limits#content). + class RecognitionAudio + include Google::Apis::Core::Hashable + + # The audio data bytes encoded as specified in + # `RecognitionConfig`. Note: as with all bytes fields, protobuffers use a + # pure binary representation, whereas JSON representations use base64. + # Corresponds to the JSON property `content` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :content + + # URI that points to a file that contains audio data bytes as specified in + # `RecognitionConfig`. Currently, only Google Cloud Storage URIs are + # supported, which must be specified in the following format: + # `gs://bucket_name/object_name` (other URI formats return + # google.rpc.Code.INVALID_ARGUMENT). For more information, see + # [Request URIs](https://cloud.google.com/storage/docs/reference-uris). + # Corresponds to the JSON property `uri` + # @return [String] + attr_accessor :uri + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @content = args[:content] if args.key?(:content) + @uri = args[:uri] if args.key?(:uri) + end + end + + # The top-level message sent by the client for the `AsyncRecognize` method. + class AsyncRecognizeRequest + include Google::Apis::Core::Hashable + + # Provides information to the recognizer that specifies how to process the + # request. + # Corresponds to the JSON property `config` + # @return [Google::Apis::SpeechV1beta1::RecognitionConfig] + attr_accessor :config + + # Contains audio data in the encoding specified in the `RecognitionConfig`. + # Either `content` or `uri` must be supplied. Supplying both or neither + # returns google.rpc.Code.INVALID_ARGUMENT. See + # [audio limits](https://cloud.google.com/speech/limits#content). + # Corresponds to the JSON property `audio` + # @return [Google::Apis::SpeechV1beta1::RecognitionAudio] + attr_accessor :audio + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @config = args[:config] if args.key?(:config) + @audio = args[:audio] if args.key?(:audio) + end + end + # This resource represents a long-running operation that is the result of a # network API call. class Operation @@ -68,7 +376,7 @@ module Google # error message is needed, put the localized message in the error details or # localize it in the client. The optional error details may contain arbitrary # information about the error. There is a predefined set of error detail types - # in the package `google.rpc` which can be used for common error conditions. + # in the package `google.rpc` that can be used for common error conditions. # # Language mapping # The `Status` message is the logical representation of the error model, but it # is not necessarily the actual wire format. When the `Status` message is @@ -84,7 +392,7 @@ module Google # it may embed the `Status` in the normal response to indicate the partial # errors. # - Workflow errors. A typical workflow has multiple steps. Each step may - # have a `Status` message for error reporting purpose. + # have a `Status` message for error reporting. # - Batch operations. If a client uses batch request and batch response, the # `Status` message should be used directly inside batch response, one for # each error sub-response. @@ -186,314 +494,6 @@ module Google @profanity_filter = args[:profanity_filter] if args.key?(:profanity_filter) end end - - # The top-level message sent by the client for the `SyncRecognize` method. - class SyncRecognizeRequest - include Google::Apis::Core::Hashable - - # Provides information to the recognizer that specifies how to process the - # request. - # Corresponds to the JSON property `config` - # @return [Google::Apis::SpeechV1beta1::RecognitionConfig] - attr_accessor :config - - # Contains audio data in the encoding specified in the `RecognitionConfig`. - # Either `content` or `uri` must be supplied. Supplying both or neither - # returns google.rpc.Code.INVALID_ARGUMENT. See - # [audio limits](https://cloud.google.com/speech/limits#content). - # Corresponds to the JSON property `audio` - # @return [Google::Apis::SpeechV1beta1::RecognitionAudio] - attr_accessor :audio - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @config = args[:config] if args.key?(:config) - @audio = args[:audio] if args.key?(:audio) - end - end - - # The `Status` type defines a logical error model that is suitable for different - # programming environments, including REST APIs and RPC APIs. It is used by - # [gRPC](https://github.com/grpc). The error model is designed to be: - # - Simple to use and understand for most users - # - Flexible enough to meet unexpected needs - # # Overview - # The `Status` message contains three pieces of data: error code, error message, - # and error details. The error code should be an enum value of - # google.rpc.Code, but it may accept additional error codes if needed. The - # error message should be a developer-facing English message that helps - # developers *understand* and *resolve* the error. If a localized user-facing - # error message is needed, put the localized message in the error details or - # localize it in the client. The optional error details may contain arbitrary - # information about the error. There is a predefined set of error detail types - # in the package `google.rpc` which can be used for common error conditions. - # # Language mapping - # The `Status` message is the logical representation of the error model, but it - # is not necessarily the actual wire format. When the `Status` message is - # exposed in different client libraries and different wire protocols, it can be - # mapped differently. For example, it will likely be mapped to some exceptions - # in Java, but more likely mapped to some error codes in C. - # # Other uses - # The error model and the `Status` message can be used in a variety of - # environments, either with or without APIs, to provide a - # consistent developer experience across different environments. - # Example uses of this error model include: - # - Partial errors. If a service needs to return partial errors to the client, - # it may embed the `Status` in the normal response to indicate the partial - # errors. - # - Workflow errors. A typical workflow has multiple steps. Each step may - # have a `Status` message for error reporting purpose. - # - Batch operations. If a client uses batch request and batch response, the - # `Status` message should be used directly inside batch response, one for - # each error sub-response. - # - Asynchronous operations. If an API call embeds asynchronous operation - # results in its response, the status of those operations should be - # represented directly using the `Status` message. - # - Logging. If some API errors are stored in logs, the message `Status` could - # be used directly after any stripping needed for security/privacy reasons. - class Status - include Google::Apis::Core::Hashable - - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # google.rpc.Status.details field, or localized by the client. - # Corresponds to the JSON property `message` - # @return [String] - attr_accessor :message - - # A list of messages that carry the error details. There will be a - # common set of message types for APIs to use. - # Corresponds to the JSON property `details` - # @return [Array>] - attr_accessor :details - - # The status code, which should be an enum value of google.rpc.Code. - # Corresponds to the JSON property `code` - # @return [Fixnum] - attr_accessor :code - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @message = args[:message] if args.key?(:message) - @details = args[:details] if args.key?(:details) - @code = args[:code] if args.key?(:code) - end - end - - # The only message returned to the client by `SyncRecognize`. method. It - # contains the result as zero or more sequential `SpeechRecognitionResult` - # messages. - class SyncRecognizeResponse - include Google::Apis::Core::Hashable - - # *Output-only* Sequential list of transcription results corresponding to - # sequential portions of audio. - # Corresponds to the JSON property `results` - # @return [Array] - attr_accessor :results - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @results = args[:results] if args.key?(:results) - end - end - - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # service Foo ` - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # ` - # The JSON representation for `Empty` is empty JSON object ````. - class Empty - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # Alternative hypotheses (a.k.a. n-best list). - class SpeechRecognitionAlternative - include Google::Apis::Core::Hashable - - # *Output-only* The confidence estimate between 0.0 and 1.0. A higher number - # indicates an estimated greater likelihood that the recognized words are - # correct. This field is typically provided only for the top hypothesis, and - # only for `is_final=true` results. Clients should not rely on the - # `confidence` field as it is not guaranteed to be accurate, or even set, in - # any of the results. - # The default of 0.0 is a sentinel value indicating `confidence` was not set. - # Corresponds to the JSON property `confidence` - # @return [Float] - attr_accessor :confidence - - # *Output-only* Transcript text representing the words that the user spoke. - # Corresponds to the JSON property `transcript` - # @return [String] - attr_accessor :transcript - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @confidence = args[:confidence] if args.key?(:confidence) - @transcript = args[:transcript] if args.key?(:transcript) - end - end - - # Provides "hints" to the speech recognizer to favor specific words and phrases - # in the results. - class SpeechContext - include Google::Apis::Core::Hashable - - # *Optional* A list of strings containing words and phrases "hints" so that - # the speech recognition is more likely to recognize them. This can be used - # to improve the accuracy for specific words and phrases, for example, if - # specific commands are typically spoken by the user. This can also be used - # to add additional words to the vocabulary of the recognizer. See - # [usage limits](https://cloud.google.com/speech/limits#content). - # Corresponds to the JSON property `phrases` - # @return [Array] - attr_accessor :phrases - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @phrases = args[:phrases] if args.key?(:phrases) - end - end - - # The response message for Operations.ListOperations. - class ListOperationsResponse - include Google::Apis::Core::Hashable - - # The standard List next-page token. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # A list of operations that matches the specified filter in the request. - # Corresponds to the JSON property `operations` - # @return [Array] - attr_accessor :operations - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @operations = args[:operations] if args.key?(:operations) - end - end - - # A speech recognition result corresponding to a portion of the audio. - class SpeechRecognitionResult - include Google::Apis::Core::Hashable - - # *Output-only* May contain one or more recognition hypotheses (up to the - # maximum specified in `max_alternatives`). - # Corresponds to the JSON property `alternatives` - # @return [Array] - attr_accessor :alternatives - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @alternatives = args[:alternatives] if args.key?(:alternatives) - end - end - - # The top-level message sent by the client for the `AsyncRecognize` method. - class AsyncRecognizeRequest - include Google::Apis::Core::Hashable - - # Provides information to the recognizer that specifies how to process the - # request. - # Corresponds to the JSON property `config` - # @return [Google::Apis::SpeechV1beta1::RecognitionConfig] - attr_accessor :config - - # Contains audio data in the encoding specified in the `RecognitionConfig`. - # Either `content` or `uri` must be supplied. Supplying both or neither - # returns google.rpc.Code.INVALID_ARGUMENT. See - # [audio limits](https://cloud.google.com/speech/limits#content). - # Corresponds to the JSON property `audio` - # @return [Google::Apis::SpeechV1beta1::RecognitionAudio] - attr_accessor :audio - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @config = args[:config] if args.key?(:config) - @audio = args[:audio] if args.key?(:audio) - end - end - - # Contains audio data in the encoding specified in the `RecognitionConfig`. - # Either `content` or `uri` must be supplied. Supplying both or neither - # returns google.rpc.Code.INVALID_ARGUMENT. See - # [audio limits](https://cloud.google.com/speech/limits#content). - class RecognitionAudio - include Google::Apis::Core::Hashable - - # The audio data bytes encoded as specified in - # `RecognitionConfig`. Note: as with all bytes fields, protobuffers use a - # pure binary representation, whereas JSON representations use base64. - # Corresponds to the JSON property `content` - # NOTE: Values are automatically base64 encoded/decoded in the client library. - # @return [String] - attr_accessor :content - - # URI that points to a file that contains audio data bytes as specified in - # `RecognitionConfig`. Currently, only Google Cloud Storage URIs are - # supported, which must be specified in the following format: - # `gs://bucket_name/object_name` (other URI formats return - # google.rpc.Code.INVALID_ARGUMENT). For more information, see - # [Request URIs](https://cloud.google.com/storage/docs/reference-uris). - # Corresponds to the JSON property `uri` - # @return [String] - attr_accessor :uri - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @content = args[:content] if args.key?(:content) - @uri = args[:uri] if args.key?(:uri) - end - end end end end diff --git a/generated/google/apis/speech_v1beta1/representations.rb b/generated/google/apis/speech_v1beta1/representations.rb index fc0c193d6..46c63d04f 100644 --- a/generated/google/apis/speech_v1beta1/representations.rb +++ b/generated/google/apis/speech_v1beta1/representations.rb @@ -22,18 +22,6 @@ module Google module Apis module SpeechV1beta1 - class Operation - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class RecognitionConfig - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class SyncRecognizeRequest class Representation < Google::Apis::Core::JsonRepresentation; end @@ -58,7 +46,7 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class SpeechRecognitionAlternative + class ListOperationsResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -70,7 +58,7 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class ListOperationsResponse + class SpeechRecognitionAlternative class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -82,18 +70,113 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class RecognitionAudio + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class AsyncRecognizeRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class RecognitionAudio + class Operation class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class RecognitionConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SyncRecognizeRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :config, as: 'config', class: Google::Apis::SpeechV1beta1::RecognitionConfig, decorator: Google::Apis::SpeechV1beta1::RecognitionConfig::Representation + + property :audio, as: 'audio', class: Google::Apis::SpeechV1beta1::RecognitionAudio, decorator: Google::Apis::SpeechV1beta1::RecognitionAudio::Representation + + end + end + + class Status + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :details, as: 'details' + property :code, as: 'code' + property :message, as: 'message' + end + end + + class SyncRecognizeResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :results, as: 'results', class: Google::Apis::SpeechV1beta1::SpeechRecognitionResult, decorator: Google::Apis::SpeechV1beta1::SpeechRecognitionResult::Representation + + end + end + + class Empty + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class ListOperationsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :operations, as: 'operations', class: Google::Apis::SpeechV1beta1::Operation, decorator: Google::Apis::SpeechV1beta1::Operation::Representation + + end + end + + class SpeechContext + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :phrases, as: 'phrases' + end + end + + class SpeechRecognitionAlternative + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :confidence, as: 'confidence' + property :transcript, as: 'transcript' + end + end + + class SpeechRecognitionResult + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :alternatives, as: 'alternatives', class: Google::Apis::SpeechV1beta1::SpeechRecognitionAlternative, decorator: Google::Apis::SpeechV1beta1::SpeechRecognitionAlternative::Representation + + end + end + + class RecognitionAudio + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :content, :base64 => true, as: 'content' + property :uri, as: 'uri' + end + end + + class AsyncRecognizeRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :config, as: 'config', class: Google::Apis::SpeechV1beta1::RecognitionConfig, decorator: Google::Apis::SpeechV1beta1::RecognitionConfig::Representation + + property :audio, as: 'audio', class: Google::Apis::SpeechV1beta1::RecognitionAudio, decorator: Google::Apis::SpeechV1beta1::RecognitionAudio::Representation + + end + end + class Operation # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -118,89 +201,6 @@ module Google property :profanity_filter, as: 'profanityFilter' end end - - class SyncRecognizeRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :config, as: 'config', class: Google::Apis::SpeechV1beta1::RecognitionConfig, decorator: Google::Apis::SpeechV1beta1::RecognitionConfig::Representation - - property :audio, as: 'audio', class: Google::Apis::SpeechV1beta1::RecognitionAudio, decorator: Google::Apis::SpeechV1beta1::RecognitionAudio::Representation - - end - end - - class Status - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :message, as: 'message' - collection :details, as: 'details' - property :code, as: 'code' - end - end - - class SyncRecognizeResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :results, as: 'results', class: Google::Apis::SpeechV1beta1::SpeechRecognitionResult, decorator: Google::Apis::SpeechV1beta1::SpeechRecognitionResult::Representation - - end - end - - class Empty - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end - end - - class SpeechRecognitionAlternative - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :confidence, as: 'confidence' - property :transcript, as: 'transcript' - end - end - - class SpeechContext - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :phrases, as: 'phrases' - end - end - - class ListOperationsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - collection :operations, as: 'operations', class: Google::Apis::SpeechV1beta1::Operation, decorator: Google::Apis::SpeechV1beta1::Operation::Representation - - end - end - - class SpeechRecognitionResult - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :alternatives, as: 'alternatives', class: Google::Apis::SpeechV1beta1::SpeechRecognitionAlternative, decorator: Google::Apis::SpeechV1beta1::SpeechRecognitionAlternative::Representation - - end - end - - class AsyncRecognizeRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :config, as: 'config', class: Google::Apis::SpeechV1beta1::RecognitionConfig, decorator: Google::Apis::SpeechV1beta1::RecognitionConfig::Representation - - property :audio, as: 'audio', class: Google::Apis::SpeechV1beta1::RecognitionAudio, decorator: Google::Apis::SpeechV1beta1::RecognitionAudio::Representation - - end - end - - class RecognitionAudio - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :content, :base64 => true, as: 'content' - property :uri, as: 'uri' - end - end end end end diff --git a/generated/google/apis/speech_v1beta1/service.rb b/generated/google/apis/speech_v1beta1/service.rb index 1bf02a071..04007a635 100644 --- a/generated/google/apis/speech_v1beta1/service.rb +++ b/generated/google/apis/speech_v1beta1/service.rb @@ -59,11 +59,11 @@ module Google # corresponding to `Code.CANCELLED`. # @param [String] name # The name of the operation resource to be cancelled. + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -76,13 +76,13 @@ 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 cancel_operation(name, quota_user: nil, fields: nil, options: nil, &block) + def cancel_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta1/operations/{+name}:cancel', options) command.response_representation = Google::Apis::SpeechV1beta1::Empty::Representation command.response_class = Google::Apis::SpeechV1beta1::Empty command.params['name'] = name unless name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -92,11 +92,11 @@ module Google # `google.rpc.Code.UNIMPLEMENTED`. # @param [String] name # The name of the operation resource to be deleted. + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -109,33 +109,38 @@ 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 delete_operation(name, quota_user: nil, fields: nil, options: nil, &block) + def delete_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1beta1/operations/{+name}', options) command.response_representation = Google::Apis::SpeechV1beta1::Empty::Representation command.response_class = Google::Apis::SpeechV1beta1::Empty command.params['name'] = name unless name.nil? - command.query['quotaUser'] = quota_user unless quota_user.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 operations that match the specified filter in the request. If the # server doesn't support this method, it returns `UNIMPLEMENTED`. - # NOTE: the `name` binding below allows API services to override the binding - # to use different resource name schemes, such as `users/*/operations`. - # @param [String] name - # The name of the operation collection. - # @param [String] page_token - # The standard list page token. + # NOTE: the `name` binding allows API services to override the binding + # to use different resource name schemes, such as `users/*/operations`. To + # override the binding, API services can add a binding such as + # `"/v1/`name=users/*`/operations"` to their service configuration. + # For backwards compatibility, the default name includes the operations + # collection id, however overriding users must ensure the name binding + # is the parent resource, without the operations collection id. # @param [Fixnum] page_size # The standard list page size. # @param [String] filter # The standard list filter. + # @param [String] name + # The name of the operation's parent resource. + # @param [String] page_token + # The standard list page token. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -148,16 +153,16 @@ 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_operations(name: nil, page_token: nil, page_size: nil, filter: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_operations(page_size: nil, filter: nil, name: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1beta1/operations', options) command.response_representation = Google::Apis::SpeechV1beta1::ListOperationsResponse::Representation command.response_class = Google::Apis::SpeechV1beta1::ListOperationsResponse - command.query['name'] = name unless name.nil? - command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['filter'] = filter unless filter.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['name'] = name unless name.nil? + command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -166,11 +171,11 @@ module Google # service. # @param [String] name # The name of the operation resource. + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -183,13 +188,13 @@ 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 get_operation(name, quota_user: nil, fields: nil, options: nil, &block) + def get_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1beta1/operations/{+name}', options) command.response_representation = Google::Apis::SpeechV1beta1::Operation::Representation command.response_class = Google::Apis::SpeechV1beta1::Operation command.params['name'] = name unless name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -200,11 +205,11 @@ module Google # `Operation.error` or an `Operation.response` which contains # an `AsyncRecognizeResponse` message. # @param [Google::Apis::SpeechV1beta1::AsyncRecognizeRequest] async_recognize_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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -217,25 +222,25 @@ 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 async_recognize_speech(async_recognize_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def async_recognize_speech(async_recognize_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta1/speech:asyncrecognize', options) command.request_representation = Google::Apis::SpeechV1beta1::AsyncRecognizeRequest::Representation command.request_object = async_recognize_request_object command.response_representation = Google::Apis::SpeechV1beta1::Operation::Representation command.response_class = Google::Apis::SpeechV1beta1::Operation - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Performs synchronous speech recognition: receive results after all audio # has been sent and processed. # @param [Google::Apis::SpeechV1beta1::SyncRecognizeRequest] sync_recognize_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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -248,14 +253,14 @@ 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 sync_recognize_speech(sync_recognize_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def sync_recognize_speech(sync_recognize_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta1/speech:syncrecognize', options) command.request_representation = Google::Apis::SpeechV1beta1::SyncRecognizeRequest::Representation command.request_object = sync_recognize_request_object command.response_representation = Google::Apis::SpeechV1beta1::SyncRecognizeResponse::Representation command.response_class = Google::Apis::SpeechV1beta1::SyncRecognizeResponse - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end diff --git a/generated/google/apis/sqladmin_v1beta4.rb b/generated/google/apis/sqladmin_v1beta4.rb index baea89ea7..a31f12480 100644 --- a/generated/google/apis/sqladmin_v1beta4.rb +++ b/generated/google/apis/sqladmin_v1beta4.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/sql/docs/reference/latest module SqladminV1beta4 VERSION = 'V1beta4' - REVISION = '20170217' + REVISION = '20170523' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/sqladmin_v1beta4/classes.rb b/generated/google/apis/sqladmin_v1beta4/classes.rb index fc2cbef57..71dbf58a1 100644 --- a/generated/google/apis/sqladmin_v1beta4/classes.rb +++ b/generated/google/apis/sqladmin_v1beta4/classes.rb @@ -862,6 +862,12 @@ module Google # @return [String] attr_accessor :file_type + # The PostgreSQL user to use for this import operation. Defaults to + # cloudsqlsuperuser. Does not apply to MySQL instances. + # Corresponds to the JSON property `importUser` + # @return [String] + attr_accessor :import_user + # This is always sql#importContext. # Corresponds to the JSON property `kind` # @return [String] @@ -883,6 +889,7 @@ module Google @csv_import_options = args[:csv_import_options] if args.key?(:csv_import_options) @database = args[:database] if args.key?(:database) @file_type = args[:file_type] if args.key?(:file_type) + @import_user = args[:import_user] if args.key?(:import_user) @kind = args[:kind] if args.key?(:kind) @uri = args[:uri] if args.key?(:uri) end @@ -1131,31 +1138,6 @@ module Google end end - # User defined labels for Cloud SQL instances. - class Labels - include Google::Apis::Core::Hashable - - # The key of the label. - # Corresponds to the JSON property `key` - # @return [String] - attr_accessor :key - - # The value of the label. - # 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) - @value = args[:value] if args.key?(:value) - end - end - # Preferred location. This specifies where a Cloud SQL instance should # preferably be located, either in a specific Compute Engine zone, or co-located # with an App Engine application. Note that if the preferred location is not @@ -1414,7 +1396,7 @@ module Google # @return [String] attr_accessor :target_id - # The URI of the instance related to the operation. + # # Corresponds to the JSON property `targetLink` # @return [String] attr_accessor :target_link @@ -1688,7 +1670,7 @@ module Google # User defined labels. # Corresponds to the JSON property `labels` - # @return [Array] + # @return [Hash] attr_accessor :labels # Preferred location. This specifies where a Cloud SQL instance should @@ -1727,7 +1709,7 @@ module Google attr_accessor :settings_version # Configuration to increase storage size automatically. The default value is - # false. Applies only to Second Generation instances. + # true. Applies only to Second Generation instances. # Corresponds to the JSON property `storageAutoResize` # @return [Boolean] attr_accessor :storage_auto_resize diff --git a/generated/google/apis/sqladmin_v1beta4/representations.rb b/generated/google/apis/sqladmin_v1beta4/representations.rb index 494b9ca3f..1666e1e22 100644 --- a/generated/google/apis/sqladmin_v1beta4/representations.rb +++ b/generated/google/apis/sqladmin_v1beta4/representations.rb @@ -190,12 +190,6 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class Labels - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class LocationPreference class Representation < Google::Apis::Core::JsonRepresentation; end @@ -543,6 +537,7 @@ module Google property :database, as: 'database' property :file_type, as: 'fileType' + property :import_user, as: 'importUser' property :kind, as: 'kind' property :uri, as: 'uri' end @@ -634,14 +629,6 @@ module Google end end - class Labels - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :key, as: 'key' - property :value, as: 'value' - end - end - class LocationPreference # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -777,8 +764,7 @@ module Google property :ip_configuration, as: 'ipConfiguration', class: Google::Apis::SqladminV1beta4::IpConfiguration, decorator: Google::Apis::SqladminV1beta4::IpConfiguration::Representation property :kind, as: 'kind' - collection :labels, as: 'labels', class: Google::Apis::SqladminV1beta4::Labels, decorator: Google::Apis::SqladminV1beta4::Labels::Representation - + hash :labels, as: 'labels' property :location_preference, as: 'locationPreference', class: Google::Apis::SqladminV1beta4::LocationPreference, decorator: Google::Apis::SqladminV1beta4::LocationPreference::Representation property :maintenance_window, as: 'maintenanceWindow', class: Google::Apis::SqladminV1beta4::MaintenanceWindow, decorator: Google::Apis::SqladminV1beta4::MaintenanceWindow::Representation diff --git a/generated/google/apis/sqladmin_v1beta4/service.rb b/generated/google/apis/sqladmin_v1beta4/service.rb index e35828656..e8b53dc4c 100644 --- a/generated/google/apis/sqladmin_v1beta4/service.rb +++ b/generated/google/apis/sqladmin_v1beta4/service.rb @@ -802,7 +802,7 @@ module Google # @param [String] project # Project ID of the project for which to list Cloud SQL instances. # @param [String] filter - # A filter expression for filtering listed instances. + # Reserved for future use. # @param [Fixnum] max_results # The maximum number of results to return per response. # @param [String] page_token diff --git a/generated/google/apis/storage_v1.rb b/generated/google/apis/storage_v1.rb index df6d19fad..e60397605 100644 --- a/generated/google/apis/storage_v1.rb +++ b/generated/google/apis/storage_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/storage/docs/json_api/ module StorageV1 VERSION = 'V1' - REVISION = '20170329' + REVISION = '20170510' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/storage_v1/classes.rb b/generated/google/apis/storage_v1/classes.rb index 9e1d4b1a4..71c06ddf9 100644 --- a/generated/google/apis/storage_v1/classes.rb +++ b/generated/google/apis/storage_v1/classes.rb @@ -31,6 +31,11 @@ module Google # @return [Array] attr_accessor :acl + # The bucket's billing configuration. + # Corresponds to the JSON property `billing` + # @return [Google::Apis::StorageV1::Bucket::Billing] + attr_accessor :billing + # The bucket's Cross-Origin Resource Sharing (CORS) configuration. # Corresponds to the JSON property `cors` # @return [Array] @@ -144,6 +149,7 @@ module Google # Update properties of this object def update!(**args) @acl = args[:acl] if args.key?(:acl) + @billing = args[:billing] if args.key?(:billing) @cors_configurations = args[:cors_configurations] if args.key?(:cors_configurations) @default_object_acl = args[:default_object_acl] if args.key?(:default_object_acl) @etag = args[:etag] if args.key?(:etag) @@ -165,6 +171,26 @@ module Google @website = args[:website] if args.key?(:website) end + # The bucket's billing configuration. + class Billing + include Google::Apis::Core::Hashable + + # When set to true, bucket is requester pays. + # Corresponds to the JSON property `requesterPays` + # @return [Boolean] + attr_accessor :requester_pays + alias_method :requester_pays?, :requester_pays + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @requester_pays = args[:requester_pays] if args.key?(:requester_pays) + end + end + # class CorsConfiguration include Google::Apis::Core::Hashable diff --git a/generated/google/apis/storage_v1/representations.rb b/generated/google/apis/storage_v1/representations.rb index e1b93bbbf..2ad87c9ca 100644 --- a/generated/google/apis/storage_v1/representations.rb +++ b/generated/google/apis/storage_v1/representations.rb @@ -25,6 +25,12 @@ module Google class Bucket class Representation < Google::Apis::Core::JsonRepresentation; end + class Billing + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class CorsConfiguration class Representation < Google::Apis::Core::JsonRepresentation; end @@ -219,6 +225,8 @@ module Google class Representation < Google::Apis::Core::JsonRepresentation collection :acl, as: 'acl', class: Google::Apis::StorageV1::BucketAccessControl, decorator: Google::Apis::StorageV1::BucketAccessControl::Representation + property :billing, as: 'billing', class: Google::Apis::StorageV1::Bucket::Billing, decorator: Google::Apis::StorageV1::Bucket::Billing::Representation + collection :cors_configurations, as: 'cors', class: Google::Apis::StorageV1::Bucket::CorsConfiguration, decorator: Google::Apis::StorageV1::Bucket::CorsConfiguration::Representation collection :default_object_acl, as: 'defaultObjectAcl', class: Google::Apis::StorageV1::ObjectAccessControl, decorator: Google::Apis::StorageV1::ObjectAccessControl::Representation @@ -249,6 +257,13 @@ module Google end + class Billing + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :requester_pays, as: 'requesterPays' + end + end + class CorsConfiguration # @private class Representation < Google::Apis::Core::JsonRepresentation diff --git a/generated/google/apis/storage_v1/service.rb b/generated/google/apis/storage_v1/service.rb index 8cdd11658..a9ccbdbb7 100644 --- a/generated/google/apis/storage_v1/service.rb +++ b/generated/google/apis/storage_v1/service.rb @@ -60,6 +60,8 @@ module Google # @param [String] entity # The entity holding the permission. Can be user-userId, user-emailAddress, # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. + # @param [String] user_project + # The project number to be billed for this request, for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -81,10 +83,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 delete_bucket_access_control(bucket, entity, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def delete_bucket_access_control(bucket, entity, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'b/{bucket}/acl/{entity}', options) command.params['bucket'] = bucket unless bucket.nil? command.params['entity'] = entity unless entity.nil? + command.query['userProject'] = user_project unless user_project.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? @@ -97,6 +100,8 @@ module Google # @param [String] entity # The entity holding the permission. Can be user-userId, user-emailAddress, # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. + # @param [String] user_project + # The project number to be billed for this request, for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -118,12 +123,13 @@ 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 get_bucket_access_control(bucket, entity, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def get_bucket_access_control(bucket, entity, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'b/{bucket}/acl/{entity}', options) command.response_representation = Google::Apis::StorageV1::BucketAccessControl::Representation command.response_class = Google::Apis::StorageV1::BucketAccessControl command.params['bucket'] = bucket unless bucket.nil? command.params['entity'] = entity unless entity.nil? + command.query['userProject'] = user_project unless user_project.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? @@ -134,6 +140,8 @@ module Google # @param [String] bucket # Name of a bucket. # @param [Google::Apis::StorageV1::BucketAccessControl] bucket_access_control_object + # @param [String] user_project + # The project number to be billed for this request, for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -155,13 +163,14 @@ 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 insert_bucket_access_control(bucket, bucket_access_control_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def insert_bucket_access_control(bucket, bucket_access_control_object = nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'b/{bucket}/acl', options) command.request_representation = Google::Apis::StorageV1::BucketAccessControl::Representation command.request_object = bucket_access_control_object command.response_representation = Google::Apis::StorageV1::BucketAccessControl::Representation command.response_class = Google::Apis::StorageV1::BucketAccessControl command.params['bucket'] = bucket unless bucket.nil? + command.query['userProject'] = user_project unless user_project.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? @@ -171,6 +180,8 @@ module Google # Retrieves ACL entries on the specified bucket. # @param [String] bucket # Name of a bucket. + # @param [String] user_project + # The project number to be billed for this request, for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -192,11 +203,12 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_bucket_access_controls(bucket, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def list_bucket_access_controls(bucket, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'b/{bucket}/acl', options) command.response_representation = Google::Apis::StorageV1::BucketAccessControls::Representation command.response_class = Google::Apis::StorageV1::BucketAccessControls command.params['bucket'] = bucket unless bucket.nil? + command.query['userProject'] = user_project unless user_project.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? @@ -211,6 +223,8 @@ module Google # The entity holding the permission. Can be user-userId, user-emailAddress, # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. # @param [Google::Apis::StorageV1::BucketAccessControl] bucket_access_control_object + # @param [String] user_project + # The project number to be billed for this request, for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -232,7 +246,7 @@ 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 patch_bucket_access_control(bucket, entity, bucket_access_control_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def patch_bucket_access_control(bucket, entity, bucket_access_control_object = nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'b/{bucket}/acl/{entity}', options) command.request_representation = Google::Apis::StorageV1::BucketAccessControl::Representation command.request_object = bucket_access_control_object @@ -240,6 +254,7 @@ module Google command.response_class = Google::Apis::StorageV1::BucketAccessControl command.params['bucket'] = bucket unless bucket.nil? command.params['entity'] = entity unless entity.nil? + command.query['userProject'] = user_project unless user_project.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? @@ -253,6 +268,8 @@ module Google # The entity holding the permission. Can be user-userId, user-emailAddress, # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. # @param [Google::Apis::StorageV1::BucketAccessControl] bucket_access_control_object + # @param [String] user_project + # The project number to be billed for this request, for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -274,7 +291,7 @@ 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 update_bucket_access_control(bucket, entity, bucket_access_control_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def update_bucket_access_control(bucket, entity, bucket_access_control_object = nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'b/{bucket}/acl/{entity}', options) command.request_representation = Google::Apis::StorageV1::BucketAccessControl::Representation command.request_object = bucket_access_control_object @@ -282,6 +299,7 @@ module Google command.response_class = Google::Apis::StorageV1::BucketAccessControl command.params['bucket'] = bucket unless bucket.nil? command.params['entity'] = entity unless entity.nil? + command.query['userProject'] = user_project unless user_project.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? @@ -296,6 +314,8 @@ module Google # @param [Fixnum] if_metageneration_not_match # If set, only deletes the bucket if its metageneration does not match this # value. + # @param [String] user_project + # The project number to be billed for this request, for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -317,11 +337,12 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_bucket(bucket, if_metageneration_match: nil, if_metageneration_not_match: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def delete_bucket(bucket, if_metageneration_match: nil, if_metageneration_not_match: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'b/{bucket}', options) command.params['bucket'] = bucket unless bucket.nil? command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil? command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil? + command.query['userProject'] = user_project unless user_project.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? @@ -339,6 +360,8 @@ module Google # current metageneration does not match the given value. # @param [String] projection # Set of properties to return. Defaults to noAcl. + # @param [String] user_project + # The project number to be billed for this request, for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -360,7 +383,7 @@ 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 get_bucket(bucket, if_metageneration_match: nil, if_metageneration_not_match: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def get_bucket(bucket, if_metageneration_match: nil, if_metageneration_not_match: nil, projection: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'b/{bucket}', options) command.response_representation = Google::Apis::StorageV1::Bucket::Representation command.response_class = Google::Apis::StorageV1::Bucket @@ -368,6 +391,7 @@ module Google command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil? command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil? command.query['projection'] = projection unless projection.nil? + command.query['userProject'] = user_project unless user_project.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? @@ -377,6 +401,8 @@ module Google # Returns an IAM policy for the specified bucket. # @param [String] bucket # Name of a bucket. + # @param [String] user_project + # The project number to be billed for this request, for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -398,11 +424,12 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_bucket_iam_policy(bucket, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def get_bucket_iam_policy(bucket, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'b/{bucket}/iam', options) command.response_representation = Google::Apis::StorageV1::Policy::Representation command.response_class = Google::Apis::StorageV1::Policy command.params['bucket'] = bucket unless bucket.nil? + command.query['userProject'] = user_project unless user_project.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? @@ -524,6 +551,8 @@ module Google # Apply a predefined set of default object access controls to this bucket. # @param [String] projection # Set of properties to return. Defaults to full. + # @param [String] user_project + # The project number to be billed for this request, for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -545,7 +574,7 @@ 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 patch_bucket(bucket, bucket_object = nil, if_metageneration_match: nil, if_metageneration_not_match: nil, predefined_acl: nil, predefined_default_object_acl: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def patch_bucket(bucket, bucket_object = nil, if_metageneration_match: nil, if_metageneration_not_match: nil, predefined_acl: nil, predefined_default_object_acl: nil, projection: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'b/{bucket}', options) command.request_representation = Google::Apis::StorageV1::Bucket::Representation command.request_object = bucket_object @@ -557,6 +586,7 @@ module Google command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil? command.query['predefinedDefaultObjectAcl'] = predefined_default_object_acl unless predefined_default_object_acl.nil? command.query['projection'] = projection unless projection.nil? + command.query['userProject'] = user_project unless user_project.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? @@ -567,6 +597,8 @@ module Google # @param [String] bucket # Name of a bucket. # @param [Google::Apis::StorageV1::Policy] policy_object + # @param [String] user_project + # The project number to be billed for this request, for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -588,13 +620,14 @@ 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 set_bucket_iam_policy(bucket, policy_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def set_bucket_iam_policy(bucket, policy_object = nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'b/{bucket}/iam', options) command.request_representation = Google::Apis::StorageV1::Policy::Representation command.request_object = policy_object command.response_representation = Google::Apis::StorageV1::Policy::Representation command.response_class = Google::Apis::StorageV1::Policy command.params['bucket'] = bucket unless bucket.nil? + command.query['userProject'] = user_project unless user_project.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? @@ -607,6 +640,8 @@ module Google # Name of a bucket. # @param [Array, String] permissions # Permissions to test. + # @param [String] user_project + # The project number to be billed for this request, for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -628,12 +663,13 @@ 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 test_bucket_iam_permissions(bucket, permissions, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def test_bucket_iam_permissions(bucket, permissions, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'b/{bucket}/iam/testPermissions', options) command.response_representation = Google::Apis::StorageV1::TestIamPermissionsResponse::Representation command.response_class = Google::Apis::StorageV1::TestIamPermissionsResponse command.params['bucket'] = bucket unless bucket.nil? command.query['permissions'] = permissions unless permissions.nil? + command.query['userProject'] = user_project unless user_project.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? @@ -657,6 +693,8 @@ module Google # Apply a predefined set of default object access controls to this bucket. # @param [String] projection # Set of properties to return. Defaults to full. + # @param [String] user_project + # The project number to be billed for this request, for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -678,7 +716,7 @@ 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 update_bucket(bucket, bucket_object = nil, if_metageneration_match: nil, if_metageneration_not_match: nil, predefined_acl: nil, predefined_default_object_acl: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def update_bucket(bucket, bucket_object = nil, if_metageneration_match: nil, if_metageneration_not_match: nil, predefined_acl: nil, predefined_default_object_acl: nil, projection: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'b/{bucket}', options) command.request_representation = Google::Apis::StorageV1::Bucket::Representation command.request_object = bucket_object @@ -690,6 +728,7 @@ module Google command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil? command.query['predefinedDefaultObjectAcl'] = predefined_default_object_acl unless predefined_default_object_acl.nil? command.query['projection'] = projection unless projection.nil? + command.query['userProject'] = user_project unless user_project.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? @@ -736,6 +775,8 @@ module Google # @param [String] entity # The entity holding the permission. Can be user-userId, user-emailAddress, # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. + # @param [String] user_project + # The project number to be billed for this request, for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -757,10 +798,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 delete_default_object_access_control(bucket, entity, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def delete_default_object_access_control(bucket, entity, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'b/{bucket}/defaultObjectAcl/{entity}', options) command.params['bucket'] = bucket unless bucket.nil? command.params['entity'] = entity unless entity.nil? + command.query['userProject'] = user_project unless user_project.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? @@ -774,6 +816,8 @@ module Google # @param [String] entity # The entity holding the permission. Can be user-userId, user-emailAddress, # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. + # @param [String] user_project + # The project number to be billed for this request, for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -795,12 +839,13 @@ 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 get_default_object_access_control(bucket, entity, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def get_default_object_access_control(bucket, entity, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'b/{bucket}/defaultObjectAcl/{entity}', options) command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation command.response_class = Google::Apis::StorageV1::ObjectAccessControl command.params['bucket'] = bucket unless bucket.nil? command.params['entity'] = entity unless entity.nil? + command.query['userProject'] = user_project unless user_project.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? @@ -811,6 +856,8 @@ module Google # @param [String] bucket # Name of a bucket. # @param [Google::Apis::StorageV1::ObjectAccessControl] object_access_control_object + # @param [String] user_project + # The project number to be billed for this request, for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -832,13 +879,14 @@ 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 insert_default_object_access_control(bucket, object_access_control_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def insert_default_object_access_control(bucket, object_access_control_object = nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'b/{bucket}/defaultObjectAcl', options) command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation command.request_object = object_access_control_object command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation command.response_class = Google::Apis::StorageV1::ObjectAccessControl command.params['bucket'] = bucket unless bucket.nil? + command.query['userProject'] = user_project unless user_project.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? @@ -854,6 +902,8 @@ module Google # @param [Fixnum] if_metageneration_not_match # If present, only return default ACL listing if the bucket's current # metageneration does not match the given value. + # @param [String] user_project + # The project number to be billed for this request, for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -875,13 +925,14 @@ 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_default_object_access_controls(bucket, if_metageneration_match: nil, if_metageneration_not_match: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def list_default_object_access_controls(bucket, if_metageneration_match: nil, if_metageneration_not_match: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'b/{bucket}/defaultObjectAcl', options) command.response_representation = Google::Apis::StorageV1::ObjectAccessControls::Representation command.response_class = Google::Apis::StorageV1::ObjectAccessControls command.params['bucket'] = bucket unless bucket.nil? command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil? command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil? + command.query['userProject'] = user_project unless user_project.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? @@ -896,6 +947,8 @@ module Google # The entity holding the permission. Can be user-userId, user-emailAddress, # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. # @param [Google::Apis::StorageV1::ObjectAccessControl] object_access_control_object + # @param [String] user_project + # The project number to be billed for this request, for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -917,7 +970,7 @@ 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 patch_default_object_access_control(bucket, entity, object_access_control_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def patch_default_object_access_control(bucket, entity, object_access_control_object = nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'b/{bucket}/defaultObjectAcl/{entity}', options) command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation command.request_object = object_access_control_object @@ -925,6 +978,7 @@ module Google command.response_class = Google::Apis::StorageV1::ObjectAccessControl command.params['bucket'] = bucket unless bucket.nil? command.params['entity'] = entity unless entity.nil? + command.query['userProject'] = user_project unless user_project.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? @@ -938,6 +992,8 @@ module Google # The entity holding the permission. Can be user-userId, user-emailAddress, # group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers. # @param [Google::Apis::StorageV1::ObjectAccessControl] object_access_control_object + # @param [String] user_project + # The project number to be billed for this request, for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -959,7 +1015,7 @@ 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 update_default_object_access_control(bucket, entity, object_access_control_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def update_default_object_access_control(bucket, entity, object_access_control_object = nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'b/{bucket}/defaultObjectAcl/{entity}', options) command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation command.request_object = object_access_control_object @@ -967,6 +1023,7 @@ module Google command.response_class = Google::Apis::StorageV1::ObjectAccessControl command.params['bucket'] = bucket unless bucket.nil? command.params['entity'] = entity unless entity.nil? + command.query['userProject'] = user_project unless user_project.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? @@ -978,6 +1035,8 @@ module Google # The parent bucket of the notification. # @param [String] notification # ID of the notification to delete. + # @param [String] user_project + # The project number to be billed for this request, for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -999,10 +1058,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 delete_notification(bucket, notification, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def delete_notification(bucket, notification, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'b/{bucket}/notificationConfigs/{notification}', options) command.params['bucket'] = bucket unless bucket.nil? command.params['notification'] = notification unless notification.nil? + command.query['userProject'] = user_project unless user_project.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? @@ -1014,6 +1074,8 @@ module Google # The parent bucket of the notification. # @param [String] notification # Notification ID + # @param [String] user_project + # The project number to be billed for this request, for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -1035,12 +1097,13 @@ 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 get_notification(bucket, notification, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def get_notification(bucket, notification, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'b/{bucket}/notificationConfigs/{notification}', options) command.response_representation = Google::Apis::StorageV1::Notification::Representation command.response_class = Google::Apis::StorageV1::Notification command.params['bucket'] = bucket unless bucket.nil? command.params['notification'] = notification unless notification.nil? + command.query['userProject'] = user_project unless user_project.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? @@ -1051,6 +1114,8 @@ module Google # @param [String] bucket # The parent bucket of the notification. # @param [Google::Apis::StorageV1::Notification] notification_object + # @param [String] user_project + # The project number to be billed for this request, for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -1072,13 +1137,14 @@ 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 insert_notification(bucket, notification_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def insert_notification(bucket, notification_object = nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'b/{bucket}/notificationConfigs', options) command.request_representation = Google::Apis::StorageV1::Notification::Representation command.request_object = notification_object command.response_representation = Google::Apis::StorageV1::Notification::Representation command.response_class = Google::Apis::StorageV1::Notification command.params['bucket'] = bucket unless bucket.nil? + command.query['userProject'] = user_project unless user_project.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? @@ -1088,6 +1154,8 @@ module Google # Retrieves a list of notification subscriptions for a given bucket. # @param [String] bucket # Name of a GCS bucket. + # @param [String] user_project + # The project number to be billed for this request, for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -1109,11 +1177,12 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_notifications(bucket, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def list_notifications(bucket, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'b/{bucket}/notificationConfigs', options) command.response_representation = Google::Apis::StorageV1::Notifications::Representation command.response_class = Google::Apis::StorageV1::Notifications command.params['bucket'] = bucket unless bucket.nil? + command.query['userProject'] = user_project unless user_project.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? @@ -1133,6 +1202,8 @@ module Google # @param [Fixnum] generation # If present, selects a specific revision of this object (as opposed to the # latest version, the default). + # @param [String] user_project + # The project number to be billed for this request, for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -1154,12 +1225,13 @@ 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 delete_object_access_control(bucket, object, entity, generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def delete_object_access_control(bucket, object, entity, generation: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'b/{bucket}/o/{object}/acl/{entity}', options) command.params['bucket'] = bucket unless bucket.nil? command.params['object'] = object unless object.nil? command.params['entity'] = entity unless entity.nil? command.query['generation'] = generation unless generation.nil? + command.query['userProject'] = user_project unless user_project.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? @@ -1178,6 +1250,8 @@ module Google # @param [Fixnum] generation # If present, selects a specific revision of this object (as opposed to the # latest version, the default). + # @param [String] user_project + # The project number to be billed for this request, for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -1199,7 +1273,7 @@ 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 get_object_access_control(bucket, object, entity, generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def get_object_access_control(bucket, object, entity, generation: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'b/{bucket}/o/{object}/acl/{entity}', options) command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation command.response_class = Google::Apis::StorageV1::ObjectAccessControl @@ -1207,6 +1281,7 @@ module Google command.params['object'] = object unless object.nil? command.params['entity'] = entity unless entity.nil? command.query['generation'] = generation unless generation.nil? + command.query['userProject'] = user_project unless user_project.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? @@ -1223,6 +1298,8 @@ module Google # @param [Fixnum] generation # If present, selects a specific revision of this object (as opposed to the # latest version, the default). + # @param [String] user_project + # The project number to be billed for this request, for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -1244,7 +1321,7 @@ 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 insert_object_access_control(bucket, object, object_access_control_object = nil, generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def insert_object_access_control(bucket, object, object_access_control_object = nil, generation: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'b/{bucket}/o/{object}/acl', options) command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation command.request_object = object_access_control_object @@ -1253,6 +1330,7 @@ module Google command.params['bucket'] = bucket unless bucket.nil? command.params['object'] = object unless object.nil? command.query['generation'] = generation unless generation.nil? + command.query['userProject'] = user_project unless user_project.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? @@ -1268,6 +1346,8 @@ module Google # @param [Fixnum] generation # If present, selects a specific revision of this object (as opposed to the # latest version, the default). + # @param [String] user_project + # The project number to be billed for this request, for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -1289,13 +1369,14 @@ 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_object_access_controls(bucket, object, generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def list_object_access_controls(bucket, object, generation: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'b/{bucket}/o/{object}/acl', options) command.response_representation = Google::Apis::StorageV1::ObjectAccessControls::Representation command.response_class = Google::Apis::StorageV1::ObjectAccessControls command.params['bucket'] = bucket unless bucket.nil? command.params['object'] = object unless object.nil? command.query['generation'] = generation unless generation.nil? + command.query['userProject'] = user_project unless user_project.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? @@ -1316,6 +1397,8 @@ module Google # @param [Fixnum] generation # If present, selects a specific revision of this object (as opposed to the # latest version, the default). + # @param [String] user_project + # The project number to be billed for this request, for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -1337,7 +1420,7 @@ 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 patch_object_access_control(bucket, object, entity, object_access_control_object = nil, generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def patch_object_access_control(bucket, object, entity, object_access_control_object = nil, generation: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'b/{bucket}/o/{object}/acl/{entity}', options) command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation command.request_object = object_access_control_object @@ -1347,6 +1430,7 @@ module Google command.params['object'] = object unless object.nil? command.params['entity'] = entity unless entity.nil? command.query['generation'] = generation unless generation.nil? + command.query['userProject'] = user_project unless user_project.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? @@ -1366,6 +1450,8 @@ module Google # @param [Fixnum] generation # If present, selects a specific revision of this object (as opposed to the # latest version, the default). + # @param [String] user_project + # The project number to be billed for this request, for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -1387,7 +1473,7 @@ 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 update_object_access_control(bucket, object, entity, object_access_control_object = nil, generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def update_object_access_control(bucket, object, entity, object_access_control_object = nil, generation: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'b/{bucket}/o/{object}/acl/{entity}', options) command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation command.request_object = object_access_control_object @@ -1397,6 +1483,7 @@ module Google command.params['object'] = object unless object.nil? command.params['entity'] = entity unless entity.nil? command.query['generation'] = generation unless generation.nil? + command.query['userProject'] = user_project unless user_project.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? @@ -1418,6 +1505,8 @@ module Google # @param [Fixnum] if_metageneration_match # Makes the operation conditional on whether the object's current metageneration # matches the given value. + # @param [String] user_project + # The project number to be billed for this request, for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -1441,7 +1530,7 @@ 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 compose_object(destination_bucket, destination_object, compose_request_object = nil, destination_predefined_acl: nil, if_generation_match: nil, if_metageneration_match: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block) + def compose_object(destination_bucket, destination_object, compose_request_object = nil, destination_predefined_acl: nil, if_generation_match: nil, if_metageneration_match: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block) if download_dest.nil? command = make_simple_command(:post, 'b/{destinationBucket}/o/{destinationObject}/compose', options) else @@ -1457,6 +1546,7 @@ module Google command.query['destinationPredefinedAcl'] = destination_predefined_acl unless destination_predefined_acl.nil? command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil? command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil? + command.query['userProject'] = user_project unless user_project.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? @@ -1509,6 +1599,8 @@ module Google # @param [Fixnum] source_generation # If present, selects a specific revision of the source object (as opposed to # the latest version, the default). + # @param [String] user_project + # The project number to be billed for this request, for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -1532,7 +1624,7 @@ 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 copy_object(source_bucket, source_object, destination_bucket, destination_object, object_object = nil, destination_predefined_acl: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, if_source_generation_match: nil, if_source_generation_not_match: nil, if_source_metageneration_match: nil, if_source_metageneration_not_match: nil, projection: nil, source_generation: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block) + def copy_object(source_bucket, source_object, destination_bucket, destination_object, object_object = nil, destination_predefined_acl: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, if_source_generation_match: nil, if_source_generation_not_match: nil, if_source_metageneration_match: nil, if_source_metageneration_not_match: nil, projection: nil, source_generation: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block) if download_dest.nil? command = make_simple_command(:post, 'b/{sourceBucket}/o/{sourceObject}/copyTo/b/{destinationBucket}/o/{destinationObject}', options) else @@ -1558,6 +1650,7 @@ module Google command.query['ifSourceMetagenerationNotMatch'] = if_source_metageneration_not_match unless if_source_metageneration_not_match.nil? command.query['projection'] = projection unless projection.nil? command.query['sourceGeneration'] = source_generation unless source_generation.nil? + command.query['userProject'] = user_project unless user_project.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? @@ -1586,6 +1679,8 @@ module Google # @param [Fixnum] if_metageneration_not_match # Makes the operation conditional on whether the object's current metageneration # does not match the given value. + # @param [String] user_project + # The project number to be billed for this request, for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -1607,7 +1702,7 @@ 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 delete_object(bucket, object, generation: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def delete_object(bucket, object, generation: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'b/{bucket}/o/{object}', options) command.params['bucket'] = bucket unless bucket.nil? command.params['object'] = object unless object.nil? @@ -1616,6 +1711,7 @@ module Google command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil? command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil? command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil? + command.query['userProject'] = user_project unless user_project.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? @@ -1645,6 +1741,8 @@ module Google # does not match the given value. # @param [String] projection # Set of properties to return. Defaults to noAcl. + # @param [String] user_project + # The project number to be billed for this request, for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -1668,7 +1766,7 @@ 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 get_object(bucket, object, generation: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block) + def get_object(bucket, object, generation: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, projection: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block) if download_dest.nil? command = make_simple_command(:get, 'b/{bucket}/o/{object}', options) else @@ -1685,6 +1783,7 @@ module Google command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil? command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil? command.query['projection'] = projection unless projection.nil? + command.query['userProject'] = user_project unless user_project.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? @@ -1700,6 +1799,8 @@ module Google # @param [Fixnum] generation # If present, selects a specific revision of this object (as opposed to the # latest version, the default). + # @param [String] user_project + # The project number to be billed for this request, for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -1721,13 +1822,14 @@ 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 get_object_iam_policy(bucket, object, generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def get_object_iam_policy(bucket, object, generation: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'b/{bucket}/o/{object}/iam', options) command.response_representation = Google::Apis::StorageV1::Policy::Representation command.response_class = Google::Apis::StorageV1::Policy command.params['bucket'] = bucket unless bucket.nil? command.params['object'] = object unless object.nil? command.query['generation'] = generation unless generation.nil? + command.query['userProject'] = user_project unless user_project.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? @@ -1766,6 +1868,8 @@ module Google # @param [String] projection # Set of properties to return. Defaults to noAcl, unless the object resource # specifies the acl property, when it defaults to full. + # @param [String] user_project + # The project number to be billed for this request, for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -1791,7 +1895,7 @@ 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 insert_object(bucket, object_object = nil, content_encoding: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, name: nil, predefined_acl: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block) + def insert_object(bucket, object_object = nil, content_encoding: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, name: nil, predefined_acl: nil, projection: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block) if upload_source.nil? command = make_simple_command(:post, 'b/{bucket}/o', options) else @@ -1812,6 +1916,7 @@ module Google command.query['name'] = name unless name.nil? command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil? command.query['projection'] = projection unless projection.nil? + command.query['userProject'] = user_project unless user_project.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? @@ -1839,6 +1944,8 @@ module Google # Filter results to objects whose names begin with this prefix. # @param [String] projection # Set of properties to return. Defaults to noAcl. + # @param [String] user_project + # The project number to be billed for this request, for Requester Pays buckets. # @param [Boolean] versions # If true, lists all versions of an object as distinct results. The default is # false. For more information, see Object Versioning. @@ -1863,7 +1970,7 @@ 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_objects(bucket, delimiter: nil, max_results: nil, page_token: nil, prefix: nil, projection: nil, versions: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def list_objects(bucket, delimiter: nil, max_results: nil, page_token: nil, prefix: nil, projection: nil, user_project: nil, versions: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'b/{bucket}/o', options) command.response_representation = Google::Apis::StorageV1::Objects::Representation command.response_class = Google::Apis::StorageV1::Objects @@ -1873,6 +1980,7 @@ module Google command.query['pageToken'] = page_token unless page_token.nil? command.query['prefix'] = prefix unless prefix.nil? command.query['projection'] = projection unless projection.nil? + command.query['userProject'] = user_project unless user_project.nil? command.query['versions'] = versions unless versions.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? @@ -1906,6 +2014,8 @@ module Google # Apply a predefined set of access controls to this object. # @param [String] projection # Set of properties to return. Defaults to full. + # @param [String] user_project + # The project number to be billed for this request, for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -1927,7 +2037,7 @@ 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 patch_object(bucket, object, object_object = nil, generation: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, predefined_acl: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def patch_object(bucket, object, object_object = nil, generation: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, predefined_acl: nil, projection: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'b/{bucket}/o/{object}', options) command.request_representation = Google::Apis::StorageV1::Object::Representation command.request_object = object_object @@ -1942,6 +2052,7 @@ module Google command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil? command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil? command.query['projection'] = projection unless projection.nil? + command.query['userProject'] = user_project unless user_project.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? @@ -2009,6 +2120,8 @@ module Google # @param [Fixnum] source_generation # If present, selects a specific revision of the source object (as opposed to # the latest version, the default). + # @param [String] user_project + # The project number to be billed for this request, for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -2030,7 +2143,7 @@ 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 rewrite_object(source_bucket, source_object, destination_bucket, destination_object, object_object = nil, destination_predefined_acl: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, if_source_generation_match: nil, if_source_generation_not_match: nil, if_source_metageneration_match: nil, if_source_metageneration_not_match: nil, max_bytes_rewritten_per_call: nil, projection: nil, rewrite_token: nil, source_generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def rewrite_object(source_bucket, source_object, destination_bucket, destination_object, object_object = nil, destination_predefined_acl: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, if_source_generation_match: nil, if_source_generation_not_match: nil, if_source_metageneration_match: nil, if_source_metageneration_not_match: nil, max_bytes_rewritten_per_call: nil, projection: nil, rewrite_token: nil, source_generation: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'b/{sourceBucket}/o/{sourceObject}/rewriteTo/b/{destinationBucket}/o/{destinationObject}', options) command.request_representation = Google::Apis::StorageV1::Object::Representation command.request_object = object_object @@ -2053,6 +2166,7 @@ module Google command.query['projection'] = projection unless projection.nil? command.query['rewriteToken'] = rewrite_token unless rewrite_token.nil? command.query['sourceGeneration'] = source_generation unless source_generation.nil? + command.query['userProject'] = user_project unless user_project.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? @@ -2069,6 +2183,8 @@ module Google # @param [Fixnum] generation # If present, selects a specific revision of this object (as opposed to the # latest version, the default). + # @param [String] user_project + # The project number to be billed for this request, for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -2090,7 +2206,7 @@ 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 set_object_iam_policy(bucket, object, policy_object = nil, generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def set_object_iam_policy(bucket, object, policy_object = nil, generation: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'b/{bucket}/o/{object}/iam', options) command.request_representation = Google::Apis::StorageV1::Policy::Representation command.request_object = policy_object @@ -2099,6 +2215,7 @@ module Google command.params['bucket'] = bucket unless bucket.nil? command.params['object'] = object unless object.nil? command.query['generation'] = generation unless generation.nil? + command.query['userProject'] = user_project unless user_project.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? @@ -2117,6 +2234,8 @@ module Google # @param [Fixnum] generation # If present, selects a specific revision of this object (as opposed to the # latest version, the default). + # @param [String] user_project + # The project number to be billed for this request, for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -2138,7 +2257,7 @@ 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 test_object_iam_permissions(bucket, object, permissions, generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def test_object_iam_permissions(bucket, object, permissions, generation: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'b/{bucket}/o/{object}/iam/testPermissions', options) command.response_representation = Google::Apis::StorageV1::TestIamPermissionsResponse::Representation command.response_class = Google::Apis::StorageV1::TestIamPermissionsResponse @@ -2146,6 +2265,7 @@ module Google command.params['object'] = object unless object.nil? command.query['generation'] = generation unless generation.nil? command.query['permissions'] = permissions unless permissions.nil? + command.query['userProject'] = user_project unless user_project.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? @@ -2178,6 +2298,8 @@ module Google # Apply a predefined set of access controls to this object. # @param [String] projection # Set of properties to return. Defaults to full. + # @param [String] user_project + # The project number to be billed for this request, for Requester Pays buckets. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -2201,7 +2323,7 @@ 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 update_object(bucket, object, object_object = nil, generation: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, predefined_acl: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block) + def update_object(bucket, object, object_object = nil, generation: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, predefined_acl: nil, projection: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block) if download_dest.nil? command = make_simple_command(:put, 'b/{bucket}/o/{object}', options) else @@ -2221,6 +2343,7 @@ module Google command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil? command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil? command.query['projection'] = projection unless projection.nil? + command.query['userProject'] = user_project unless user_project.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? @@ -2249,6 +2372,8 @@ module Google # Filter results to objects whose names begin with this prefix. # @param [String] projection # Set of properties to return. Defaults to noAcl. + # @param [String] user_project + # The project number to be billed for this request, for Requester Pays buckets. # @param [Boolean] versions # If true, lists all versions of an object as distinct results. The default is # false. For more information, see Object Versioning. @@ -2273,7 +2398,7 @@ 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 watch_all_objects(bucket, channel_object = nil, delimiter: nil, max_results: nil, page_token: nil, prefix: nil, projection: nil, versions: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def watch_all_objects(bucket, channel_object = nil, delimiter: nil, max_results: nil, page_token: nil, prefix: nil, projection: nil, user_project: nil, versions: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'b/{bucket}/o/watch', options) command.request_representation = Google::Apis::StorageV1::Channel::Representation command.request_object = channel_object @@ -2285,6 +2410,7 @@ module Google command.query['pageToken'] = page_token unless page_token.nil? command.query['prefix'] = prefix unless prefix.nil? command.query['projection'] = projection unless projection.nil? + command.query['userProject'] = user_project unless user_project.nil? command.query['versions'] = versions unless versions.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? diff --git a/generated/google/apis/storagetransfer_v1.rb b/generated/google/apis/storagetransfer_v1.rb index 280d03dd4..5dc55d5ad 100644 --- a/generated/google/apis/storagetransfer_v1.rb +++ b/generated/google/apis/storagetransfer_v1.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/storage/transfer module StoragetransferV1 VERSION = 'V1' - REVISION = '20170428' + REVISION = '20170518' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/storagetransfer_v1/classes.rb b/generated/google/apis/storagetransfer_v1/classes.rb index 25fd04bd3..cc4fbf55c 100644 --- a/generated/google/apis/storagetransfer_v1/classes.rb +++ b/generated/google/apis/storagetransfer_v1/classes.rb @@ -22,6 +22,39 @@ module Google module Apis module StoragetransferV1 + # A summary of errors by error code, plus a count and sample error log + # entries. + class ErrorSummary + include Google::Apis::Core::Hashable + + # Count of this type of error. + # Required. + # Corresponds to the JSON property `errorCount` + # @return [Fixnum] + attr_accessor :error_count + + # Error samples. + # Corresponds to the JSON property `errorLogEntries` + # @return [Array] + attr_accessor :error_log_entries + + # Required. + # Corresponds to the JSON property `errorCode` + # @return [String] + attr_accessor :error_code + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @error_count = args[:error_count] if args.key?(:error_count) + @error_log_entries = args[:error_log_entries] if args.key?(:error_log_entries) + @error_code = args[:error_code] if args.key?(:error_code) + end + end + # An HttpData specifies a list of objects on the web to be transferred over # HTTP. The information of the objects to be transferred is contained in a # file referenced by a URL. The first line in the file must be @@ -165,6 +198,12 @@ module Google class ObjectConditions include Google::Apis::Core::Hashable + # `maxTimeElapsedSinceLastModification` is the complement to + # `minTimeElapsedSinceLastModification`. + # Corresponds to the JSON property `maxTimeElapsedSinceLastModification` + # @return [String] + attr_accessor :max_time_elapsed_since_last_modification + # If `includePrefixes` is specified, objects that satisfy the object # conditions must have names that start with one of the `includePrefixes` # and that do not start with any of the `excludePrefixes`. If `includePrefixes` @@ -212,22 +251,16 @@ module Google # @return [Array] attr_accessor :exclude_prefixes - # `maxTimeElapsedSinceLastModification` is the complement to - # `minTimeElapsedSinceLastModification`. - # Corresponds to the JSON property `maxTimeElapsedSinceLastModification` - # @return [String] - attr_accessor :max_time_elapsed_since_last_modification - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @max_time_elapsed_since_last_modification = args[:max_time_elapsed_since_last_modification] if args.key?(:max_time_elapsed_since_last_modification) @include_prefixes = args[:include_prefixes] if args.key?(:include_prefixes) @min_time_elapsed_since_last_modification = args[:min_time_elapsed_since_last_modification] if args.key?(:min_time_elapsed_since_last_modification) @exclude_prefixes = args[:exclude_prefixes] if args.key?(:exclude_prefixes) - @max_time_elapsed_since_last_modification = args[:max_time_elapsed_since_last_modification] if args.key?(:max_time_elapsed_since_last_modification) end end @@ -236,54 +269,6 @@ module Google class Operation include Google::Apis::Core::Hashable - # The `Status` type defines a logical error model that is suitable for different - # programming environments, including REST APIs and RPC APIs. It is used by - # [gRPC](https://github.com/grpc). The error model is designed to be: - # - Simple to use and understand for most users - # - Flexible enough to meet unexpected needs - # # Overview - # The `Status` message contains three pieces of data: error code, error message, - # and error details. The error code should be an enum value of - # google.rpc.Code, but it may accept additional error codes if needed. The - # error message should be a developer-facing English message that helps - # developers *understand* and *resolve* the error. If a localized user-facing - # error message is needed, put the localized message in the error details or - # localize it in the client. The optional error details may contain arbitrary - # information about the error. There is a predefined set of error detail types - # in the package `google.rpc` which can be used for common error conditions. - # # Language mapping - # The `Status` message is the logical representation of the error model, but it - # is not necessarily the actual wire format. When the `Status` message is - # exposed in different client libraries and different wire protocols, it can be - # mapped differently. For example, it will likely be mapped to some exceptions - # in Java, but more likely mapped to some error codes in C. - # # Other uses - # The error model and the `Status` message can be used in a variety of - # environments, either with or without APIs, to provide a - # consistent developer experience across different environments. - # Example uses of this error model include: - # - Partial errors. If a service needs to return partial errors to the client, - # it may embed the `Status` in the normal response to indicate the partial - # errors. - # - Workflow errors. A typical workflow has multiple steps. Each step may - # have a `Status` message for error reporting purpose. - # - Batch operations. If a client uses batch request and batch response, the - # `Status` message should be used directly inside batch response, one for - # each error sub-response. - # - Asynchronous operations. If an API call embeds asynchronous operation - # results in its response, the status of those operations should be - # represented directly using the `Status` message. - # - Logging. If some API errors are stored in logs, the message `Status` could - # be used directly after any stripping needed for security/privacy reasons. - # Corresponds to the JSON property `error` - # @return [Google::Apis::StoragetransferV1::Status] - attr_accessor :error - - # Represents the transfer operation object. - # Corresponds to the JSON property `metadata` - # @return [Hash] - attr_accessor :metadata - # If the value is `false`, it means the operation is still in progress. # If true, the operation is completed, and either `error` or `response` is # available. @@ -311,17 +296,101 @@ module Google # @return [String] attr_accessor :name + # The `Status` type defines a logical error model that is suitable for different + # programming environments, including REST APIs and RPC APIs. It is used by + # [gRPC](https://github.com/grpc). The error model is designed to be: + # - Simple to use and understand for most users + # - Flexible enough to meet unexpected needs + # # Overview + # The `Status` message contains three pieces of data: error code, error message, + # and error details. The error code should be an enum value of + # google.rpc.Code, but it may accept additional error codes if needed. The + # error message should be a developer-facing English message that helps + # developers *understand* and *resolve* the error. If a localized user-facing + # error message is needed, put the localized message in the error details or + # localize it in the client. The optional error details may contain arbitrary + # information about the error. There is a predefined set of error detail types + # in the package `google.rpc` that can be used for common error conditions. + # # Language mapping + # The `Status` message is the logical representation of the error model, but it + # is not necessarily the actual wire format. When the `Status` message is + # exposed in different client libraries and different wire protocols, it can be + # mapped differently. For example, it will likely be mapped to some exceptions + # in Java, but more likely mapped to some error codes in C. + # # Other uses + # The error model and the `Status` message can be used in a variety of + # environments, either with or without APIs, to provide a + # consistent developer experience across different environments. + # Example uses of this error model include: + # - Partial errors. If a service needs to return partial errors to the client, + # it may embed the `Status` in the normal response to indicate the partial + # errors. + # - Workflow errors. A typical workflow has multiple steps. Each step may + # have a `Status` message for error reporting. + # - Batch operations. If a client uses batch request and batch response, the + # `Status` message should be used directly inside batch response, one for + # each error sub-response. + # - Asynchronous operations. If an API call embeds asynchronous operation + # results in its response, the status of those operations should be + # represented directly using the `Status` message. + # - Logging. If some API errors are stored in logs, the message `Status` could + # be used directly after any stripping needed for security/privacy reasons. + # Corresponds to the JSON property `error` + # @return [Google::Apis::StoragetransferV1::Status] + attr_accessor :error + + # Represents the transfer operation object. + # Corresponds to the JSON property `metadata` + # @return [Hash] + attr_accessor :metadata + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @error = args[:error] if args.key?(:error) - @metadata = args[:metadata] if args.key?(:metadata) @done = args[:done] if args.key?(:done) @response = args[:response] if args.key?(:response) @name = args[:name] if args.key?(:name) + @error = args[:error] if args.key?(:error) + @metadata = args[:metadata] if args.key?(:metadata) + end + end + + # TransferOptions uses three boolean parameters to define the actions + # to be performed on objects in a transfer. + class TransferOptions + include Google::Apis::Core::Hashable + + # Whether objects should be deleted from the source after they are + # transferred to the sink. + # Corresponds to the JSON property `deleteObjectsFromSourceAfterTransfer` + # @return [Boolean] + attr_accessor :delete_objects_from_source_after_transfer + alias_method :delete_objects_from_source_after_transfer?, :delete_objects_from_source_after_transfer + + # Whether objects that exist only in the sink should be deleted. + # Corresponds to the JSON property `deleteObjectsUniqueInSink` + # @return [Boolean] + attr_accessor :delete_objects_unique_in_sink + alias_method :delete_objects_unique_in_sink?, :delete_objects_unique_in_sink + + # Whether overwriting objects that already exist in the sink is allowed. + # Corresponds to the JSON property `overwriteObjectsAlreadyExistingInSink` + # @return [Boolean] + attr_accessor :overwrite_objects_already_existing_in_sink + alias_method :overwrite_objects_already_existing_in_sink?, :overwrite_objects_already_existing_in_sink + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @delete_objects_from_source_after_transfer = args[:delete_objects_from_source_after_transfer] if args.key?(:delete_objects_from_source_after_transfer) + @delete_objects_unique_in_sink = args[:delete_objects_unique_in_sink] if args.key?(:delete_objects_unique_in_sink) + @overwrite_objects_already_existing_in_sink = args[:overwrite_objects_already_existing_in_sink] if args.key?(:overwrite_objects_already_existing_in_sink) end end @@ -329,19 +398,6 @@ module Google class TransferSpec include Google::Apis::Core::Hashable - # In a GcsData, an object's name is the Google Cloud Storage object's name and - # its `lastModificationTime` refers to the object's updated time, which changes - # when the content or the metadata of the object is updated. - # Corresponds to the JSON property `gcsDataSource` - # @return [Google::Apis::StoragetransferV1::GcsData] - attr_accessor :gcs_data_source - - # TransferOptions uses three boolean parameters to define the actions - # to be performed on objects in a transfer. - # Corresponds to the JSON property `transferOptions` - # @return [Google::Apis::StoragetransferV1::TransferOptions] - attr_accessor :transfer_options - # An AwsS3Data can be a data source, but not a data sink. # In an AwsS3Data, an object's name is the S3 object's key name. # Corresponds to the JSON property `awsS3DataSource` @@ -395,54 +451,31 @@ module Google # @return [Google::Apis::StoragetransferV1::GcsData] attr_accessor :gcs_data_sink + # In a GcsData, an object's name is the Google Cloud Storage object's name and + # its `lastModificationTime` refers to the object's updated time, which changes + # when the content or the metadata of the object is updated. + # Corresponds to the JSON property `gcsDataSource` + # @return [Google::Apis::StoragetransferV1::GcsData] + attr_accessor :gcs_data_source + + # TransferOptions uses three boolean parameters to define the actions + # to be performed on objects in a transfer. + # Corresponds to the JSON property `transferOptions` + # @return [Google::Apis::StoragetransferV1::TransferOptions] + attr_accessor :transfer_options + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @gcs_data_source = args[:gcs_data_source] if args.key?(:gcs_data_source) - @transfer_options = args[:transfer_options] if args.key?(:transfer_options) @aws_s3_data_source = args[:aws_s3_data_source] if args.key?(:aws_s3_data_source) @http_data_source = args[:http_data_source] if args.key?(:http_data_source) @object_conditions = args[:object_conditions] if args.key?(:object_conditions) @gcs_data_sink = args[:gcs_data_sink] if args.key?(:gcs_data_sink) - end - end - - # TransferOptions uses three boolean parameters to define the actions - # to be performed on objects in a transfer. - class TransferOptions - include Google::Apis::Core::Hashable - - # Whether objects that exist only in the sink should be deleted. - # Corresponds to the JSON property `deleteObjectsUniqueInSink` - # @return [Boolean] - attr_accessor :delete_objects_unique_in_sink - alias_method :delete_objects_unique_in_sink?, :delete_objects_unique_in_sink - - # Whether overwriting objects that already exist in the sink is allowed. - # Corresponds to the JSON property `overwriteObjectsAlreadyExistingInSink` - # @return [Boolean] - attr_accessor :overwrite_objects_already_existing_in_sink - alias_method :overwrite_objects_already_existing_in_sink?, :overwrite_objects_already_existing_in_sink - - # Whether objects should be deleted from the source after they are - # transferred to the sink. - # Corresponds to the JSON property `deleteObjectsFromSourceAfterTransfer` - # @return [Boolean] - attr_accessor :delete_objects_from_source_after_transfer - alias_method :delete_objects_from_source_after_transfer?, :delete_objects_from_source_after_transfer - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @delete_objects_unique_in_sink = args[:delete_objects_unique_in_sink] if args.key?(:delete_objects_unique_in_sink) - @overwrite_objects_already_existing_in_sink = args[:overwrite_objects_already_existing_in_sink] if args.key?(:overwrite_objects_already_existing_in_sink) - @delete_objects_from_source_after_transfer = args[:delete_objects_from_source_after_transfer] if args.key?(:delete_objects_from_source_after_transfer) + @gcs_data_source = args[:gcs_data_source] if args.key?(:gcs_data_source) + @transfer_options = args[:transfer_options] if args.key?(:transfer_options) end end @@ -460,7 +493,7 @@ module Google # error message is needed, put the localized message in the error details or # localize it in the client. The optional error details may contain arbitrary # information about the error. There is a predefined set of error detail types - # in the package `google.rpc` which can be used for common error conditions. + # in the package `google.rpc` that can be used for common error conditions. # # Language mapping # The `Status` message is the logical representation of the error model, but it # is not necessarily the actual wire format. When the `Status` message is @@ -476,7 +509,7 @@ module Google # it may embed the `Status` in the normal response to indicate the partial # errors. # - Workflow errors. A typical workflow has multiple steps. Each step may - # have a `Status` message for error reporting purpose. + # have a `Status` message for error reporting. # - Batch operations. If a client uses batch request and batch response, the # `Status` message should be used directly inside batch response, one for # each error sub-response. @@ -488,11 +521,6 @@ module Google class Status include Google::Apis::Core::Hashable - # The status code, which should be an enum value of google.rpc.Code. - # Corresponds to the JSON property `code` - # @return [Fixnum] - attr_accessor :code - # A developer-facing error message, which should be in English. Any # user-facing error message should be localized and sent in the # google.rpc.Status.details field, or localized by the client. @@ -506,15 +534,20 @@ module Google # @return [Array>] attr_accessor :details + # The status code, which should be an enum value of google.rpc.Code. + # Corresponds to the JSON property `code` + # @return [Fixnum] + attr_accessor :code + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @code = args[:code] if args.key?(:code) @message = args[:message] if args.key?(:message) @details = args[:details] if args.key?(:details) + @code = args[:code] if args.key?(:code) end end @@ -535,24 +568,24 @@ module Google class ListOperationsResponse include Google::Apis::Core::Hashable - # A list of operations that matches the specified filter in the request. - # Corresponds to the JSON property `operations` - # @return [Array] - attr_accessor :operations - # The standard List next-page token. # Corresponds to the JSON property `nextPageToken` # @return [String] attr_accessor :next_page_token + # A list of operations that matches the specified filter in the request. + # Corresponds to the JSON property `operations` + # @return [Array] + attr_accessor :operations + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @operations = args[:operations] if args.key?(:operations) @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @operations = args[:operations] if args.key?(:operations) end end @@ -581,11 +614,6 @@ module Google class TimeOfDay include Google::Apis::Core::Hashable - # Minutes of hour of day. Must be from 0 to 59. - # Corresponds to the JSON property `minutes` - # @return [Fixnum] - attr_accessor :minutes - # Hours of day in 24 hour format. Should be from 0 to 23. An API may choose # to allow the value "24:00:00" for scenarios like business closing time. # Corresponds to the JSON property `hours` @@ -603,16 +631,21 @@ module Google # @return [Fixnum] attr_accessor :seconds + # Minutes of hour of day. Must be from 0 to 59. + # Corresponds to the JSON property `minutes` + # @return [Fixnum] + attr_accessor :minutes + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @minutes = args[:minutes] if args.key?(:minutes) @hours = args[:hours] if args.key?(:hours) @nanos = args[:nanos] if args.key?(:nanos) @seconds = args[:seconds] if args.key?(:seconds) + @minutes = args[:minutes] if args.key?(:minutes) end end @@ -776,6 +809,11 @@ module Google class Date include Google::Apis::Core::Hashable + # Month of year. Must be from 1 to 12. + # Corresponds to the JSON property `month` + # @return [Fixnum] + attr_accessor :month + # Year of date. Must be from 1 to 9999, or 0 if specifying a date without # a year. # Corresponds to the JSON property `year` @@ -788,20 +826,15 @@ module Google # @return [Fixnum] attr_accessor :day - # Month of year. Must be from 1 to 12. - # Corresponds to the JSON property `month` - # @return [Fixnum] - attr_accessor :month - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @month = args[:month] if args.key?(:month) @year = args[:year] if args.key?(:year) @day = args[:day] if args.key?(:day) - @month = args[:month] if args.key?(:month) end end @@ -809,11 +842,6 @@ module Google class TransferOperation include Google::Apis::Core::Hashable - # End time of this transfer execution. - # Corresponds to the JSON property `endTime` - # @return [String] - attr_accessor :end_time - # Start time of this transfer execution. # Corresponds to the JSON property `startTime` # @return [String] @@ -855,13 +883,17 @@ module Google # @return [String] attr_accessor :project_id + # End time of this transfer execution. + # Corresponds to the JSON property `endTime` + # @return [String] + attr_accessor :end_time + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @end_time = args[:end_time] if args.key?(:end_time) @start_time = args[:start_time] if args.key?(:start_time) @transfer_job_name = args[:transfer_job_name] if args.key?(:transfer_job_name) @transfer_spec = args[:transfer_spec] if args.key?(:transfer_spec) @@ -870,6 +902,7 @@ module Google @error_breakdowns = args[:error_breakdowns] if args.key?(:error_breakdowns) @name = args[:name] if args.key?(:name) @project_id = args[:project_id] if args.key?(:project_id) + @end_time = args[:end_time] if args.key?(:end_time) end end @@ -904,6 +937,35 @@ module Google end end + # AWS access key (see + # [AWS Security Credentials](http://docs.aws.amazon.com/general/latest/gr/aws- + # security-credentials.html)). + class AwsAccessKey + include Google::Apis::Core::Hashable + + # AWS secret access key. This field is not returned in RPC responses. + # Required. + # Corresponds to the JSON property `secretAccessKey` + # @return [String] + attr_accessor :secret_access_key + + # AWS access key ID. + # Required. + # Corresponds to the JSON property `accessKeyId` + # @return [String] + attr_accessor :access_key_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @secret_access_key = args[:secret_access_key] if args.key?(:secret_access_key) + @access_key_id = args[:access_key_id] if args.key?(:access_key_id) + end + end + # A generic empty message that you can re-use to avoid defining duplicated # empty messages in your APIs. A typical example is to use it as the request # or the response type of an API method. For instance: @@ -923,35 +985,6 @@ module Google end end - # AWS access key (see - # [AWS Security Credentials](http://docs.aws.amazon.com/general/latest/gr/aws- - # security-credentials.html)). - class AwsAccessKey - include Google::Apis::Core::Hashable - - # AWS access key ID. - # Required. - # Corresponds to the JSON property `accessKeyId` - # @return [String] - attr_accessor :access_key_id - - # AWS secret access key. This field is not returned in RPC responses. - # Required. - # Corresponds to the JSON property `secretAccessKey` - # @return [String] - attr_accessor :secret_access_key - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @access_key_id = args[:access_key_id] if args.key?(:access_key_id) - @secret_access_key = args[:secret_access_key] if args.key?(:secret_access_key) - end - end - # Request passed to PauseTransferOperation. class PauseTransferOperationRequest include Google::Apis::Core::Hashable @@ -969,6 +1002,34 @@ module Google class TransferCounters include Google::Apis::Core::Hashable + # Bytes found only in the data sink that are scheduled to be deleted. + # Corresponds to the JSON property `bytesFoundOnlyFromSink` + # @return [Fixnum] + attr_accessor :bytes_found_only_from_sink + + # Objects that are deleted from the data source. + # Corresponds to the JSON property `objectsDeletedFromSource` + # @return [Fixnum] + attr_accessor :objects_deleted_from_source + + # Bytes that are copied to the data sink. + # Corresponds to the JSON property `bytesCopiedToSink` + # @return [Fixnum] + attr_accessor :bytes_copied_to_sink + + # Bytes found in the data source that are scheduled to be transferred, + # which will be copied, excluded based on conditions, or skipped due to + # failures. + # Corresponds to the JSON property `bytesFoundFromSource` + # @return [Fixnum] + attr_accessor :bytes_found_from_source + + # Objects in the data source that are not transferred because they already + # exist in the data sink. + # Corresponds to the JSON property `objectsFromSourceSkippedBySync` + # @return [Fixnum] + attr_accessor :objects_from_source_skipped_by_sync + # Objects found in the data source that are scheduled to be transferred, # which will be copied, excluded based on conditions, or skipped due to # failures. @@ -1002,16 +1063,16 @@ module Google # @return [Fixnum] attr_accessor :bytes_from_source_skipped_by_sync - # Bytes that are deleted from the data sink. - # Corresponds to the JSON property `bytesDeletedFromSink` - # @return [Fixnum] - attr_accessor :bytes_deleted_from_sink - # Bytes that failed to be deleted from the data sink. # Corresponds to the JSON property `bytesFailedToDeleteFromSink` # @return [Fixnum] attr_accessor :bytes_failed_to_delete_from_sink + # Bytes that are deleted from the data sink. + # Corresponds to the JSON property `bytesDeletedFromSink` + # @return [Fixnum] + attr_accessor :bytes_deleted_from_sink + # Bytes in the data source that failed during the transfer. # Corresponds to the JSON property `bytesFromSourceFailed` # @return [Fixnum] @@ -1027,89 +1088,28 @@ module Google # @return [Fixnum] attr_accessor :objects_copied_to_sink - # Bytes found only in the data sink that are scheduled to be deleted. - # Corresponds to the JSON property `bytesFoundOnlyFromSink` - # @return [Fixnum] - attr_accessor :bytes_found_only_from_sink - - # Objects that are deleted from the data source. - # Corresponds to the JSON property `objectsDeletedFromSource` - # @return [Fixnum] - attr_accessor :objects_deleted_from_source - - # Bytes that are copied to the data sink. - # Corresponds to the JSON property `bytesCopiedToSink` - # @return [Fixnum] - attr_accessor :bytes_copied_to_sink - - # Bytes found in the data source that are scheduled to be transferred, - # which will be copied, excluded based on conditions, or skipped due to - # failures. - # Corresponds to the JSON property `bytesFoundFromSource` - # @return [Fixnum] - attr_accessor :bytes_found_from_source - - # Objects in the data source that are not transferred because they already - # exist in the data sink. - # Corresponds to the JSON property `objectsFromSourceSkippedBySync` - # @return [Fixnum] - attr_accessor :objects_from_source_skipped_by_sync - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @bytes_found_only_from_sink = args[:bytes_found_only_from_sink] if args.key?(:bytes_found_only_from_sink) + @objects_deleted_from_source = args[:objects_deleted_from_source] if args.key?(:objects_deleted_from_source) + @bytes_copied_to_sink = args[:bytes_copied_to_sink] if args.key?(:bytes_copied_to_sink) + @bytes_found_from_source = args[:bytes_found_from_source] if args.key?(:bytes_found_from_source) + @objects_from_source_skipped_by_sync = args[:objects_from_source_skipped_by_sync] if args.key?(:objects_from_source_skipped_by_sync) @objects_found_from_source = args[:objects_found_from_source] if args.key?(:objects_found_from_source) @bytes_deleted_from_source = args[:bytes_deleted_from_source] if args.key?(:bytes_deleted_from_source) @objects_failed_to_delete_from_sink = args[:objects_failed_to_delete_from_sink] if args.key?(:objects_failed_to_delete_from_sink) @objects_deleted_from_sink = args[:objects_deleted_from_sink] if args.key?(:objects_deleted_from_sink) @objects_found_only_from_sink = args[:objects_found_only_from_sink] if args.key?(:objects_found_only_from_sink) @bytes_from_source_skipped_by_sync = args[:bytes_from_source_skipped_by_sync] if args.key?(:bytes_from_source_skipped_by_sync) - @bytes_deleted_from_sink = args[:bytes_deleted_from_sink] if args.key?(:bytes_deleted_from_sink) @bytes_failed_to_delete_from_sink = args[:bytes_failed_to_delete_from_sink] if args.key?(:bytes_failed_to_delete_from_sink) + @bytes_deleted_from_sink = args[:bytes_deleted_from_sink] if args.key?(:bytes_deleted_from_sink) @bytes_from_source_failed = args[:bytes_from_source_failed] if args.key?(:bytes_from_source_failed) @objects_from_source_failed = args[:objects_from_source_failed] if args.key?(:objects_from_source_failed) @objects_copied_to_sink = args[:objects_copied_to_sink] if args.key?(:objects_copied_to_sink) - @bytes_found_only_from_sink = args[:bytes_found_only_from_sink] if args.key?(:bytes_found_only_from_sink) - @objects_deleted_from_source = args[:objects_deleted_from_source] if args.key?(:objects_deleted_from_source) - @bytes_copied_to_sink = args[:bytes_copied_to_sink] if args.key?(:bytes_copied_to_sink) - @bytes_found_from_source = args[:bytes_found_from_source] if args.key?(:bytes_found_from_source) - @objects_from_source_skipped_by_sync = args[:objects_from_source_skipped_by_sync] if args.key?(:objects_from_source_skipped_by_sync) - end - end - - # A summary of errors by error code, plus a count and sample error log - # entries. - class ErrorSummary - include Google::Apis::Core::Hashable - - # Required. - # Corresponds to the JSON property `errorCode` - # @return [String] - attr_accessor :error_code - - # Count of this type of error. - # Required. - # Corresponds to the JSON property `errorCount` - # @return [Fixnum] - attr_accessor :error_count - - # Error samples. - # Corresponds to the JSON property `errorLogEntries` - # @return [Array] - attr_accessor :error_log_entries - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @error_code = args[:error_code] if args.key?(:error_code) - @error_count = args[:error_count] if args.key?(:error_count) - @error_log_entries = args[:error_log_entries] if args.key?(:error_log_entries) end end end diff --git a/generated/google/apis/storagetransfer_v1/representations.rb b/generated/google/apis/storagetransfer_v1/representations.rb index 6cc8e5855..65e454a15 100644 --- a/generated/google/apis/storagetransfer_v1/representations.rb +++ b/generated/google/apis/storagetransfer_v1/representations.rb @@ -22,6 +22,12 @@ module Google module Apis module StoragetransferV1 + class ErrorSummary + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class HttpData class Representation < Google::Apis::Core::JsonRepresentation; end @@ -58,13 +64,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class TransferSpec + class TransferOptions class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class TransferOptions + class TransferSpec class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -136,13 +142,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class Empty + class AwsAccessKey class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class AwsAccessKey + class Empty class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -161,9 +167,13 @@ module Google end class ErrorSummary - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :error_count, :numeric_string => true, as: 'errorCount' + collection :error_log_entries, as: 'errorLogEntries', class: Google::Apis::StoragetransferV1::ErrorLogEntry, decorator: Google::Apis::StoragetransferV1::ErrorLogEntry::Representation - include Google::Apis::Core::JsonObjectSupport + property :error_code, as: 'errorCode' + end end class HttpData @@ -202,32 +212,37 @@ module Google class ObjectConditions # @private class Representation < Google::Apis::Core::JsonRepresentation + property :max_time_elapsed_since_last_modification, as: 'maxTimeElapsedSinceLastModification' collection :include_prefixes, as: 'includePrefixes' property :min_time_elapsed_since_last_modification, as: 'minTimeElapsedSinceLastModification' collection :exclude_prefixes, as: 'excludePrefixes' - property :max_time_elapsed_since_last_modification, as: 'maxTimeElapsedSinceLastModification' end end class Operation # @private class Representation < Google::Apis::Core::JsonRepresentation - property :error, as: 'error', class: Google::Apis::StoragetransferV1::Status, decorator: Google::Apis::StoragetransferV1::Status::Representation - - hash :metadata, as: 'metadata' property :done, as: 'done' hash :response, as: 'response' property :name, as: 'name' + property :error, as: 'error', class: Google::Apis::StoragetransferV1::Status, decorator: Google::Apis::StoragetransferV1::Status::Representation + + hash :metadata, as: 'metadata' + end + end + + class TransferOptions + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :delete_objects_from_source_after_transfer, as: 'deleteObjectsFromSourceAfterTransfer' + property :delete_objects_unique_in_sink, as: 'deleteObjectsUniqueInSink' + property :overwrite_objects_already_existing_in_sink, as: 'overwriteObjectsAlreadyExistingInSink' end end class TransferSpec # @private class Representation < Google::Apis::Core::JsonRepresentation - property :gcs_data_source, as: 'gcsDataSource', class: Google::Apis::StoragetransferV1::GcsData, decorator: Google::Apis::StoragetransferV1::GcsData::Representation - - property :transfer_options, as: 'transferOptions', class: Google::Apis::StoragetransferV1::TransferOptions, decorator: Google::Apis::StoragetransferV1::TransferOptions::Representation - property :aws_s3_data_source, as: 'awsS3DataSource', class: Google::Apis::StoragetransferV1::AwsS3Data, decorator: Google::Apis::StoragetransferV1::AwsS3Data::Representation property :http_data_source, as: 'httpDataSource', class: Google::Apis::StoragetransferV1::HttpData, decorator: Google::Apis::StoragetransferV1::HttpData::Representation @@ -236,24 +251,19 @@ module Google property :gcs_data_sink, as: 'gcsDataSink', class: Google::Apis::StoragetransferV1::GcsData, decorator: Google::Apis::StoragetransferV1::GcsData::Representation - end - end + property :gcs_data_source, as: 'gcsDataSource', class: Google::Apis::StoragetransferV1::GcsData, decorator: Google::Apis::StoragetransferV1::GcsData::Representation + + property :transfer_options, as: 'transferOptions', class: Google::Apis::StoragetransferV1::TransferOptions, decorator: Google::Apis::StoragetransferV1::TransferOptions::Representation - class TransferOptions - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :delete_objects_unique_in_sink, as: 'deleteObjectsUniqueInSink' - property :overwrite_objects_already_existing_in_sink, as: 'overwriteObjectsAlreadyExistingInSink' - property :delete_objects_from_source_after_transfer, as: 'deleteObjectsFromSourceAfterTransfer' end end class Status # @private class Representation < Google::Apis::Core::JsonRepresentation - property :code, as: 'code' property :message, as: 'message' collection :details, as: 'details' + property :code, as: 'code' end end @@ -266,9 +276,9 @@ module Google class ListOperationsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' collection :operations, as: 'operations', class: Google::Apis::StoragetransferV1::Operation, decorator: Google::Apis::StoragetransferV1::Operation::Representation - property :next_page_token, as: 'nextPageToken' end end @@ -282,10 +292,10 @@ module Google class TimeOfDay # @private class Representation < Google::Apis::Core::JsonRepresentation - property :minutes, as: 'minutes' property :hours, as: 'hours' property :nanos, as: 'nanos' property :seconds, as: 'seconds' + property :minutes, as: 'minutes' end end @@ -329,16 +339,15 @@ module Google class Date # @private class Representation < Google::Apis::Core::JsonRepresentation + property :month, as: 'month' property :year, as: 'year' property :day, as: 'day' - property :month, as: 'month' end end class TransferOperation # @private class Representation < Google::Apis::Core::JsonRepresentation - property :end_time, as: 'endTime' property :start_time, as: 'startTime' property :transfer_job_name, as: 'transferJobName' property :transfer_spec, as: 'transferSpec', class: Google::Apis::StoragetransferV1::TransferSpec, decorator: Google::Apis::StoragetransferV1::TransferSpec::Representation @@ -350,6 +359,7 @@ module Google property :name, as: 'name' property :project_id, as: 'projectId' + property :end_time, as: 'endTime' end end @@ -362,17 +372,17 @@ module Google end end - class Empty - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end - end - class AwsAccessKey # @private class Representation < Google::Apis::Core::JsonRepresentation - property :access_key_id, as: 'accessKeyId' property :secret_access_key, as: 'secretAccessKey' + property :access_key_id, as: 'accessKeyId' + end + end + + class Empty + # @private + class Representation < Google::Apis::Core::JsonRepresentation end end @@ -385,32 +395,22 @@ module Google class TransferCounters # @private class Representation < Google::Apis::Core::JsonRepresentation + property :bytes_found_only_from_sink, :numeric_string => true, as: 'bytesFoundOnlyFromSink' + property :objects_deleted_from_source, :numeric_string => true, as: 'objectsDeletedFromSource' + property :bytes_copied_to_sink, :numeric_string => true, as: 'bytesCopiedToSink' + property :bytes_found_from_source, :numeric_string => true, as: 'bytesFoundFromSource' + property :objects_from_source_skipped_by_sync, :numeric_string => true, as: 'objectsFromSourceSkippedBySync' property :objects_found_from_source, :numeric_string => true, as: 'objectsFoundFromSource' property :bytes_deleted_from_source, :numeric_string => true, as: 'bytesDeletedFromSource' property :objects_failed_to_delete_from_sink, :numeric_string => true, as: 'objectsFailedToDeleteFromSink' property :objects_deleted_from_sink, :numeric_string => true, as: 'objectsDeletedFromSink' property :objects_found_only_from_sink, :numeric_string => true, as: 'objectsFoundOnlyFromSink' property :bytes_from_source_skipped_by_sync, :numeric_string => true, as: 'bytesFromSourceSkippedBySync' - property :bytes_deleted_from_sink, :numeric_string => true, as: 'bytesDeletedFromSink' property :bytes_failed_to_delete_from_sink, :numeric_string => true, as: 'bytesFailedToDeleteFromSink' + property :bytes_deleted_from_sink, :numeric_string => true, as: 'bytesDeletedFromSink' property :bytes_from_source_failed, :numeric_string => true, as: 'bytesFromSourceFailed' property :objects_from_source_failed, :numeric_string => true, as: 'objectsFromSourceFailed' property :objects_copied_to_sink, :numeric_string => true, as: 'objectsCopiedToSink' - property :bytes_found_only_from_sink, :numeric_string => true, as: 'bytesFoundOnlyFromSink' - property :objects_deleted_from_source, :numeric_string => true, as: 'objectsDeletedFromSource' - property :bytes_copied_to_sink, :numeric_string => true, as: 'bytesCopiedToSink' - property :bytes_found_from_source, :numeric_string => true, as: 'bytesFoundFromSource' - property :objects_from_source_skipped_by_sync, :numeric_string => true, as: 'objectsFromSourceSkippedBySync' - end - end - - class ErrorSummary - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :error_code, as: 'errorCode' - property :error_count, :numeric_string => true, as: 'errorCount' - collection :error_log_entries, as: 'errorLogEntries', class: Google::Apis::StoragetransferV1::ErrorLogEntry, decorator: Google::Apis::StoragetransferV1::ErrorLogEntry::Representation - end end end diff --git a/generated/google/apis/storagetransfer_v1/service.rb b/generated/google/apis/storagetransfer_v1/service.rb index 0c4d2c204..ec7c26e8b 100644 --- a/generated/google/apis/storagetransfer_v1/service.rb +++ b/generated/google/apis/storagetransfer_v1/service.rb @@ -60,11 +60,11 @@ module Google # The ID of the Google Cloud Platform Console project that the Google service # account is associated with. # Required. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -77,43 +77,13 @@ 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 get_google_service_account(project_id, fields: nil, quota_user: nil, options: nil, &block) + def get_google_service_account(project_id, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/googleServiceAccounts/{projectId}', options) command.response_representation = Google::Apis::StoragetransferV1::GoogleServiceAccount::Representation command.response_class = Google::Apis::StoragetransferV1::GoogleServiceAccount command.params['projectId'] = project_id unless project_id.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Creates a transfer job that runs periodically. - # @param [Google::Apis::StoragetransferV1::TransferJob] transfer_job_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::StoragetransferV1::TransferJob] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::StoragetransferV1::TransferJob] - # - # @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_transfer_job(transfer_job_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/transferJobs', options) - command.request_representation = Google::Apis::StoragetransferV1::TransferJob::Representation - command.request_object = transfer_job_object - command.response_representation = Google::Apis::StoragetransferV1::TransferJob::Representation - command.response_class = Google::Apis::StoragetransferV1::TransferJob command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -124,11 +94,11 @@ module Google # The name of job to update. # Required. # @param [Google::Apis::StoragetransferV1::UpdateTransferJobRequest] update_transfer_job_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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -141,15 +111,15 @@ 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 patch_transfer_job(job_name, update_transfer_job_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def patch_transfer_job(job_name, update_transfer_job_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/{+jobName}', options) command.request_representation = Google::Apis::StoragetransferV1::UpdateTransferJobRequest::Representation command.request_object = update_transfer_job_request_object command.response_representation = Google::Apis::StoragetransferV1::TransferJob::Representation command.response_class = Google::Apis::StoragetransferV1::TransferJob command.params['jobName'] = job_name unless job_name.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -160,11 +130,11 @@ module Google # @param [String] project_id # The ID of the Google Cloud Platform Console project that owns the job. # Required. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -177,14 +147,14 @@ 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 get_transfer_job(job_name, project_id: nil, fields: nil, quota_user: nil, options: nil, &block) + def get_transfer_job(job_name, project_id: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+jobName}', options) command.response_representation = Google::Apis::StoragetransferV1::TransferJob::Representation command.response_class = Google::Apis::StoragetransferV1::TransferJob command.params['jobName'] = job_name unless job_name.nil? command.query['projectId'] = project_id unless project_id.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -202,11 +172,11 @@ module Google # The list page token. # @param [Fixnum] page_size # The list page size. The max allowed value is 256. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -219,26 +189,56 @@ 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_transfer_jobs(filter: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_transfer_jobs(filter: nil, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/transferJobs', options) command.response_representation = Google::Apis::StoragetransferV1::ListTransferJobsResponse::Representation command.response_class = Google::Apis::StoragetransferV1::ListTransferJobsResponse command.query['filter'] = filter unless filter.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Creates a transfer job that runs periodically. + # @param [Google::Apis::StoragetransferV1::TransferJob] transfer_job_object + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::StoragetransferV1::TransferJob] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::StoragetransferV1::TransferJob] + # + # @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_transfer_job(transfer_job_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/transferJobs', options) + command.request_representation = Google::Apis::StoragetransferV1::TransferJob::Representation + command.request_object = transfer_job_object + command.response_representation = Google::Apis::StoragetransferV1::TransferJob::Representation + command.response_class = Google::Apis::StoragetransferV1::TransferJob + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end # This method is not supported and the server returns `UNIMPLEMENTED`. # @param [String] name # The name of the operation resource to be deleted. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -251,13 +251,13 @@ 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 delete_transfer_operation(name, fields: nil, quota_user: nil, options: nil, &block) + def delete_transfer_operation(name, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', options) command.response_representation = Google::Apis::StoragetransferV1::Empty::Representation command.response_class = Google::Apis::StoragetransferV1::Empty command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -278,11 +278,11 @@ module Google # The list page token. # @param [Fixnum] page_size # The list page size. The max allowed value is 256. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -295,7 +295,7 @@ 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_transfer_operations(name, filter: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_transfer_operations(name, filter: nil, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', options) command.response_representation = Google::Apis::StoragetransferV1::ListOperationsResponse::Representation command.response_class = Google::Apis::StoragetransferV1::ListOperationsResponse @@ -303,8 +303,8 @@ module Google command.query['filter'] = filter unless filter.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -313,11 +313,11 @@ module Google # The name of the transfer operation. # Required. # @param [Google::Apis::StoragetransferV1::ResumeTransferOperationRequest] resume_transfer_operation_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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -330,15 +330,15 @@ 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 resume_transfer_operation(name, resume_transfer_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def resume_transfer_operation(name, resume_transfer_operation_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:resume', options) command.request_representation = Google::Apis::StoragetransferV1::ResumeTransferOperationRequest::Representation command.request_object = resume_transfer_operation_request_object command.response_representation = Google::Apis::StoragetransferV1::Empty::Representation command.response_class = Google::Apis::StoragetransferV1::Empty command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -346,11 +346,11 @@ module Google # succeeded or whether the operation completed despite cancellation. # @param [String] name # The name of the operation resource to be cancelled. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -363,13 +363,13 @@ 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 cancel_transfer_operation(name, fields: nil, quota_user: nil, options: nil, &block) + def cancel_transfer_operation(name, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:cancel', options) command.response_representation = Google::Apis::StoragetransferV1::Empty::Representation command.response_class = Google::Apis::StoragetransferV1::Empty command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -378,11 +378,11 @@ module Google # service. # @param [String] name # The name of the operation resource. - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -395,13 +395,13 @@ 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 get_transfer_operation(name, fields: nil, quota_user: nil, options: nil, &block) + def get_transfer_operation(name, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', options) command.response_representation = Google::Apis::StoragetransferV1::Operation::Representation command.response_class = Google::Apis::StoragetransferV1::Operation command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -410,11 +410,11 @@ module Google # The name of the transfer operation. # Required. # @param [Google::Apis::StoragetransferV1::PauseTransferOperationRequest] pause_transfer_operation_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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -427,15 +427,15 @@ 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 pause_transfer_operation(name, pause_transfer_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def pause_transfer_operation(name, pause_transfer_operation_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:pause', options) command.request_representation = Google::Apis::StoragetransferV1::PauseTransferOperationRequest::Representation command.request_object = pause_transfer_operation_request_object command.response_representation = Google::Apis::StoragetransferV1::Empty::Representation command.response_class = Google::Apis::StoragetransferV1::Empty command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end diff --git a/generated/google/apis/toolresults_v1beta3.rb b/generated/google/apis/toolresults_v1beta3.rb index 9e70d47e3..e1df79fc6 100644 --- a/generated/google/apis/toolresults_v1beta3.rb +++ b/generated/google/apis/toolresults_v1beta3.rb @@ -25,7 +25,7 @@ module Google # @see https://firebase.google.com/docs/test-lab/ module ToolresultsV1beta3 VERSION = 'V1beta3' - REVISION = '20170503' + REVISION = '20170525' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/toolresults_v1beta3/classes.rb b/generated/google/apis/toolresults_v1beta3/classes.rb index d5cab66a4..ce14b41d6 100644 --- a/generated/google/apis/toolresults_v1beta3/classes.rb +++ b/generated/google/apis/toolresults_v1beta3/classes.rb @@ -34,6 +34,9 @@ module Google # Example 3: Pack and unpack a message in Python. # foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any. # Unpack(foo) ... + # Example 4: Pack and unpack a message in Go + # foo := &pb.Foo`...` any, err := ptypes.MarshalAny(foo) ... foo := &pb.Foo`` if + # err := ptypes.UnmarshalAny(any, foo); err != nil ` ... ` # The pack methods provided by protobuf library will by default use 'type. # googleapis.com/full.type.name' as the type URL and the unpack methods only use # the fully qualified type name after the last '/' in the type URL, for example " @@ -546,7 +549,7 @@ module Google # put the localized message in the error details or localize it in the client. # The optional error details may contain arbitrary information about the error. # There is a predefined set of error detail types in the package `google.rpc` - # which can be used for common error conditions. + # that can be used for common error conditions. # # Language mapping # The `Status` message is the logical representation of the error model, but it # is not necessarily the actual wire format. When the `Status` message is @@ -562,7 +565,7 @@ module Google # it may embed the `Status` in the normal response to indicate the partial # errors. # - Workflow errors. A typical workflow has multiple steps. Each step may have a - # `Status` message for error reporting purpose. + # `Status` message for error reporting. # - Batch operations. If a client uses batch request and batch response, the ` # Status` message should be used directly inside batch response, one for each # error sub-response. @@ -1192,7 +1195,7 @@ module Google # put the localized message in the error details or localize it in the client. # The optional error details may contain arbitrary information about the error. # There is a predefined set of error detail types in the package `google.rpc` - # which can be used for common error conditions. + # that can be used for common error conditions. # # Language mapping # The `Status` message is the logical representation of the error model, but it # is not necessarily the actual wire format. When the `Status` message is @@ -1208,7 +1211,7 @@ module Google # it may embed the `Status` in the normal response to indicate the partial # errors. # - Workflow errors. A typical workflow has multiple steps. Each step may have a - # `Status` message for error reporting purpose. + # `Status` message for error reporting. # - Batch operations. If a client uses batch request and batch response, the ` # Status` message should be used directly inside batch response, one for each # error sub-response. diff --git a/generated/google/apis/toolresults_v1beta3/service.rb b/generated/google/apis/toolresults_v1beta3/service.rb index fef08c3a5..27f108407 100644 --- a/generated/google/apis/toolresults_v1beta3/service.rb +++ b/generated/google/apis/toolresults_v1beta3/service.rb @@ -93,19 +93,20 @@ module Google # Creates resources for settings which have not yet been set. # Currently, this creates a single resource: a Google Cloud Storage bucket, to - # be used as the default bucket for this project. The bucket is created in the - # name of the user calling. Except in rare cases, calling this method in + # be used as the default bucket for this project. The bucket is created in an + # FTL-own storage project. Except for in rare cases, calling this method in # parallel from multiple clients will only create a single bucket. In order to # avoid unnecessary storage charges, the bucket is configured to automatically # delete objects older than 90 days. - # The bucket is created with the project-private ACL: All project team members - # are given permissions to the bucket and objects created within it according to - # their roles. Project owners have owners rights, and so on. The default ACL on - # objects created in the bucket is project-private as well. See Google Cloud - # Storage documentation for more details. + # The bucket is created with the following permissions: - Owner access for + # owners of central storage project (FTL-owned) - Writer access for owners/ + # editors of customer project - Reader access for viewers of customer project + # The default ACL on objects created in the bucket is: - Owner access for owners + # of central storage project - Reader access for owners/editors/viewers of + # customer project See Google Cloud Storage documentation for more details. # If there is already a default bucket set and the project can access the bucket, # this call does nothing. However, if the project doesn't have the permission - # to access the bucket or the bucket is deteleted, a new bucket will be created. + # to access the bucket or the bucket is deleted, a new bucket will be created. # May return any canonical error codes, including the following: # - PERMISSION_DENIED - if the user is not authorized to write to project - Any # error code raised by Google Cloud Storage diff --git a/generated/google/apis/translate_v2.rb b/generated/google/apis/translate_v2.rb index b00c8d097..1845f6483 100644 --- a/generated/google/apis/translate_v2.rb +++ b/generated/google/apis/translate_v2.rb @@ -18,14 +18,21 @@ require 'google/apis/translate_v2/representations.rb' module Google module Apis - # Translate API + # Google Cloud Translation API # - # Translates text from one language to another. + # The Google Cloud Translation API lets websites and programs integrate with + # Google Translate programmatically. # - # @see https://developers.google.com/translate/v2/using_rest + # @see https://code.google.com/apis/language/translate/v2/getting_started.html module TranslateV2 VERSION = 'V2' - REVISION = '20160627' + REVISION = '20170502' + + # View and manage your data across Google Cloud Platform services + AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' + + # Translate text from one language to another using Google Translate + AUTH_CLOUD_TRANSLATION = 'https://www.googleapis.com/auth/cloud-translation' end end end diff --git a/generated/google/apis/translate_v2/classes.rb b/generated/google/apis/translate_v2/classes.rb index f8cabbede..bf73c1d31 100644 --- a/generated/google/apis/translate_v2/classes.rb +++ b/generated/google/apis/translate_v2/classes.rb @@ -22,6 +22,33 @@ module Google module Apis module TranslateV2 + # + class LanguagesResource + include Google::Apis::Core::Hashable + + # Supported language code, generally consisting of its ISO 639-1 + # identifier. (E.g. 'en', 'ja'). In certain cases, BCP-47 codes including + # language + region identifiers are returned (e.g. 'zh-TW' and 'zh-CH') + # Corresponds to the JSON property `language` + # @return [String] + attr_accessor :language + + # Human readable name of the language localized to the target language. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @language = args[:language] if args.key?(:language) + @name = args[:name] if args.key?(:name) + end + end + # class ListDetectionsResponse include Google::Apis::Core::Hashable @@ -41,25 +68,15 @@ module Google end end - # - class DetectionsResource + # The request message for discovering supported languages. + class GetSupportedLanguagesRequest include Google::Apis::Core::Hashable - # The confidence of the detection resul of this language. - # Corresponds to the JSON property `confidence` - # @return [Float] - attr_accessor :confidence - - # A boolean to indicate is the language detection result reliable. - # Corresponds to the JSON property `isReliable` - # @return [Boolean] - attr_accessor :is_reliable - alias_method :is_reliable?, :is_reliable - - # The language we detect - # Corresponds to the JSON property `language` + # The language to use to return localized, human readable names of supported + # languages. + # Corresponds to the JSON property `target` # @return [String] - attr_accessor :language + attr_accessor :target def initialize(**args) update!(**args) @@ -67,9 +84,7 @@ module Google # Update properties of this object def update!(**args) - @confidence = args[:confidence] if args.key?(:confidence) - @is_reliable = args[:is_reliable] if args.key?(:is_reliable) - @language = args[:language] if args.key?(:language) + @target = args[:target] if args.key?(:target) end end @@ -96,31 +111,74 @@ module Google end # - class LanguagesResource + class DetectionsResource include Google::Apis::Core::Hashable - # The language code. + # The confidence of the detection result of this language. + # Corresponds to the JSON property `confidence` + # @return [Float] + attr_accessor :confidence + + # A boolean to indicate is the language detection result reliable. + # Corresponds to the JSON property `isReliable` + # @return [Boolean] + attr_accessor :is_reliable + alias_method :is_reliable?, :is_reliable + + # The language we detected. # Corresponds to the JSON property `language` # @return [String] attr_accessor :language - # The localized name of the language if target parameter is given. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @confidence = args[:confidence] if args.key?(:confidence) + @is_reliable = args[:is_reliable] if args.key?(:is_reliable) @language = args[:language] if args.key?(:language) - @name = args[:name] if args.key?(:name) end end # + class TranslationsResource + include Google::Apis::Core::Hashable + + # Text translated into the target language. + # Corresponds to the JSON property `translatedText` + # @return [String] + attr_accessor :translated_text + + # The source language of the initial request, detected automatically, if + # no source language was passed within the initial request. If the + # source language was passed, auto-detection of the language will not + # occur and this field will be empty. + # Corresponds to the JSON property `detectedSourceLanguage` + # @return [String] + attr_accessor :detected_source_language + + # The `model` type used for this translation. Valid values are + # listed in public documentation. Can be different from requested `model`. + # Present only if specific model type was explicitly requested. + # Corresponds to the JSON property `model` + # @return [String] + attr_accessor :model + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @translated_text = args[:translated_text] if args.key?(:translated_text) + @detected_source_language = args[:detected_source_language] if args.key?(:detected_source_language) + @model = args[:model] if args.key?(:model) + end + end + + # The main language translation response message. class ListTranslationsResponse include Google::Apis::Core::Hashable @@ -139,19 +197,41 @@ module Google end end - # - class TranslationsResource + # The main translation request message for the Cloud Translation API. + class TranslateTextRequest include Google::Apis::Core::Hashable - # Detected source language if source parameter is unspecified. - # Corresponds to the JSON property `detectedSourceLanguage` - # @return [String] - attr_accessor :detected_source_language + # The input text to translate. Repeat this parameter to perform translation + # operations on multiple text inputs. + # Corresponds to the JSON property `q` + # @return [Array] + attr_accessor :q - # The translation. - # Corresponds to the JSON property `translatedText` + # The format of the source text, in either HTML (default) or plain-text. A + # value of "html" indicates HTML and a value of "text" indicates plain-text. + # Corresponds to the JSON property `format` # @return [String] - attr_accessor :translated_text + attr_accessor :format + + # The language of the source text, set to one of the language codes listed in + # Language Support. If the source language is not specified, the API will + # attempt to identify the source language automatically and return it within + # the response. + # Corresponds to the JSON property `source` + # @return [String] + attr_accessor :source + + # The `model` type requested for this translation. Valid values are + # listed in public documentation. + # Corresponds to the JSON property `model` + # @return [String] + attr_accessor :model + + # The language to use for translation of the input text, set to one of the + # language codes listed in Language Support. + # Corresponds to the JSON property `target` + # @return [String] + attr_accessor :target def initialize(**args) update!(**args) @@ -159,8 +239,31 @@ module Google # Update properties of this object def update!(**args) - @detected_source_language = args[:detected_source_language] if args.key?(:detected_source_language) - @translated_text = args[:translated_text] if args.key?(:translated_text) + @q = args[:q] if args.key?(:q) + @format = args[:format] if args.key?(:format) + @source = args[:source] if args.key?(:source) + @model = args[:model] if args.key?(:model) + @target = args[:target] if args.key?(:target) + end + end + + # The request message for language detection. + class DetectLanguageRequest + include Google::Apis::Core::Hashable + + # The input text upon which to perform language detection. Repeat this + # parameter to perform language detection on multiple text inputs. + # Corresponds to the JSON property `q` + # @return [Array] + attr_accessor :q + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @q = args[:q] if args.key?(:q) end end end diff --git a/generated/google/apis/translate_v2/representations.rb b/generated/google/apis/translate_v2/representations.rb index b9b9f403f..aea2aafe1 100644 --- a/generated/google/apis/translate_v2/representations.rb +++ b/generated/google/apis/translate_v2/representations.rb @@ -22,13 +22,19 @@ module Google module Apis module TranslateV2 + class LanguagesResource + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class ListDetectionsResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class DetectionsResource + class GetSupportedLanguagesRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -40,7 +46,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class LanguagesResource + class DetectionsResource + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TranslationsResource class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -52,12 +64,27 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class TranslationsResource + class TranslateTextRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class DetectLanguageRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class LanguagesResource + # @private + class Representation < Google::Apis::Core::JsonRepresentation + self.representation_wrap = lambda { |args| :data if args[:unwrap] == Google::Apis::TranslateV2::LanguagesResource } + property :language, as: 'language' + property :name, as: 'name' + end + end + class ListDetectionsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -71,13 +98,11 @@ module Google end end - class DetectionsResource + class GetSupportedLanguagesRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - self.representation_wrap = lambda { |args| :data if args[:unwrap] == Google::Apis::TranslateV2::DetectionsResource } - property :confidence, as: 'confidence' - property :is_reliable, as: 'isReliable' - property :language, as: 'language' + self.representation_wrap = lambda { |args| :data if args[:unwrap] == Google::Apis::TranslateV2::GetSupportedLanguagesRequest } + property :target, as: 'target' end end @@ -90,12 +115,23 @@ module Google end end - class LanguagesResource + class DetectionsResource # @private class Representation < Google::Apis::Core::JsonRepresentation - self.representation_wrap = lambda { |args| :data if args[:unwrap] == Google::Apis::TranslateV2::LanguagesResource } + self.representation_wrap = lambda { |args| :data if args[:unwrap] == Google::Apis::TranslateV2::DetectionsResource } + property :confidence, as: 'confidence' + property :is_reliable, as: 'isReliable' property :language, as: 'language' - property :name, as: 'name' + end + end + + class TranslationsResource + # @private + class Representation < Google::Apis::Core::JsonRepresentation + self.representation_wrap = lambda { |args| :data if args[:unwrap] == Google::Apis::TranslateV2::TranslationsResource } + property :translated_text, as: 'translatedText' + property :detected_source_language, as: 'detectedSourceLanguage' + property :model, as: 'model' end end @@ -108,12 +144,23 @@ module Google end end - class TranslationsResource + class TranslateTextRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - self.representation_wrap = lambda { |args| :data if args[:unwrap] == Google::Apis::TranslateV2::TranslationsResource } - property :detected_source_language, as: 'detectedSourceLanguage' - property :translated_text, as: 'translatedText' + self.representation_wrap = lambda { |args| :data if args[:unwrap] == Google::Apis::TranslateV2::TranslateTextRequest } + collection :q, as: 'q' + property :format, as: 'format' + property :source, as: 'source' + property :model, as: 'model' + property :target, as: 'target' + end + end + + class DetectLanguageRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + self.representation_wrap = lambda { |args| :data if args[:unwrap] == Google::Apis::TranslateV2::DetectLanguageRequest } + collection :q, as: 'q' end end end diff --git a/generated/google/apis/translate_v2/service.rb b/generated/google/apis/translate_v2/service.rb index 6ea7b6fb6..347af9469 100644 --- a/generated/google/apis/translate_v2/service.rb +++ b/generated/google/apis/translate_v2/service.rb @@ -20,9 +20,10 @@ require 'google/apis/errors' module Google module Apis module TranslateV2 - # Translate API + # Google Cloud Translation API # - # Translates text from one language to another. + # The Google Cloud Translation API lets websites and programs integrate with + # Google Translate programmatically. # # @example # require 'google/apis/translate_v2' @@ -30,7 +31,7 @@ module Google # Translate = Google::Apis::TranslateV2 # Alias the module # service = Translate::TranslateService.new # - # @see https://developers.google.com/translate/v2/using_rest + # @see https://code.google.com/apis/language/translate/v2/getting_started.html class TranslateService < Google::Apis::Core::BaseService # @return [String] # API key. Your API key identifies your project and provides you with API access, @@ -43,63 +44,21 @@ module Google # 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/', 'language/translate/') - @batch_path = 'batch' + super('https://translation.googleapis.com/', 'language/translate/') + @batch_path = 'batch/translate' end - # Detect the language of text. - # @param [Array, String] q - # The text to detect - # @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::TranslateV2::ListDetectionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::TranslateV2::ListDetectionsResponse] - # - # @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_detections(q, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:get, 'v2/detect', options) - command.response_representation = Google::Apis::TranslateV2::ListDetectionsResponse::Representation - command.response_class = Google::Apis::TranslateV2::ListDetectionsResponse - command.query['q'] = q unless q.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 - - # List the source/target languages supported by the API + # Returns a list of supported languages for translation. # @param [String] target - # the language and collation in which the localized results should be returned - # @param [String] fields - # Selector specifying which fields to include in a partial response. + # The language to use to return localized, human readable names of supported + # languages. # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -112,37 +71,39 @@ 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_languages(target: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def list_languages(target: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v2/languages', options) command.response_representation = Google::Apis::TranslateV2::ListLanguagesResponse::Representation command.response_class = Google::Apis::TranslateV2::ListLanguagesResponse command.query['target'] = target unless target.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? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end - # Returns text translations from one language to another. + # Translates input text, returning translated text. # @param [Array, String] q - # The text to translate + # The input text to translate. Repeat this parameter to perform translation + # operations on multiple text inputs. # @param [String] target - # The target language into which the text should be translated + # The language to use for translation of the input text, set to one of the + # language codes listed in Language Support. + # @param [String] format + # The format of the source text, in either HTML (default) or plain-text. A + # value of "html" indicates HTML and a value of "text" indicates plain-text. + # @param [String] source + # The language of the source text, set to one of the language codes listed in + # Language Support. If the source language is not specified, the API will + # attempt to identify the source language automatically and return it within + # the response. # @param [Array, String] cid # The customization id for translate - # @param [String] format - # The format of the text - # @param [String] source - # The source language of the text - # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -155,18 +116,111 @@ 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_translations(q, target, cid: nil, format: nil, source: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def list_translations(q, target, format: nil, source: nil, cid: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v2', options) command.response_representation = Google::Apis::TranslateV2::ListTranslationsResponse::Representation command.response_class = Google::Apis::TranslateV2::ListTranslationsResponse - command.query['cid'] = cid unless cid.nil? command.query['format'] = format unless format.nil? command.query['q'] = q unless q.nil? command.query['source'] = source unless source.nil? + command.query['cid'] = cid unless cid.nil? command.query['target'] = target unless target.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? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Translates input text, returning translated text. + # @param [Google::Apis::TranslateV2::TranslateTextRequest] translate_text_request_object + # @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] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TranslateV2::ListTranslationsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TranslateV2::ListTranslationsResponse] + # + # @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 translate_translation_text(translate_text_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v2', options) + command.request_representation = Google::Apis::TranslateV2::TranslateTextRequest::Representation + command.request_object = translate_text_request_object + command.response_representation = Google::Apis::TranslateV2::ListTranslationsResponse::Representation + command.response_class = Google::Apis::TranslateV2::ListTranslationsResponse + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Detects the language of text within a request. + # @param [Array, String] q + # The input text upon which to perform language detection. Repeat this + # parameter to perform language detection on multiple text inputs. + # @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] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TranslateV2::ListDetectionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TranslateV2::ListDetectionsResponse] + # + # @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_detections(q, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/detect', options) + command.response_representation = Google::Apis::TranslateV2::ListDetectionsResponse::Representation + command.response_class = Google::Apis::TranslateV2::ListDetectionsResponse + command.query['q'] = q unless q.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Detects the language of text within a request. + # @param [Google::Apis::TranslateV2::DetectLanguageRequest] detect_language_request_object + # @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] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::TranslateV2::ListDetectionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::TranslateV2::ListDetectionsResponse] + # + # @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 detect_detection_language(detect_language_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v2/detect', options) + command.request_representation = Google::Apis::TranslateV2::DetectLanguageRequest::Representation + command.request_object = detect_language_request_object + command.response_representation = Google::Apis::TranslateV2::ListDetectionsResponse::Representation + command.response_class = Google::Apis::TranslateV2::ListDetectionsResponse + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -175,7 +229,6 @@ module Google 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 diff --git a/generated/google/apis/vision_v1.rb b/generated/google/apis/vision_v1.rb index c0c3f5c5e..2bae01179 100644 --- a/generated/google/apis/vision_v1.rb +++ b/generated/google/apis/vision_v1.rb @@ -27,7 +27,7 @@ module Google # @see https://cloud.google.com/vision/ module VisionV1 VERSION = 'V1' - REVISION = '20170501' + REVISION = '20170523' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/vision_v1/classes.rb b/generated/google/apis/vision_v1/classes.rb index 254769b44..ab2d22633 100644 --- a/generated/google/apis/vision_v1/classes.rb +++ b/generated/google/apis/vision_v1/classes.rb @@ -22,529 +22,6 @@ module Google module Apis module VisionV1 - # Parameters for crop hints annotation request. - class CropHintsParams - include Google::Apis::Core::Hashable - - # Aspect ratios in floats, representing the ratio of the width to the height - # of the image. For example, if the desired aspect ratio is 4/3, the - # corresponding float value should be 1.33333. If not specified, the - # best possible crop is returned. The number of provided aspect ratios is - # limited to a maximum of 16; any aspect ratios provided after the 16th are - # ignored. - # Corresponds to the JSON property `aspectRatios` - # @return [Array] - attr_accessor :aspect_ratios - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @aspect_ratios = args[:aspect_ratios] if args.key?(:aspect_ratios) - end - end - - # Logical element on the page. - class Block - include Google::Apis::Core::Hashable - - # Additional information detected on the structural component. - # Corresponds to the JSON property `property` - # @return [Google::Apis::VisionV1::TextProperty] - attr_accessor :property - - # Detected block type (text, image etc) for this block. - # Corresponds to the JSON property `blockType` - # @return [String] - attr_accessor :block_type - - # A bounding polygon for the detected image annotation. - # Corresponds to the JSON property `boundingBox` - # @return [Google::Apis::VisionV1::BoundingPoly] - attr_accessor :bounding_box - - # List of paragraphs in this block (if this blocks is of type text). - # Corresponds to the JSON property `paragraphs` - # @return [Array] - attr_accessor :paragraphs - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @property = args[:property] if args.key?(:property) - @block_type = args[:block_type] if args.key?(:block_type) - @bounding_box = args[:bounding_box] if args.key?(:bounding_box) - @paragraphs = args[:paragraphs] if args.key?(:paragraphs) - end - end - - # Relevant information for the image from the Internet. - class WebDetection - include Google::Apis::Core::Hashable - - # Fully matching images from the Internet. - # Can include resized copies of the query image. - # Corresponds to the JSON property `fullMatchingImages` - # @return [Array] - attr_accessor :full_matching_images - - # Deduced entities from similar images on the Internet. - # Corresponds to the JSON property `webEntities` - # @return [Array] - attr_accessor :web_entities - - # Web pages containing the matching images from the Internet. - # Corresponds to the JSON property `pagesWithMatchingImages` - # @return [Array] - attr_accessor :pages_with_matching_images - - # Partial matching images from the Internet. - # Those images are similar enough to share some key-point features. For - # example an original image will likely have partial matching for its crops. - # Corresponds to the JSON property `partialMatchingImages` - # @return [Array] - attr_accessor :partial_matching_images - - # The visually similar image results. - # Corresponds to the JSON property `visuallySimilarImages` - # @return [Array] - attr_accessor :visually_similar_images - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @full_matching_images = args[:full_matching_images] if args.key?(:full_matching_images) - @web_entities = args[:web_entities] if args.key?(:web_entities) - @pages_with_matching_images = args[:pages_with_matching_images] if args.key?(:pages_with_matching_images) - @partial_matching_images = args[:partial_matching_images] if args.key?(:partial_matching_images) - @visually_similar_images = args[:visually_similar_images] if args.key?(:visually_similar_images) - end - end - - # Response to a batch image annotation request. - class BatchAnnotateImagesResponse - include Google::Apis::Core::Hashable - - # Individual responses to image annotation requests within the batch. - # Corresponds to the JSON property `responses` - # @return [Array] - attr_accessor :responses - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @responses = args[:responses] if args.key?(:responses) - end - end - - # A `Property` consists of a user-supplied name/value pair. - class Property - include Google::Apis::Core::Hashable - - # Value of numeric properties. - # Corresponds to the JSON property `uint64Value` - # @return [Fixnum] - attr_accessor :uint64_value - - # Name of the property. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Value of the property. - # 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) - @uint64_value = args[:uint64_value] if args.key?(:uint64_value) - @name = args[:name] if args.key?(:name) - @value = args[:value] if args.key?(:value) - end - end - - # Detected entity location information. - class LocationInfo - include Google::Apis::Core::Hashable - - # An object representing a latitude/longitude pair. This is expressed as a pair - # of doubles representing degrees latitude and degrees longitude. Unless - # specified otherwise, this must conform to the - # WGS84 - # standard. Values must be within normalized ranges. - # Example of normalization code in Python: - # def NormalizeLongitude(longitude): - # """Wraps decimal degrees longitude to [-180.0, 180.0].""" - # q, r = divmod(longitude, 360.0) - # if r > 180.0 or (r == 180.0 and q <= -1.0): - # return r - 360.0 - # return r - # def NormalizeLatLng(latitude, longitude): - # """Wraps decimal degrees latitude and longitude to - # [-90.0, 90.0] and [-180.0, 180.0], respectively.""" - # r = latitude % 360.0 - # if r <= 90.0: - # return r, NormalizeLongitude(longitude) - # elif r >= 270.0: - # return r - 360, NormalizeLongitude(longitude) - # else: - # return 180 - r, NormalizeLongitude(longitude + 180.0) - # assert 180.0 == NormalizeLongitude(180.0) - # assert -180.0 == NormalizeLongitude(-180.0) - # assert -179.0 == NormalizeLongitude(181.0) - # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0) - # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0) - # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) - # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0) - # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0) - # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0) - # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0) - # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) - # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) - # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) - # The code in logs/storage/validator/logs_validator_traits.cc treats this type - # as if it were annotated as ST_LOCATION. - # Corresponds to the JSON property `latLng` - # @return [Google::Apis::VisionV1::LatLng] - attr_accessor :lat_lng - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @lat_lng = args[:lat_lng] if args.key?(:lat_lng) - end - end - - # External image source (Google Cloud Storage image location). - class ImageSource - include Google::Apis::Core::Hashable - - # NOTE: For new code `image_uri` below is preferred. - # Google Cloud Storage image URI, which must be in the following form: - # `gs://bucket_name/object_name` (for details, see - # [Google Cloud Storage Request - # URIs](https://cloud.google.com/storage/docs/reference-uris)). - # NOTE: Cloud Storage object versioning is not supported. - # Corresponds to the JSON property `gcsImageUri` - # @return [String] - attr_accessor :gcs_image_uri - - # Image URI which supports: - # 1) Google Cloud Storage image URI, which must be in the following form: - # `gs://bucket_name/object_name` (for details, see - # [Google Cloud Storage Request - # URIs](https://cloud.google.com/storage/docs/reference-uris)). - # NOTE: Cloud Storage object versioning is not supported. - # 2) Publicly accessible image HTTP/HTTPS URL. - # This is preferred over the legacy `gcs_image_uri` above. When both - # `gcs_image_uri` and `image_uri` are specified, `image_uri` takes - # precedence. - # Corresponds to the JSON property `imageUri` - # @return [String] - attr_accessor :image_uri - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @gcs_image_uri = args[:gcs_image_uri] if args.key?(:gcs_image_uri) - @image_uri = args[:image_uri] if args.key?(:image_uri) - end - end - - # A 3D position in the image, used primarily for Face detection landmarks. - # A valid Position must have both x and y coordinates. - # The position coordinates are in the same scale as the original image. - class Position - include Google::Apis::Core::Hashable - - # Y coordinate. - # Corresponds to the JSON property `y` - # @return [Float] - attr_accessor :y - - # X coordinate. - # Corresponds to the JSON property `x` - # @return [Float] - attr_accessor :x - - # Z coordinate (or depth). - # Corresponds to the JSON property `z` - # @return [Float] - attr_accessor :z - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @y = args[:y] if args.key?(:y) - @x = args[:x] if args.key?(:x) - @z = args[:z] if args.key?(:z) - end - end - - # Metadata for web pages. - class WebPage - include Google::Apis::Core::Hashable - - # Overall relevancy score for the web page. - # Not normalized and not comparable across different image queries. - # Corresponds to the JSON property `score` - # @return [Float] - attr_accessor :score - - # The result web page URL. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @score = args[:score] if args.key?(:score) - @url = args[:url] if args.key?(:url) - end - end - - # Color information consists of RGB channels, score, and the fraction of - # the image that the color occupies in the image. - class ColorInfo - include Google::Apis::Core::Hashable - - # Image-specific score for this color. Value in range [0, 1]. - # Corresponds to the JSON property `score` - # @return [Float] - attr_accessor :score - - # The fraction of pixels the color occupies in the image. - # Value in range [0, 1]. - # Corresponds to the JSON property `pixelFraction` - # @return [Float] - attr_accessor :pixel_fraction - - # Represents a color in the RGBA color space. This representation is designed - # for simplicity of conversion to/from color representations in various - # languages over compactness; for example, the fields of this representation - # can be trivially provided to the constructor of "java.awt.Color" in Java; it - # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" - # method in iOS; and, with just a little work, it can be easily formatted into - # a CSS "rgba()" string in JavaScript, as well. Here are some examples: - # Example (Java): - # import com.google.type.Color; - # // ... - # public static java.awt.Color fromProto(Color protocolor) ` - # float alpha = protocolor.hasAlpha() - # ? protocolor.getAlpha().getValue() - # : 1.0; - # return new java.awt.Color( - # protocolor.getRed(), - # protocolor.getGreen(), - # protocolor.getBlue(), - # alpha); - # ` - # public static Color toProto(java.awt.Color color) ` - # float red = (float) color.getRed(); - # float green = (float) color.getGreen(); - # float blue = (float) color.getBlue(); - # float denominator = 255.0; - # Color.Builder resultBuilder = - # Color - # .newBuilder() - # .setRed(red / denominator) - # .setGreen(green / denominator) - # .setBlue(blue / denominator); - # int alpha = color.getAlpha(); - # if (alpha != 255) ` - # result.setAlpha( - # FloatValue - # .newBuilder() - # .setValue(((float) alpha) / denominator) - # .build()); - # ` - # return resultBuilder.build(); - # ` - # // ... - # Example (iOS / Obj-C): - # // ... - # static UIColor* fromProto(Color* protocolor) ` - # float red = [protocolor red]; - # float green = [protocolor green]; - # float blue = [protocolor blue]; - # FloatValue* alpha_wrapper = [protocolor alpha]; - # float alpha = 1.0; - # if (alpha_wrapper != nil) ` - # alpha = [alpha_wrapper value]; - # ` - # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; - # ` - # static Color* toProto(UIColor* color) ` - # CGFloat red, green, blue, alpha; - # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` - # return nil; - # ` - # Color* result = [Color alloc] init]; - # [result setRed:red]; - # [result setGreen:green]; - # [result setBlue:blue]; - # if (alpha <= 0.9999) ` - # [result setAlpha:floatWrapperWithValue(alpha)]; - # ` - # [result autorelease]; - # return result; - # ` - # // ... - # Example (JavaScript): - # // ... - # var protoToCssColor = function(rgb_color) ` - # var redFrac = rgb_color.red || 0.0; - # var greenFrac = rgb_color.green || 0.0; - # var blueFrac = rgb_color.blue || 0.0; - # var red = Math.floor(redFrac * 255); - # var green = Math.floor(greenFrac * 255); - # var blue = Math.floor(blueFrac * 255); - # if (!('alpha' in rgb_color)) ` - # return rgbToCssColor_(red, green, blue); - # ` - # var alphaFrac = rgb_color.alpha.value || 0.0; - # var rgbParams = [red, green, blue].join(','); - # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); - # `; - # var rgbToCssColor_ = function(red, green, blue) ` - # var rgbNumber = new Number((red << 16) | (green << 8) | blue); - # var hexString = rgbNumber.toString(16); - # var missingZeros = 6 - hexString.length; - # var resultBuilder = ['#']; - # for (var i = 0; i < missingZeros; i++) ` - # resultBuilder.push('0'); - # ` - # resultBuilder.push(hexString); - # return resultBuilder.join(''); - # `; - # // ... - # Corresponds to the JSON property `color` - # @return [Google::Apis::VisionV1::Color] - attr_accessor :color - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @score = args[:score] if args.key?(:score) - @pixel_fraction = args[:pixel_fraction] if args.key?(:pixel_fraction) - @color = args[:color] if args.key?(:color) - end - end - - # Set of detected entity features. - class EntityAnnotation - include Google::Apis::Core::Hashable - - # Overall score of the result. Range [0, 1]. - # Corresponds to the JSON property `score` - # @return [Float] - attr_accessor :score - - # The location information for the detected entity. Multiple - # `LocationInfo` elements can be present because one location may - # indicate the location of the scene in the image, and another location - # may indicate the location of the place where the image was taken. - # Location information is usually present for landmarks. - # Corresponds to the JSON property `locations` - # @return [Array] - attr_accessor :locations - - # Opaque entity ID. Some IDs may be available in - # [Google Knowledge Graph Search API](https://developers.google.com/knowledge- - # graph/). - # Corresponds to the JSON property `mid` - # @return [String] - attr_accessor :mid - - # The accuracy of the entity detection in an image. - # For example, for an image in which the "Eiffel Tower" entity is detected, - # this field represents the confidence that there is a tower in the query - # image. Range [0, 1]. - # Corresponds to the JSON property `confidence` - # @return [Float] - attr_accessor :confidence - - # The language code for the locale in which the entity textual - # `description` is expressed. - # Corresponds to the JSON property `locale` - # @return [String] - attr_accessor :locale - - # A bounding polygon for the detected image annotation. - # Corresponds to the JSON property `boundingPoly` - # @return [Google::Apis::VisionV1::BoundingPoly] - attr_accessor :bounding_poly - - # The relevancy of the ICA (Image Content Annotation) label to the - # image. For example, the relevancy of "tower" is likely higher to an image - # containing the detected "Eiffel Tower" than to an image containing a - # detected distant towering building, even though the confidence that - # there is a tower in each image may be the same. Range [0, 1]. - # Corresponds to the JSON property `topicality` - # @return [Float] - attr_accessor :topicality - - # Entity textual description, expressed in its `locale` language. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Some entities may have optional user-supplied `Property` (name/value) - # fields, such a score or string that qualifies the entity. - # Corresponds to the JSON property `properties` - # @return [Array] - attr_accessor :properties - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @score = args[:score] if args.key?(:score) - @locations = args[:locations] if args.key?(:locations) - @mid = args[:mid] if args.key?(:mid) - @confidence = args[:confidence] if args.key?(:confidence) - @locale = args[:locale] if args.key?(:locale) - @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly) - @topicality = args[:topicality] if args.key?(:topicality) - @description = args[:description] if args.key?(:description) - @properties = args[:properties] if args.key?(:properties) - end - end - # Single crop hint that is used to generate a new crop when serving an image. class CropHint include Google::Apis::Core::Hashable @@ -585,11 +62,6 @@ module Google class Landmark include Google::Apis::Core::Hashable - # Face landmark type. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - # A 3D position in the image, used primarily for Face detection landmarks. # A valid Position must have both x and y coordinates. # The position coordinates are in the same scale as the original image. @@ -597,14 +69,19 @@ module Google # @return [Google::Apis::VisionV1::Position] attr_accessor :position + # Face landmark type. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @type = args[:type] if args.key?(:type) @position = args[:position] if args.key?(:position) + @type = args[:type] if args.key?(:type) end end @@ -638,6 +115,11 @@ module Google class Word include Google::Apis::Core::Hashable + # A bounding polygon for the detected image annotation. + # Corresponds to the JSON property `boundingBox` + # @return [Google::Apis::VisionV1::BoundingPoly] + attr_accessor :bounding_box + # List of symbols in the word. # The order of the symbols follows the natural reading order. # Corresponds to the JSON property `symbols` @@ -649,20 +131,46 @@ module Google # @return [Google::Apis::VisionV1::TextProperty] attr_accessor :property + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @bounding_box = args[:bounding_box] if args.key?(:bounding_box) + @symbols = args[:symbols] if args.key?(:symbols) + @property = args[:property] if args.key?(:property) + end + end + + # Structural unit of text representing a number of words in certain order. + class Paragraph + include Google::Apis::Core::Hashable + # A bounding polygon for the detected image annotation. # Corresponds to the JSON property `boundingBox` # @return [Google::Apis::VisionV1::BoundingPoly] attr_accessor :bounding_box + # List of words in this paragraph. + # Corresponds to the JSON property `words` + # @return [Array] + attr_accessor :words + + # Additional information detected on the structural component. + # Corresponds to the JSON property `property` + # @return [Google::Apis::VisionV1::TextProperty] + attr_accessor :property + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @symbols = args[:symbols] if args.key?(:symbols) - @property = args[:property] if args.key?(:property) @bounding_box = args[:bounding_box] if args.key?(:bounding_box) + @words = args[:words] if args.key?(:words) + @property = args[:property] if args.key?(:property) end end @@ -694,41 +202,15 @@ module Google end end - # Structural unit of text representing a number of words in certain order. - class Paragraph - include Google::Apis::Core::Hashable - - # Additional information detected on the structural component. - # Corresponds to the JSON property `property` - # @return [Google::Apis::VisionV1::TextProperty] - attr_accessor :property - - # A bounding polygon for the detected image annotation. - # Corresponds to the JSON property `boundingBox` - # @return [Google::Apis::VisionV1::BoundingPoly] - attr_accessor :bounding_box - - # List of words in this paragraph. - # Corresponds to the JSON property `words` - # @return [Array] - attr_accessor :words - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @property = args[:property] if args.key?(:property) - @bounding_box = args[:bounding_box] if args.key?(:bounding_box) - @words = args[:words] if args.key?(:words) - end - end - # A face annotation object contains the results of face detection. class FaceAnnotation include Google::Apis::Core::Hashable + # Sorrow likelihood. + # Corresponds to the JSON property `sorrowLikelihood` + # @return [String] + attr_accessor :sorrow_likelihood + # Pitch angle, which indicates the upwards/downwards angle that the face is # pointing relative to the image's horizontal plane. Range [-180,180]. # Corresponds to the JSON property `tiltAngle` @@ -740,20 +222,20 @@ module Google # @return [Google::Apis::VisionV1::BoundingPoly] attr_accessor :fd_bounding_poly - # Anger likelihood. - # Corresponds to the JSON property `angerLikelihood` + # Surprise likelihood. + # Corresponds to the JSON property `surpriseLikelihood` # @return [String] - attr_accessor :anger_likelihood + attr_accessor :surprise_likelihood # Detected face landmarks. # Corresponds to the JSON property `landmarks` # @return [Array] attr_accessor :landmarks - # Surprise likelihood. - # Corresponds to the JSON property `surpriseLikelihood` + # Anger likelihood. + # Corresponds to the JSON property `angerLikelihood` # @return [String] - attr_accessor :surprise_likelihood + attr_accessor :anger_likelihood # Joy likelihood. # Corresponds to the JSON property `joyLikelihood` @@ -765,10 +247,10 @@ module Google # @return [Float] attr_accessor :landmarking_confidence - # Under-exposed likelihood. - # Corresponds to the JSON property `underExposedLikelihood` - # @return [String] - attr_accessor :under_exposed_likelihood + # Detection confidence. Range [0, 1]. + # Corresponds to the JSON property `detectionConfidence` + # @return [Float] + attr_accessor :detection_confidence # Yaw angle, which indicates the leftward/rightward angle that the face is # pointing relative to the vertical plane perpendicular to the image. Range @@ -777,10 +259,10 @@ module Google # @return [Float] attr_accessor :pan_angle - # Detection confidence. Range [0, 1]. - # Corresponds to the JSON property `detectionConfidence` - # @return [Float] - attr_accessor :detection_confidence + # Under-exposed likelihood. + # Corresponds to the JSON property `underExposedLikelihood` + # @return [String] + attr_accessor :under_exposed_likelihood # Blurred likelihood. # Corresponds to the JSON property `blurredLikelihood` @@ -804,32 +286,27 @@ module Google # @return [Float] attr_accessor :roll_angle - # Sorrow likelihood. - # Corresponds to the JSON property `sorrowLikelihood` - # @return [String] - attr_accessor :sorrow_likelihood - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @sorrow_likelihood = args[:sorrow_likelihood] if args.key?(:sorrow_likelihood) @tilt_angle = args[:tilt_angle] if args.key?(:tilt_angle) @fd_bounding_poly = args[:fd_bounding_poly] if args.key?(:fd_bounding_poly) - @anger_likelihood = args[:anger_likelihood] if args.key?(:anger_likelihood) - @landmarks = args[:landmarks] if args.key?(:landmarks) @surprise_likelihood = args[:surprise_likelihood] if args.key?(:surprise_likelihood) + @landmarks = args[:landmarks] if args.key?(:landmarks) + @anger_likelihood = args[:anger_likelihood] if args.key?(:anger_likelihood) @joy_likelihood = args[:joy_likelihood] if args.key?(:joy_likelihood) @landmarking_confidence = args[:landmarking_confidence] if args.key?(:landmarking_confidence) - @under_exposed_likelihood = args[:under_exposed_likelihood] if args.key?(:under_exposed_likelihood) - @pan_angle = args[:pan_angle] if args.key?(:pan_angle) @detection_confidence = args[:detection_confidence] if args.key?(:detection_confidence) + @pan_angle = args[:pan_angle] if args.key?(:pan_angle) + @under_exposed_likelihood = args[:under_exposed_likelihood] if args.key?(:under_exposed_likelihood) @blurred_likelihood = args[:blurred_likelihood] if args.key?(:blurred_likelihood) @headwear_likelihood = args[:headwear_likelihood] if args.key?(:headwear_likelihood) @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly) @roll_angle = args[:roll_angle] if args.key?(:roll_angle) - @sorrow_likelihood = args[:sorrow_likelihood] if args.key?(:sorrow_likelihood) end end @@ -856,25 +333,25 @@ module Google class DetectedBreak include Google::Apis::Core::Hashable - # Detected break type. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - # True if break prepends the element. # Corresponds to the JSON property `isPrefix` # @return [Boolean] attr_accessor :is_prefix alias_method :is_prefix?, :is_prefix + # Detected break type. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @type = args[:type] if args.key?(:type) @is_prefix = args[:is_prefix] if args.key?(:is_prefix) + @type = args[:type] if args.key?(:type) end end @@ -882,6 +359,11 @@ module Google class ImageContext include Google::Apis::Core::Hashable + # Rectangle determined by min and max `LatLng` pairs. + # Corresponds to the JSON property `latLongRect` + # @return [Google::Apis::VisionV1::LatLongRect] + attr_accessor :lat_long_rect + # Parameters for crop hints annotation request. # Corresponds to the JSON property `cropHintsParams` # @return [Google::Apis::VisionV1::CropHintsParams] @@ -899,20 +381,15 @@ module Google # @return [Array] attr_accessor :language_hints - # Rectangle determined by min and max `LatLng` pairs. - # Corresponds to the JSON property `latLongRect` - # @return [Google::Apis::VisionV1::LatLongRect] - attr_accessor :lat_long_rect - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @lat_long_rect = args[:lat_long_rect] if args.key?(:lat_long_rect) @crop_hints_params = args[:crop_hints_params] if args.key?(:crop_hints_params) @language_hints = args[:language_hints] if args.key?(:language_hints) - @lat_long_rect = args[:lat_long_rect] if args.key?(:lat_long_rect) end end @@ -999,7 +476,7 @@ module Google # error message is needed, put the localized message in the error details or # localize it in the client. The optional error details may contain arbitrary # information about the error. There is a predefined set of error detail types - # in the package `google.rpc` which can be used for common error conditions. + # in the package `google.rpc` that can be used for common error conditions. # # Language mapping # The `Status` message is the logical representation of the error model, but it # is not necessarily the actual wire format. When the `Status` message is @@ -1015,7 +492,7 @@ module Google # it may embed the `Status` in the normal response to indicate the partial # errors. # - Workflow errors. A typical workflow has multiple steps. Each step may - # have a `Status` message for error reporting purpose. + # have a `Status` message for error reporting. # - Batch operations. If a client uses batch request and batch response, the # `Status` message should be used directly inside batch response, one for # each error sub-response. @@ -1057,6 +534,37 @@ module Google end end + # A single symbol representation. + class Symbol + include Google::Apis::Core::Hashable + + # A bounding polygon for the detected image annotation. + # Corresponds to the JSON property `boundingBox` + # @return [Google::Apis::VisionV1::BoundingPoly] + attr_accessor :bounding_box + + # The actual UTF-8 representation of the symbol. + # Corresponds to the JSON property `text` + # @return [String] + attr_accessor :text + + # Additional information detected on the structural component. + # Corresponds to the JSON property `property` + # @return [Google::Apis::VisionV1::TextProperty] + attr_accessor :property + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @bounding_box = args[:bounding_box] if args.key?(:bounding_box) + @text = args[:text] if args.key?(:text) + @property = args[:property] if args.key?(:property) + end + end + # Rectangle determined by min and max `LatLng` pairs. class LatLongRect include Google::Apis::Core::Hashable @@ -1096,8 +604,6 @@ module Google # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) - # The code in logs/storage/validator/logs_validator_traits.cc treats this type - # as if it were annotated as ST_LOCATION. # Corresponds to the JSON property `minLatLng` # @return [Google::Apis::VisionV1::LatLng] attr_accessor :min_lat_lng @@ -1137,8 +643,6 @@ module Google # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) - # The code in logs/storage/validator/logs_validator_traits.cc treats this type - # as if it were annotated as ST_LOCATION. # Corresponds to the JSON property `maxLatLng` # @return [Google::Apis::VisionV1::LatLng] attr_accessor :max_lat_lng @@ -1154,37 +658,6 @@ module Google end end - # A single symbol representation. - class Symbol - include Google::Apis::Core::Hashable - - # Additional information detected on the structural component. - # Corresponds to the JSON property `property` - # @return [Google::Apis::VisionV1::TextProperty] - attr_accessor :property - - # A bounding polygon for the detected image annotation. - # Corresponds to the JSON property `boundingBox` - # @return [Google::Apis::VisionV1::BoundingPoly] - attr_accessor :bounding_box - - # The actual UTF-8 representation of the symbol. - # Corresponds to the JSON property `text` - # @return [String] - attr_accessor :text - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @property = args[:property] if args.key?(:property) - @bounding_box = args[:bounding_box] if args.key?(:bounding_box) - @text = args[:text] if args.key?(:text) - end - end - # Set of crop hints that are used to generate new crops when serving images. class CropHintsAnnotation include Google::Apis::Core::Hashable @@ -1239,29 +712,27 @@ module Google # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) - # The code in logs/storage/validator/logs_validator_traits.cc treats this type - # as if it were annotated as ST_LOCATION. class LatLng include Google::Apis::Core::Hashable - # The latitude in degrees. It must be in the range [-90.0, +90.0]. - # Corresponds to the JSON property `latitude` - # @return [Float] - attr_accessor :latitude - # The longitude in degrees. It must be in the range [-180.0, +180.0]. # Corresponds to the JSON property `longitude` # @return [Float] attr_accessor :longitude + # The latitude in degrees. It must be in the range [-90.0, +90.0]. + # Corresponds to the JSON property `latitude` + # @return [Float] + attr_accessor :latitude + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @latitude = args[:latitude] if args.key?(:latitude) @longitude = args[:longitude] if args.key?(:longitude) + @latitude = args[:latitude] if args.key?(:latitude) end end @@ -1408,25 +879,6 @@ module Google end end - # Stores image properties, such as dominant colors. - class ImageProperties - include Google::Apis::Core::Hashable - - # Set of dominant colors and their corresponding scores. - # Corresponds to the JSON property `dominantColors` - # @return [Google::Apis::VisionV1::DominantColorsAnnotation] - attr_accessor :dominant_colors - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @dominant_colors = args[:dominant_colors] if args.key?(:dominant_colors) - end - end - # Users describe the type of Google Cloud Vision API tasks to perform over # images by using *Feature*s. Each Feature indicates a type of image # detection task to perform. Features encode the Cloud Vision API @@ -1455,12 +907,38 @@ module Google end end + # Stores image properties, such as dominant colors. + class ImageProperties + include Google::Apis::Core::Hashable + + # Set of dominant colors and their corresponding scores. + # Corresponds to the JSON property `dominantColors` + # @return [Google::Apis::VisionV1::DominantColorsAnnotation] + attr_accessor :dominant_colors + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @dominant_colors = args[:dominant_colors] if args.key?(:dominant_colors) + end + end + # Set of features pertaining to the image, computed by computer vision # methods over safe-search verticals (for example, adult, spoof, medical, # violence). class SafeSearchAnnotation include Google::Apis::Core::Hashable + # Spoof likelihood. The likelihood that an modification + # was made to the image's canonical version to make it appear + # funny or offensive. + # Corresponds to the JSON property `spoof` + # @return [String] + attr_accessor :spoof + # Likelihood that this is a medical image. # Corresponds to the JSON property `medical` # @return [String] @@ -1476,23 +954,16 @@ module Google # @return [String] attr_accessor :adult - # Spoof likelihood. The likelihood that an modification - # was made to the image's canonical version to make it appear - # funny or offensive. - # Corresponds to the JSON property `spoof` - # @return [String] - attr_accessor :spoof - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @spoof = args[:spoof] if args.key?(:spoof) @medical = args[:medical] if args.key?(:medical) @violence = args[:violence] if args.key?(:violence) @adult = args[:adult] if args.key?(:adult) - @spoof = args[:spoof] if args.key?(:spoof) end end @@ -1578,24 +1049,24 @@ module Google class Vertex include Google::Apis::Core::Hashable - # X coordinate. - # Corresponds to the JSON property `x` - # @return [Fixnum] - attr_accessor :x - # Y coordinate. # Corresponds to the JSON property `y` # @return [Fixnum] attr_accessor :y + # X coordinate. + # Corresponds to the JSON property `x` + # @return [Fixnum] + attr_accessor :x + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @x = args[:x] if args.key?(:x) @y = args[:y] if args.key?(:y) + @x = args[:x] if args.key?(:x) end end @@ -1603,24 +1074,43 @@ module Google class TextProperty include Google::Apis::Core::Hashable - # A list of detected languages together with confidence. - # Corresponds to the JSON property `detectedLanguages` - # @return [Array] - attr_accessor :detected_languages - # Detected start or end of a structural component. # Corresponds to the JSON property `detectedBreak` # @return [Google::Apis::VisionV1::DetectedBreak] attr_accessor :detected_break + # A list of detected languages together with confidence. + # Corresponds to the JSON property `detectedLanguages` + # @return [Array] + attr_accessor :detected_languages + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @detected_languages = args[:detected_languages] if args.key?(:detected_languages) @detected_break = args[:detected_break] if args.key?(:detected_break) + @detected_languages = args[:detected_languages] if args.key?(:detected_languages) + end + end + + # A bounding polygon for the detected image annotation. + class BoundingPoly + include Google::Apis::Core::Hashable + + # The bounding polygon vertices. + # Corresponds to the JSON property `vertices` + # @return [Array] + attr_accessor :vertices + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @vertices = args[:vertices] if args.key?(:vertices) end end @@ -1656,29 +1146,37 @@ module Google end end - # A bounding polygon for the detected image annotation. - class BoundingPoly - include Google::Apis::Core::Hashable - - # The bounding polygon vertices. - # Corresponds to the JSON property `vertices` - # @return [Array] - attr_accessor :vertices - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @vertices = args[:vertices] if args.key?(:vertices) - end - end - # Response to an image annotation request. class AnnotateImageResponse include Google::Apis::Core::Hashable + # If present, logo detection has completed successfully. + # Corresponds to the JSON property `logoAnnotations` + # @return [Array] + attr_accessor :logo_annotations + + # Set of crop hints that are used to generate new crops when serving images. + # Corresponds to the JSON property `cropHintsAnnotation` + # @return [Google::Apis::VisionV1::CropHintsAnnotation] + attr_accessor :crop_hints_annotation + + # Relevant information for the image from the Internet. + # Corresponds to the JSON property `webDetection` + # @return [Google::Apis::VisionV1::WebDetection] + attr_accessor :web_detection + + # If present, label detection has completed successfully. + # Corresponds to the JSON property `labelAnnotations` + # @return [Array] + attr_accessor :label_annotations + + # Set of features pertaining to the image, computed by computer vision + # methods over safe-search verticals (for example, adult, spoof, medical, + # violence). + # Corresponds to the JSON property `safeSearchAnnotation` + # @return [Google::Apis::VisionV1::SafeSearchAnnotation] + attr_accessor :safe_search_annotation + # The `Status` type defines a logical error model that is suitable for different # programming environments, including REST APIs and RPC APIs. It is used by # [gRPC](https://github.com/grpc). The error model is designed to be: @@ -1693,7 +1191,7 @@ module Google # error message is needed, put the localized message in the error details or # localize it in the client. The optional error details may contain arbitrary # information about the error. There is a predefined set of error detail types - # in the package `google.rpc` which can be used for common error conditions. + # in the package `google.rpc` that can be used for common error conditions. # # Language mapping # The `Status` message is the logical representation of the error model, but it # is not necessarily the actual wire format. When the `Status` message is @@ -1709,7 +1207,7 @@ module Google # it may embed the `Status` in the normal response to indicate the partial # errors. # - Workflow errors. A typical workflow has multiple steps. Each step may - # have a `Status` message for error reporting purpose. + # have a `Status` message for error reporting. # - Batch operations. If a client uses batch request and batch response, the # `Status` message should be used directly inside batch response, one for # each error sub-response. @@ -1753,32 +1251,39 @@ module Google # @return [Google::Apis::VisionV1::ImageProperties] attr_accessor :image_properties_annotation - # If present, logo detection has completed successfully. - # Corresponds to the JSON property `logoAnnotations` - # @return [Array] - attr_accessor :logo_annotations + def initialize(**args) + update!(**args) + end - # Set of crop hints that are used to generate new crops when serving images. - # Corresponds to the JSON property `cropHintsAnnotation` - # @return [Google::Apis::VisionV1::CropHintsAnnotation] - attr_accessor :crop_hints_annotation + # Update properties of this object + def update!(**args) + @logo_annotations = args[:logo_annotations] if args.key?(:logo_annotations) + @crop_hints_annotation = args[:crop_hints_annotation] if args.key?(:crop_hints_annotation) + @web_detection = args[:web_detection] if args.key?(:web_detection) + @label_annotations = args[:label_annotations] if args.key?(:label_annotations) + @safe_search_annotation = args[:safe_search_annotation] if args.key?(:safe_search_annotation) + @error = args[:error] if args.key?(:error) + @full_text_annotation = args[:full_text_annotation] if args.key?(:full_text_annotation) + @landmark_annotations = args[:landmark_annotations] if args.key?(:landmark_annotations) + @text_annotations = args[:text_annotations] if args.key?(:text_annotations) + @face_annotations = args[:face_annotations] if args.key?(:face_annotations) + @image_properties_annotation = args[:image_properties_annotation] if args.key?(:image_properties_annotation) + end + end - # Relevant information for the image from the Internet. - # Corresponds to the JSON property `webDetection` - # @return [Google::Apis::VisionV1::WebDetection] - attr_accessor :web_detection + # Parameters for crop hints annotation request. + class CropHintsParams + include Google::Apis::Core::Hashable - # Set of features pertaining to the image, computed by computer vision - # methods over safe-search verticals (for example, adult, spoof, medical, - # violence). - # Corresponds to the JSON property `safeSearchAnnotation` - # @return [Google::Apis::VisionV1::SafeSearchAnnotation] - attr_accessor :safe_search_annotation - - # If present, label detection has completed successfully. - # Corresponds to the JSON property `labelAnnotations` - # @return [Array] - attr_accessor :label_annotations + # Aspect ratios in floats, representing the ratio of the width to the height + # of the image. For example, if the desired aspect ratio is 4/3, the + # corresponding float value should be 1.33333. If not specified, the + # best possible crop is returned. The number of provided aspect ratios is + # limited to a maximum of 16; any aspect ratios provided after the 16th are + # ignored. + # Corresponds to the JSON property `aspectRatios` + # @return [Array] + attr_accessor :aspect_ratios def initialize(**args) update!(**args) @@ -1786,17 +1291,504 @@ module Google # Update properties of this object def update!(**args) - @error = args[:error] if args.key?(:error) - @full_text_annotation = args[:full_text_annotation] if args.key?(:full_text_annotation) - @landmark_annotations = args[:landmark_annotations] if args.key?(:landmark_annotations) - @text_annotations = args[:text_annotations] if args.key?(:text_annotations) - @face_annotations = args[:face_annotations] if args.key?(:face_annotations) - @image_properties_annotation = args[:image_properties_annotation] if args.key?(:image_properties_annotation) - @logo_annotations = args[:logo_annotations] if args.key?(:logo_annotations) - @crop_hints_annotation = args[:crop_hints_annotation] if args.key?(:crop_hints_annotation) - @web_detection = args[:web_detection] if args.key?(:web_detection) - @safe_search_annotation = args[:safe_search_annotation] if args.key?(:safe_search_annotation) - @label_annotations = args[:label_annotations] if args.key?(:label_annotations) + @aspect_ratios = args[:aspect_ratios] if args.key?(:aspect_ratios) + end + end + + # Logical element on the page. + class Block + include Google::Apis::Core::Hashable + + # Additional information detected on the structural component. + # Corresponds to the JSON property `property` + # @return [Google::Apis::VisionV1::TextProperty] + attr_accessor :property + + # Detected block type (text, image etc) for this block. + # Corresponds to the JSON property `blockType` + # @return [String] + attr_accessor :block_type + + # A bounding polygon for the detected image annotation. + # Corresponds to the JSON property `boundingBox` + # @return [Google::Apis::VisionV1::BoundingPoly] + attr_accessor :bounding_box + + # List of paragraphs in this block (if this blocks is of type text). + # Corresponds to the JSON property `paragraphs` + # @return [Array] + attr_accessor :paragraphs + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @property = args[:property] if args.key?(:property) + @block_type = args[:block_type] if args.key?(:block_type) + @bounding_box = args[:bounding_box] if args.key?(:bounding_box) + @paragraphs = args[:paragraphs] if args.key?(:paragraphs) + end + end + + # A `Property` consists of a user-supplied name/value pair. + class Property + include Google::Apis::Core::Hashable + + # Value of numeric properties. + # Corresponds to the JSON property `uint64Value` + # @return [Fixnum] + attr_accessor :uint64_value + + # Name of the property. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Value of the property. + # 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) + @uint64_value = args[:uint64_value] if args.key?(:uint64_value) + @name = args[:name] if args.key?(:name) + @value = args[:value] if args.key?(:value) + end + end + + # Detected entity location information. + class LocationInfo + include Google::Apis::Core::Hashable + + # An object representing a latitude/longitude pair. This is expressed as a pair + # of doubles representing degrees latitude and degrees longitude. Unless + # specified otherwise, this must conform to the + # WGS84 + # standard. Values must be within normalized ranges. + # Example of normalization code in Python: + # def NormalizeLongitude(longitude): + # """Wraps decimal degrees longitude to [-180.0, 180.0].""" + # q, r = divmod(longitude, 360.0) + # if r > 180.0 or (r == 180.0 and q <= -1.0): + # return r - 360.0 + # return r + # def NormalizeLatLng(latitude, longitude): + # """Wraps decimal degrees latitude and longitude to + # [-90.0, 90.0] and [-180.0, 180.0], respectively.""" + # r = latitude % 360.0 + # if r <= 90.0: + # return r, NormalizeLongitude(longitude) + # elif r >= 270.0: + # return r - 360, NormalizeLongitude(longitude) + # else: + # return 180 - r, NormalizeLongitude(longitude + 180.0) + # assert 180.0 == NormalizeLongitude(180.0) + # assert -180.0 == NormalizeLongitude(-180.0) + # assert -179.0 == NormalizeLongitude(181.0) + # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0) + # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0) + # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) + # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0) + # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0) + # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0) + # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0) + # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) + # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) + # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) + # Corresponds to the JSON property `latLng` + # @return [Google::Apis::VisionV1::LatLng] + attr_accessor :lat_lng + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @lat_lng = args[:lat_lng] if args.key?(:lat_lng) + end + end + + # External image source (Google Cloud Storage image location). + class ImageSource + include Google::Apis::Core::Hashable + + # NOTE: For new code `image_uri` below is preferred. + # Google Cloud Storage image URI, which must be in the following form: + # `gs://bucket_name/object_name` (for details, see + # [Google Cloud Storage Request + # URIs](https://cloud.google.com/storage/docs/reference-uris)). + # NOTE: Cloud Storage object versioning is not supported. + # Corresponds to the JSON property `gcsImageUri` + # @return [String] + attr_accessor :gcs_image_uri + + # Image URI which supports: + # 1) Google Cloud Storage image URI, which must be in the following form: + # `gs://bucket_name/object_name` (for details, see + # [Google Cloud Storage Request + # URIs](https://cloud.google.com/storage/docs/reference-uris)). + # NOTE: Cloud Storage object versioning is not supported. + # 2) Publicly accessible image HTTP/HTTPS URL. + # This is preferred over the legacy `gcs_image_uri` above. When both + # `gcs_image_uri` and `image_uri` are specified, `image_uri` takes + # precedence. + # Corresponds to the JSON property `imageUri` + # @return [String] + attr_accessor :image_uri + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @gcs_image_uri = args[:gcs_image_uri] if args.key?(:gcs_image_uri) + @image_uri = args[:image_uri] if args.key?(:image_uri) + end + end + + # Response to a batch image annotation request. + class BatchAnnotateImagesResponse + include Google::Apis::Core::Hashable + + # Individual responses to image annotation requests within the batch. + # Corresponds to the JSON property `responses` + # @return [Array] + attr_accessor :responses + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @responses = args[:responses] if args.key?(:responses) + end + end + + # Relevant information for the image from the Internet. + class WebDetection + include Google::Apis::Core::Hashable + + # Partial matching images from the Internet. + # Those images are similar enough to share some key-point features. For + # example an original image will likely have partial matching for its crops. + # Corresponds to the JSON property `partialMatchingImages` + # @return [Array] + attr_accessor :partial_matching_images + + # The visually similar image results. + # Corresponds to the JSON property `visuallySimilarImages` + # @return [Array] + attr_accessor :visually_similar_images + + # Fully matching images from the Internet. + # Can include resized copies of the query image. + # Corresponds to the JSON property `fullMatchingImages` + # @return [Array] + attr_accessor :full_matching_images + + # Deduced entities from similar images on the Internet. + # Corresponds to the JSON property `webEntities` + # @return [Array] + attr_accessor :web_entities + + # Web pages containing the matching images from the Internet. + # Corresponds to the JSON property `pagesWithMatchingImages` + # @return [Array] + attr_accessor :pages_with_matching_images + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @partial_matching_images = args[:partial_matching_images] if args.key?(:partial_matching_images) + @visually_similar_images = args[:visually_similar_images] if args.key?(:visually_similar_images) + @full_matching_images = args[:full_matching_images] if args.key?(:full_matching_images) + @web_entities = args[:web_entities] if args.key?(:web_entities) + @pages_with_matching_images = args[:pages_with_matching_images] if args.key?(:pages_with_matching_images) + end + end + + # A 3D position in the image, used primarily for Face detection landmarks. + # A valid Position must have both x and y coordinates. + # The position coordinates are in the same scale as the original image. + class Position + include Google::Apis::Core::Hashable + + # Y coordinate. + # Corresponds to the JSON property `y` + # @return [Float] + attr_accessor :y + + # X coordinate. + # Corresponds to the JSON property `x` + # @return [Float] + attr_accessor :x + + # Z coordinate (or depth). + # Corresponds to the JSON property `z` + # @return [Float] + attr_accessor :z + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @y = args[:y] if args.key?(:y) + @x = args[:x] if args.key?(:x) + @z = args[:z] if args.key?(:z) + end + end + + # Metadata for web pages. + class WebPage + include Google::Apis::Core::Hashable + + # Overall relevancy score for the web page. + # Not normalized and not comparable across different image queries. + # Corresponds to the JSON property `score` + # @return [Float] + attr_accessor :score + + # The result web page URL. + # Corresponds to the JSON property `url` + # @return [String] + attr_accessor :url + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @score = args[:score] if args.key?(:score) + @url = args[:url] if args.key?(:url) + end + end + + # Color information consists of RGB channels, score, and the fraction of + # the image that the color occupies in the image. + class ColorInfo + include Google::Apis::Core::Hashable + + # The fraction of pixels the color occupies in the image. + # Value in range [0, 1]. + # Corresponds to the JSON property `pixelFraction` + # @return [Float] + attr_accessor :pixel_fraction + + # Represents a color in the RGBA color space. This representation is designed + # for simplicity of conversion to/from color representations in various + # languages over compactness; for example, the fields of this representation + # can be trivially provided to the constructor of "java.awt.Color" in Java; it + # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" + # method in iOS; and, with just a little work, it can be easily formatted into + # a CSS "rgba()" string in JavaScript, as well. Here are some examples: + # Example (Java): + # import com.google.type.Color; + # // ... + # public static java.awt.Color fromProto(Color protocolor) ` + # float alpha = protocolor.hasAlpha() + # ? protocolor.getAlpha().getValue() + # : 1.0; + # return new java.awt.Color( + # protocolor.getRed(), + # protocolor.getGreen(), + # protocolor.getBlue(), + # alpha); + # ` + # public static Color toProto(java.awt.Color color) ` + # float red = (float) color.getRed(); + # float green = (float) color.getGreen(); + # float blue = (float) color.getBlue(); + # float denominator = 255.0; + # Color.Builder resultBuilder = + # Color + # .newBuilder() + # .setRed(red / denominator) + # .setGreen(green / denominator) + # .setBlue(blue / denominator); + # int alpha = color.getAlpha(); + # if (alpha != 255) ` + # result.setAlpha( + # FloatValue + # .newBuilder() + # .setValue(((float) alpha) / denominator) + # .build()); + # ` + # return resultBuilder.build(); + # ` + # // ... + # Example (iOS / Obj-C): + # // ... + # static UIColor* fromProto(Color* protocolor) ` + # float red = [protocolor red]; + # float green = [protocolor green]; + # float blue = [protocolor blue]; + # FloatValue* alpha_wrapper = [protocolor alpha]; + # float alpha = 1.0; + # if (alpha_wrapper != nil) ` + # alpha = [alpha_wrapper value]; + # ` + # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; + # ` + # static Color* toProto(UIColor* color) ` + # CGFloat red, green, blue, alpha; + # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` + # return nil; + # ` + # Color* result = [Color alloc] init]; + # [result setRed:red]; + # [result setGreen:green]; + # [result setBlue:blue]; + # if (alpha <= 0.9999) ` + # [result setAlpha:floatWrapperWithValue(alpha)]; + # ` + # [result autorelease]; + # return result; + # ` + # // ... + # Example (JavaScript): + # // ... + # var protoToCssColor = function(rgb_color) ` + # var redFrac = rgb_color.red || 0.0; + # var greenFrac = rgb_color.green || 0.0; + # var blueFrac = rgb_color.blue || 0.0; + # var red = Math.floor(redFrac * 255); + # var green = Math.floor(greenFrac * 255); + # var blue = Math.floor(blueFrac * 255); + # if (!('alpha' in rgb_color)) ` + # return rgbToCssColor_(red, green, blue); + # ` + # var alphaFrac = rgb_color.alpha.value || 0.0; + # var rgbParams = [red, green, blue].join(','); + # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); + # `; + # var rgbToCssColor_ = function(red, green, blue) ` + # var rgbNumber = new Number((red << 16) | (green << 8) | blue); + # var hexString = rgbNumber.toString(16); + # var missingZeros = 6 - hexString.length; + # var resultBuilder = ['#']; + # for (var i = 0; i < missingZeros; i++) ` + # resultBuilder.push('0'); + # ` + # resultBuilder.push(hexString); + # return resultBuilder.join(''); + # `; + # // ... + # Corresponds to the JSON property `color` + # @return [Google::Apis::VisionV1::Color] + attr_accessor :color + + # Image-specific score for this color. Value in range [0, 1]. + # Corresponds to the JSON property `score` + # @return [Float] + attr_accessor :score + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @pixel_fraction = args[:pixel_fraction] if args.key?(:pixel_fraction) + @color = args[:color] if args.key?(:color) + @score = args[:score] if args.key?(:score) + end + end + + # Set of detected entity features. + class EntityAnnotation + include Google::Apis::Core::Hashable + + # Some entities may have optional user-supplied `Property` (name/value) + # fields, such a score or string that qualifies the entity. + # Corresponds to the JSON property `properties` + # @return [Array] + attr_accessor :properties + + # Overall score of the result. Range [0, 1]. + # Corresponds to the JSON property `score` + # @return [Float] + attr_accessor :score + + # The location information for the detected entity. Multiple + # `LocationInfo` elements can be present because one location may + # indicate the location of the scene in the image, and another location + # may indicate the location of the place where the image was taken. + # Location information is usually present for landmarks. + # Corresponds to the JSON property `locations` + # @return [Array] + attr_accessor :locations + + # Opaque entity ID. Some IDs may be available in + # [Google Knowledge Graph Search API](https://developers.google.com/knowledge- + # graph/). + # Corresponds to the JSON property `mid` + # @return [String] + attr_accessor :mid + + # The accuracy of the entity detection in an image. + # For example, for an image in which the "Eiffel Tower" entity is detected, + # this field represents the confidence that there is a tower in the query + # image. Range [0, 1]. + # Corresponds to the JSON property `confidence` + # @return [Float] + attr_accessor :confidence + + # The language code for the locale in which the entity textual + # `description` is expressed. + # Corresponds to the JSON property `locale` + # @return [String] + attr_accessor :locale + + # A bounding polygon for the detected image annotation. + # Corresponds to the JSON property `boundingPoly` + # @return [Google::Apis::VisionV1::BoundingPoly] + attr_accessor :bounding_poly + + # Entity textual description, expressed in its `locale` language. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # The relevancy of the ICA (Image Content Annotation) label to the + # image. For example, the relevancy of "tower" is likely higher to an image + # containing the detected "Eiffel Tower" than to an image containing a + # detected distant towering building, even though the confidence that + # there is a tower in each image may be the same. Range [0, 1]. + # Corresponds to the JSON property `topicality` + # @return [Float] + attr_accessor :topicality + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @properties = args[:properties] if args.key?(:properties) + @score = args[:score] if args.key?(:score) + @locations = args[:locations] if args.key?(:locations) + @mid = args[:mid] if args.key?(:mid) + @confidence = args[:confidence] if args.key?(:confidence) + @locale = args[:locale] if args.key?(:locale) + @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly) + @description = args[:description] if args.key?(:description) + @topicality = args[:topicality] if args.key?(:topicality) end end end diff --git a/generated/google/apis/vision_v1/representations.rb b/generated/google/apis/vision_v1/representations.rb index 7f2ab667c..4333e2529 100644 --- a/generated/google/apis/vision_v1/representations.rb +++ b/generated/google/apis/vision_v1/representations.rb @@ -22,72 +22,6 @@ module Google module Apis module VisionV1 - class CropHintsParams - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Block - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class WebDetection - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BatchAnnotateImagesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Property - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class LocationInfo - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ImageSource - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Position - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class WebPage - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ColorInfo - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class EntityAnnotation - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class CropHint class Representation < Google::Apis::Core::JsonRepresentation; end @@ -112,13 +46,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class Image + class Paragraph class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class Paragraph + class Image class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -166,13 +100,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class LatLongRect + class Symbol class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class Symbol + class LatLongRect class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -196,13 +130,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class ImageProperties + class Feature class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class Feature + class ImageProperties class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -244,13 +178,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class WebEntity + class BoundingPoly class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class BoundingPoly + class WebEntity class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -263,117 +197,69 @@ module Google end class CropHintsParams - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :aspect_ratios, as: 'aspectRatios' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class Block - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :property, as: 'property', class: Google::Apis::VisionV1::TextProperty, decorator: Google::Apis::VisionV1::TextProperty::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :block_type, as: 'blockType' - property :bounding_box, as: 'boundingBox', class: Google::Apis::VisionV1::BoundingPoly, decorator: Google::Apis::VisionV1::BoundingPoly::Representation - - collection :paragraphs, as: 'paragraphs', class: Google::Apis::VisionV1::Paragraph, decorator: Google::Apis::VisionV1::Paragraph::Representation - - end - end - - class WebDetection - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :full_matching_images, as: 'fullMatchingImages', class: Google::Apis::VisionV1::WebImage, decorator: Google::Apis::VisionV1::WebImage::Representation - - collection :web_entities, as: 'webEntities', class: Google::Apis::VisionV1::WebEntity, decorator: Google::Apis::VisionV1::WebEntity::Representation - - collection :pages_with_matching_images, as: 'pagesWithMatchingImages', class: Google::Apis::VisionV1::WebPage, decorator: Google::Apis::VisionV1::WebPage::Representation - - collection :partial_matching_images, as: 'partialMatchingImages', class: Google::Apis::VisionV1::WebImage, decorator: Google::Apis::VisionV1::WebImage::Representation - - collection :visually_similar_images, as: 'visuallySimilarImages', class: Google::Apis::VisionV1::WebImage, decorator: Google::Apis::VisionV1::WebImage::Representation - - end - end - - class BatchAnnotateImagesResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :responses, as: 'responses', class: Google::Apis::VisionV1::AnnotateImageResponse, decorator: Google::Apis::VisionV1::AnnotateImageResponse::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class Property - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :uint64_value, :numeric_string => true, as: 'uint64Value' - property :name, as: 'name' - property :value, as: 'value' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class LocationInfo - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :lat_lng, as: 'latLng', class: Google::Apis::VisionV1::LatLng, decorator: Google::Apis::VisionV1::LatLng::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class ImageSource - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :gcs_image_uri, as: 'gcsImageUri' - property :image_uri, as: 'imageUri' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BatchAnnotateImagesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class WebDetection + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class Position - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :y, as: 'y' - property :x, as: 'x' - property :z, as: 'z' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class WebPage - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :score, as: 'score' - property :url, as: 'url' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ColorInfo - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :score, as: 'score' - property :pixel_fraction, as: 'pixelFraction' - property :color, as: 'color', class: Google::Apis::VisionV1::Color, decorator: Google::Apis::VisionV1::Color::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class EntityAnnotation - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :score, as: 'score' - collection :locations, as: 'locations', class: Google::Apis::VisionV1::LocationInfo, decorator: Google::Apis::VisionV1::LocationInfo::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :mid, as: 'mid' - property :confidence, as: 'confidence' - property :locale, as: 'locale' - property :bounding_poly, as: 'boundingPoly', class: Google::Apis::VisionV1::BoundingPoly, decorator: Google::Apis::VisionV1::BoundingPoly::Representation - - property :topicality, as: 'topicality' - property :description, as: 'description' - collection :properties, as: 'properties', class: Google::Apis::VisionV1::Property, decorator: Google::Apis::VisionV1::Property::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class CropHint @@ -389,9 +275,9 @@ module Google class Landmark # @private class Representation < Google::Apis::Core::JsonRepresentation - property :type, as: 'type' property :position, as: 'position', class: Google::Apis::VisionV1::Position, decorator: Google::Apis::VisionV1::Position::Representation + property :type, as: 'type' end end @@ -406,12 +292,24 @@ module Google class Word # @private class Representation < Google::Apis::Core::JsonRepresentation + property :bounding_box, as: 'boundingBox', class: Google::Apis::VisionV1::BoundingPoly, decorator: Google::Apis::VisionV1::BoundingPoly::Representation + collection :symbols, as: 'symbols', class: Google::Apis::VisionV1::Symbol, decorator: Google::Apis::VisionV1::Symbol::Representation property :property, as: 'property', class: Google::Apis::VisionV1::TextProperty, decorator: Google::Apis::VisionV1::TextProperty::Representation + end + end + + class Paragraph + # @private + class Representation < Google::Apis::Core::JsonRepresentation property :bounding_box, as: 'boundingBox', class: Google::Apis::VisionV1::BoundingPoly, decorator: Google::Apis::VisionV1::BoundingPoly::Representation + collection :words, as: 'words', class: Google::Apis::VisionV1::Word, decorator: Google::Apis::VisionV1::Word::Representation + + property :property, as: 'property', class: Google::Apis::VisionV1::TextProperty, decorator: Google::Apis::VisionV1::TextProperty::Representation + end end @@ -424,39 +322,27 @@ module Google end end - class Paragraph - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :property, as: 'property', class: Google::Apis::VisionV1::TextProperty, decorator: Google::Apis::VisionV1::TextProperty::Representation - - property :bounding_box, as: 'boundingBox', class: Google::Apis::VisionV1::BoundingPoly, decorator: Google::Apis::VisionV1::BoundingPoly::Representation - - collection :words, as: 'words', class: Google::Apis::VisionV1::Word, decorator: Google::Apis::VisionV1::Word::Representation - - end - end - class FaceAnnotation # @private class Representation < Google::Apis::Core::JsonRepresentation + property :sorrow_likelihood, as: 'sorrowLikelihood' property :tilt_angle, as: 'tiltAngle' property :fd_bounding_poly, as: 'fdBoundingPoly', class: Google::Apis::VisionV1::BoundingPoly, decorator: Google::Apis::VisionV1::BoundingPoly::Representation - property :anger_likelihood, as: 'angerLikelihood' + property :surprise_likelihood, as: 'surpriseLikelihood' collection :landmarks, as: 'landmarks', class: Google::Apis::VisionV1::Landmark, decorator: Google::Apis::VisionV1::Landmark::Representation - property :surprise_likelihood, as: 'surpriseLikelihood' + property :anger_likelihood, as: 'angerLikelihood' property :joy_likelihood, as: 'joyLikelihood' property :landmarking_confidence, as: 'landmarkingConfidence' - property :under_exposed_likelihood, as: 'underExposedLikelihood' - property :pan_angle, as: 'panAngle' property :detection_confidence, as: 'detectionConfidence' + property :pan_angle, as: 'panAngle' + property :under_exposed_likelihood, as: 'underExposedLikelihood' property :blurred_likelihood, as: 'blurredLikelihood' property :headwear_likelihood, as: 'headwearLikelihood' property :bounding_poly, as: 'boundingPoly', class: Google::Apis::VisionV1::BoundingPoly, decorator: Google::Apis::VisionV1::BoundingPoly::Representation property :roll_angle, as: 'rollAngle' - property :sorrow_likelihood, as: 'sorrowLikelihood' end end @@ -471,19 +357,19 @@ module Google class DetectedBreak # @private class Representation < Google::Apis::Core::JsonRepresentation - property :type, as: 'type' property :is_prefix, as: 'isPrefix' + property :type, as: 'type' end end class ImageContext # @private class Representation < Google::Apis::Core::JsonRepresentation + property :lat_long_rect, as: 'latLongRect', class: Google::Apis::VisionV1::LatLongRect, decorator: Google::Apis::VisionV1::LatLongRect::Representation + property :crop_hints_params, as: 'cropHintsParams', class: Google::Apis::VisionV1::CropHintsParams, decorator: Google::Apis::VisionV1::CropHintsParams::Representation collection :language_hints, as: 'languageHints' - property :lat_long_rect, as: 'latLongRect', class: Google::Apis::VisionV1::LatLongRect, decorator: Google::Apis::VisionV1::LatLongRect::Representation - end end @@ -520,6 +406,17 @@ module Google end end + class Symbol + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :bounding_box, as: 'boundingBox', class: Google::Apis::VisionV1::BoundingPoly, decorator: Google::Apis::VisionV1::BoundingPoly::Representation + + property :text, as: 'text' + property :property, as: 'property', class: Google::Apis::VisionV1::TextProperty, decorator: Google::Apis::VisionV1::TextProperty::Representation + + end + end + class LatLongRect # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -530,17 +427,6 @@ module Google end end - class Symbol - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :property, as: 'property', class: Google::Apis::VisionV1::TextProperty, decorator: Google::Apis::VisionV1::TextProperty::Representation - - property :bounding_box, as: 'boundingBox', class: Google::Apis::VisionV1::BoundingPoly, decorator: Google::Apis::VisionV1::BoundingPoly::Representation - - property :text, as: 'text' - end - end - class CropHintsAnnotation # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -552,8 +438,8 @@ module Google class LatLng # @private class Representation < Google::Apis::Core::JsonRepresentation - property :latitude, as: 'latitude' property :longitude, as: 'longitude' + property :latitude, as: 'latitude' end end @@ -567,14 +453,6 @@ module Google end end - class ImageProperties - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :dominant_colors, as: 'dominantColors', class: Google::Apis::VisionV1::DominantColorsAnnotation, decorator: Google::Apis::VisionV1::DominantColorsAnnotation::Representation - - end - end - class Feature # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -583,13 +461,21 @@ module Google end end + class ImageProperties + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :dominant_colors, as: 'dominantColors', class: Google::Apis::VisionV1::DominantColorsAnnotation, decorator: Google::Apis::VisionV1::DominantColorsAnnotation::Representation + + end + end + class SafeSearchAnnotation # @private class Representation < Google::Apis::Core::JsonRepresentation + property :spoof, as: 'spoof' property :medical, as: 'medical' property :violence, as: 'violence' property :adult, as: 'adult' - property :spoof, as: 'spoof' end end @@ -621,17 +507,25 @@ module Google class Vertex # @private class Representation < Google::Apis::Core::JsonRepresentation - property :x, as: 'x' property :y, as: 'y' + property :x, as: 'x' end end class TextProperty # @private class Representation < Google::Apis::Core::JsonRepresentation + property :detected_break, as: 'detectedBreak', class: Google::Apis::VisionV1::DetectedBreak, decorator: Google::Apis::VisionV1::DetectedBreak::Representation + collection :detected_languages, as: 'detectedLanguages', class: Google::Apis::VisionV1::DetectedLanguage, decorator: Google::Apis::VisionV1::DetectedLanguage::Representation - property :detected_break, as: 'detectedBreak', class: Google::Apis::VisionV1::DetectedBreak, decorator: Google::Apis::VisionV1::DetectedBreak::Representation + end + end + + class BoundingPoly + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :vertices, as: 'vertices', class: Google::Apis::VisionV1::Vertex, decorator: Google::Apis::VisionV1::Vertex::Representation end end @@ -645,17 +539,19 @@ module Google end end - class BoundingPoly - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :vertices, as: 'vertices', class: Google::Apis::VisionV1::Vertex, decorator: Google::Apis::VisionV1::Vertex::Representation - - end - end - class AnnotateImageResponse # @private class Representation < Google::Apis::Core::JsonRepresentation + collection :logo_annotations, as: 'logoAnnotations', class: Google::Apis::VisionV1::EntityAnnotation, decorator: Google::Apis::VisionV1::EntityAnnotation::Representation + + property :crop_hints_annotation, as: 'cropHintsAnnotation', class: Google::Apis::VisionV1::CropHintsAnnotation, decorator: Google::Apis::VisionV1::CropHintsAnnotation::Representation + + property :web_detection, as: 'webDetection', class: Google::Apis::VisionV1::WebDetection, decorator: Google::Apis::VisionV1::WebDetection::Representation + + collection :label_annotations, as: 'labelAnnotations', class: Google::Apis::VisionV1::EntityAnnotation, decorator: Google::Apis::VisionV1::EntityAnnotation::Representation + + property :safe_search_annotation, as: 'safeSearchAnnotation', class: Google::Apis::VisionV1::SafeSearchAnnotation, decorator: Google::Apis::VisionV1::SafeSearchAnnotation::Representation + property :error, as: 'error', class: Google::Apis::VisionV1::Status, decorator: Google::Apis::VisionV1::Status::Representation property :full_text_annotation, as: 'fullTextAnnotation', class: Google::Apis::VisionV1::TextAnnotation, decorator: Google::Apis::VisionV1::TextAnnotation::Representation @@ -668,18 +564,122 @@ module Google property :image_properties_annotation, as: 'imagePropertiesAnnotation', class: Google::Apis::VisionV1::ImageProperties, decorator: Google::Apis::VisionV1::ImageProperties::Representation - collection :logo_annotations, as: 'logoAnnotations', class: Google::Apis::VisionV1::EntityAnnotation, decorator: Google::Apis::VisionV1::EntityAnnotation::Representation + end + end - property :crop_hints_annotation, as: 'cropHintsAnnotation', class: Google::Apis::VisionV1::CropHintsAnnotation, decorator: Google::Apis::VisionV1::CropHintsAnnotation::Representation + class CropHintsParams + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :aspect_ratios, as: 'aspectRatios' + end + end - property :web_detection, as: 'webDetection', class: Google::Apis::VisionV1::WebDetection, decorator: Google::Apis::VisionV1::WebDetection::Representation + class Block + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :property, as: 'property', class: Google::Apis::VisionV1::TextProperty, decorator: Google::Apis::VisionV1::TextProperty::Representation - property :safe_search_annotation, as: 'safeSearchAnnotation', class: Google::Apis::VisionV1::SafeSearchAnnotation, decorator: Google::Apis::VisionV1::SafeSearchAnnotation::Representation + property :block_type, as: 'blockType' + property :bounding_box, as: 'boundingBox', class: Google::Apis::VisionV1::BoundingPoly, decorator: Google::Apis::VisionV1::BoundingPoly::Representation - collection :label_annotations, as: 'labelAnnotations', class: Google::Apis::VisionV1::EntityAnnotation, decorator: Google::Apis::VisionV1::EntityAnnotation::Representation + collection :paragraphs, as: 'paragraphs', class: Google::Apis::VisionV1::Paragraph, decorator: Google::Apis::VisionV1::Paragraph::Representation end end + + class Property + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :uint64_value, :numeric_string => true, as: 'uint64Value' + property :name, as: 'name' + property :value, as: 'value' + end + end + + class LocationInfo + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :lat_lng, as: 'latLng', class: Google::Apis::VisionV1::LatLng, decorator: Google::Apis::VisionV1::LatLng::Representation + + end + end + + class ImageSource + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :gcs_image_uri, as: 'gcsImageUri' + property :image_uri, as: 'imageUri' + end + end + + class BatchAnnotateImagesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :responses, as: 'responses', class: Google::Apis::VisionV1::AnnotateImageResponse, decorator: Google::Apis::VisionV1::AnnotateImageResponse::Representation + + end + end + + class WebDetection + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :partial_matching_images, as: 'partialMatchingImages', class: Google::Apis::VisionV1::WebImage, decorator: Google::Apis::VisionV1::WebImage::Representation + + collection :visually_similar_images, as: 'visuallySimilarImages', class: Google::Apis::VisionV1::WebImage, decorator: Google::Apis::VisionV1::WebImage::Representation + + collection :full_matching_images, as: 'fullMatchingImages', class: Google::Apis::VisionV1::WebImage, decorator: Google::Apis::VisionV1::WebImage::Representation + + collection :web_entities, as: 'webEntities', class: Google::Apis::VisionV1::WebEntity, decorator: Google::Apis::VisionV1::WebEntity::Representation + + collection :pages_with_matching_images, as: 'pagesWithMatchingImages', class: Google::Apis::VisionV1::WebPage, decorator: Google::Apis::VisionV1::WebPage::Representation + + end + end + + class Position + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :y, as: 'y' + property :x, as: 'x' + property :z, as: 'z' + end + end + + class WebPage + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :score, as: 'score' + property :url, as: 'url' + end + end + + class ColorInfo + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :pixel_fraction, as: 'pixelFraction' + property :color, as: 'color', class: Google::Apis::VisionV1::Color, decorator: Google::Apis::VisionV1::Color::Representation + + property :score, as: 'score' + end + end + + class EntityAnnotation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :properties, as: 'properties', class: Google::Apis::VisionV1::Property, decorator: Google::Apis::VisionV1::Property::Representation + + property :score, as: 'score' + collection :locations, as: 'locations', class: Google::Apis::VisionV1::LocationInfo, decorator: Google::Apis::VisionV1::LocationInfo::Representation + + property :mid, as: 'mid' + property :confidence, as: 'confidence' + property :locale, as: 'locale' + property :bounding_poly, as: 'boundingPoly', class: Google::Apis::VisionV1::BoundingPoly, decorator: Google::Apis::VisionV1::BoundingPoly::Representation + + property :description, as: 'description' + property :topicality, as: 'topicality' + end + end end end end diff --git a/generated/google/apis/vision_v1/service.rb b/generated/google/apis/vision_v1/service.rb index 05bf09e0a..8e557b3bc 100644 --- a/generated/google/apis/vision_v1/service.rb +++ b/generated/google/apis/vision_v1/service.rb @@ -51,11 +51,11 @@ module Google # Run image detection and annotation for a batch of images. # @param [Google::Apis::VisionV1::BatchAnnotateImagesRequest] batch_annotate_images_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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -68,14 +68,14 @@ 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 annotate_image(batch_annotate_images_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def annotate_image(batch_annotate_images_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/images:annotate', options) command.request_representation = Google::Apis::VisionV1::BatchAnnotateImagesRequest::Representation command.request_object = batch_annotate_images_request_object command.response_representation = Google::Apis::VisionV1::BatchAnnotateImagesResponse::Representation command.response_class = Google::Apis::VisionV1::BatchAnnotateImagesResponse - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end diff --git a/generated/google/apis/webmasters_v3.rb b/generated/google/apis/webmasters_v3.rb index fcc54d297..daf935a7a 100644 --- a/generated/google/apis/webmasters_v3.rb +++ b/generated/google/apis/webmasters_v3.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/webmaster-tools/ module WebmastersV3 VERSION = 'V3' - REVISION = '20170322' + REVISION = '20170517' # View and manage Search Console data for your verified sites AUTH_WEBMASTERS = 'https://www.googleapis.com/auth/webmasters' diff --git a/generated/google/apis/youtube_analytics_v1.rb b/generated/google/apis/youtube_analytics_v1.rb index 95dd58f37..1745ed320 100644 --- a/generated/google/apis/youtube_analytics_v1.rb +++ b/generated/google/apis/youtube_analytics_v1.rb @@ -25,7 +25,7 @@ module Google # @see http://developers.google.com/youtube/analytics/ module YoutubeAnalyticsV1 VERSION = 'V1' - REVISION = '20170428' + REVISION = '20170522' # Manage your YouTube account AUTH_YOUTUBE = 'https://www.googleapis.com/auth/youtube' diff --git a/generated/google/apis/youtube_partner_v1.rb b/generated/google/apis/youtube_partner_v1.rb index ee09a5ce9..850d0d6dc 100644 --- a/generated/google/apis/youtube_partner_v1.rb +++ b/generated/google/apis/youtube_partner_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/youtube/partner/ module YoutubePartnerV1 VERSION = 'V1' - REVISION = '20170424' + REVISION = '20170522' # View and manage your assets and associated content on YouTube AUTH_YOUTUBEPARTNER = 'https://www.googleapis.com/auth/youtubepartner' diff --git a/generated/google/apis/youtube_partner_v1/classes.rb b/generated/google/apis/youtube_partner_v1/classes.rb index 94b2d7f7a..595eb67f0 100644 --- a/generated/google/apis/youtube_partner_v1/classes.rb +++ b/generated/google/apis/youtube_partner_v1/classes.rb @@ -3030,7 +3030,8 @@ module Google attr_accessor :content_type # The ID that uniquely identifies the reference that this reference duplicates. - # This field is only present if the reference's status is duplicate_on_hold. + # This field is only present if the reference's status is inactive with reason + # REASON_DUPLICATE_FOR_OWNERS. # Corresponds to the JSON property `duplicateLeader` # @return [String] attr_accessor :duplicate_leader diff --git a/generated/google/apis/youtubereporting_v1.rb b/generated/google/apis/youtubereporting_v1.rb index a07841dc1..810f0af56 100644 --- a/generated/google/apis/youtubereporting_v1.rb +++ b/generated/google/apis/youtubereporting_v1.rb @@ -26,7 +26,7 @@ module Google # @see https://developers.google.com/youtube/reporting/v1/reports/ module YoutubereportingV1 VERSION = 'V1' - REVISION = '20170502' + REVISION = '20170524' # View YouTube Analytics reports for your YouTube content AUTH_YT_ANALYTICS_READONLY = 'https://www.googleapis.com/auth/yt-analytics.readonly' diff --git a/generated/google/apis/youtubereporting_v1/classes.rb b/generated/google/apis/youtubereporting_v1/classes.rb index 2c9d2985a..498619d09 100644 --- a/generated/google/apis/youtubereporting_v1/classes.rb +++ b/generated/google/apis/youtubereporting_v1/classes.rb @@ -22,26 +22,118 @@ module Google module Apis module YoutubereportingV1 + # Media resource. + class Media + include Google::Apis::Core::Hashable + + # Name of the media resource. + # Corresponds to the JSON property `resourceName` + # @return [String] + attr_accessor :resource_name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @resource_name = args[:resource_name] if args.key?(:resource_name) + end + end + + # A report type. + class ReportType + include Google::Apis::Core::Hashable + + # The ID of the report type (max. 100 characters). + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # True if this a system-managed report type; otherwise false. Reporting jobs + # for system-managed report types are created automatically and can thus not + # be used in the `CreateJob` method. + # Corresponds to the JSON property `systemManaged` + # @return [Boolean] + attr_accessor :system_managed + alias_method :system_managed?, :system_managed + + # The date/time when this report type was/will be deprecated. + # Corresponds to the JSON property `deprecateTime` + # @return [String] + attr_accessor :deprecate_time + + # The name of the report type (max. 100 characters). + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @id = args[:id] if args.key?(:id) + @system_managed = args[:system_managed] if args.key?(:system_managed) + @deprecate_time = args[:deprecate_time] if args.key?(:deprecate_time) + @name = args[:name] if args.key?(:name) + end + end + + # Response message for ReportingService.ListReportTypes. + class ListReportTypesResponse + include Google::Apis::Core::Hashable + + # A token to retrieve next page of results. + # Pass this value in the + # ListReportTypesRequest.page_token + # field in the subsequent call to `ListReportTypes` method to retrieve the next + # page of results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The list of report types. + # Corresponds to the JSON property `reportTypes` + # @return [Array] + attr_accessor :report_types + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @report_types = args[:report_types] if args.key?(:report_types) + end + end + + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # service Foo ` + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # ` + # The JSON representation for `Empty` is empty JSON object ````. + class Empty + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + # A report's metadata including the URL from which the report itself can be # downloaded. class Report include Google::Apis::Core::Hashable - # The date/time when this report was created. - # Corresponds to the JSON property `createTime` - # @return [String] - attr_accessor :create_time - - # The ID of the job that created this report. - # Corresponds to the JSON property `jobId` - # @return [String] - attr_accessor :job_id - - # The server-generated ID of the report. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - # The date/time when the job this report belongs to will expire/expired. # Corresponds to the JSON property `jobExpireTime` # @return [String] @@ -64,107 +156,34 @@ module Google # @return [String] attr_accessor :start_time - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @create_time = args[:create_time] if args.key?(:create_time) - @job_id = args[:job_id] if args.key?(:job_id) - @id = args[:id] if args.key?(:id) - @job_expire_time = args[:job_expire_time] if args.key?(:job_expire_time) - @end_time = args[:end_time] if args.key?(:end_time) - @download_url = args[:download_url] if args.key?(:download_url) - @start_time = args[:start_time] if args.key?(:start_time) - end - end - - # A report type. - class ReportType - include Google::Apis::Core::Hashable - - # The name of the report type (max. 100 characters). - # Corresponds to the JSON property `name` + # The date/time when this report was created. + # Corresponds to the JSON property `createTime` # @return [String] - attr_accessor :name + attr_accessor :create_time - # The ID of the report type (max. 100 characters). + # The ID of the job that created this report. + # Corresponds to the JSON property `jobId` + # @return [String] + attr_accessor :job_id + + # The server-generated ID of the report. # Corresponds to the JSON property `id` # @return [String] attr_accessor :id - # True if this a system-managed report type; otherwise false. Reporting jobs - # for system-managed report types are created automatically and can thus not - # be used in the `CreateJob` method. - # Corresponds to the JSON property `systemManaged` - # @return [Boolean] - attr_accessor :system_managed - alias_method :system_managed?, :system_managed - - # The date/time when this report type was/will be deprecated. - # Corresponds to the JSON property `deprecateTime` - # @return [String] - attr_accessor :deprecate_time - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @name = args[:name] if args.key?(:name) + @job_expire_time = args[:job_expire_time] if args.key?(:job_expire_time) + @end_time = args[:end_time] if args.key?(:end_time) + @download_url = args[:download_url] if args.key?(:download_url) + @start_time = args[:start_time] if args.key?(:start_time) + @create_time = args[:create_time] if args.key?(:create_time) + @job_id = args[:job_id] if args.key?(:job_id) @id = args[:id] if args.key?(:id) - @system_managed = args[:system_managed] if args.key?(:system_managed) - @deprecate_time = args[:deprecate_time] if args.key?(:deprecate_time) - end - end - - # Response message for ReportingService.ListReportTypes. - class ListReportTypesResponse - include Google::Apis::Core::Hashable - - # The list of report types. - # Corresponds to the JSON property `reportTypes` - # @return [Array] - attr_accessor :report_types - - # A token to retrieve next page of results. - # Pass this value in the - # ListReportTypesRequest.page_token - # field in the subsequent call to `ListReportTypes` method to retrieve the next - # page of results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @report_types = args[:report_types] if args.key?(:report_types) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # service Foo ` - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # ` - # The JSON representation for `Empty` is empty JSON object ````. - class Empty - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) end end @@ -201,10 +220,11 @@ module Google class Job include Google::Apis::Core::Hashable - # The creation date/time of the job. - # Corresponds to the JSON property `createTime` + # The type of reports this job creates. Corresponds to the ID of a + # ReportType. + # Corresponds to the JSON property `reportTypeId` # @return [String] - attr_accessor :create_time + attr_accessor :report_type_id # The date/time when this job will expire/expired. After a job expired, no # new reports are generated. @@ -212,17 +232,16 @@ module Google # @return [String] attr_accessor :expire_time - # The type of reports this job creates. Corresponds to the ID of a - # ReportType. - # Corresponds to the JSON property `reportTypeId` - # @return [String] - attr_accessor :report_type_id - # The name of the job (max. 100 characters). # Corresponds to the JSON property `name` # @return [String] attr_accessor :name + # The server-generated ID of the job (max. 40 characters). + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + # True if this a system-managed job that cannot be modified by the user; # otherwise false. # Corresponds to the JSON property `systemManaged` @@ -230,10 +249,10 @@ module Google attr_accessor :system_managed alias_method :system_managed?, :system_managed - # The server-generated ID of the job (max. 40 characters). - # Corresponds to the JSON property `id` + # The creation date/time of the job. + # Corresponds to the JSON property `createTime` # @return [String] - attr_accessor :id + attr_accessor :create_time def initialize(**args) update!(**args) @@ -241,12 +260,12 @@ module Google # Update properties of this object def update!(**args) - @create_time = args[:create_time] if args.key?(:create_time) - @expire_time = args[:expire_time] if args.key?(:expire_time) @report_type_id = args[:report_type_id] if args.key?(:report_type_id) + @expire_time = args[:expire_time] if args.key?(:expire_time) @name = args[:name] if args.key?(:name) - @system_managed = args[:system_managed] if args.key?(:system_managed) @id = args[:id] if args.key?(:id) + @system_managed = args[:system_managed] if args.key?(:system_managed) + @create_time = args[:create_time] if args.key?(:create_time) end end @@ -278,25 +297,6 @@ module Google @next_page_token = args[:next_page_token] if args.key?(:next_page_token) end end - - # Media resource. - class Media - include Google::Apis::Core::Hashable - - # Name of the media resource. - # Corresponds to the JSON property `resourceName` - # @return [String] - attr_accessor :resource_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @resource_name = args[:resource_name] if args.key?(:resource_name) - end - end end end end diff --git a/generated/google/apis/youtubereporting_v1/representations.rb b/generated/google/apis/youtubereporting_v1/representations.rb index 912ef42a5..64c74ad30 100644 --- a/generated/google/apis/youtubereporting_v1/representations.rb +++ b/generated/google/apis/youtubereporting_v1/representations.rb @@ -22,7 +22,7 @@ module Google module Apis module YoutubereportingV1 - class Report + class Media class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -46,6 +46,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class Report + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class ListJobsResponse class Representation < Google::Apis::Core::JsonRepresentation; end @@ -65,40 +71,28 @@ module Google end class Media - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Report # @private class Representation < Google::Apis::Core::JsonRepresentation - property :create_time, as: 'createTime' - property :job_id, as: 'jobId' - property :id, as: 'id' - property :job_expire_time, as: 'jobExpireTime' - property :end_time, as: 'endTime' - property :download_url, as: 'downloadUrl' - property :start_time, as: 'startTime' + property :resource_name, as: 'resourceName' end end class ReportType # @private class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' property :id, as: 'id' property :system_managed, as: 'systemManaged' property :deprecate_time, as: 'deprecateTime' + property :name, as: 'name' end end class ListReportTypesResponse # @private class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' collection :report_types, as: 'reportTypes', class: Google::Apis::YoutubereportingV1::ReportType, decorator: Google::Apis::YoutubereportingV1::ReportType::Representation - property :next_page_token, as: 'nextPageToken' end end @@ -108,6 +102,19 @@ module Google end end + class Report + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :job_expire_time, as: 'jobExpireTime' + property :end_time, as: 'endTime' + property :download_url, as: 'downloadUrl' + property :start_time, as: 'startTime' + property :create_time, as: 'createTime' + property :job_id, as: 'jobId' + property :id, as: 'id' + end + end + class ListJobsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -120,12 +127,12 @@ module Google class Job # @private class Representation < Google::Apis::Core::JsonRepresentation - property :create_time, as: 'createTime' - property :expire_time, as: 'expireTime' property :report_type_id, as: 'reportTypeId' + property :expire_time, as: 'expireTime' property :name, as: 'name' - property :system_managed, as: 'systemManaged' property :id, as: 'id' + property :system_managed, as: 'systemManaged' + property :create_time, as: 'createTime' end end @@ -137,13 +144,6 @@ module Google property :next_page_token, as: 'nextPageToken' end end - - class Media - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :resource_name, as: 'resourceName' - end - end end end end diff --git a/generated/google/apis/youtubereporting_v1/service.rb b/generated/google/apis/youtubereporting_v1/service.rb index 2d3d74044..e5530e8d3 100644 --- a/generated/google/apis/youtubereporting_v1/service.rb +++ b/generated/google/apis/youtubereporting_v1/service.rb @@ -48,303 +48,16 @@ module Google @batch_path = 'batch' end - # Creates a job and returns it. - # @param [Google::Apis::YoutubereportingV1::Job] job_object - # @param [String] on_behalf_of_content_owner - # The content owner's external ID on which behalf the user is acting on. If - # not set, the user is acting for himself (his own channel). - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::YoutubereportingV1::Job] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::YoutubereportingV1::Job] - # - # @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_job(job_object = nil, on_behalf_of_content_owner: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/jobs', options) - command.request_representation = Google::Apis::YoutubereportingV1::Job::Representation - command.request_object = job_object - command.response_representation = Google::Apis::YoutubereportingV1::Job::Representation - command.response_class = Google::Apis::YoutubereportingV1::Job - command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Deletes a job. - # @param [String] job_id - # The ID of the job to delete. - # @param [String] on_behalf_of_content_owner - # The content owner's external ID on which behalf the user is acting on. If - # not set, the user is acting for himself (his own channel). - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::YoutubereportingV1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::YoutubereportingV1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_job(job_id, on_behalf_of_content_owner: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1/jobs/{jobId}', options) - command.response_representation = Google::Apis::YoutubereportingV1::Empty::Representation - command.response_class = Google::Apis::YoutubereportingV1::Empty - command.params['jobId'] = job_id unless job_id.nil? - command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Lists jobs. - # @param [String] page_token - # A token identifying a page of results the server should return. Typically, - # this is the value of - # ListReportTypesResponse.next_page_token - # returned in response to the previous call to the `ListJobs` method. - # @param [Boolean] include_system_managed - # If set to true, also system-managed jobs will be returned; otherwise only - # user-created jobs will be returned. System-managed jobs can neither be - # modified nor deleted. - # @param [Fixnum] page_size - # Requested page size. Server may return fewer jobs than requested. - # If unspecified, server will pick an appropriate default. - # @param [String] on_behalf_of_content_owner - # The content owner's external ID on which behalf the user is acting on. If - # not set, the user is acting for himself (his own channel). - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::YoutubereportingV1::ListJobsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::YoutubereportingV1::ListJobsResponse] - # - # @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_jobs(page_token: nil, include_system_managed: nil, page_size: nil, on_behalf_of_content_owner: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/jobs', options) - command.response_representation = Google::Apis::YoutubereportingV1::ListJobsResponse::Representation - command.response_class = Google::Apis::YoutubereportingV1::ListJobsResponse - command.query['pageToken'] = page_token unless page_token.nil? - command.query['includeSystemManaged'] = include_system_managed unless include_system_managed.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Gets a job. - # @param [String] job_id - # The ID of the job to retrieve. - # @param [String] on_behalf_of_content_owner - # The content owner's external ID on which behalf the user is acting on. If - # not set, the user is acting for himself (his own channel). - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::YoutubereportingV1::Job] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::YoutubereportingV1::Job] - # - # @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_job(job_id, on_behalf_of_content_owner: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/jobs/{jobId}', options) - command.response_representation = Google::Apis::YoutubereportingV1::Job::Representation - command.response_class = Google::Apis::YoutubereportingV1::Job - command.params['jobId'] = job_id unless job_id.nil? - command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Lists reports created by a specific job. - # Returns NOT_FOUND if the job does not exist. - # @param [String] job_id - # The ID of the job. - # @param [String] start_time_before - # If set, only reports whose start time is smaller than the specified - # date/time are returned. - # @param [String] created_after - # If set, only reports created after the specified date/time are returned. - # @param [String] page_token - # A token identifying a page of results the server should return. Typically, - # this is the value of - # ListReportsResponse.next_page_token - # returned in response to the previous call to the `ListReports` method. - # @param [String] start_time_at_or_after - # If set, only reports whose start time is greater than or equal the - # specified date/time are returned. - # @param [Fixnum] page_size - # Requested page size. Server may return fewer report types than requested. - # If unspecified, server will pick an appropriate default. - # @param [String] on_behalf_of_content_owner - # The content owner's external ID on which behalf the user is acting on. If - # not set, the user is acting for himself (his own channel). - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::YoutubereportingV1::ListReportsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::YoutubereportingV1::ListReportsResponse] - # - # @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_job_reports(job_id, start_time_before: nil, created_after: nil, page_token: nil, start_time_at_or_after: nil, page_size: nil, on_behalf_of_content_owner: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/jobs/{jobId}/reports', options) - command.response_representation = Google::Apis::YoutubereportingV1::ListReportsResponse::Representation - command.response_class = Google::Apis::YoutubereportingV1::ListReportsResponse - command.params['jobId'] = job_id unless job_id.nil? - command.query['startTimeBefore'] = start_time_before unless start_time_before.nil? - command.query['createdAfter'] = created_after unless created_after.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['startTimeAtOrAfter'] = start_time_at_or_after unless start_time_at_or_after.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Gets the metadata of a specific report. - # @param [String] job_id - # The ID of the job. - # @param [String] report_id - # The ID of the report to retrieve. - # @param [String] on_behalf_of_content_owner - # The content owner's external ID on which behalf the user is acting on. If - # not set, the user is acting for himself (his own channel). - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::YoutubereportingV1::Report] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::YoutubereportingV1::Report] - # - # @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_job_report(job_id, report_id, on_behalf_of_content_owner: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/jobs/{jobId}/reports/{reportId}', options) - command.response_representation = Google::Apis::YoutubereportingV1::Report::Representation - command.response_class = Google::Apis::YoutubereportingV1::Report - command.params['jobId'] = job_id unless job_id.nil? - command.params['reportId'] = report_id unless report_id.nil? - command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Lists report types. - # @param [String] on_behalf_of_content_owner - # The content owner's external ID on which behalf the user is acting on. If - # not set, the user is acting for himself (his own channel). - # @param [String] page_token - # A token identifying a page of results the server should return. Typically, - # this is the value of - # ListReportTypesResponse.next_page_token - # returned in response to the previous call to the `ListReportTypes` method. - # @param [Boolean] include_system_managed - # If set to true, also system-managed report types will be returned; - # otherwise only the report types that can be used to create new reporting - # jobs will be returned. - # @param [Fixnum] page_size - # Requested page size. Server may return fewer report types than requested. - # If unspecified, server will pick an appropriate default. - # @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 [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::YoutubereportingV1::ListReportTypesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::YoutubereportingV1::ListReportTypesResponse] - # - # @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_report_types(on_behalf_of_content_owner: nil, page_token: nil, include_system_managed: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/reportTypes', options) - command.response_representation = Google::Apis::YoutubereportingV1::ListReportTypesResponse::Representation - command.response_class = Google::Apis::YoutubereportingV1::ListReportTypesResponse - command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['includeSystemManaged'] = include_system_managed unless include_system_managed.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - # Method for media download. Download is supported # on the URI `/v1/media/`+name`?alt=media`. # @param [String] resource_name # Name of the media that is being downloaded. See # ReadRequest.resource_name. + # @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 [String] fields - # Selector specifying which fields to include in a partial response. # @param [IO, String] download_dest # IO stream or filename to receive content download # @param [Google::Apis::RequestOptions] options @@ -359,7 +72,7 @@ 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 download_medium(resource_name, quota_user: nil, fields: nil, download_dest: nil, options: nil, &block) + def download_medium(resource_name, fields: nil, quota_user: nil, download_dest: nil, options: nil, &block) if download_dest.nil? command = make_simple_command(:get, 'v1/media/{+resourceName}', options) else @@ -369,8 +82,295 @@ module Google command.response_representation = Google::Apis::YoutubereportingV1::Media::Representation command.response_class = Google::Apis::YoutubereportingV1::Media command.params['resourceName'] = resource_name unless resource_name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a job. + # @param [String] job_id + # The ID of the job to delete. + # @param [String] on_behalf_of_content_owner + # The content owner's external ID on which behalf the user is acting on. If + # not set, the user is acting for himself (his own channel). + # @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::YoutubereportingV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::YoutubereportingV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_job(job_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/jobs/{jobId}', options) + command.response_representation = Google::Apis::YoutubereportingV1::Empty::Representation + command.response_class = Google::Apis::YoutubereportingV1::Empty + command.params['jobId'] = job_id unless job_id.nil? + command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists jobs. + # @param [String] on_behalf_of_content_owner + # The content owner's external ID on which behalf the user is acting on. If + # not set, the user is acting for himself (his own channel). + # @param [String] page_token + # A token identifying a page of results the server should return. Typically, + # this is the value of + # ListReportTypesResponse.next_page_token + # returned in response to the previous call to the `ListJobs` method. + # @param [Boolean] include_system_managed + # If set to true, also system-managed jobs will be returned; otherwise only + # user-created jobs will be returned. System-managed jobs can neither be + # modified nor deleted. + # @param [Fixnum] page_size + # Requested page size. Server may return fewer jobs than requested. + # If unspecified, server will pick an appropriate default. + # @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::YoutubereportingV1::ListJobsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::YoutubereportingV1::ListJobsResponse] + # + # @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_jobs(on_behalf_of_content_owner: nil, page_token: nil, include_system_managed: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/jobs', options) + command.response_representation = Google::Apis::YoutubereportingV1::ListJobsResponse::Representation + command.response_class = Google::Apis::YoutubereportingV1::ListJobsResponse + command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['includeSystemManaged'] = include_system_managed unless include_system_managed.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a job. + # @param [String] job_id + # The ID of the job to retrieve. + # @param [String] on_behalf_of_content_owner + # The content owner's external ID on which behalf the user is acting on. If + # not set, the user is acting for himself (his own channel). + # @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::YoutubereportingV1::Job] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::YoutubereportingV1::Job] + # + # @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_job(job_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/jobs/{jobId}', options) + command.response_representation = Google::Apis::YoutubereportingV1::Job::Representation + command.response_class = Google::Apis::YoutubereportingV1::Job + command.params['jobId'] = job_id unless job_id.nil? + command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a job and returns it. + # @param [Google::Apis::YoutubereportingV1::Job] job_object + # @param [String] on_behalf_of_content_owner + # The content owner's external ID on which behalf the user is acting on. If + # not set, the user is acting for himself (his own channel). + # @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::YoutubereportingV1::Job] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::YoutubereportingV1::Job] + # + # @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_job(job_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/jobs', options) + command.request_representation = Google::Apis::YoutubereportingV1::Job::Representation + command.request_object = job_object + command.response_representation = Google::Apis::YoutubereportingV1::Job::Representation + command.response_class = Google::Apis::YoutubereportingV1::Job + command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists reports created by a specific job. + # Returns NOT_FOUND if the job does not exist. + # @param [String] job_id + # The ID of the job. + # @param [String] on_behalf_of_content_owner + # The content owner's external ID on which behalf the user is acting on. If + # not set, the user is acting for himself (his own channel). + # @param [String] start_time_before + # If set, only reports whose start time is smaller than the specified + # date/time are returned. + # @param [String] created_after + # If set, only reports created after the specified date/time are returned. + # @param [String] start_time_at_or_after + # If set, only reports whose start time is greater than or equal the + # specified date/time are returned. + # @param [String] page_token + # A token identifying a page of results the server should return. Typically, + # this is the value of + # ListReportsResponse.next_page_token + # returned in response to the previous call to the `ListReports` method. + # @param [Fixnum] page_size + # Requested page size. Server may return fewer report types than requested. + # If unspecified, server will pick an appropriate default. + # @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::YoutubereportingV1::ListReportsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::YoutubereportingV1::ListReportsResponse] + # + # @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_job_reports(job_id, on_behalf_of_content_owner: nil, start_time_before: nil, created_after: nil, start_time_at_or_after: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/jobs/{jobId}/reports', options) + command.response_representation = Google::Apis::YoutubereportingV1::ListReportsResponse::Representation + command.response_class = Google::Apis::YoutubereportingV1::ListReportsResponse + command.params['jobId'] = job_id unless job_id.nil? + command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? + command.query['startTimeBefore'] = start_time_before unless start_time_before.nil? + command.query['createdAfter'] = created_after unless created_after.nil? + command.query['startTimeAtOrAfter'] = start_time_at_or_after unless start_time_at_or_after.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets the metadata of a specific report. + # @param [String] job_id + # The ID of the job. + # @param [String] report_id + # The ID of the report to retrieve. + # @param [String] on_behalf_of_content_owner + # The content owner's external ID on which behalf the user is acting on. If + # not set, the user is acting for himself (his own channel). + # @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::YoutubereportingV1::Report] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::YoutubereportingV1::Report] + # + # @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_job_report(job_id, report_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/jobs/{jobId}/reports/{reportId}', options) + command.response_representation = Google::Apis::YoutubereportingV1::Report::Representation + command.response_class = Google::Apis::YoutubereportingV1::Report + command.params['jobId'] = job_id unless job_id.nil? + command.params['reportId'] = report_id unless report_id.nil? + command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists report types. + # @param [String] page_token + # A token identifying a page of results the server should return. Typically, + # this is the value of + # ListReportTypesResponse.next_page_token + # returned in response to the previous call to the `ListReportTypes` method. + # @param [Boolean] include_system_managed + # If set to true, also system-managed report types will be returned; + # otherwise only the report types that can be used to create new reporting + # jobs will be returned. + # @param [Fixnum] page_size + # Requested page size. Server may return fewer report types than requested. + # If unspecified, server will pick an appropriate default. + # @param [String] on_behalf_of_content_owner + # The content owner's external ID on which behalf the user is acting on. If + # not set, the user is acting for himself (his own channel). + # @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::YoutubereportingV1::ListReportTypesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::YoutubereportingV1::ListReportTypesResponse] + # + # @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_report_types(page_token: nil, include_system_managed: nil, page_size: nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/reportTypes', options) + command.response_representation = Google::Apis::YoutubereportingV1::ListReportTypesResponse::Representation + command.response_class = Google::Apis::YoutubereportingV1::ListReportTypesResponse + command.query['pageToken'] = page_token unless page_token.nil? + command.query['includeSystemManaged'] = include_system_managed unless include_system_managed.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end diff --git a/lib/google/apis/version.rb b/lib/google/apis/version.rb index 2111b1a2d..48d3b745e 100644 --- a/lib/google/apis/version.rb +++ b/lib/google/apis/version.rb @@ -15,7 +15,7 @@ module Google module Apis # Client library version - VERSION = '0.11.2' + VERSION = '0.11.3' # Current operating system # @private