From 46b655e6d567f563f69dee88eb43bd31d11be360 Mon Sep 17 00:00:00 2001 From: Google APIs Date: Wed, 20 Dec 2017 00:35:35 +0000 Subject: [PATCH] Autogenerated update (2017-12-20) Delete: - consumersurveys_v2 Update: - cloudtasks_v2beta2 - compute_alpha - compute_beta --- api_names_out.yaml | 41 + generated/google/apis/cloudtasks_v2beta2.rb | 2 +- .../google/apis/cloudtasks_v2beta2/classes.rb | 37 +- .../cloudtasks_v2beta2/representations.rb | 4 +- generated/google/apis/compute_alpha.rb | 2 +- .../google/apis/compute_alpha/classes.rb | 319 ++++- .../apis/compute_alpha/representations.rb | 45 +- .../google/apis/compute_alpha/service.rb | 219 +++- generated/google/apis/compute_beta.rb | 2 +- generated/google/apis/compute_beta/classes.rb | 822 ++++++++++++- .../apis/compute_beta/representations.rb | 254 ++++ generated/google/apis/compute_beta/service.rb | 1061 ++++++++++++++++- generated/google/apis/consumersurveys_v2.rb | 40 - .../google/apis/consumersurveys_v2/classes.rb | 736 ------------ .../consumersurveys_v2/representations.rb | 343 ------ .../google/apis/consumersurveys_v2/service.rb | 478 -------- 16 files changed, 2671 insertions(+), 1734 deletions(-) delete mode 100644 generated/google/apis/consumersurveys_v2.rb delete mode 100644 generated/google/apis/consumersurveys_v2/classes.rb delete mode 100644 generated/google/apis/consumersurveys_v2/representations.rb delete mode 100644 generated/google/apis/consumersurveys_v2/service.rb diff --git a/api_names_out.yaml b/api_names_out.yaml index 07f00392d..37e051a90 100644 --- a/api_names_out.yaml +++ b/api_names_out.yaml @@ -15741,6 +15741,8 @@ "/compute:alpha/AttachedDisk/deviceName": device_name "/compute:alpha/AttachedDisk/diskEncryptionKey": disk_encryption_key "/compute:alpha/AttachedDisk/diskSizeGb": disk_size_gb +"/compute:alpha/AttachedDisk/guestOsFeatures": guest_os_features +"/compute:alpha/AttachedDisk/guestOsFeatures/guest_os_feature": guest_os_feature "/compute:alpha/AttachedDisk/index": index "/compute:alpha/AttachedDisk/initializeParams": initialize_params "/compute:alpha/AttachedDisk/interface": interface @@ -15748,6 +15750,7 @@ "/compute:alpha/AttachedDisk/licenses": licenses "/compute:alpha/AttachedDisk/licenses/license": license "/compute:alpha/AttachedDisk/mode": mode +"/compute:alpha/AttachedDisk/savedState": saved_state "/compute:alpha/AttachedDisk/source": source "/compute:alpha/AttachedDisk/type": type "/compute:alpha/AttachedDiskInitializeParams": attached_disk_initialize_params @@ -15776,6 +15779,7 @@ "/compute:alpha/Autoscaler/id": id "/compute:alpha/Autoscaler/kind": kind "/compute:alpha/Autoscaler/name": name +"/compute:alpha/Autoscaler/recommendedSize": recommended_size "/compute:alpha/Autoscaler/region": region "/compute:alpha/Autoscaler/selfLink": self_link "/compute:alpha/Autoscaler/status": status @@ -17019,6 +17023,10 @@ "/compute:alpha/InstancesRemoveMaintenancePoliciesRequest": instances_remove_maintenance_policies_request "/compute:alpha/InstancesRemoveMaintenancePoliciesRequest/maintenancePolicies": maintenance_policies "/compute:alpha/InstancesRemoveMaintenancePoliciesRequest/maintenancePolicies/maintenance_policy": maintenance_policy +"/compute:alpha/InstancesResumeRequest": instances_resume_request +"/compute:alpha/InstancesResumeRequest/disks": disks +"/compute:alpha/InstancesResumeRequest/disks/disk": disk +"/compute:alpha/InstancesResumeRequest/instanceEncryptionKey": instance_encryption_key "/compute:alpha/InstancesScopedList": instances_scoped_list "/compute:alpha/InstancesScopedList/instances": instances "/compute:alpha/InstancesScopedList/instances/instance": instance @@ -17065,6 +17073,9 @@ "/compute:alpha/Interconnect/interconnectAttachments/interconnect_attachment": interconnect_attachment "/compute:alpha/Interconnect/interconnectType": interconnect_type "/compute:alpha/Interconnect/kind": kind +"/compute:alpha/Interconnect/labelFingerprint": label_fingerprint +"/compute:alpha/Interconnect/labels": labels +"/compute:alpha/Interconnect/labels/label": label "/compute:alpha/Interconnect/linkType": link_type "/compute:alpha/Interconnect/location": location "/compute:alpha/Interconnect/name": name @@ -17074,6 +17085,7 @@ "/compute:alpha/Interconnect/provisionedLinkCount": provisioned_link_count "/compute:alpha/Interconnect/requestedLinkCount": requested_link_count "/compute:alpha/Interconnect/selfLink": self_link +"/compute:alpha/Interconnect/state": state "/compute:alpha/InterconnectAttachment": interconnect_attachment "/compute:alpha/InterconnectAttachment/adminEnabled": admin_enabled "/compute:alpha/InterconnectAttachment/availabilityZone": availability_zone @@ -17088,9 +17100,14 @@ "/compute:alpha/InterconnectAttachment/id": id "/compute:alpha/InterconnectAttachment/interconnect": interconnect "/compute:alpha/InterconnectAttachment/kind": kind +"/compute:alpha/InterconnectAttachment/labelFingerprint": label_fingerprint +"/compute:alpha/InterconnectAttachment/labels": labels +"/compute:alpha/InterconnectAttachment/labels/label": label "/compute:alpha/InterconnectAttachment/name": name "/compute:alpha/InterconnectAttachment/operationalStatus": operational_status "/compute:alpha/InterconnectAttachment/pairingKey": pairing_key +"/compute:alpha/InterconnectAttachment/partnerAsn": partner_asn +"/compute:alpha/InterconnectAttachment/partnerMetadata": partner_metadata "/compute:alpha/InterconnectAttachment/privateInterconnectInfo": private_interconnect_info "/compute:alpha/InterconnectAttachment/region": region "/compute:alpha/InterconnectAttachment/router": router @@ -17126,6 +17143,10 @@ "/compute:alpha/InterconnectAttachmentList/warning/data/datum/key": key "/compute:alpha/InterconnectAttachmentList/warning/data/datum/value": value "/compute:alpha/InterconnectAttachmentList/warning/message": message +"/compute:alpha/InterconnectAttachmentPartnerMetadata": interconnect_attachment_partner_metadata +"/compute:alpha/InterconnectAttachmentPartnerMetadata/interconnectName": interconnect_name +"/compute:alpha/InterconnectAttachmentPartnerMetadata/partnerName": partner_name +"/compute:alpha/InterconnectAttachmentPartnerMetadata/portalUrl": portal_url "/compute:alpha/InterconnectAttachmentPrivateInfo": interconnect_attachment_private_info "/compute:alpha/InterconnectAttachmentPrivateInfo/tag8021q": tag8021q "/compute:alpha/InterconnectAttachmentsScopedList": interconnect_attachments_scoped_list @@ -18148,6 +18169,8 @@ "/compute:alpha/Snapshot/status": status "/compute:alpha/Snapshot/storageBytes": storage_bytes "/compute:alpha/Snapshot/storageBytesStatus": storage_bytes_status +"/compute:alpha/Snapshot/storageLocations": storage_locations +"/compute:alpha/Snapshot/storageLocations/storage_location": storage_location "/compute:alpha/SnapshotList": snapshot_list "/compute:alpha/SnapshotList/id": id "/compute:alpha/SnapshotList/items": items @@ -19637,6 +19660,11 @@ "/compute:alpha/compute.instances.reset/project": project "/compute:alpha/compute.instances.reset/requestId": request_id "/compute:alpha/compute.instances.reset/zone": zone +"/compute:alpha/compute.instances.resume": resume_instance +"/compute:alpha/compute.instances.resume/instance": instance +"/compute:alpha/compute.instances.resume/project": project +"/compute:alpha/compute.instances.resume/requestId": request_id +"/compute:alpha/compute.instances.resume/zone": zone "/compute:alpha/compute.instances.setDeletionProtection": set_instance_deletion_protection "/compute:alpha/compute.instances.setDeletionProtection/deletionProtection": deletion_protection "/compute:alpha/compute.instances.setDeletionProtection/project": project @@ -19771,10 +19799,20 @@ "/compute:alpha/compute.interconnectAttachments.list/pageToken": page_token "/compute:alpha/compute.interconnectAttachments.list/project": project "/compute:alpha/compute.interconnectAttachments.list/region": region +"/compute:alpha/compute.interconnectAttachments.patch": patch_interconnect_attachment +"/compute:alpha/compute.interconnectAttachments.patch/interconnectAttachment": interconnect_attachment +"/compute:alpha/compute.interconnectAttachments.patch/project": project +"/compute:alpha/compute.interconnectAttachments.patch/region": region +"/compute:alpha/compute.interconnectAttachments.patch/requestId": request_id "/compute:alpha/compute.interconnectAttachments.setIamPolicy": set_interconnect_attachment_iam_policy "/compute:alpha/compute.interconnectAttachments.setIamPolicy/project": project "/compute:alpha/compute.interconnectAttachments.setIamPolicy/region": region "/compute:alpha/compute.interconnectAttachments.setIamPolicy/resource": resource +"/compute:alpha/compute.interconnectAttachments.setLabels": set_interconnect_attachment_labels +"/compute:alpha/compute.interconnectAttachments.setLabels/project": project +"/compute:alpha/compute.interconnectAttachments.setLabels/region": region +"/compute:alpha/compute.interconnectAttachments.setLabels/requestId": request_id +"/compute:alpha/compute.interconnectAttachments.setLabels/resource": resource "/compute:alpha/compute.interconnectAttachments.testIamPermissions": test_interconnect_attachment_iam_permissions "/compute:alpha/compute.interconnectAttachments.testIamPermissions/project": project "/compute:alpha/compute.interconnectAttachments.testIamPermissions/region": region @@ -19817,6 +19855,9 @@ "/compute:alpha/compute.interconnects.setIamPolicy": set_interconnect_iam_policy "/compute:alpha/compute.interconnects.setIamPolicy/project": project "/compute:alpha/compute.interconnects.setIamPolicy/resource": resource +"/compute:alpha/compute.interconnects.setLabels": set_interconnect_labels +"/compute:alpha/compute.interconnects.setLabels/project": project +"/compute:alpha/compute.interconnects.setLabels/resource": resource "/compute:alpha/compute.interconnects.testIamPermissions": test_interconnect_iam_permissions "/compute:alpha/compute.interconnects.testIamPermissions/project": project "/compute:alpha/compute.interconnects.testIamPermissions/resource": resource diff --git a/generated/google/apis/cloudtasks_v2beta2.rb b/generated/google/apis/cloudtasks_v2beta2.rb index 2317a3496..4f1d726ed 100644 --- a/generated/google/apis/cloudtasks_v2beta2.rb +++ b/generated/google/apis/cloudtasks_v2beta2.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/cloud-tasks/ module CloudtasksV2beta2 VERSION = 'V2beta2' - REVISION = '20171215' + REVISION = '20171219' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/cloudtasks_v2beta2/classes.rb b/generated/google/apis/cloudtasks_v2beta2/classes.rb index c26be5051..1588e4fd4 100644 --- a/generated/google/apis/cloudtasks_v2beta2/classes.rb +++ b/generated/google/apis/cloudtasks_v2beta2/classes.rb @@ -69,13 +69,11 @@ module Google # task-level app_engine_routing. # The `url` that the task will be sent to is: # * `url =` AppEngineRouting.host `+` AppEngineHttpRequest.relative_url - # The task will be sent to a task handler by an HTTP - # request using the specified AppEngineHttpRequest.http_method (for example - # POST, HTTP GET, etc). The task attempt has succeeded if the task handler - # returns an HTTP response code in the range [200 - 299]. Error 503 is - # considered an App Engine system error instead of an application error. - # Requests returning error 503 will be retried regardless of retry - # configuration and not counted against retry counts. + # The task attempt has succeeded if the app's request handler returns + # an HTTP response code in the range [`200` - `299`]. `503` is + # considered an App Engine system error instead of an application + # error. Requests returning error `503` will be retried regardless of + # retry configuration and not counted against retry counts. # Any other response code or a failure to receive a response before the # deadline is a failed attempt. class AppEngineHttpRequest @@ -118,10 +116,15 @@ module Google # * `Host` # * `X-Google-*` # * `X-AppEngine-*` - # In addition, some App Engine headers, which contain - # task-specific information, are also be sent to the task handler; see + # In addition, Cloud Tasks sets some headers when the task is dispatched, + # such as headers containing information about the task; see # [request headers](/appengine/docs/python/taskqueue/push/creating-handlers# # reading_request_headers). + # These headers are set only when the task is dispatched, so they are not + # visible when the task is returned in a Cloud Tasks response. + # Although there is no specific limit for the maximum number of headers or + # the size, there is a limit on the maximum size of the Task. For more + # information, see the CloudTasks.CreateTask documentation. # Corresponds to the JSON property `headers` # @return [Hash] attr_accessor :headers @@ -134,7 +137,7 @@ module Google # creating-handlers#writing_a_push_task_request_handler) # and the documentation for the request handlers in the language your app is # written in e.g. - # [python RequestHandler](/appengine/docs/python/tools/webapp/ + # [Python Request Handler](/appengine/docs/python/tools/webapp/ # requesthandlerclass). # Corresponds to the JSON property `httpMethod` # @return [String] @@ -555,7 +558,7 @@ module Google # `filter` can be used to specify a subset of tasks to lease. # When `filter` is set to `tag=` then the # LeaseTasksResponse will contain only tasks whose - # LeaseMessage.tag is equal to ``. `` must be less than + # PullMessage.tag is equal to ``. `` must be less than # 500 bytes. # When `filter` is set to `tag_function=oldest_tag()`, only tasks which have # the same tag as the task with the oldest schedule_time will be returned. @@ -1501,13 +1504,11 @@ module Google # task-level app_engine_routing. # The `url` that the task will be sent to is: # * `url =` AppEngineRouting.host `+` AppEngineHttpRequest.relative_url - # The task will be sent to a task handler by an HTTP - # request using the specified AppEngineHttpRequest.http_method (for example - # POST, HTTP GET, etc). The task attempt has succeeded if the task handler - # returns an HTTP response code in the range [200 - 299]. Error 503 is - # considered an App Engine system error instead of an application error. - # Requests returning error 503 will be retried regardless of retry - # configuration and not counted against retry counts. + # The task attempt has succeeded if the app's request handler returns + # an HTTP response code in the range [`200` - `299`]. `503` is + # considered an App Engine system error instead of an application + # error. Requests returning error `503` will be retried regardless of + # retry configuration and not counted against retry counts. # Any other response code or a failure to receive a response before the # deadline is a failed attempt. # Corresponds to the JSON property `appEngineHttpRequest` diff --git a/generated/google/apis/cloudtasks_v2beta2/representations.rb b/generated/google/apis/cloudtasks_v2beta2/representations.rb index b0b85cc30..596b561e6 100644 --- a/generated/google/apis/cloudtasks_v2beta2/representations.rb +++ b/generated/google/apis/cloudtasks_v2beta2/representations.rb @@ -522,8 +522,8 @@ module Google class TaskStatus # @private class Representation < Google::Apis::Core::JsonRepresentation - property :attempt_dispatch_count, :numeric_string => true, as: 'attemptDispatchCount' - property :attempt_response_count, :numeric_string => true, as: 'attemptResponseCount' + property :attempt_dispatch_count, as: 'attemptDispatchCount' + property :attempt_response_count, as: 'attemptResponseCount' property :first_attempt_status, as: 'firstAttemptStatus', class: Google::Apis::CloudtasksV2beta2::AttemptStatus, decorator: Google::Apis::CloudtasksV2beta2::AttemptStatus::Representation property :last_attempt_status, as: 'lastAttemptStatus', class: Google::Apis::CloudtasksV2beta2::AttemptStatus, decorator: Google::Apis::CloudtasksV2beta2::AttemptStatus::Representation diff --git a/generated/google/apis/compute_alpha.rb b/generated/google/apis/compute_alpha.rb index f91d7553f..4008b68bb 100644 --- a/generated/google/apis/compute_alpha.rb +++ b/generated/google/apis/compute_alpha.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/compute/docs/reference/latest/ module ComputeAlpha VERSION = 'Alpha' - REVISION = '20171127' + REVISION = '20171207' # 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_alpha/classes.rb b/generated/google/apis/compute_alpha/classes.rb index c576c632d..bb563746c 100644 --- a/generated/google/apis/compute_alpha/classes.rb +++ b/generated/google/apis/compute_alpha/classes.rb @@ -49,7 +49,8 @@ module Google end end - # An Accelerator Type resource. + # An Accelerator Type resource. (== resource_for beta.acceleratorTypes ==) (== + # resource_for v1.acceleratorTypes ==) class AcceleratorType include Google::Apis::Core::Hashable @@ -532,7 +533,9 @@ module Google end end - # A reserved address resource. + # A reserved address resource. (== resource_for beta.addresses ==) (== + # resource_for v1.addresses ==) (== resource_for beta.globalAddresses ==) (== + # resource_for v1.globalAddresses ==) class Address include Google::Apis::Core::Hashable @@ -630,9 +633,9 @@ module Google # @return [String] attr_accessor :status - # For external addresses, this field should not be used. # The URL of the subnetwork in which to reserve the address. If an IP address is - # specified, it must be within the subnetwork's IP range. + # specified, it must be within the subnetwork's IP range. This field can only be + # used with INTERNAL type with GCE_ENDPOINT/DNS_RESOLVER purposes. # Corresponds to the JSON property `subnetwork` # @return [String] attr_accessor :subnetwork @@ -1065,6 +1068,13 @@ module Google # @return [Fixnum] attr_accessor :disk_size_gb + # A list of features to enable on the guest operating system. Applicable only + # for bootable images. Read Enabling guest operating system features to see a + # list of available options. + # Corresponds to the JSON property `guestOsFeatures` + # @return [Array] + attr_accessor :guest_os_features + # [Output Only] A zero-based index to this disk, where 0 is reserved for the # boot disk. If you have many disks attached to an instance, each disk would # have a unique index number. @@ -1107,6 +1117,14 @@ module Google # @return [String] attr_accessor :mode + # For LocalSSD disks on VM Instances in STOPPED or SUSPENDED state, this field + # is set to PRESERVED iff the LocalSSD data has been saved to a persistent + # location by customer request. (see the discard_local_ssd option on Stop/ + # Suspend). Read-only in the api. + # Corresponds to the JSON property `savedState` + # @return [String] + attr_accessor :saved_state + # Specifies a valid partial or full URL to an existing Persistent Disk resource. # When creating a new instance, one of initializeParams.sourceImage or disks. # source is required except for local SSD. @@ -1135,12 +1153,14 @@ module Google @device_name = args[:device_name] if args.key?(:device_name) @disk_encryption_key = args[:disk_encryption_key] if args.key?(:disk_encryption_key) @disk_size_gb = args[:disk_size_gb] if args.key?(:disk_size_gb) + @guest_os_features = args[:guest_os_features] if args.key?(:guest_os_features) @index = args[:index] if args.key?(:index) @initialize_params = args[:initialize_params] if args.key?(:initialize_params) @interface = args[:interface] if args.key?(:interface) @kind = args[:kind] if args.key?(:kind) @licenses = args[:licenses] if args.key?(:licenses) @mode = args[:mode] if args.key?(:mode) + @saved_state = args[:saved_state] if args.key?(:saved_state) @source = args[:source] if args.key?(:source) @type = args[:type] if args.key?(:type) end @@ -1327,7 +1347,9 @@ module Google # Represents an Autoscaler resource. Autoscalers allow you to automatically # scale virtual machine instances in managed instance groups according to an # autoscaling policy that you define. For more information, read Autoscaling - # Groups of Instances. + # Groups of Instances. (== resource_for beta.autoscalers ==) (== resource_for v1. + # autoscalers ==) (== resource_for beta.regionAutoscalers ==) (== resource_for + # v1.regionAutoscalers ==) class Autoscaler include Google::Apis::Core::Hashable @@ -1368,6 +1390,14 @@ module Google # @return [String] attr_accessor :name + # [Output Only] Target recommended MIG size computed by autoscaler. Autoscaler + # calculates recommended MIG size even when autoscaling policy mode is different + # from ON. This field is empty when autoscaler is not connected to the existing + # managed instance group or autoscaler did not generate its first prediction. + # Corresponds to the JSON property `recommendedSize` + # @return [Fixnum] + attr_accessor :recommended_size + # [Output Only] URL of the region where the instance group resides (for # autoscalers living in regional scope). # Corresponds to the JSON property `region` @@ -1414,6 +1444,7 @@ module Google @id = args[:id] if args.key?(:id) @kind = args[:kind] if args.key?(:kind) @name = args[:name] if args.key?(:name) + @recommended_size = args[:recommended_size] if args.key?(:recommended_size) @region = args[:region] if args.key?(:region) @self_link = args[:self_link] if args.key?(:self_link) @status = args[:status] if args.key?(:status) @@ -2401,7 +2432,8 @@ module Google end # A BackendService resource. This resource defines a group of backend virtual - # machines and their serving capacity. + # machines and their serving capacity. (== resource_for v1.backendService ==) (== + # resource_for beta.backendService ==) class BackendService include Google::Apis::Core::Hashable @@ -3303,7 +3335,8 @@ module Google # Committed use discounts are subject to Google Cloud Platform's Service # Specific Terms. By purchasing a committed use discount, you agree to these # terms. Committed use discounts will not renew, so you must purchase a new - # commitment to continue receiving discounts. + # commitment to continue receiving discounts. (== resource_for beta.commitments = + # =) (== resource_for v1.commitments ==) class Commitment include Google::Apis::Core::Hashable @@ -3963,7 +3996,7 @@ module Google end end - # A Disk resource. + # A Disk resource. (== resource_for beta.disks ==) (== resource_for v1.disks ==) class Disk include Google::Apis::Core::Hashable @@ -3983,14 +4016,9 @@ module Google # @return [Google::Apis::ComputeAlpha::CustomerEncryptionKey] attr_accessor :disk_encryption_key - # A list of features to enable on the guest OS. Applicable for bootable disks - # only. Currently, only one feature can be enabled, VIRTIO_SCSI_MULTIQUEUE, - # which allows each virtual CPU to have its own queue. For Windows disks, you - # can only enable VIRTIO_SCSI_MULTIQUEUE on images with driver version 1.2.0. - # 1621 or higher. Linux disks with kernel versions 3.17 and higher will support - # VIRTIO_SCSI_MULTIQUEUE. - # For newer Windows images, the server might also populate this property with - # the value WINDOWS to indicate that this is a Windows image. + # A list of features to enable on the guest operating system. Applicable only + # for bootable images. Read Enabling guest operating system features to see a + # list of available options. # Corresponds to the JSON property `guestOsFeatures` # @return [Array] attr_accessor :guest_os_features @@ -4527,7 +4555,8 @@ module Google end end - # A DiskType resource. + # A DiskType resource. (== resource_for beta.diskTypes ==) (== resource_for v1. + # diskTypes ==) class DiskType include Google::Apis::Core::Hashable @@ -5534,7 +5563,11 @@ module Google # A ForwardingRule resource. A ForwardingRule resource specifies which pool of # target virtual machines to forward a packet to if it matches the given [ - # IPAddress, IPProtocol, ports] tuple. + # IPAddress, IPProtocol, ports] tuple. (== resource_for beta.forwardingRules ==) + # (== resource_for v1.forwardingRules ==) (== resource_for beta. + # globalForwardingRules ==) (== resource_for v1.globalForwardingRules ==) (== + # resource_for beta.regionForwardingRules ==) (== resource_for v1. + # regionForwardingRules ==) class ForwardingRule include Google::Apis::Core::Hashable @@ -6210,9 +6243,8 @@ module Google class GuestOsFeature include Google::Apis::Core::Hashable - # The type of supported feature. Currently only VIRTIO_SCSI_MULTIQUEUE is - # supported. For newer Windows images, the server might also populate this - # property with the value WINDOWS to indicate that this is a Windows image. + # The ID of a supported feature. Read Enabling guest operating system features + # to see a list of available options. # Corresponds to the JSON property `type` # @return [String] attr_accessor :type @@ -8177,7 +8209,8 @@ module Google end end - # An Image resource. + # An Image resource. (== resource_for beta.images ==) (== resource_for v1.images + # ==) class Image include Google::Apis::Core::Hashable @@ -8215,14 +8248,9 @@ module Google # @return [String] 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_SCSI_MULTIQUEUE, - # which allows each virtual CPU to have its own queue. For Windows images, you - # 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_SCSI_MULTIQUEUE. - # For newer Windows images, the server might also populate this property with - # the value WINDOWS to indicate that this is a Windows image. + # A list of features to enable on the guest operating system. Applicable only + # for bootable images. Read Enabling guest operating system features to see a + # list of available options. # Corresponds to the JSON property `guestOsFeatures` # @return [Array] attr_accessor :guest_os_features @@ -8559,7 +8587,8 @@ module Google end end - # An Instance resource. + # An Instance resource. (== resource_for beta.instances ==) (== resource_for v1. + # instances ==) class Instance include Google::Apis::Core::Hashable @@ -8906,7 +8935,9 @@ module Google end end - # + # InstanceGroups (== resource_for beta.instanceGroups ==) (== resource_for v1. + # instanceGroups ==) (== resource_for beta.regionInstanceGroups ==) (== + # resource_for v1.regionInstanceGroups ==) class InstanceGroup include Google::Apis::Core::Hashable @@ -9247,7 +9278,10 @@ module Google end end - # An Instance Group Manager resource. + # An Instance Group Manager resource. (== resource_for beta. + # instanceGroupManagers ==) (== resource_for v1.instanceGroupManagers ==) (== + # resource_for beta.regionInstanceGroupManagers ==) (== resource_for v1. + # regionInstanceGroupManagers ==) class InstanceGroupManager include Google::Apis::Core::Hashable @@ -11153,7 +11187,8 @@ module Google end end - # An Instance Template resource. + # An Instance Template resource. (== resource_for beta.instanceTemplates ==) (== + # resource_for v1.instanceTemplates ==) class InstanceTemplate include Google::Apis::Core::Hashable @@ -11422,6 +11457,36 @@ module Google end end + # + class InstancesResumeRequest + include Google::Apis::Core::Hashable + + # Array of disks associated with this instance that are protected with a + # customer-supplied encryption key. + # In order to resume the instance, the disk url and its corresponding key must + # be provided. + # If the disk is not protected with a customer-supplied encryption key it should + # not be specified. + # Corresponds to the JSON property `disks` + # @return [Array] + attr_accessor :disks + + # Represents a customer-supplied encryption key + # Corresponds to the JSON property `instanceEncryptionKey` + # @return [Google::Apis::ComputeAlpha::CustomerEncryptionKey] + attr_accessor :instance_encryption_key + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @disks = args[:disks] if args.key?(:disks) + @instance_encryption_key = args[:instance_encryption_key] if args.key?(:instance_encryption_key) + end + end + # class InstancesScopedList include Google::Apis::Core::Hashable @@ -11657,7 +11722,8 @@ module Google # Represents an Interconnects resource. The Interconnects resource is a # dedicated connection between Google's network and your on-premises network. - # For more information, see the Dedicated overview page. + # For more information, see the Dedicated overview page. (== resource_for v1. + # interconnects ==) (== resource_for beta.interconnects ==) class Interconnect include Google::Apis::Core::Hashable @@ -11734,6 +11800,25 @@ module Google # @return [String] attr_accessor :kind + # A fingerprint for the labels being applied to this Interconnect, which is + # essentially a hash of the labels set used for optimistic locking. 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. + # To see the latest fingerprint, make a get() request to retrieve an + # Interconnect. + # Corresponds to the JSON property `labelFingerprint` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :label_fingerprint + + # Labels to apply to this Interconnect resource. These can be later modified by + # the setLabels method. Each label key/value must comply with RFC1035. Label + # values may be empty. + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + # Type of link requested. This field indicates speed of each of the links in the # bundle, not the entire bundle. Only 10G per link is allowed for a dedicated # interconnect. Options: Ethernet_10G_LR @@ -11794,6 +11879,12 @@ module Google # @return [String] attr_accessor :self_link + # [Output Only] The current state of whether or not this Interconnect is + # functional. + # Corresponds to the JSON property `state` + # @return [String] + attr_accessor :state + def initialize(**args) update!(**args) end @@ -11812,6 +11903,8 @@ module Google @interconnect_attachments = args[:interconnect_attachments] if args.key?(:interconnect_attachments) @interconnect_type = args[:interconnect_type] if args.key?(:interconnect_type) @kind = args[:kind] if args.key?(:kind) + @label_fingerprint = args[:label_fingerprint] if args.key?(:label_fingerprint) + @labels = args[:labels] if args.key?(:labels) @link_type = args[:link_type] if args.key?(:link_type) @location = args[:location] if args.key?(:location) @name = args[:name] if args.key?(:name) @@ -11821,11 +11914,13 @@ module Google @provisioned_link_count = args[:provisioned_link_count] if args.key?(:provisioned_link_count) @requested_link_count = args[:requested_link_count] if args.key?(:requested_link_count) @self_link = args[:self_link] if args.key?(:self_link) + @state = args[:state] if args.key?(:state) end end # Represents an InterconnectAttachment (VLAN attachment) resource. For more - # information, see Creating VLAN Attachments. + # information, see Creating VLAN Attachments. (== resource_for beta. + # interconnectAttachments ==) (== resource_for v1.interconnectAttachments ==) class InterconnectAttachment include Google::Apis::Core::Hashable @@ -11903,6 +11998,25 @@ module Google # @return [String] attr_accessor :kind + # A fingerprint for the labels being applied to this InterconnectAttachment, + # which is essentially a hash of the labels set used for optimistic locking. 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. + # To see the latest fingerprint, make a get() request to retrieve an + # InterconnectAttachment. + # Corresponds to the JSON property `labelFingerprint` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :label_fingerprint + + # Labels to apply to this InterconnectAttachment resource. These can be later + # modified by the setLabels method. Each label key/value must comply with + # RFC1035. Label values may be empty. + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + # Name of the resource. Provided by the client when the resource is created. The # name must be 1-63 characters long, and comply with RFC1035. Specifically, the # name must be 1-63 characters long and match the regular expression [a-z]([-a- @@ -11926,6 +12040,21 @@ module Google # @return [String] attr_accessor :pairing_key + # [Output only for PARTNER. Input for PARTNER_PROVIDER. Not present for + # DEDICATED] BGP ASN of the Partner. A layer 3 Partner should supply this if + # they configured BGP on behalf of the customer. + # Corresponds to the JSON property `partnerAsn` + # @return [Fixnum] + attr_accessor :partner_asn + + # Informational metadata about Partner attachments from Partners to display to + # customers. These fields are propagated from PARTNER_PROVIDER attachments to + # their corresponding PARTNER attachments. Only mutable for PARTNER_PROVIDER + # type, output-only for PARTNER, not available for DEDICATED. + # Corresponds to the JSON property `partnerMetadata` + # @return [Google::Apis::ComputeAlpha::InterconnectAttachmentPartnerMetadata] + attr_accessor :partner_metadata + # Information for an interconnect attachment when this belongs to an # interconnect of type DEDICATED. # Corresponds to the JSON property `privateInterconnectInfo` @@ -11962,9 +12091,9 @@ module Google # @return [String] attr_accessor :type - # Available only for DEDICATED and PARTNER_PROVIDER New field: VLAN. Only - # specified at creation time. This field is mapped to ieee_802_1q_tag in the - # resource proto. + # Available only for DEDICATED and PARTNER_PROVIDER. Desired VLAN tag for this + # attachment, in the range 2-4094. This field refers to 802.1q VLAN tag, also + # known as IEEE 802.1Q Only specified at creation time. # Corresponds to the JSON property `vlanTag8021q` # @return [Fixnum] attr_accessor :vlan_tag8021q @@ -11987,9 +12116,13 @@ module Google @id = args[:id] if args.key?(:id) @interconnect = args[:interconnect] if args.key?(:interconnect) @kind = args[:kind] if args.key?(:kind) + @label_fingerprint = args[:label_fingerprint] if args.key?(:label_fingerprint) + @labels = args[:labels] if args.key?(:labels) @name = args[:name] if args.key?(:name) @operational_status = args[:operational_status] if args.key?(:operational_status) @pairing_key = args[:pairing_key] if args.key?(:pairing_key) + @partner_asn = args[:partner_asn] if args.key?(:partner_asn) + @partner_metadata = args[:partner_metadata] if args.key?(:partner_metadata) @private_interconnect_info = args[:private_interconnect_info] if args.key?(:private_interconnect_info) @region = args[:region] if args.key?(:region) @router = args[:router] if args.key?(:router) @@ -12237,6 +12370,45 @@ module Google end end + # Informational metadata about Partner attachments from Partners to display to + # customers. These fields are propagated from PARTNER_PROVIDER attachments to + # their corresponding PARTNER attachments. Only mutable for PARTNER_PROVIDER + # type, output-only for PARTNER, not available for DEDICATED. + class InterconnectAttachmentPartnerMetadata + include Google::Apis::Core::Hashable + + # Plain text name of the Interconnect this attachment is connected to, as + # displayed in the Partner?s portal. For instance ?Chicago 1?. This value may be + # validated to match approved Partner values. + # Corresponds to the JSON property `interconnectName` + # @return [String] + attr_accessor :interconnect_name + + # Plain text name of the Partner providing this attachment. This value may be + # validated to match approved Partner values. + # Corresponds to the JSON property `partnerName` + # @return [String] + attr_accessor :partner_name + + # URL of the Partner?s portal for this Attachment. Partners may customise this + # to be a deep-link to the specific resource on the Partner portal. This value + # may be validated to match approved Partner values. + # Corresponds to the JSON property `portalUrl` + # @return [String] + attr_accessor :portal_url + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @interconnect_name = args[:interconnect_name] if args.key?(:interconnect_name) + @partner_name = args[:partner_name] if args.key?(:partner_name) + @portal_url = args[:portal_url] if args.key?(:portal_url) + end + end + # Information for an interconnect attachment when this belongs to an # interconnect of type DEDICATED. class InterconnectAttachmentPrivateInfo @@ -13421,7 +13593,8 @@ module Google end end - # A Machine Type resource. + # A Machine Type resource. (== resource_for v1.machineTypes ==) (== resource_for + # beta.machineTypes ==) class MachineType include Google::Apis::Core::Hashable @@ -14614,7 +14787,8 @@ module Google end # Represents a Network resource. Read Networks and Firewalls for more - # information. + # information. (== resource_for v1.networks ==) (== resource_for beta.networks == + # ) class Network include Google::Apis::Core::Hashable @@ -15763,7 +15937,11 @@ module Google end end - # An Operation resource, used to manage asynchronous API requests. + # An Operation resource, used to manage asynchronous API requests. (== + # resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) + # (== resource_for v1.regionOperations ==) (== resource_for beta. + # regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for + # beta.zoneOperations ==) class Operation include Google::Apis::Core::Hashable @@ -16562,7 +16740,8 @@ module Google end # A Project resource. Projects can only be created in the Google Cloud Platform - # Console. Unless marked otherwise, values can only be modified in the console. + # Console. Unless marked otherwise, values can only be modified in the console. ( + # == resource_for v1.projects ==) (== resource_for beta.projects ==) class Project include Google::Apis::Core::Hashable @@ -16864,7 +17043,8 @@ module Google end end - # Region resource. + # Region resource. (== resource_for beta.regions ==) (== resource_for v1.regions + # ==) class Region include Google::Apis::Core::Hashable @@ -18144,7 +18324,7 @@ module Google # either to another instance destination, an instance gateway, or a Google # Compute Engine-operated gateway. # Packets that do not match any route in the sending instance's routing table - # are dropped. + # are dropped. (== resource_for beta.routes ==) (== resource_for v1.routes ==) class Route include Google::Apis::Core::Hashable @@ -19898,11 +20078,6 @@ module Google # @return [Array] attr_accessor :src_ip_ranges - # Match by country or region code. - # Corresponds to the JSON property `srcRegionCodes` - # @return [Array] - attr_accessor :src_region_codes - # Preconfigured versioned expression. If this field is specified, config must # also be specified. Available preconfigured expressions along with their # requirements are: SRC_IPS_V1 - must specify the corresponding src_ip_range @@ -19920,7 +20095,6 @@ module Google @config = args[:config] if args.key?(:config) @expr = args[:expr] if args.key?(:expr) @src_ip_ranges = args[:src_ip_ranges] if args.key?(:src_ip_ranges) - @src_region_codes = args[:src_region_codes] if args.key?(:src_region_codes) @versioned_expr = args[:versioned_expr] if args.key?(:versioned_expr) end end @@ -20074,7 +20248,8 @@ module Google end end - # A persistent disk snapshot resource. + # A persistent disk snapshot resource. (== resource_for beta.snapshots ==) (== + # resource_for v1.snapshots ==) class Snapshot include Google::Apis::Core::Hashable @@ -20192,6 +20367,11 @@ module Google # @return [String] attr_accessor :storage_bytes_status + # GCS bucket storage location of the snapshot (regional or multi-regional). + # Corresponds to the JSON property `storageLocations` + # @return [Array] + attr_accessor :storage_locations + def initialize(**args) update!(**args) end @@ -20216,6 +20396,7 @@ module Google @status = args[:status] if args.key?(:status) @storage_bytes = args[:storage_bytes] if args.key?(:storage_bytes) @storage_bytes_status = args[:storage_bytes_status] if args.key?(:storage_bytes_status) + @storage_locations = args[:storage_locations] if args.key?(:storage_locations) end end @@ -20361,7 +20542,8 @@ module Google # An SslCertificate resource. This resource provides a mechanism to upload an # SSL key and certificate to the load balancer to serve secure connections from - # the user. + # the user. (== resource_for beta.sslCertificates ==) (== resource_for v1. + # sslCertificates ==) class SslCertificate include Google::Apis::Core::Hashable @@ -20935,7 +21117,8 @@ module Google end end - # A Subnetwork resource. + # A Subnetwork resource. (== resource_for beta.subnetworks ==) (== resource_for + # v1.subnetworks ==) class Subnetwork include Google::Apis::Core::Hashable @@ -21571,7 +21754,9 @@ module Google end end - # A TargetHttpProxy resource. This resource defines an HTTP proxy. + # A TargetHttpProxy resource. This resource defines an HTTP proxy. (== + # resource_for beta.targetHttpProxies ==) (== resource_for v1.targetHttpProxies = + # =) class TargetHttpProxy include Google::Apis::Core::Hashable @@ -21792,7 +21977,9 @@ module Google end end - # A TargetHttpsProxy resource. This resource defines an HTTPS proxy. + # A TargetHttpsProxy resource. This resource defines an HTTPS proxy. (== + # resource_for beta.targetHttpsProxies ==) (== resource_for v1. + # targetHttpsProxies ==) class TargetHttpsProxy include Google::Apis::Core::Hashable @@ -22014,7 +22201,8 @@ module Google end # A TargetInstance resource. This resource defines an endpoint instance that - # terminates traffic of certain protocols. + # terminates traffic of certain protocols. (== resource_for beta.targetInstances + # ==) (== resource_for v1.targetInstances ==) class TargetInstance include Google::Apis::Core::Hashable @@ -22423,7 +22611,8 @@ module Google end # A TargetPool resource. This resource defines a pool of instances, an - # associated HttpHealthCheck resource, and the fallback target pool. + # associated HttpHealthCheck resource, and the fallback target pool. (== + # resource_for beta.targetPools ==) (== resource_for v1.targetPools ==) class TargetPool include Google::Apis::Core::Hashable @@ -23062,7 +23251,8 @@ module Google end end - # A TargetSslProxy resource. This resource defines an SSL proxy. + # A TargetSslProxy resource. This resource defines an SSL proxy. (== + # resource_for beta.targetSslProxies ==) (== resource_for v1.targetSslProxies ==) class TargetSslProxy include Google::Apis::Core::Hashable @@ -23310,7 +23500,8 @@ module Google end end - # A TargetTcpProxy resource. This resource defines a TCP proxy. + # A TargetTcpProxy resource. This resource defines a TCP proxy. (== resource_for + # beta.targetTcpProxies ==) (== resource_for v1.targetTcpProxies ==) class TargetTcpProxy include Google::Apis::Core::Hashable @@ -23497,7 +23688,8 @@ module Google end end - # Represents a Target VPN gateway resource. + # Represents a Target VPN gateway resource. (== resource_for beta. + # targetVpnGateways ==) (== resource_for v1.targetVpnGateways ==) class TargetVpnGateway include Google::Apis::Core::Hashable @@ -24605,7 +24797,8 @@ module Google end end - # + # VPN tunnel resource. (== resource_for beta.vpnTunnels ==) (== resource_for v1. + # vpnTunnels ==) class VpnTunnel include Google::Apis::Core::Hashable @@ -25223,7 +25416,7 @@ module Google end end - # A Zone resource. + # A Zone resource. (== resource_for beta.zones ==) (== resource_for v1.zones ==) class Zone include Google::Apis::Core::Hashable diff --git a/generated/google/apis/compute_alpha/representations.rb b/generated/google/apis/compute_alpha/representations.rb index 43e7cd944..9e288cc24 100644 --- a/generated/google/apis/compute_alpha/representations.rb +++ b/generated/google/apis/compute_alpha/representations.rb @@ -1498,6 +1498,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class InstancesResumeRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class InstancesScopedList class Representation < Google::Apis::Core::JsonRepresentation; end @@ -1600,6 +1606,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class InterconnectAttachmentPartnerMetadata + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class InterconnectAttachmentPrivateInfo class Representation < Google::Apis::Core::JsonRepresentation; end @@ -3830,6 +3842,8 @@ module Google property :disk_encryption_key, as: 'diskEncryptionKey', class: Google::Apis::ComputeAlpha::CustomerEncryptionKey, decorator: Google::Apis::ComputeAlpha::CustomerEncryptionKey::Representation property :disk_size_gb, :numeric_string => true, as: 'diskSizeGb' + collection :guest_os_features, as: 'guestOsFeatures', class: Google::Apis::ComputeAlpha::GuestOsFeature, decorator: Google::Apis::ComputeAlpha::GuestOsFeature::Representation + property :index, as: 'index' property :initialize_params, as: 'initializeParams', class: Google::Apis::ComputeAlpha::AttachedDiskInitializeParams, decorator: Google::Apis::ComputeAlpha::AttachedDiskInitializeParams::Representation @@ -3837,6 +3851,7 @@ module Google property :kind, as: 'kind' collection :licenses, as: 'licenses' property :mode, as: 'mode' + property :saved_state, as: 'savedState' property :source, as: 'source' property :type, as: 'type' end @@ -3890,6 +3905,7 @@ module Google property :id, :numeric_string => true, as: 'id' property :kind, as: 'kind' property :name, as: 'name' + property :recommended_size, as: 'recommendedSize' property :region, as: 'region' property :self_link, as: 'selfLink' property :status, as: 'status' @@ -6356,6 +6372,16 @@ module Google end end + class InstancesResumeRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :disks, as: 'disks', class: Google::Apis::ComputeAlpha::CustomerEncryptionKeyProtectedDisk, decorator: Google::Apis::ComputeAlpha::CustomerEncryptionKeyProtectedDisk::Representation + + property :instance_encryption_key, as: 'instanceEncryptionKey', class: Google::Apis::ComputeAlpha::CustomerEncryptionKey, decorator: Google::Apis::ComputeAlpha::CustomerEncryptionKey::Representation + + end + end + class InstancesScopedList # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -6449,6 +6475,8 @@ module Google collection :interconnect_attachments, as: 'interconnectAttachments' property :interconnect_type, as: 'interconnectType' property :kind, as: 'kind' + property :label_fingerprint, :base64 => true, as: 'labelFingerprint' + hash :labels, as: 'labels' property :link_type, as: 'linkType' property :location, as: 'location' property :name, as: 'name' @@ -6458,6 +6486,7 @@ module Google property :provisioned_link_count, as: 'provisionedLinkCount' property :requested_link_count, as: 'requestedLinkCount' property :self_link, as: 'selfLink' + property :state, as: 'state' end end @@ -6476,9 +6505,14 @@ module Google property :id, :numeric_string => true, as: 'id' property :interconnect, as: 'interconnect' property :kind, as: 'kind' + property :label_fingerprint, :base64 => true, as: 'labelFingerprint' + hash :labels, as: 'labels' property :name, as: 'name' property :operational_status, as: 'operationalStatus' property :pairing_key, as: 'pairingKey' + property :partner_asn, :numeric_string => true, as: 'partnerAsn' + property :partner_metadata, as: 'partnerMetadata', class: Google::Apis::ComputeAlpha::InterconnectAttachmentPartnerMetadata, decorator: Google::Apis::ComputeAlpha::InterconnectAttachmentPartnerMetadata::Representation + property :private_interconnect_info, as: 'privateInterconnectInfo', class: Google::Apis::ComputeAlpha::InterconnectAttachmentPrivateInfo, decorator: Google::Apis::ComputeAlpha::InterconnectAttachmentPrivateInfo::Representation property :region, as: 'region' @@ -6554,6 +6588,15 @@ module Google end end + class InterconnectAttachmentPartnerMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :interconnect_name, as: 'interconnectName' + property :partner_name, as: 'partnerName' + property :portal_url, as: 'portalUrl' + end + end + class InterconnectAttachmentPrivateInfo # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -8574,7 +8617,6 @@ module Google property :expr, as: 'expr', class: Google::Apis::ComputeAlpha::Expr, decorator: Google::Apis::ComputeAlpha::Expr::Representation collection :src_ip_ranges, as: 'srcIpRanges' - collection :src_region_codes, as: 'srcRegionCodes' property :versioned_expr, as: 'versionedExpr' end end @@ -8644,6 +8686,7 @@ module Google property :status, as: 'status' property :storage_bytes, :numeric_string => true, as: 'storageBytes' property :storage_bytes_status, as: 'storageBytesStatus' + collection :storage_locations, as: 'storageLocations' end end diff --git a/generated/google/apis/compute_alpha/service.rb b/generated/google/apis/compute_alpha/service.rb index 8e600e2d5..5cfb6871e 100644 --- a/generated/google/apis/compute_alpha/service.rb +++ b/generated/google/apis/compute_alpha/service.rb @@ -2974,7 +2974,8 @@ module Google execute_or_queue_command(command, &block) end - # Resizes the specified persistent disk. + # Resizes the specified persistent disk. You can only increase the size of the + # disk. # @param [String] project # Project ID for this request. # @param [String] zone @@ -10292,6 +10293,62 @@ module Google execute_or_queue_command(command, &block) end + # Resumes an instance that was suspended using the instances().suspend method. + # @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 resource to resume. + # @param [Google::Apis::ComputeAlpha::InstancesResumeRequest] instances_resume_request_object + # @param [String] request_id + # An optional request ID to identify requests. Specify a unique request ID so + # that if you must retry your request, the server will know to ignore the + # request if it has already been completed. + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request ID, the + # server can check if original operation with the same request ID was received, + # and if so, will ignore the second request. This prevents clients from + # accidentally creating duplicate commitments. + # The request ID must be a valid UUID with the exception that zero UUID is not + # supported (00000000-0000-0000-0000-000000000000). + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available 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::ComputeAlpha::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ComputeAlpha::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 resume_instance(project, zone, instance, instances_resume_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}/resume', options) + command.request_representation = Google::Apis::ComputeAlpha::InstancesResumeRequest::Representation + command.request_object = instances_resume_request_object + command.response_representation = Google::Apis::ComputeAlpha::Operation::Representation + command.response_class = Google::Apis::ComputeAlpha::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 deletion protection on the instance. # @param [String] project # Project ID for this request. @@ -11748,6 +11805,64 @@ module Google execute_or_queue_command(command, &block) end + # Updates the specified interconnect attachment with the data included in the + # request. This method supports PATCH semantics and uses the JSON merge patch + # format and processing rules. + # @param [String] project + # Project ID for this request. + # @param [String] region + # Name of the region scoping this request. + # @param [String] interconnect_attachment + # Name of the interconnect attachment to patch. + # @param [Google::Apis::ComputeAlpha::InterconnectAttachment] interconnect_attachment_object + # @param [String] request_id + # An optional request ID to identify requests. Specify a unique request ID so + # that if you must retry your request, the server will know to ignore the + # request if it has already been completed. + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request ID, the + # server can check if original operation with the same request ID was received, + # and if so, will ignore the second request. This prevents clients from + # accidentally creating duplicate commitments. + # The request ID must be a valid UUID with the exception that zero UUID is not + # supported (00000000-0000-0000-0000-000000000000). + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available 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::ComputeAlpha::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ComputeAlpha::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_interconnect_attachment(project, region, interconnect_attachment, interconnect_attachment_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:patch, '{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}', options) + command.request_representation = Google::Apis::ComputeAlpha::InterconnectAttachment::Representation + command.request_object = interconnect_attachment_object + command.response_representation = Google::Apis::ComputeAlpha::Operation::Representation + command.response_class = Google::Apis::ComputeAlpha::Operation + command.params['project'] = project unless project.nil? + command.params['region'] = region unless region.nil? + command.params['interconnectAttachment'] = interconnect_attachment unless interconnect_attachment.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 the access control policy on the specified resource. Replaces any # existing policy. # @param [String] project @@ -11793,6 +11908,63 @@ module Google execute_or_queue_command(command, &block) end + # Sets the labels on an InterconnectAttachment. To learn more about labels, read + # the Labeling Resources documentation. + # @param [String] project + # Project ID for this request. + # @param [String] region + # The region for this request. + # @param [String] resource + # Name of the resource for this request. + # @param [Google::Apis::ComputeAlpha::RegionSetLabelsRequest] region_set_labels_request_object + # @param [String] request_id + # An optional request ID to identify requests. Specify a unique request ID so + # that if you must retry your request, the server will know to ignore the + # request if it has already been completed. + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request ID, the + # server can check if original operation with the same request ID was received, + # and if so, will ignore the second request. This prevents clients from + # accidentally creating duplicate commitments. + # The request ID must be a valid UUID with the exception that zero UUID is not + # supported (00000000-0000-0000-0000-000000000000). + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available 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::ComputeAlpha::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ComputeAlpha::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_interconnect_attachment_labels(project, region, resource, region_set_labels_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, '{project}/regions/{region}/interconnectAttachments/{resource}/setLabels', options) + command.request_representation = Google::Apis::ComputeAlpha::RegionSetLabelsRequest::Representation + command.request_object = region_set_labels_request_object + command.response_representation = Google::Apis::ComputeAlpha::Operation::Representation + command.response_class = Google::Apis::ComputeAlpha::Operation + command.params['project'] = project unless project.nil? + command.params['region'] = region unless region.nil? + command.params['resource'] = resource unless resource.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 + # Returns permissions that a caller has on the specified resource. # @param [String] project # Project ID for this request. @@ -12346,6 +12518,48 @@ module Google execute_or_queue_command(command, &block) end + # Sets the labels on an Interconnect. To learn more about labels, read the + # Labeling Resources documentation. + # @param [String] project + # Project ID for this request. + # @param [String] resource + # Name of the resource for this request. + # @param [Google::Apis::ComputeAlpha::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::ComputeAlpha::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ComputeAlpha::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_interconnect_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/interconnects/{resource}/setLabels', options) + command.request_representation = Google::Apis::ComputeAlpha::GlobalSetLabelsRequest::Representation + command.request_object = global_set_labels_request_object + command.response_representation = Google::Apis::ComputeAlpha::Operation::Representation + command.response_class = Google::Apis::ComputeAlpha::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 + # Returns permissions that a caller has on the specified resource. # @param [String] project # Project ID for this request. @@ -14442,7 +14656,8 @@ module Google execute_or_queue_command(command, &block) end - # Patches the specified network with the data included in the request. + # Patches the specified network with the data included in the request. Only the + # following fields can be modified: routingConfig.routingMode. # @param [String] project # Project ID for this request. # @param [String] network diff --git a/generated/google/apis/compute_beta.rb b/generated/google/apis/compute_beta.rb index 296acaabc..5a44f4498 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 = '20171127' + REVISION = '20171207' # 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 b923dd60d..266e26097 100644 --- a/generated/google/apis/compute_beta/classes.rb +++ b/generated/google/apis/compute_beta/classes.rb @@ -49,7 +49,8 @@ module Google end end - # An Accelerator Type resource. + # An Accelerator Type resource. (== resource_for beta.acceleratorTypes ==) (== + # resource_for v1.acceleratorTypes ==) class AcceleratorType include Google::Apis::Core::Hashable @@ -506,7 +507,9 @@ module Google end end - # A reserved address resource. + # A reserved address resource. (== resource_for beta.addresses ==) (== + # resource_for v1.addresses ==) (== resource_for beta.globalAddresses ==) (== + # resource_for v1.globalAddresses ==) class Address include Google::Apis::Core::Hashable @@ -597,9 +600,9 @@ module Google # @return [String] attr_accessor :status - # For external addresses, this field should not be used. # The URL of the subnetwork in which to reserve the address. If an IP address is - # specified, it must be within the subnetwork's IP range. + # specified, it must be within the subnetwork's IP range. This field can only be + # used with INTERNAL type with GCE_ENDPOINT/DNS_RESOLVER purposes. # Corresponds to the JSON property `subnetwork` # @return [String] attr_accessor :subnetwork @@ -1286,7 +1289,9 @@ module Google # Represents an Autoscaler resource. Autoscalers allow you to automatically # scale virtual machine instances in managed instance groups according to an # autoscaling policy that you define. For more information, read Autoscaling - # Groups of Instances. + # Groups of Instances. (== resource_for beta.autoscalers ==) (== resource_for v1. + # autoscalers ==) (== resource_for beta.regionAutoscalers ==) (== resource_for + # v1.regionAutoscalers ==) class Autoscaler include Google::Apis::Core::Hashable @@ -2038,6 +2043,11 @@ module Google # @return [String] attr_accessor :bucket_name + # Message containing Cloud CDN configuration for a backend bucket. + # Corresponds to the JSON property `cdnPolicy` + # @return [Google::Apis::ComputeBeta::BackendBucketCdnPolicy] + attr_accessor :cdn_policy + # [Output Only] Creation timestamp in RFC3339 text format. # Corresponds to the JSON property `creationTimestamp` # @return [String] @@ -2087,6 +2097,7 @@ module Google # Update properties of this object def update!(**args) @bucket_name = args[:bucket_name] if args.key?(:bucket_name) + @cdn_policy = args[:cdn_policy] if args.key?(:cdn_policy) @creation_timestamp = args[:creation_timestamp] if args.key?(:creation_timestamp) @description = args[:description] if args.key?(:description) @enable_cdn = args[:enable_cdn] if args.key?(:enable_cdn) @@ -2097,6 +2108,37 @@ module Google end end + # Message containing Cloud CDN configuration for a backend bucket. + class BackendBucketCdnPolicy + include Google::Apis::Core::Hashable + + # Number of seconds up to which the response to a signed URL request will be + # cached in the CDN. After this time period, the Signed URL will be revalidated + # before being served. Defaults to 1hr (3600s). If this field is set, Cloud CDN + # will internally act as though all responses from this bucket had a ?Cache- + # Control: public, max-age=[TTL]? header, regardless of any existing Cache- + # Control header. The actual headers served in responses will not be altered. + # Corresponds to the JSON property `signedUrlCacheMaxAgeSec` + # @return [Fixnum] + attr_accessor :signed_url_cache_max_age_sec + + # [Output Only] Names of the keys currently configured for Cloud CDN Signed URL + # on this backend bucket. + # Corresponds to the JSON property `signedUrlKeyNames` + # @return [Array] + attr_accessor :signed_url_key_names + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @signed_url_cache_max_age_sec = args[:signed_url_cache_max_age_sec] if args.key?(:signed_url_cache_max_age_sec) + @signed_url_key_names = args[:signed_url_key_names] if args.key?(:signed_url_key_names) + end + end + # Contains a list of BackendBucket resources. class BackendBucketList include Google::Apis::Core::Hashable @@ -2215,7 +2257,8 @@ module Google end # A BackendService resource. This resource defines a group of backend virtual - # machines and their serving capacity. + # machines and their serving capacity. (== resource_for v1.backendService ==) (== + # resource_for beta.backendService ==) class BackendService include Google::Apis::Core::Hashable @@ -2528,6 +2571,22 @@ module Google # @return [Google::Apis::ComputeBeta::CacheKeyPolicy] attr_accessor :cache_key_policy + # Number of seconds up to which the response to a signed URL request will be + # cached in the CDN. After this time period, the Signed URL will be revalidated + # before being served. Defaults to 1hr (3600s). If this field is set, Cloud CDN + # will internally act as though all responses from this backend had a ?Cache- + # Control: public, max-age=[TTL]? header, regardless of any existing Cache- + # Control header. The actual headers served in responses will not be altered. + # Corresponds to the JSON property `signedUrlCacheMaxAgeSec` + # @return [Fixnum] + attr_accessor :signed_url_cache_max_age_sec + + # [Output Only] Names of the keys currently configured for Cloud CDN Signed URL + # on this backend service. + # Corresponds to the JSON property `signedUrlKeyNames` + # @return [Array] + attr_accessor :signed_url_key_names + def initialize(**args) update!(**args) end @@ -2535,6 +2594,8 @@ module Google # Update properties of this object def update!(**args) @cache_key_policy = args[:cache_key_policy] if args.key?(:cache_key_policy) + @signed_url_cache_max_age_sec = args[:signed_url_cache_max_age_sec] if args.key?(:signed_url_cache_max_age_sec) + @signed_url_key_names = args[:signed_url_key_names] if args.key?(:signed_url_key_names) end end @@ -2948,7 +3009,8 @@ module Google # Committed use discounts are subject to Google Cloud Platform's Service # Specific Terms. By purchasing a committed use discount, you agree to these # terms. Committed use discounts will not renew, so you must purchase a new - # commitment to continue receiving discounts. + # commitment to continue receiving discounts. (== resource_for beta.commitments = + # =) (== resource_for v1.commitments ==) class Commitment include Google::Apis::Core::Hashable @@ -3569,7 +3631,7 @@ module Google end end - # A Disk resource. + # A Disk resource. (== resource_for beta.disks ==) (== resource_for v1.disks ==) class Disk include Google::Apis::Core::Hashable @@ -3905,6 +3967,47 @@ module Google end end + # A specification of the desired way to instantiate a disk in the instance + # template when its created from a source instance. + class DiskInstantiationConfig + include Google::Apis::Core::Hashable + + # Specifies whether the disk will be auto-deleted when the instance is deleted ( + # but not when the disk is detached from the instance). + # Corresponds to the JSON property `autoDelete` + # @return [Boolean] + attr_accessor :auto_delete + alias_method :auto_delete?, :auto_delete + + # Specifies the device name of the disk to which the configurations apply to. + # Corresponds to the JSON property `deviceName` + # @return [String] + attr_accessor :device_name + + # Specifies whether to include the disk and what image to use. + # Corresponds to the JSON property `instantiateFrom` + # @return [String] + attr_accessor :instantiate_from + + # The custom source image to be used to restore this disk when instantiating + # this instance template. + # Corresponds to the JSON property `sourceImage` + # @return [String] + attr_accessor :source_image + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @auto_delete = args[:auto_delete] if args.key?(:auto_delete) + @device_name = args[:device_name] if args.key?(:device_name) + @instantiate_from = args[:instantiate_from] if args.key?(:instantiate_from) + @source_image = args[:source_image] if args.key?(:source_image) + end + end + # A list of Disk resources. class DiskList include Google::Apis::Core::Hashable @@ -4055,7 +4158,8 @@ module Google end end - # A DiskType resource. + # A DiskType resource. (== resource_for beta.diskTypes ==) (== resource_for v1. + # diskTypes ==) class DiskType include Google::Apis::Core::Hashable @@ -5042,7 +5146,11 @@ module Google # A ForwardingRule resource. A ForwardingRule resource specifies which pool of # target virtual machines to forward a packet to if it matches the given [ - # IPAddress, IPProtocol, ports] tuple. + # IPAddress, IPProtocol, ports] tuple. (== resource_for beta.forwardingRules ==) + # (== resource_for v1.forwardingRules ==) (== resource_for beta. + # globalForwardingRules ==) (== resource_for v1.globalForwardingRules ==) (== + # resource_for beta.regionForwardingRules ==) (== resource_for v1. + # regionForwardingRules ==) class ForwardingRule include Google::Apis::Core::Hashable @@ -5637,9 +5745,8 @@ module Google class GuestOsFeature include Google::Apis::Core::Hashable - # The type of supported feature. Currently only VIRTIO_SCSI_MULTIQUEUE is - # supported. For newer Windows images, the server might also populate this - # property with the value WINDOWS to indicate that this is a Windows image. + # The ID of a supported feature. Read Enabling guest operating system features + # to see a list of available options. # Corresponds to the JSON property `type` # @return [String] attr_accessor :type @@ -6550,7 +6657,8 @@ module Google end end - # An Image resource. + # An Image resource. (== resource_for beta.images ==) (== resource_for v1.images + # ==) class Image include Google::Apis::Core::Hashable @@ -6588,14 +6696,9 @@ module Google # @return [String] 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_SCSI_MULTIQUEUE, - # which allows each virtual CPU to have its own queue. For Windows images, you - # 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_SCSI_MULTIQUEUE. - # For newer Windows images, the server might also populate this property with - # the value WINDOWS to indicate that this is a Windows image. + # A list of features to enable on the guest operating system. Applicable only + # for bootable images. Read Enabling guest operating system features to see a + # list of available options. # Corresponds to the JSON property `guestOsFeatures` # @return [Array] attr_accessor :guest_os_features @@ -6907,7 +7010,8 @@ module Google end end - # An Instance resource. + # An Instance resource. (== resource_for beta.instances ==) (== resource_for v1. + # instances ==) class Instance include Google::Apis::Core::Hashable @@ -7225,7 +7329,9 @@ module Google end end - # + # InstanceGroups (== resource_for beta.instanceGroups ==) (== resource_for v1. + # instanceGroups ==) (== resource_for beta.regionInstanceGroups ==) (== + # resource_for v1.regionInstanceGroups ==) class InstanceGroup include Google::Apis::Core::Hashable @@ -7566,7 +7672,10 @@ module Google end end - # An Instance Group Manager resource. + # An Instance Group Manager resource. (== resource_for beta. + # instanceGroupManagers ==) (== resource_for v1.instanceGroupManagers ==) (== + # resource_for beta.regionInstanceGroupManagers ==) (== resource_for v1. + # regionInstanceGroupManagers ==) class InstanceGroupManager include Google::Apis::Core::Hashable @@ -9213,7 +9322,8 @@ module Google end end - # An Instance Template resource. + # An Instance Template resource. (== resource_for beta.instanceTemplates ==) (== + # resource_for v1.instanceTemplates ==) class InstanceTemplate include Google::Apis::Core::Hashable @@ -9261,6 +9371,22 @@ module Google # @return [String] attr_accessor :self_link + # The source instance used to create the template. You can provide this as a + # partial or full URL to the resource. For example, the following are valid + # values: + # - https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/ + # instance + # - projects/project/zones/zone/instances/instance + # Corresponds to the JSON property `sourceInstance` + # @return [String] + attr_accessor :source_instance + + # A specification of the parameters to use when creating the instance template + # from a source instance. + # Corresponds to the JSON property `sourceInstanceParams` + # @return [Google::Apis::ComputeBeta::SourceInstanceParams] + attr_accessor :source_instance_params + def initialize(**args) update!(**args) end @@ -9274,6 +9400,8 @@ module Google @name = args[:name] if args.key?(:name) @properties = args[:properties] if args.key?(:properties) @self_link = args[:self_link] if args.key?(:self_link) + @source_instance = args[:source_instance] if args.key?(:source_instance) + @source_instance_params = args[:source_instance_params] if args.key?(:source_instance_params) end end @@ -9655,7 +9783,8 @@ module Google # Represents an Interconnects resource. The Interconnects resource is a # dedicated connection between Google's network and your on-premises network. - # For more information, see the Dedicated overview page. + # For more information, see the Dedicated overview page. (== resource_for v1. + # interconnects ==) (== resource_for beta.interconnects ==) class Interconnect include Google::Apis::Core::Hashable @@ -9823,7 +9952,8 @@ module Google end # Represents an InterconnectAttachment (VLAN attachment) resource. For more - # information, see Creating VLAN Attachments. + # information, see Creating VLAN Attachments. (== resource_for beta. + # interconnectAttachments ==) (== resource_for v1.interconnectAttachments ==) class InterconnectAttachment include Google::Apis::Core::Hashable @@ -11208,7 +11338,8 @@ module Google end end - # A Machine Type resource. + # A Machine Type resource. (== resource_for v1.machineTypes ==) (== resource_for + # beta.machineTypes ==) class MachineType include Google::Apis::Core::Hashable @@ -11895,7 +12026,8 @@ module Google end # Represents a Network resource. Read Networks and Firewalls for more - # information. + # information. (== resource_for v1.networks ==) (== resource_for beta.networks == + # ) class Network include Google::Apis::Core::Hashable @@ -12341,7 +12473,11 @@ module Google end end - # An Operation resource, used to manage asynchronous API requests. + # An Operation resource, used to manage asynchronous API requests. (== + # resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) + # (== resource_for v1.regionOperations ==) (== resource_for beta. + # regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for + # beta.zoneOperations ==) class Operation include Google::Apis::Core::Hashable @@ -13114,7 +13250,8 @@ module Google end # A Project resource. Projects can only be created in the Google Cloud Platform - # Console. Unless marked otherwise, values can only be modified in the console. + # Console. Unless marked otherwise, values can only be modified in the console. ( + # == resource_for v1.projects ==) (== resource_for beta.projects ==) class Project include Google::Apis::Core::Hashable @@ -13370,7 +13507,8 @@ module Google end end - # Region resource. + # Region resource. (== resource_for beta.regions ==) (== resource_for v1.regions + # ==) class Region include Google::Apis::Core::Hashable @@ -14341,7 +14479,7 @@ module Google # either to another instance destination, an instance gateway, or a Google # Compute Engine-operated gateway. # Packets that do not match any route in the sending instance's routing table - # are dropped. + # are dropped. (== resource_for beta.routes ==) (== resource_for v1.routes ==) class Route include Google::Apis::Core::Hashable @@ -14744,6 +14882,31 @@ module Google end end + # Description-tagged IP ranges for the router to advertise. + class RouterAdvertisedIpRange + include Google::Apis::Core::Hashable + + # User-specified description for the IP range. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # The IP range to advertise. The value must be a CIDR-formatted string. + # Corresponds to the JSON property `range` + # @return [String] + attr_accessor :range + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @description = args[:description] if args.key?(:description) + @range = args[:range] if args.key?(:range) + end + end + # Contains a list of routers. class RouterAggregatedList include Google::Apis::Core::Hashable @@ -14865,6 +15028,27 @@ module Google class RouterBgp include Google::Apis::Core::Hashable + # User-specified flag to indicate which mode to use for advertisement. + # Corresponds to the JSON property `advertiseMode` + # @return [String] + attr_accessor :advertise_mode + + # User-specified list of prefix groups to advertise in custom mode. This field + # can only be populated if advertise_mode is CUSTOM and is advertised to all + # peers of the router. These groups will be advertised in addition to any + # specified prefixes. Leave this field blank to advertise no custom groups. + # Corresponds to the JSON property `advertisedGroups` + # @return [Array] + attr_accessor :advertised_groups + + # User-specified list of individual IP ranges to advertise in custom mode. This + # field can only be populated if advertise_mode is CUSTOM and is advertised to + # all peers of the router. These IP ranges will be advertised in addition to any + # specified groups. Leave this field blank to advertise no custom IP ranges. + # Corresponds to the JSON property `advertisedIpRanges` + # @return [Array] + attr_accessor :advertised_ip_ranges + # Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, # either 16-bit or 32-bit. The value will be fixed for this router resource. All # VPN tunnels that link to this router will have the same local ASN. @@ -14878,6 +15062,9 @@ module Google # Update properties of this object def update!(**args) + @advertise_mode = args[:advertise_mode] if args.key?(:advertise_mode) + @advertised_groups = args[:advertised_groups] if args.key?(:advertised_groups) + @advertised_ip_ranges = args[:advertised_ip_ranges] if args.key?(:advertised_ip_ranges) @asn = args[:asn] if args.key?(:asn) end end @@ -14886,6 +15073,29 @@ module Google class RouterBgpPeer include Google::Apis::Core::Hashable + # User-specified flag to indicate which mode to use for advertisement. + # Corresponds to the JSON property `advertiseMode` + # @return [String] + attr_accessor :advertise_mode + + # User-specified list of prefix groups to advertise in custom mode. This field + # can only be populated if advertise_mode is CUSTOM and overrides the list + # defined for the router (in Bgp message). These groups will be advertised in + # addition to any specified prefixes. Leave this field blank to advertise no + # custom groups. + # Corresponds to the JSON property `advertisedGroups` + # @return [Array] + attr_accessor :advertised_groups + + # User-specified list of individual IP ranges to advertise in custom mode. This + # field can only be populated if advertise_mode is CUSTOM and overrides the list + # defined for the router (in Bgp message). These IP ranges will be advertised in + # addition to any specified groups. Leave this field blank to advertise no + # custom IP ranges. + # Corresponds to the JSON property `advertisedIpRanges` + # @return [Array] + attr_accessor :advertised_ip_ranges + # The priority of routes advertised to this BGP peer. In the case where there is # more than one matching route of maximum length, the routes with lowest # priority value win. @@ -14927,6 +15137,9 @@ module Google # Update properties of this object def update!(**args) + @advertise_mode = args[:advertise_mode] if args.key?(:advertise_mode) + @advertised_groups = args[:advertised_groups] if args.key?(:advertised_groups) + @advertised_ip_ranges = args[:advertised_ip_ranges] if args.key?(:advertised_ip_ranges) @advertised_route_priority = args[:advertised_route_priority] if args.key?(:advertised_route_priority) @interface_name = args[:interface_name] if args.key?(:interface_name) @ip_address = args[:ip_address] if args.key?(:ip_address) @@ -15771,6 +15984,42 @@ module Google class SecurityPolicyRuleMatcher include Google::Apis::Core::Hashable + # The configuration options available when specifying versioned_expr. This field + # must be specified if versioned_expr is specified and cannot be specified if + # versioned_expr is not specified. + # Corresponds to the JSON property `config` + # @return [Google::Apis::ComputeBeta::SecurityPolicyRuleMatcherConfig] + attr_accessor :config + + # CIDR IP address range. Only IPv4 is supported. + # Corresponds to the JSON property `srcIpRanges` + # @return [Array] + attr_accessor :src_ip_ranges + + # Preconfigured versioned expression. If this field is specified, config must + # also be specified. Available preconfigured expressions along with their + # requirements are: SRC_IPS_V1 - must specify the corresponding src_ip_range + # field in config. + # Corresponds to the JSON property `versionedExpr` + # @return [String] + attr_accessor :versioned_expr + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @config = args[:config] if args.key?(:config) + @src_ip_ranges = args[:src_ip_ranges] if args.key?(:src_ip_ranges) + @versioned_expr = args[:versioned_expr] if args.key?(:versioned_expr) + end + end + + # + class SecurityPolicyRuleMatcherConfig + include Google::Apis::Core::Hashable + # CIDR IP address range. Only IPv4 is supported. # Corresponds to the JSON property `srcIpRanges` # @return [Array] @@ -15859,7 +16108,38 @@ module Google end end - # A persistent disk snapshot resource. + # Represents a customer-supplied Signing Key used by Cloud CDN Signed URLs + class SignedUrlKey + include Google::Apis::Core::Hashable + + # Name of the key. The name must be 1-63 characters long, and 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. + # Corresponds to the JSON property `keyName` + # @return [String] + attr_accessor :key_name + + # 128-bit key value used for signing the URL. The key value must be a valid RFC + # 4648 Section 5 base64url encoded string. + # Corresponds to the JSON property `keyValue` + # @return [String] + attr_accessor :key_value + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @key_name = args[:key_name] if args.key?(:key_name) + @key_value = args[:key_value] if args.key?(:key_value) + end + end + + # A persistent disk snapshot resource. (== resource_for beta.snapshots ==) (== + # resource_for v1.snapshots ==) class Snapshot include Google::Apis::Core::Hashable @@ -16121,9 +16401,33 @@ module Google end end + # A specification of the parameters to use when creating the instance template + # from a source instance. + class SourceInstanceParams + include Google::Apis::Core::Hashable + + # Attached disks configuration. If not provided, defaults are applied: For boot + # disk and any other R/W disks, new custom images will be created from each disk. + # For read-only disks, they will be attached in read-only mode. Local SSD disks + # will be created as blank volumes. + # Corresponds to the JSON property `diskConfigs` + # @return [Array] + attr_accessor :disk_configs + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @disk_configs = args[:disk_configs] if args.key?(:disk_configs) + end + end + # An SslCertificate resource. This resource provides a mechanism to upload an # SSL key and certificate to the load balancer to serve secure connections from - # the user. + # the user. (== resource_for beta.sslCertificates ==) (== resource_for v1. + # sslCertificates ==) class SslCertificate include Google::Apis::Core::Hashable @@ -16312,7 +16616,335 @@ module Google end end - # A Subnetwork resource. + # + class SslPoliciesList + include Google::Apis::Core::Hashable + + # [Output Only] Unique identifier for the resource; defined by the server. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # A list of SslPolicy resources. + # Corresponds to the JSON property `items` + # @return [Array] + attr_accessor :items + + # [Output Only] Type of the resource. Always compute#sslPoliciesList for lists + # of sslPolicies. + # 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 + + # [Output Only] Informational warning message. + # Corresponds to the JSON property `warning` + # @return [Google::Apis::ComputeBeta::SslPoliciesList::Warning] + attr_accessor :warning + + 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) + @warning = args[:warning] if args.key?(:warning) + end + + # [Output Only] Informational warning message. + class Warning + include Google::Apis::Core::Hashable + + # [Output Only] A warning code, if applicable. For example, Compute Engine + # returns NO_RESULTS_ON_PAGE if there are no results in the response. + # Corresponds to the JSON property `code` + # @return [String] + attr_accessor :code + + # [Output Only] Metadata about this warning in key: value format. For example: + # "data": [ ` "key": "scope", "value": "zones/us-east1-d" ` + # Corresponds to the JSON property `data` + # @return [Array] + attr_accessor :data + + # [Output Only] A human-readable description of the warning code. + # Corresponds to the JSON property `message` + # @return [String] + attr_accessor :message + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @code = args[:code] if args.key?(:code) + @data = args[:data] if args.key?(:data) + @message = args[:message] if args.key?(:message) + end + + # + class Datum + include Google::Apis::Core::Hashable + + # [Output Only] A key that provides more detail on the warning being returned. + # For example, for warnings where there are no results in a list request for a + # particular zone, this key might be scope and the key value might be the zone + # name. Other examples might be a key indicating a deprecated resource and a + # suggested replacement, or a warning about invalid network settings (for + # example, if an instance attempts to perform IP forwarding but is not enabled + # for IP forwarding). + # Corresponds to the JSON property `key` + # @return [String] + attr_accessor :key + + # [Output Only] A warning data value corresponding to the key. + # 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 + end + end + + # + class SslPoliciesListAvailableFeaturesResponse + include Google::Apis::Core::Hashable + + # + # 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) + @features = args[:features] if args.key?(:features) + end + end + + # A SSL policy specifies the server-side support for SSL features. This can be + # attached to a TargetHttpsProxy or a TargetSslProxy. This affects connections + # between clients and the HTTPS or SSL proxy load balancer. They do not affect + # the connection between the load balancers and the backends. + class SslPolicy + include Google::Apis::Core::Hashable + + # [Output Only] Creation timestamp in RFC3339 text format. + # Corresponds to the JSON property `creationTimestamp` + # @return [String] + attr_accessor :creation_timestamp + + # List of features enabled when the selected profile is CUSTOM. The + # - method returns the set of features that can be specified in this list. This + # field must be empty if the profile is not CUSTOM. + # Corresponds to the JSON property `customFeatures` + # @return [Array] + attr_accessor :custom_features + + # An optional description of this resource. Provide this property when you + # create the resource. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # [Output Only] The list of features enabled in the SSL policy. + # Corresponds to the JSON property `enabledFeatures` + # @return [Array] + attr_accessor :enabled_features + + # Fingerprint of this resource. A hash of the contents stored in this object. + # This field is used in optimistic locking. This field will be ignored when + # inserting a SslPolicy. An up-to-date fingerprint must be provided in order to + # update the SslPolicy. + # Corresponds to the JSON property `fingerprint` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :fingerprint + + # [Output Only] The unique identifier for the resource. This identifier is + # defined by the server. + # Corresponds to the JSON property `id` + # @return [Fixnum] + attr_accessor :id + + # [Output only] Type of the resource. Always compute#sslPolicyfor SSL policies. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # The minimum version of SSL protocol that can be used by the clients to + # establish a connection with the load balancer. This can be one of TLS_1_0, + # TLS_1_1, TLS_1_2, TLS_1_3. + # Corresponds to the JSON property `minTlsVersion` + # @return [String] + attr_accessor :min_tls_version + + # Name of the resource. The name must be 1-63 characters long, and 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. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Profile specifies the set of SSL features that can be used by the load + # balancer when negotiating SSL with clients. This can be one of COMPATIBLE, + # MODERN, RESTRICTED, or CUSTOM. If using CUSTOM, the set of SSL features to + # enable must be specified in the customFeatures field. + # Corresponds to the JSON property `profile` + # @return [String] + attr_accessor :profile + + # [Output Only] Server-defined URL for the resource. + # Corresponds to the JSON property `selfLink` + # @return [String] + attr_accessor :self_link + + # [Output Only] If potential misconfigurations are detected for this SSL policy, + # this field will be populated with warning messages. + # Corresponds to the JSON property `warnings` + # @return [Array] + attr_accessor :warnings + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @creation_timestamp = args[:creation_timestamp] if args.key?(:creation_timestamp) + @custom_features = args[:custom_features] if args.key?(:custom_features) + @description = args[:description] if args.key?(:description) + @enabled_features = args[:enabled_features] if args.key?(:enabled_features) + @fingerprint = args[:fingerprint] if args.key?(:fingerprint) + @id = args[:id] if args.key?(:id) + @kind = args[:kind] if args.key?(:kind) + @min_tls_version = args[:min_tls_version] if args.key?(:min_tls_version) + @name = args[:name] if args.key?(:name) + @profile = args[:profile] if args.key?(:profile) + @self_link = args[:self_link] if args.key?(:self_link) + @warnings = args[:warnings] if args.key?(:warnings) + end + + # + class Warning + include Google::Apis::Core::Hashable + + # [Output Only] A warning code, if applicable. For example, Compute Engine + # returns NO_RESULTS_ON_PAGE if there are no results in the response. + # Corresponds to the JSON property `code` + # @return [String] + attr_accessor :code + + # [Output Only] Metadata about this warning in key: value format. For example: + # "data": [ ` "key": "scope", "value": "zones/us-east1-d" ` + # Corresponds to the JSON property `data` + # @return [Array] + attr_accessor :data + + # [Output Only] A human-readable description of the warning code. + # Corresponds to the JSON property `message` + # @return [String] + attr_accessor :message + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @code = args[:code] if args.key?(:code) + @data = args[:data] if args.key?(:data) + @message = args[:message] if args.key?(:message) + end + + # + class Datum + include Google::Apis::Core::Hashable + + # [Output Only] A key that provides more detail on the warning being returned. + # For example, for warnings where there are no results in a list request for a + # particular zone, this key might be scope and the key value might be the zone + # name. Other examples might be a key indicating a deprecated resource and a + # suggested replacement, or a warning about invalid network settings (for + # example, if an instance attempts to perform IP forwarding but is not enabled + # for IP forwarding). + # Corresponds to the JSON property `key` + # @return [String] + attr_accessor :key + + # [Output Only] A warning data value corresponding to the key. + # 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 + end + end + + # + class SslPolicyReference + include Google::Apis::Core::Hashable + + # URL of the SSL policy resource. Set this to empty string to clear any existing + # SSL policy associated with the target proxy resource. + # Corresponds to the JSON property `sslPolicy` + # @return [String] + attr_accessor :ssl_policy + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @ssl_policy = args[:ssl_policy] if args.key?(:ssl_policy) + end + end + + # A Subnetwork resource. (== resource_for beta.subnetworks ==) (== resource_for + # v1.subnetworks ==) class Subnetwork include Google::Apis::Core::Hashable @@ -16927,7 +17559,9 @@ module Google end end - # A TargetHttpProxy resource. This resource defines an HTTP proxy. + # A TargetHttpProxy resource. This resource defines an HTTP proxy. (== + # resource_for beta.targetHttpProxies ==) (== resource_for v1.targetHttpProxies = + # =) class TargetHttpProxy include Google::Apis::Core::Hashable @@ -17109,6 +17743,25 @@ module Google end end + # + class TargetHttpsProxiesSetQuicOverrideRequest + include Google::Apis::Core::Hashable + + # QUIC policy for the TargetHttpsProxy resource. + # Corresponds to the JSON property `quicOverride` + # @return [String] + attr_accessor :quic_override + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @quic_override = args[:quic_override] if args.key?(:quic_override) + end + end + # class TargetHttpsProxiesSetSslCertificatesRequest include Google::Apis::Core::Hashable @@ -17129,7 +17782,9 @@ module Google end end - # A TargetHttpsProxy resource. This resource defines an HTTPS proxy. + # A TargetHttpsProxy resource. This resource defines an HTTPS proxy. (== + # resource_for beta.targetHttpsProxies ==) (== resource_for v1. + # targetHttpsProxies ==) class TargetHttpsProxy include Google::Apis::Core::Hashable @@ -17166,6 +17821,17 @@ module Google # @return [String] attr_accessor :name + # Specifies the QUIC override policy for this TargetHttpsProxy resource. This + # determines whether the load balancer will attempt to negotiate QUIC with + # clients or not. Can specify one of NONE, ENABLE, or DISABLE. Specify ENABLE to + # always enable QUIC, Enables QUIC when set to ENABLE, and disables QUIC when + # set to DISABLE. If NONE is specified, uses the QUIC policy with no user + # overrides, which is equivalent to DISABLE. Not specifying this field is + # equivalent to specifying NONE. + # Corresponds to the JSON property `quicOverride` + # @return [String] + attr_accessor :quic_override + # [Output Only] Server-defined URL for the resource. # Corresponds to the JSON property `selfLink` # @return [String] @@ -17178,6 +17844,13 @@ module Google # @return [Array] attr_accessor :ssl_certificates + # URL of SslPolicy resource that will be associated with the TargetHttpsProxy + # resource. If not set, the TargetHttpsProxy resource will not have any SSL + # policy configured. + # Corresponds to the JSON property `sslPolicy` + # @return [String] + attr_accessor :ssl_policy + # A fully-qualified or valid partial URL to the UrlMap resource that defines the # mapping from URL to the BackendService. For example, the following are all # valid URLs for specifying a URL map: @@ -17199,8 +17872,10 @@ module Google @id = args[:id] if args.key?(:id) @kind = args[:kind] if args.key?(:kind) @name = args[:name] if args.key?(:name) + @quic_override = args[:quic_override] if args.key?(:quic_override) @self_link = args[:self_link] if args.key?(:self_link) @ssl_certificates = args[:ssl_certificates] if args.key?(:ssl_certificates) + @ssl_policy = args[:ssl_policy] if args.key?(:ssl_policy) @url_map = args[:url_map] if args.key?(:url_map) end end @@ -17324,7 +17999,8 @@ module Google end # A TargetInstance resource. This resource defines an endpoint instance that - # terminates traffic of certain protocols. + # terminates traffic of certain protocols. (== resource_for beta.targetInstances + # ==) (== resource_for v1.targetInstances ==) class TargetInstance include Google::Apis::Core::Hashable @@ -17733,7 +18409,8 @@ module Google end # A TargetPool resource. This resource defines a pool of instances, an - # associated HttpHealthCheck resource, and the fallback target pool. + # associated HttpHealthCheck resource, and the fallback target pool. (== + # resource_for beta.targetPools ==) (== resource_for v1.targetPools ==) class TargetPool include Google::Apis::Core::Hashable @@ -18372,7 +19049,8 @@ module Google end end - # A TargetSslProxy resource. This resource defines an SSL proxy. + # A TargetSslProxy resource. This resource defines an SSL proxy. (== + # resource_for beta.targetSslProxies ==) (== resource_for v1.targetSslProxies ==) class TargetSslProxy include Google::Apis::Core::Hashable @@ -18431,6 +19109,13 @@ module Google # @return [Array] attr_accessor :ssl_certificates + # URL of SslPolicy resource that will be associated with the TargetSslProxy + # resource. If not set, the TargetSslProxy resource will not have any SSL policy + # configured. + # Corresponds to the JSON property `sslPolicy` + # @return [String] + attr_accessor :ssl_policy + def initialize(**args) update!(**args) end @@ -18446,6 +19131,7 @@ module Google @self_link = args[:self_link] if args.key?(:self_link) @service = args[:service] if args.key?(:service) @ssl_certificates = args[:ssl_certificates] if args.key?(:ssl_certificates) + @ssl_policy = args[:ssl_policy] if args.key?(:ssl_policy) end end @@ -18605,7 +19291,8 @@ module Google end end - # A TargetTcpProxy resource. This resource defines a TCP proxy. + # A TargetTcpProxy resource. This resource defines a TCP proxy. (== resource_for + # beta.targetTcpProxies ==) (== resource_for v1.targetTcpProxies ==) class TargetTcpProxy include Google::Apis::Core::Hashable @@ -18792,7 +19479,8 @@ module Google end end - # Represents a Target VPN gateway resource. + # Represents a Target VPN gateway resource. (== resource_for beta. + # targetVpnGateways ==) (== resource_for v1.targetVpnGateways ==) class TargetVpnGateway include Google::Apis::Core::Hashable @@ -18826,6 +19514,25 @@ module Google # @return [String] attr_accessor :kind + # A fingerprint for the labels being applied to this TargetVpnGateway, which is + # essentially a hash of the labels set used for optimistic locking. 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. + # To see the latest fingerprint, make a get() request to retrieve an + # TargetVpnGateway. + # Corresponds to the JSON property `labelFingerprint` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :label_fingerprint + + # Labels to apply to this TargetVpnGateway resource. These can be later modified + # by the setLabels method. Each label key/value must comply with RFC1035. Label + # values may be empty. + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + # Name of the resource. Provided by the client when the resource is created. The # name must be 1-63 characters long, and comply with RFC1035. Specifically, the # name must be 1-63 characters long and match the regular expression [a-z]([-a- @@ -18874,6 +19581,8 @@ module Google @forwarding_rules = args[:forwarding_rules] if args.key?(:forwarding_rules) @id = args[:id] if args.key?(:id) @kind = args[:kind] if args.key?(:kind) + @label_fingerprint = args[:label_fingerprint] if args.key?(:label_fingerprint) + @labels = args[:labels] if args.key?(:labels) @name = args[:name] if args.key?(:name) @network = args[:network] if args.key?(:network) @region = args[:region] if args.key?(:region) @@ -19708,7 +20417,8 @@ module Google end end - # + # VPN tunnel resource. (== resource_for beta.vpnTunnels ==) (== resource_for v1. + # vpnTunnels ==) class VpnTunnel include Google::Apis::Core::Hashable @@ -19745,6 +20455,24 @@ module Google # @return [String] attr_accessor :kind + # A fingerprint for the labels being applied to this VpnTunnel, which is + # essentially a hash of the labels set used for optimistic locking. 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. + # To see the latest fingerprint, make a get() request to retrieve a VpnTunnel. + # Corresponds to the JSON property `labelFingerprint` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :label_fingerprint + + # Labels to apply to this VpnTunnel. These can be later modified by the + # setLabels method. Each label key/value pair must comply with RFC1035. Label + # values may be empty. + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + # Local traffic selector to use when establishing the VPN tunnel with peer VPN # gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/ # 16. The ranges should be disjoint. Only IPv4 is supported. @@ -19823,6 +20551,8 @@ module Google @id = args[:id] if args.key?(:id) @ike_version = args[:ike_version] if args.key?(:ike_version) @kind = args[:kind] if args.key?(:kind) + @label_fingerprint = args[:label_fingerprint] if args.key?(:label_fingerprint) + @labels = args[:labels] if args.key?(:labels) @local_traffic_selector = args[:local_traffic_selector] if args.key?(:local_traffic_selector) @name = args[:name] if args.key?(:name) @peer_ip = args[:peer_ip] if args.key?(:peer_ip) @@ -20306,7 +21036,7 @@ module Google end end - # A Zone resource. + # A Zone resource. (== resource_for beta.zones ==) (== resource_for v1.zones ==) class Zone include Google::Apis::Core::Hashable diff --git a/generated/google/apis/compute_beta/representations.rb b/generated/google/apis/compute_beta/representations.rb index 4dfcc0395..8088c53c0 100644 --- a/generated/google/apis/compute_beta/representations.rb +++ b/generated/google/apis/compute_beta/representations.rb @@ -292,6 +292,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class BackendBucketCdnPolicy + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class BackendBucketList class Representation < Google::Apis::Core::JsonRepresentation; end @@ -520,6 +526,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class DiskInstantiationConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class DiskList class Representation < Google::Apis::Core::JsonRepresentation; end @@ -2008,6 +2020,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class RouterAdvertisedIpRange + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class RouterAggregatedList class Representation < Google::Apis::Core::JsonRepresentation; end @@ -2164,6 +2182,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class SecurityPolicyRuleMatcherConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class SerialPortOutput class Representation < Google::Apis::Core::JsonRepresentation; end @@ -2176,6 +2200,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class SignedUrlKey + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class Snapshot class Representation < Google::Apis::Core::JsonRepresentation; end @@ -2200,6 +2230,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class SourceInstanceParams + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class SslCertificate class Representation < Google::Apis::Core::JsonRepresentation; end @@ -2224,6 +2260,54 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class SslPoliciesList + class Representation < Google::Apis::Core::JsonRepresentation; end + + class Warning + class Representation < Google::Apis::Core::JsonRepresentation; end + + class Datum + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + include Google::Apis::Core::JsonObjectSupport + end + + include Google::Apis::Core::JsonObjectSupport + end + + class SslPoliciesListAvailableFeaturesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SslPolicy + class Representation < Google::Apis::Core::JsonRepresentation; end + + class Warning + class Representation < Google::Apis::Core::JsonRepresentation; end + + class Datum + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + include Google::Apis::Core::JsonObjectSupport + end + + include Google::Apis::Core::JsonObjectSupport + end + + class SslPolicyReference + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class Subnetwork class Representation < Google::Apis::Core::JsonRepresentation; end @@ -2338,6 +2422,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class TargetHttpsProxiesSetQuicOverrideRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class TargetHttpsProxiesSetSslCertificatesRequest class Representation < Google::Apis::Core::JsonRepresentation; end @@ -3346,6 +3436,8 @@ module Google # @private class Representation < Google::Apis::Core::JsonRepresentation property :bucket_name, as: 'bucketName' + property :cdn_policy, as: 'cdnPolicy', class: Google::Apis::ComputeBeta::BackendBucketCdnPolicy, decorator: Google::Apis::ComputeBeta::BackendBucketCdnPolicy::Representation + property :creation_timestamp, as: 'creationTimestamp' property :description, as: 'description' property :enable_cdn, as: 'enableCdn' @@ -3356,6 +3448,14 @@ module Google end end + class BackendBucketCdnPolicy + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :signed_url_cache_max_age_sec, :numeric_string => true, as: 'signedUrlCacheMaxAgeSec' + collection :signed_url_key_names, as: 'signedUrlKeyNames' + end + end + class BackendBucketList # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -3457,6 +3557,8 @@ module Google class Representation < Google::Apis::Core::JsonRepresentation property :cache_key_policy, as: 'cacheKeyPolicy', class: Google::Apis::ComputeBeta::CacheKeyPolicy, decorator: Google::Apis::ComputeBeta::CacheKeyPolicy::Representation + property :signed_url_cache_max_age_sec, :numeric_string => true, as: 'signedUrlCacheMaxAgeSec' + collection :signed_url_key_names, as: 'signedUrlKeyNames' end end @@ -3795,6 +3897,16 @@ module Google end end + class DiskInstantiationConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :auto_delete, as: 'autoDelete' + property :device_name, as: 'deviceName' + property :instantiate_from, as: 'instantiateFrom' + property :source_image, as: 'sourceImage' + end + end + class DiskList # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -5114,6 +5226,9 @@ module Google property :properties, as: 'properties', class: Google::Apis::ComputeBeta::InstanceProperties, decorator: Google::Apis::ComputeBeta::InstanceProperties::Representation property :self_link, as: 'selfLink' + property :source_instance, as: 'sourceInstance' + property :source_instance_params, as: 'sourceInstanceParams', class: Google::Apis::ComputeBeta::SourceInstanceParams, decorator: Google::Apis::ComputeBeta::SourceInstanceParams::Representation + end end @@ -6532,6 +6647,14 @@ module Google end end + class RouterAdvertisedIpRange + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :description, as: 'description' + property :range, as: 'range' + end + end + class RouterAggregatedList # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -6567,6 +6690,10 @@ module Google class RouterBgp # @private class Representation < Google::Apis::Core::JsonRepresentation + property :advertise_mode, as: 'advertiseMode' + collection :advertised_groups, as: 'advertisedGroups' + collection :advertised_ip_ranges, as: 'advertisedIpRanges', class: Google::Apis::ComputeBeta::RouterAdvertisedIpRange, decorator: Google::Apis::ComputeBeta::RouterAdvertisedIpRange::Representation + property :asn, as: 'asn' end end @@ -6574,6 +6701,10 @@ module Google class RouterBgpPeer # @private class Representation < Google::Apis::Core::JsonRepresentation + property :advertise_mode, as: 'advertiseMode' + collection :advertised_groups, as: 'advertisedGroups' + collection :advertised_ip_ranges, as: 'advertisedIpRanges', class: Google::Apis::ComputeBeta::RouterAdvertisedIpRange, decorator: Google::Apis::ComputeBeta::RouterAdvertisedIpRange::Representation + property :advertised_route_priority, as: 'advertisedRoutePriority' property :interface_name, as: 'interfaceName' property :ip_address, as: 'ipAddress' @@ -6802,6 +6933,16 @@ module Google end class SecurityPolicyRuleMatcher + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :config, as: 'config', class: Google::Apis::ComputeBeta::SecurityPolicyRuleMatcherConfig, decorator: Google::Apis::ComputeBeta::SecurityPolicyRuleMatcherConfig::Representation + + collection :src_ip_ranges, as: 'srcIpRanges' + property :versioned_expr, as: 'versionedExpr' + end + end + + class SecurityPolicyRuleMatcherConfig # @private class Representation < Google::Apis::Core::JsonRepresentation collection :src_ip_ranges, as: 'srcIpRanges' @@ -6827,6 +6968,14 @@ module Google end end + class SignedUrlKey + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :key_name, as: 'keyName' + property :key_value, as: 'keyValue' + end + end + class Snapshot # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -6885,6 +7034,14 @@ module Google end end + class SourceInstanceParams + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :disk_configs, as: 'diskConfigs', class: Google::Apis::ComputeBeta::DiskInstantiationConfig, decorator: Google::Apis::ComputeBeta::DiskInstantiationConfig::Representation + + end + end + class SslCertificate # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -6931,6 +7088,89 @@ module Google end end + class SslPoliciesList + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :id, as: 'id' + collection :items, as: 'items', class: Google::Apis::ComputeBeta::SslPolicy, decorator: Google::Apis::ComputeBeta::SslPolicy::Representation + + property :kind, as: 'kind' + property :next_page_token, as: 'nextPageToken' + property :self_link, as: 'selfLink' + property :warning, as: 'warning', class: Google::Apis::ComputeBeta::SslPoliciesList::Warning, decorator: Google::Apis::ComputeBeta::SslPoliciesList::Warning::Representation + + end + + class Warning + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :code, as: 'code' + collection :data, as: 'data', class: Google::Apis::ComputeBeta::SslPoliciesList::Warning::Datum, decorator: Google::Apis::ComputeBeta::SslPoliciesList::Warning::Datum::Representation + + property :message, as: 'message' + end + + class Datum + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :key, as: 'key' + property :value, as: 'value' + end + end + end + end + + class SslPoliciesListAvailableFeaturesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :features, as: 'features' + end + end + + class SslPolicy + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :creation_timestamp, as: 'creationTimestamp' + collection :custom_features, as: 'customFeatures' + property :description, as: 'description' + collection :enabled_features, as: 'enabledFeatures' + property :fingerprint, :base64 => true, as: 'fingerprint' + property :id, :numeric_string => true, as: 'id' + property :kind, as: 'kind' + property :min_tls_version, as: 'minTlsVersion' + property :name, as: 'name' + property :profile, as: 'profile' + property :self_link, as: 'selfLink' + collection :warnings, as: 'warnings', class: Google::Apis::ComputeBeta::SslPolicy::Warning, decorator: Google::Apis::ComputeBeta::SslPolicy::Warning::Representation + + end + + class Warning + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :code, as: 'code' + collection :data, as: 'data', class: Google::Apis::ComputeBeta::SslPolicy::Warning::Datum, decorator: Google::Apis::ComputeBeta::SslPolicy::Warning::Datum::Representation + + property :message, as: 'message' + end + + class Datum + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :key, as: 'key' + property :value, as: 'value' + end + end + end + end + + class SslPolicyReference + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :ssl_policy, as: 'sslPolicy' + end + end + class Subnetwork # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -7130,6 +7370,13 @@ module Google end end + class TargetHttpsProxiesSetQuicOverrideRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :quic_override, as: 'quicOverride' + end + end + class TargetHttpsProxiesSetSslCertificatesRequest # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -7145,8 +7392,10 @@ module Google property :id, :numeric_string => true, as: 'id' property :kind, as: 'kind' property :name, as: 'name' + property :quic_override, as: 'quicOverride' property :self_link, as: 'selfLink' collection :ssl_certificates, as: 'sslCertificates' + property :ssl_policy, as: 'sslPolicy' property :url_map, as: 'urlMap' end end @@ -7481,6 +7730,7 @@ module Google property :self_link, as: 'selfLink' property :service, as: 'service' collection :ssl_certificates, as: 'sslCertificates' + property :ssl_policy, as: 'sslPolicy' end end @@ -7584,6 +7834,8 @@ module Google collection :forwarding_rules, as: 'forwardingRules' property :id, :numeric_string => true, as: 'id' property :kind, as: 'kind' + property :label_fingerprint, :base64 => true, as: 'labelFingerprint' + hash :labels, as: 'labels' property :name, as: 'name' property :network, as: 'network' property :region, as: 'region' @@ -7832,6 +8084,8 @@ module Google property :id, :numeric_string => true, as: 'id' property :ike_version, as: 'ikeVersion' property :kind, as: 'kind' + property :label_fingerprint, :base64 => true, as: 'labelFingerprint' + hash :labels, as: 'labels' collection :local_traffic_selector, as: 'localTrafficSelector' property :name, as: 'name' property :peer_ip, as: 'peerIp' diff --git a/generated/google/apis/compute_beta/service.rb b/generated/google/apis/compute_beta/service.rb index 1240d832c..211a7ee15 100644 --- a/generated/google/apis/compute_beta/service.rb +++ b/generated/google/apis/compute_beta/service.rb @@ -1117,6 +1117,60 @@ module Google execute_or_queue_command(command, &block) end + # Adds the given Signed URL Key to the backend bucket. + # @param [String] project + # Project ID for this request. + # @param [String] backend_bucket + # Name of the BackendBucket resource to which the Signed URL Key should be added. + # The name should conform to RFC1035. + # @param [Google::Apis::ComputeBeta::SignedUrlKey] signed_url_key_object + # @param [String] request_id + # An optional request ID to identify requests. Specify a unique request ID so + # that if you must retry your request, the server will know to ignore the + # request if it has already been completed. + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request ID, the + # server can check if original operation with the same request ID was received, + # and if so, will ignore the second request. This prevents clients from + # accidentally creating duplicate commitments. + # The request ID must be a valid UUID with the exception that zero UUID is not + # supported (00000000-0000-0000-0000-000000000000). + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available 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 add_backend_bucket_signed_url_key(project, backend_bucket, signed_url_key_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, '{project}/global/backendBuckets/{backendBucket}/addSignedUrlKey', options) + command.request_representation = Google::Apis::ComputeBeta::SignedUrlKey::Representation + command.request_object = signed_url_key_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['backendBucket'] = backend_bucket unless backend_bucket.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 + # Deletes the specified BackendBucket resource. # @param [String] project # Project ID for this request. @@ -1167,6 +1221,60 @@ module Google execute_or_queue_command(command, &block) end + # Deletes the given Signed URL Key from the backend bucket. + # @param [String] project + # Project ID for this request. + # @param [String] backend_bucket + # Name of the BackendBucket resource to which the Signed URL Key should be added. + # The name should conform to RFC1035. + # @param [String] key_name + # The name of the Signed URL Key to delete. + # @param [String] request_id + # An optional request ID to identify requests. Specify a unique request ID so + # that if you must retry your request, the server will know to ignore the + # request if it has already been completed. + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request ID, the + # server can check if original operation with the same request ID was received, + # and if so, will ignore the second request. This prevents clients from + # accidentally creating duplicate commitments. + # The request ID must be a valid UUID with the exception that zero UUID is not + # supported (00000000-0000-0000-0000-000000000000). + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available 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 delete_backend_bucket_signed_url_key(project, backend_bucket, key_name, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, '{project}/global/backendBuckets/{backendBucket}/deleteSignedUrlKey', options) + command.response_representation = Google::Apis::ComputeBeta::Operation::Representation + command.response_class = Google::Apis::ComputeBeta::Operation + command.params['project'] = project unless project.nil? + command.params['backendBucket'] = backend_bucket unless backend_bucket.nil? + command.query['keyName'] = key_name unless key_name.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 + # Returns the specified BackendBucket resource. Get a list of available backend # buckets by making a list() request. # @param [String] project @@ -1443,6 +1551,60 @@ module Google execute_or_queue_command(command, &block) end + # Adds the given Signed URL Key to the specified backend service. + # @param [String] project + # Project ID for this request. + # @param [String] backend_service + # Name of the BackendService resource to which the Signed URL Key should be + # added. The name should conform to RFC1035. + # @param [Google::Apis::ComputeBeta::SignedUrlKey] signed_url_key_object + # @param [String] request_id + # An optional request ID to identify requests. Specify a unique request ID so + # that if you must retry your request, the server will know to ignore the + # request if it has already been completed. + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request ID, the + # server can check if original operation with the same request ID was received, + # and if so, will ignore the second request. This prevents clients from + # accidentally creating duplicate commitments. + # The request ID must be a valid UUID with the exception that zero UUID is not + # supported (00000000-0000-0000-0000-000000000000). + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available 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 add_backend_service_signed_url_key(project, backend_service, signed_url_key_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, '{project}/global/backendServices/{backendService}/addSignedUrlKey', options) + command.request_representation = Google::Apis::ComputeBeta::SignedUrlKey::Representation + command.request_object = signed_url_key_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['backendService'] = backend_service unless backend_service.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 + # Retrieves the list of all BackendService resources, regional and global, # available to the specified project. # @param [String] project @@ -1570,6 +1732,60 @@ module Google execute_or_queue_command(command, &block) end + # Deletes the given Signed URL Key from the specified backend service. + # @param [String] project + # Project ID for this request. + # @param [String] backend_service + # Name of the BackendService resource to which the Signed URL Key should be + # added. The name should conform to RFC1035. + # @param [String] key_name + # The name of the Signed URL Key to delete. + # @param [String] request_id + # An optional request ID to identify requests. Specify a unique request ID so + # that if you must retry your request, the server will know to ignore the + # request if it has already been completed. + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request ID, the + # server can check if original operation with the same request ID was received, + # and if so, will ignore the second request. This prevents clients from + # accidentally creating duplicate commitments. + # The request ID must be a valid UUID with the exception that zero UUID is not + # supported (00000000-0000-0000-0000-000000000000). + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available 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 delete_backend_service_signed_url_key(project, backend_service, key_name, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, '{project}/global/backendServices/{backendService}/deleteSignedUrlKey', options) + command.response_representation = Google::Apis::ComputeBeta::Operation::Representation + command.response_class = Google::Apis::ComputeBeta::Operation + command.params['project'] = project unless project.nil? + command.params['backendService'] = backend_service unless backend_service.nil? + command.query['keyName'] = key_name unless key_name.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 + # Returns the specified BackendService resource. Get a list of available backend # services by making a list() request. # @param [String] project @@ -2553,7 +2769,8 @@ module Google execute_or_queue_command(command, &block) end - # Resizes the specified persistent disk. + # Resizes the specified persistent disk. You can only increase the size of the + # disk. # @param [String] project # Project ID for this request. # @param [String] zone @@ -10963,7 +11180,8 @@ module Google execute_or_queue_command(command, &block) end - # Patches the specified network with the data included in the request. + # Patches the specified network with the data included in the request. Only the + # following fields can be modified: routingConfig.routingMode. # @param [String] project # Project ID for this request. # @param [String] network @@ -15064,6 +15282,47 @@ module Google execute_or_queue_command(command, &block) end + # Inserts a rule into a security policy. + # @param [String] project + # Project ID for this request. + # @param [String] security_policy + # Name of the security policy to update. + # @param [Google::Apis::ComputeBeta::SecurityPolicyRule] security_policy_rule_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::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 add_security_policy_rule(project, security_policy, security_policy_rule_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, '{project}/global/securityPolicies/{securityPolicy}/addRule', options) + command.request_representation = Google::Apis::ComputeBeta::SecurityPolicyRule::Representation + command.request_object = security_policy_rule_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['securityPolicy'] = security_policy unless security_policy.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 policy. # @param [String] project # Project ID for this request. @@ -15152,6 +15411,47 @@ module Google execute_or_queue_command(command, &block) end + # Gets a rule at the specified priority. + # @param [String] project + # Project ID for this request. + # @param [String] security_policy + # Name of the security policy to which the queried rule belongs. + # @param [Fixnum] priority + # The priority of the rule to get from the security policy. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available 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::SecurityPolicyRule] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ComputeBeta::SecurityPolicyRule] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_security_policy_rule(project, security_policy, priority: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:get, '{project}/global/securityPolicies/{securityPolicy}/getRule', options) + command.response_representation = Google::Apis::ComputeBeta::SecurityPolicyRule::Representation + command.response_class = Google::Apis::ComputeBeta::SecurityPolicyRule + command.params['project'] = project unless project.nil? + command.params['securityPolicy'] = security_policy unless security_policy.nil? + command.query['priority'] = priority unless priority.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 + # Creates a new policy in the specified project using the data included in the # request. # @param [String] project @@ -15332,6 +15632,91 @@ module Google execute_or_queue_command(command, &block) end + # Patches a rule at the specified priority. + # @param [String] project + # Project ID for this request. + # @param [String] security_policy + # Name of the security policy to update. + # @param [Google::Apis::ComputeBeta::SecurityPolicyRule] security_policy_rule_object + # @param [Fixnum] priority + # The priority of the rule to patch. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available 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 patch_security_policy_rule(project, security_policy, security_policy_rule_object = nil, priority: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, '{project}/global/securityPolicies/{securityPolicy}/patchRule', options) + command.request_representation = Google::Apis::ComputeBeta::SecurityPolicyRule::Representation + command.request_object = security_policy_rule_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['securityPolicy'] = security_policy unless security_policy.nil? + command.query['priority'] = priority unless priority.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 a rule at the specified priority. + # @param [String] project + # Project ID for this request. + # @param [String] security_policy + # Name of the security policy to update. + # @param [Fixnum] priority + # The priority of the rule to remove from the security policy. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available 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 remove_security_policy_rule(project, security_policy, priority: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, '{project}/global/securityPolicies/{securityPolicy}/removeRule', options) + command.response_representation = Google::Apis::ComputeBeta::Operation::Representation + command.response_class = Google::Apis::ComputeBeta::Operation + command.params['project'] = project unless project.nil? + command.params['securityPolicy'] = security_policy unless security_policy.nil? + command.query['priority'] = priority unless priority.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 permissions that a caller has on the specified resource. # @param [String] project # Project ID for this request. @@ -15884,6 +16269,396 @@ module Google execute_or_queue_command(command, &block) end + # Deletes the specified SSL policy. The SSL policy resource can be deleted only + # if it is not in use by any TargetHttpsProxy or TargetSslProxy resources. + # @param [String] project + # Project ID for this request. + # @param [String] ssl_policy + # Name of the SSL policy to delete. The name must be 1-63 characters long, and + # comply with RFC1035. + # @param [String] request_id + # An optional request ID to identify requests. Specify a unique request ID so + # that if you must retry your request, the server will know to ignore the + # request if it has already been completed. + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request ID, the + # server can check if original operation with the same request ID was received, + # and if so, will ignore the second request. This prevents clients from + # accidentally creating duplicate commitments. + # The request ID must be a valid UUID with the exception that zero UUID is not + # supported (00000000-0000-0000-0000-000000000000). + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available 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 delete_ssl_policy(project, ssl_policy, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:delete, '{project}/global/sslPolicies/{sslPolicy}', options) + command.response_representation = Google::Apis::ComputeBeta::Operation::Representation + command.response_class = Google::Apis::ComputeBeta::Operation + command.params['project'] = project unless project.nil? + command.params['sslPolicy'] = ssl_policy unless ssl_policy.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 + + # List all of the ordered rules present in a single specified policy. + # @param [String] project + # Project ID for this request. + # @param [String] ssl_policy + # Name of the SSL policy to update. The name must be 1-63 characters long, and + # comply with RFC1035. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available 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::SslPolicy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ComputeBeta::SslPolicy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_ssl_policy(project, ssl_policy, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:get, '{project}/global/sslPolicies/{sslPolicy}', options) + command.response_representation = Google::Apis::ComputeBeta::SslPolicy::Representation + command.response_class = Google::Apis::ComputeBeta::SslPolicy + command.params['project'] = project unless project.nil? + command.params['sslPolicy'] = ssl_policy unless ssl_policy.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 SSL policy resource. Get a list of available SSL + # policies by making a list() request. + # @param [String] project + # Project ID for this request. + # @param [Google::Apis::ComputeBeta::SslPolicy] ssl_policy_object + # @param [String] request_id + # An optional request ID to identify requests. Specify a unique request ID so + # that if you must retry your request, the server will know to ignore the + # request if it has already been completed. + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request ID, the + # server can check if original operation with the same request ID was received, + # and if so, will ignore the second request. This prevents clients from + # accidentally creating duplicate commitments. + # The request ID must be a valid UUID with the exception that zero UUID is not + # supported (00000000-0000-0000-0000-000000000000). + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available 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 insert_ssl_policy(project, ssl_policy_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, '{project}/global/sslPolicies', options) + command.request_representation = Google::Apis::ComputeBeta::SslPolicy::Representation + command.request_object = ssl_policy_object + command.response_representation = Google::Apis::ComputeBeta::Operation::Representation + command.response_class = Google::Apis::ComputeBeta::Operation + command.params['project'] = project unless project.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 + + # List all the SSL policies that have been configured for the specified project. + # @param [String] project + # Project ID for this request. + # @param [String] filter + # Sets a filter `expression` for filtering listed resources. Your `expression` + # must be in the format: field_name comparison_string literal_string. + # The field_name is the name of the field you want to compare. Only atomic field + # types are supported (string, number, boolean). The comparison_string must be + # either eq (equals) or ne (not equals). The literal_string is the string value + # to filter to. The literal value must be valid for the type of field you are + # filtering by (string, number, boolean). For string fields, the literal value + # is interpreted as a regular expression using RE2 syntax. The literal value + # must match the entire field. + # For example, to filter for instances that do not have a name of example- + # instance, you would use name ne example-instance. + # You can filter on nested fields. For example, you could filter on instances + # that have set the scheduling.automaticRestart field to true. Use filtering on + # nested fields to take advantage of labels to organize and search for results + # based on label values. + # To filter on multiple expressions, provide each separate expression within + # parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us- + # central1-f). Multiple expressions are treated as AND expressions, meaning that + # resources must match all expressions to pass the filters. + # @param [Fixnum] max_results + # The maximum number of results per page that should be returned. If the number + # of available results is larger than maxResults, Compute Engine returns a + # nextPageToken that can be used to get the next page of results in subsequent + # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + # @param [String] order_by + # Sorts list results by a certain order. By default, results are returned in + # alphanumerical order based on the resource name. + # You can also sort results in descending order based on the creation timestamp + # using orderBy="creationTimestamp desc". This sorts results based on the + # creationTimestamp field in reverse chronological order (newest result first). + # Use this to sort resources like operations so that the newest operation is + # returned first. + # Currently, only sorting by name or creationTimestamp desc is supported. + # @param [String] page_token + # Specifies a page token to use. Set pageToken to the nextPageToken returned by + # a previous list request to get the next page 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. + # 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::SslPoliciesList] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ComputeBeta::SslPoliciesList] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_ssl_policies(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}/global/sslPolicies', options) + command.response_representation = Google::Apis::ComputeBeta::SslPoliciesList::Representation + command.response_class = Google::Apis::ComputeBeta::SslPoliciesList + 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['orderBy'] = 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 + + # Lists all features that can be specified in the SSL policy when using custom + # profile. + # @param [String] project + # Project ID for this request. + # @param [String] filter + # Sets a filter `expression` for filtering listed resources. Your `expression` + # must be in the format: field_name comparison_string literal_string. + # The field_name is the name of the field you want to compare. Only atomic field + # types are supported (string, number, boolean). The comparison_string must be + # either eq (equals) or ne (not equals). The literal_string is the string value + # to filter to. The literal value must be valid for the type of field you are + # filtering by (string, number, boolean). For string fields, the literal value + # is interpreted as a regular expression using RE2 syntax. The literal value + # must match the entire field. + # For example, to filter for instances that do not have a name of example- + # instance, you would use name ne example-instance. + # You can filter on nested fields. For example, you could filter on instances + # that have set the scheduling.automaticRestart field to true. Use filtering on + # nested fields to take advantage of labels to organize and search for results + # based on label values. + # To filter on multiple expressions, provide each separate expression within + # parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us- + # central1-f). Multiple expressions are treated as AND expressions, meaning that + # resources must match all expressions to pass the filters. + # @param [Fixnum] max_results + # The maximum number of results per page that should be returned. If the number + # of available results is larger than maxResults, Compute Engine returns a + # nextPageToken that can be used to get the next page of results in subsequent + # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500) + # @param [String] order_by + # Sorts list results by a certain order. By default, results are returned in + # alphanumerical order based on the resource name. + # You can also sort results in descending order based on the creation timestamp + # using orderBy="creationTimestamp desc". This sorts results based on the + # creationTimestamp field in reverse chronological order (newest result first). + # Use this to sort resources like operations so that the newest operation is + # returned first. + # Currently, only sorting by name or creationTimestamp desc is supported. + # @param [String] page_token + # Specifies a page token to use. Set pageToken to the nextPageToken returned by + # a previous list request to get the next page 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. + # 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::SslPoliciesListAvailableFeaturesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ComputeBeta::SslPoliciesListAvailableFeaturesResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_ssl_policy_available_features(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}/global/sslPolicies/listAvailableFeatures', options) + command.response_representation = Google::Apis::ComputeBeta::SslPoliciesListAvailableFeaturesResponse::Representation + command.response_class = Google::Apis::ComputeBeta::SslPoliciesListAvailableFeaturesResponse + 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['orderBy'] = 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 + + # Patches the specified SSL policy with the data included in the request. + # @param [String] project + # Project ID for this request. + # @param [String] ssl_policy + # Name of the SSL policy to update. The name must be 1-63 characters long, and + # comply with RFC1035. + # @param [Google::Apis::ComputeBeta::SslPolicy] ssl_policy_object + # @param [String] request_id + # An optional request ID to identify requests. Specify a unique request ID so + # that if you must retry your request, the server will know to ignore the + # request if it has already been completed. + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request ID, the + # server can check if original operation with the same request ID was received, + # and if so, will ignore the second request. This prevents clients from + # accidentally creating duplicate commitments. + # The request ID must be a valid UUID with the exception that zero UUID is not + # supported (00000000-0000-0000-0000-000000000000). + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available 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 patch_ssl_policy(project, ssl_policy, ssl_policy_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:patch, '{project}/global/sslPolicies/{sslPolicy}', options) + command.request_representation = Google::Apis::ComputeBeta::SslPolicy::Representation + command.request_object = ssl_policy_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['sslPolicy'] = ssl_policy unless ssl_policy.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 + + # Returns permissions that a caller has on the specified resource. + # @param [String] project + # Project ID for this request. + # @param [String] resource + # Name of the resource for this request. + # @param [Google::Apis::ComputeBeta::TestPermissionsRequest] test_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. + # 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::TestPermissionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ComputeBeta::TestPermissionsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_ssl_policy_iam_permissions(project, resource, test_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, '{project}/global/sslPolicies/{resource}/testIamPermissions', options) + command.request_representation = Google::Apis::ComputeBeta::TestPermissionsRequest::Representation + command.request_object = test_permissions_request_object + command.response_representation = Google::Apis::ComputeBeta::TestPermissionsResponse::Representation + command.response_class = Google::Apis::ComputeBeta::TestPermissionsResponse + 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 + # Retrieves an aggregated list of subnetworks. # @param [String] project # Project ID for this request. @@ -17020,6 +17795,60 @@ module Google execute_or_queue_command(command, &block) end + # Sets the QUIC override policy for TargetHttpsProxy. + # @param [String] project + # Project ID for this request. + # @param [String] target_https_proxy + # Name of the TargetHttpsProxy resource to set the QUIC override policy for. The + # name should conform to RFC1035. + # @param [Google::Apis::ComputeBeta::TargetHttpsProxiesSetQuicOverrideRequest] target_https_proxies_set_quic_override_request_object + # @param [String] request_id + # An optional request ID to identify requests. Specify a unique request ID so + # that if you must retry your request, the server will know to ignore the + # request if it has already been completed. + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request ID, the + # server can check if original operation with the same request ID was received, + # and if so, will ignore the second request. This prevents clients from + # accidentally creating duplicate commitments. + # The request ID must be a valid UUID with the exception that zero UUID is not + # supported (00000000-0000-0000-0000-000000000000). + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available 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_target_https_proxy_quic_override(project, target_https_proxy, target_https_proxies_set_quic_override_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, '{project}/global/targetHttpsProxies/{targetHttpsProxy}/setQuicOverride', options) + command.request_representation = Google::Apis::ComputeBeta::TargetHttpsProxiesSetQuicOverrideRequest::Representation + command.request_object = target_https_proxies_set_quic_override_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['targetHttpsProxy'] = target_https_proxy unless target_https_proxy.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 + # Replaces SslCertificates for TargetHttpsProxy. # @param [String] project # Project ID for this request. @@ -17073,6 +17902,63 @@ module Google execute_or_queue_command(command, &block) end + # Sets the SSL policy for TargetHttpsProxy. The SSL policy specifies the server- + # side support for SSL features. This affects connections between clients and + # the HTTPS proxy load balancer. They do not affect the connection between the + # load balancer and the backends. + # @param [String] project + # Project ID for this request. + # @param [String] target_https_proxy + # Name of the TargetHttpsProxy resource whose SSL policy is to be set. The name + # must be 1-63 characters long, and comply with RFC1035. + # @param [Google::Apis::ComputeBeta::SslPolicyReference] ssl_policy_reference_object + # @param [String] request_id + # An optional request ID to identify requests. Specify a unique request ID so + # that if you must retry your request, the server will know to ignore the + # request if it has already been completed. + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request ID, the + # server can check if original operation with the same request ID was received, + # and if so, will ignore the second request. This prevents clients from + # accidentally creating duplicate commitments. + # The request ID must be a valid UUID with the exception that zero UUID is not + # supported (00000000-0000-0000-0000-000000000000). + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available 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_target_https_proxy_ssl_policy(project, target_https_proxy, ssl_policy_reference_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, '{project}/global/targetHttpsProxies/{targetHttpsProxy}/setSslPolicy', options) + command.request_representation = Google::Apis::ComputeBeta::SslPolicyReference::Representation + command.request_object = ssl_policy_reference_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['targetHttpsProxy'] = target_https_proxy unless target_https_proxy.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 + # Changes the URL map for TargetHttpsProxy. # @param [String] project # Project ID for this request. @@ -18568,6 +19454,63 @@ module Google execute_or_queue_command(command, &block) end + # Sets the SSL policy for TargetSslProxy. The SSL policy specifies the server- + # side support for SSL features. This affects connections between clients and + # the SSL proxy load balancer. They do not affect the connection between the + # load balancer and the backends. + # @param [String] project + # Project ID for this request. + # @param [String] target_ssl_proxy + # Name of the TargetSslProxy resource whose SSL policy is to be set. The name + # must be 1-63 characters long, and comply with RFC1035. + # @param [Google::Apis::ComputeBeta::SslPolicyReference] ssl_policy_reference_object + # @param [String] request_id + # An optional request ID to identify requests. Specify a unique request ID so + # that if you must retry your request, the server will know to ignore the + # request if it has already been completed. + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request ID, the + # server can check if original operation with the same request ID was received, + # and if so, will ignore the second request. This prevents clients from + # accidentally creating duplicate commitments. + # The request ID must be a valid UUID with the exception that zero UUID is not + # supported (00000000-0000-0000-0000-000000000000). + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available 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_target_ssl_proxy_ssl_policy(project, target_ssl_proxy, ssl_policy_reference_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, '{project}/global/targetSslProxies/{targetSslProxy}/setSslPolicy', options) + command.request_representation = Google::Apis::ComputeBeta::SslPolicyReference::Representation + command.request_object = ssl_policy_reference_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['targetSslProxy'] = target_ssl_proxy unless target_ssl_proxy.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 + # Returns permissions that a caller has on the specified resource. # @param [String] project # Project ID for this request. @@ -19237,6 +20180,63 @@ module Google execute_or_queue_command(command, &block) end + # Sets the labels on a TargetVpnGateway. To learn more about labels, read the + # Labeling Resources documentation. + # @param [String] project + # Project ID for this request. + # @param [String] region + # The region for this request. + # @param [String] resource + # Name of the resource for this request. + # @param [Google::Apis::ComputeBeta::RegionSetLabelsRequest] region_set_labels_request_object + # @param [String] request_id + # An optional request ID to identify requests. Specify a unique request ID so + # that if you must retry your request, the server will know to ignore the + # request if it has already been completed. + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request ID, the + # server can check if original operation with the same request ID was received, + # and if so, will ignore the second request. This prevents clients from + # accidentally creating duplicate commitments. + # The request ID must be a valid UUID with the exception that zero UUID is not + # supported (00000000-0000-0000-0000-000000000000). + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available 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_target_vpn_gateway_labels(project, region, resource, region_set_labels_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, '{project}/regions/{region}/targetVpnGateways/{resource}/setLabels', options) + command.request_representation = Google::Apis::ComputeBeta::RegionSetLabelsRequest::Representation + command.request_object = region_set_labels_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['region'] = region unless region.nil? + command.params['resource'] = resource unless resource.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 + # Returns permissions that a caller has on the specified resource. # @param [String] project # Project ID for this request. @@ -20047,6 +21047,63 @@ module Google execute_or_queue_command(command, &block) end + # Sets the labels on a VpnTunnel. To learn more about labels, read the Labeling + # Resources documentation. + # @param [String] project + # Project ID for this request. + # @param [String] region + # The region for this request. + # @param [String] resource + # Name of the resource for this request. + # @param [Google::Apis::ComputeBeta::RegionSetLabelsRequest] region_set_labels_request_object + # @param [String] request_id + # An optional request ID to identify requests. Specify a unique request ID so + # that if you must retry your request, the server will know to ignore the + # request if it has already been completed. + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request ID, the + # server can check if original operation with the same request ID was received, + # and if so, will ignore the second request. This prevents clients from + # accidentally creating duplicate commitments. + # The request ID must be a valid UUID with the exception that zero UUID is not + # supported (00000000-0000-0000-0000-000000000000). + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available 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_vpn_tunnel_labels(project, region, resource, region_set_labels_request_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, '{project}/regions/{region}/vpnTunnels/{resource}/setLabels', options) + command.request_representation = Google::Apis::ComputeBeta::RegionSetLabelsRequest::Representation + command.request_object = region_set_labels_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['region'] = region unless region.nil? + command.params['resource'] = resource unless resource.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 + # Returns permissions that a caller has on the specified resource. # @param [String] project # Project ID for this request. diff --git a/generated/google/apis/consumersurveys_v2.rb b/generated/google/apis/consumersurveys_v2.rb deleted file mode 100644 index 1f596d004..000000000 --- a/generated/google/apis/consumersurveys_v2.rb +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright 2015 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -require 'google/apis/consumersurveys_v2/service.rb' -require 'google/apis/consumersurveys_v2/classes.rb' -require 'google/apis/consumersurveys_v2/representations.rb' - -module Google - module Apis - # Consumer Surveys API - # - # Creates and conducts surveys, lists the surveys that an authenticated user - # owns, and retrieves survey results and information about specified surveys. - # - module ConsumersurveysV2 - VERSION = 'V2' - REVISION = '20170407' - - # View and edit your surveys and results - AUTH_CONSUMERSURVEYS = 'https://www.googleapis.com/auth/consumersurveys' - - # View the results for your surveys - AUTH_CONSUMERSURVEYS_READONLY = 'https://www.googleapis.com/auth/consumersurveys.readonly' - - # View your email address - AUTH_USERINFO_EMAIL = 'https://www.googleapis.com/auth/userinfo.email' - end - end -end diff --git a/generated/google/apis/consumersurveys_v2/classes.rb b/generated/google/apis/consumersurveys_v2/classes.rb deleted file mode 100644 index 404d9e2c7..000000000 --- a/generated/google/apis/consumersurveys_v2/classes.rb +++ /dev/null @@ -1,736 +0,0 @@ -# Copyright 2015 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -require 'date' -require 'google/apis/core/base_service' -require 'google/apis/core/json_representation' -require 'google/apis/core/hashable' -require 'google/apis/errors' - -module Google - module Apis - module ConsumersurveysV2 - - # - class FieldMask - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `fields` - # @return [Array] - attr_accessor :fields - - # - # 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) - @fields = args[:fields] if args.key?(:fields) - @id = args[:id] if args.key?(:id) - end - end - - # - class MobileAppPanel - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `country` - # @return [String] - attr_accessor :country - - # - # Corresponds to the JSON property `isPublicPanel` - # @return [Boolean] - attr_accessor :is_public_panel - alias_method :is_public_panel?, :is_public_panel - - # - # Corresponds to the JSON property `language` - # @return [String] - attr_accessor :language - - # - # Corresponds to the JSON property `mobileAppPanelId` - # @return [String] - attr_accessor :mobile_app_panel_id - - # - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # - # Corresponds to the JSON property `owners` - # @return [Array] - attr_accessor :owners - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @country = args[:country] if args.key?(:country) - @is_public_panel = args[:is_public_panel] if args.key?(:is_public_panel) - @language = args[:language] if args.key?(:language) - @mobile_app_panel_id = args[:mobile_app_panel_id] if args.key?(:mobile_app_panel_id) - @name = args[:name] if args.key?(:name) - @owners = args[:owners] if args.key?(:owners) - end - end - - # - class MobileAppPanelsListResponse - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `pageInfo` - # @return [Google::Apis::ConsumersurveysV2::PageInfo] - attr_accessor :page_info - - # Unique request ID used for logging and debugging. Please include in any error - # reporting or troubleshooting requests. - # Corresponds to the JSON property `requestId` - # @return [String] - attr_accessor :request_id - - # An individual predefined panel of Opinion Rewards mobile users. - # Corresponds to the JSON property `resources` - # @return [Array] - attr_accessor :resources - - # - # Corresponds to the JSON property `tokenPagination` - # @return [Google::Apis::ConsumersurveysV2::TokenPagination] - attr_accessor :token_pagination - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @page_info = args[:page_info] if args.key?(:page_info) - @request_id = args[:request_id] if args.key?(:request_id) - @resources = args[:resources] if args.key?(:resources) - @token_pagination = args[:token_pagination] if args.key?(:token_pagination) - end - end - - # - class PageInfo - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `resultPerPage` - # @return [Fixnum] - attr_accessor :result_per_page - - # - # Corresponds to the JSON property `startIndex` - # @return [Fixnum] - attr_accessor :start_index - - # - # 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) - @result_per_page = args[:result_per_page] if args.key?(:result_per_page) - @start_index = args[:start_index] if args.key?(:start_index) - @total_results = args[:total_results] if args.key?(:total_results) - end - end - - # - class ResultsGetRequest - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `resultMask` - # @return [Google::Apis::ConsumersurveysV2::ResultsMask] - attr_accessor :result_mask - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @result_mask = args[:result_mask] if args.key?(:result_mask) - end - end - - # - class ResultsMask - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `fields` - # @return [Array] - attr_accessor :fields - - # - # Corresponds to the JSON property `projection` - # @return [String] - attr_accessor :projection - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @fields = args[:fields] if args.key?(:fields) - @projection = args[:projection] if args.key?(:projection) - end - end - - # - class Survey - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `audience` - # @return [Google::Apis::ConsumersurveysV2::SurveyAudience] - attr_accessor :audience - - # - # Corresponds to the JSON property `cost` - # @return [Google::Apis::ConsumersurveysV2::SurveyCost] - attr_accessor :cost - - # - # Corresponds to the JSON property `customerData` - # NOTE: Values are automatically base64 encoded/decoded in the client library. - # @return [String] - attr_accessor :customer_data - - # - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # - # Corresponds to the JSON property `owners` - # @return [Array] - attr_accessor :owners - - # - # Corresponds to the JSON property `questions` - # @return [Array] - attr_accessor :questions - - # - # Corresponds to the JSON property `rejectionReason` - # @return [Google::Apis::ConsumersurveysV2::SurveyRejection] - attr_accessor :rejection_reason - - # - # Corresponds to the JSON property `state` - # @return [String] - attr_accessor :state - - # - # Corresponds to the JSON property `surveyUrlId` - # @return [String] - attr_accessor :survey_url_id - - # - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # - # Corresponds to the JSON property `wantedResponseCount` - # @return [Fixnum] - attr_accessor :wanted_response_count - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @audience = args[:audience] if args.key?(:audience) - @cost = args[:cost] if args.key?(:cost) - @customer_data = args[:customer_data] if args.key?(:customer_data) - @description = args[:description] if args.key?(:description) - @owners = args[:owners] if args.key?(:owners) - @questions = args[:questions] if args.key?(:questions) - @rejection_reason = args[:rejection_reason] if args.key?(:rejection_reason) - @state = args[:state] if args.key?(:state) - @survey_url_id = args[:survey_url_id] if args.key?(:survey_url_id) - @title = args[:title] if args.key?(:title) - @wanted_response_count = args[:wanted_response_count] if args.key?(:wanted_response_count) - end - end - - # - class SurveyAudience - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `ages` - # @return [Array] - attr_accessor :ages - - # - # Corresponds to the JSON property `country` - # @return [String] - attr_accessor :country - - # - # Corresponds to the JSON property `countrySubdivision` - # @return [String] - attr_accessor :country_subdivision - - # - # Corresponds to the JSON property `gender` - # @return [String] - attr_accessor :gender - - # - # Corresponds to the JSON property `languages` - # @return [Array] - attr_accessor :languages - - # - # Corresponds to the JSON property `mobileAppPanelId` - # @return [String] - attr_accessor :mobile_app_panel_id - - # - # Corresponds to the JSON property `populationSource` - # @return [String] - attr_accessor :population_source - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @ages = args[:ages] if args.key?(:ages) - @country = args[:country] if args.key?(:country) - @country_subdivision = args[:country_subdivision] if args.key?(:country_subdivision) - @gender = args[:gender] if args.key?(:gender) - @languages = args[:languages] if args.key?(:languages) - @mobile_app_panel_id = args[:mobile_app_panel_id] if args.key?(:mobile_app_panel_id) - @population_source = args[:population_source] if args.key?(:population_source) - end - end - - # - class SurveyCost - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `costPerResponseNanos` - # @return [Fixnum] - attr_accessor :cost_per_response_nanos - - # - # Corresponds to the JSON property `currencyCode` - # @return [String] - attr_accessor :currency_code - - # - # Corresponds to the JSON property `maxCostPerResponseNanos` - # @return [Fixnum] - attr_accessor :max_cost_per_response_nanos - - # - # 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) - @cost_per_response_nanos = args[:cost_per_response_nanos] if args.key?(:cost_per_response_nanos) - @currency_code = args[:currency_code] if args.key?(:currency_code) - @max_cost_per_response_nanos = args[:max_cost_per_response_nanos] if args.key?(:max_cost_per_response_nanos) - @nanos = args[:nanos] if args.key?(:nanos) - end - end - - # - class SurveyQuestion - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `answerOrder` - # @return [String] - attr_accessor :answer_order - - # - # Corresponds to the JSON property `answers` - # @return [Array] - attr_accessor :answers - - # - # Corresponds to the JSON property `hasOther` - # @return [Boolean] - attr_accessor :has_other - alias_method :has_other?, :has_other - - # - # Corresponds to the JSON property `highValueLabel` - # @return [String] - attr_accessor :high_value_label - - # - # Corresponds to the JSON property `images` - # @return [Array] - attr_accessor :images - - # - # Corresponds to the JSON property `lastAnswerPositionPinned` - # @return [Boolean] - attr_accessor :last_answer_position_pinned - alias_method :last_answer_position_pinned?, :last_answer_position_pinned - - # - # Corresponds to the JSON property `lowValueLabel` - # @return [String] - attr_accessor :low_value_label - - # - # Corresponds to the JSON property `mustPickSuggestion` - # @return [Boolean] - attr_accessor :must_pick_suggestion - alias_method :must_pick_suggestion?, :must_pick_suggestion - - # - # Corresponds to the JSON property `numStars` - # @return [String] - attr_accessor :num_stars - - # - # Corresponds to the JSON property `openTextPlaceholder` - # @return [String] - attr_accessor :open_text_placeholder - - # - # Corresponds to the JSON property `openTextSuggestions` - # @return [Array] - attr_accessor :open_text_suggestions - - # - # Corresponds to the JSON property `question` - # @return [String] - attr_accessor :question - - # - # Corresponds to the JSON property `sentimentText` - # @return [String] - attr_accessor :sentiment_text - - # - # Corresponds to the JSON property `singleLineResponse` - # @return [Boolean] - attr_accessor :single_line_response - alias_method :single_line_response?, :single_line_response - - # - # Corresponds to the JSON property `thresholdAnswers` - # @return [Array] - attr_accessor :threshold_answers - - # - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # - # Corresponds to the JSON property `unitOfMeasurementLabel` - # @return [String] - attr_accessor :unit_of_measurement_label - - # - # Corresponds to the JSON property `videoId` - # @return [String] - attr_accessor :video_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @answer_order = args[:answer_order] if args.key?(:answer_order) - @answers = args[:answers] if args.key?(:answers) - @has_other = args[:has_other] if args.key?(:has_other) - @high_value_label = args[:high_value_label] if args.key?(:high_value_label) - @images = args[:images] if args.key?(:images) - @last_answer_position_pinned = args[:last_answer_position_pinned] if args.key?(:last_answer_position_pinned) - @low_value_label = args[:low_value_label] if args.key?(:low_value_label) - @must_pick_suggestion = args[:must_pick_suggestion] if args.key?(:must_pick_suggestion) - @num_stars = args[:num_stars] if args.key?(:num_stars) - @open_text_placeholder = args[:open_text_placeholder] if args.key?(:open_text_placeholder) - @open_text_suggestions = args[:open_text_suggestions] if args.key?(:open_text_suggestions) - @question = args[:question] if args.key?(:question) - @sentiment_text = args[:sentiment_text] if args.key?(:sentiment_text) - @single_line_response = args[:single_line_response] if args.key?(:single_line_response) - @threshold_answers = args[:threshold_answers] if args.key?(:threshold_answers) - @type = args[:type] if args.key?(:type) - @unit_of_measurement_label = args[:unit_of_measurement_label] if args.key?(:unit_of_measurement_label) - @video_id = args[:video_id] if args.key?(:video_id) - end - end - - # - class SurveyQuestionImage - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `altText` - # @return [String] - attr_accessor :alt_text - - # - # Corresponds to the JSON property `data` - # NOTE: Values are automatically base64 encoded/decoded in the client library. - # @return [String] - attr_accessor :data - - # - # 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) - @alt_text = args[:alt_text] if args.key?(:alt_text) - @data = args[:data] if args.key?(:data) - @url = args[:url] if args.key?(:url) - end - end - - # - class SurveyRejection - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `explanation` - # @return [String] - attr_accessor :explanation - - # - # 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) - @explanation = args[:explanation] if args.key?(:explanation) - @type = args[:type] if args.key?(:type) - end - end - - # - class SurveyResults - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # - # Corresponds to the JSON property `surveyUrlId` - # @return [String] - attr_accessor :survey_url_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @status = args[:status] if args.key?(:status) - @survey_url_id = args[:survey_url_id] if args.key?(:survey_url_id) - end - end - - # - class SurveysDeleteResponse - include Google::Apis::Core::Hashable - - # Unique request ID used for logging and debugging. Please include in any error - # reporting or troubleshooting requests. - # Corresponds to the JSON property `requestId` - # @return [String] - attr_accessor :request_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @request_id = args[:request_id] if args.key?(:request_id) - end - end - - # - class SurveysListResponse - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `pageInfo` - # @return [Google::Apis::ConsumersurveysV2::PageInfo] - attr_accessor :page_info - - # Unique request ID used for logging and debugging. Please include in any error - # reporting or troubleshooting requests. - # Corresponds to the JSON property `requestId` - # @return [String] - attr_accessor :request_id - - # An individual survey resource. - # Corresponds to the JSON property `resources` - # @return [Array] - attr_accessor :resources - - # - # Corresponds to the JSON property `tokenPagination` - # @return [Google::Apis::ConsumersurveysV2::TokenPagination] - attr_accessor :token_pagination - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @page_info = args[:page_info] if args.key?(:page_info) - @request_id = args[:request_id] if args.key?(:request_id) - @resources = args[:resources] if args.key?(:resources) - @token_pagination = args[:token_pagination] if args.key?(:token_pagination) - end - end - - # - class SurveysStartRequest - include Google::Apis::Core::Hashable - - # Threshold to start a survey automically if the quoted prices is less than or - # equal to this value. See Survey.Cost for more details. - # Corresponds to the JSON property `maxCostPerResponseNanos` - # @return [Fixnum] - attr_accessor :max_cost_per_response_nanos - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @max_cost_per_response_nanos = args[:max_cost_per_response_nanos] if args.key?(:max_cost_per_response_nanos) - end - end - - # - class SurveysStartResponse - include Google::Apis::Core::Hashable - - # Unique request ID used for logging and debugging. Please include in any error - # reporting or troubleshooting requests. - # Corresponds to the JSON property `requestId` - # @return [String] - attr_accessor :request_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @request_id = args[:request_id] if args.key?(:request_id) - end - end - - # - class SurveysStopResponse - include Google::Apis::Core::Hashable - - # Unique request ID used for logging and debugging. Please include in any error - # reporting or troubleshooting requests. - # Corresponds to the JSON property `requestId` - # @return [String] - attr_accessor :request_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @request_id = args[:request_id] if args.key?(:request_id) - end - end - - # - class TokenPagination - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # - # Corresponds to the JSON property `previousPageToken` - # @return [String] - attr_accessor :previous_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) - @previous_page_token = args[:previous_page_token] if args.key?(:previous_page_token) - end - end - end - end -end diff --git a/generated/google/apis/consumersurveys_v2/representations.rb b/generated/google/apis/consumersurveys_v2/representations.rb deleted file mode 100644 index 7f32abd96..000000000 --- a/generated/google/apis/consumersurveys_v2/representations.rb +++ /dev/null @@ -1,343 +0,0 @@ -# Copyright 2015 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -require 'date' -require 'google/apis/core/base_service' -require 'google/apis/core/json_representation' -require 'google/apis/core/hashable' -require 'google/apis/errors' - -module Google - module Apis - module ConsumersurveysV2 - - class FieldMask - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class MobileAppPanel - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class MobileAppPanelsListResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class PageInfo - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ResultsGetRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ResultsMask - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Survey - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SurveyAudience - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SurveyCost - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SurveyQuestion - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SurveyQuestionImage - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SurveyRejection - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SurveyResults - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SurveysDeleteResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SurveysListResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SurveysStartRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SurveysStartResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SurveysStopResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class TokenPagination - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class FieldMask - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :fields, as: 'fields', class: Google::Apis::ConsumersurveysV2::FieldMask, decorator: Google::Apis::ConsumersurveysV2::FieldMask::Representation - - property :id, as: 'id' - end - end - - class MobileAppPanel - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :country, as: 'country' - property :is_public_panel, as: 'isPublicPanel' - property :language, as: 'language' - property :mobile_app_panel_id, as: 'mobileAppPanelId' - property :name, as: 'name' - collection :owners, as: 'owners' - end - end - - class MobileAppPanelsListResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :page_info, as: 'pageInfo', class: Google::Apis::ConsumersurveysV2::PageInfo, decorator: Google::Apis::ConsumersurveysV2::PageInfo::Representation - - property :request_id, as: 'requestId' - collection :resources, as: 'resources', class: Google::Apis::ConsumersurveysV2::MobileAppPanel, decorator: Google::Apis::ConsumersurveysV2::MobileAppPanel::Representation - - property :token_pagination, as: 'tokenPagination', class: Google::Apis::ConsumersurveysV2::TokenPagination, decorator: Google::Apis::ConsumersurveysV2::TokenPagination::Representation - - end - end - - class PageInfo - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :result_per_page, as: 'resultPerPage' - property :start_index, as: 'startIndex' - property :total_results, as: 'totalResults' - end - end - - class ResultsGetRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :result_mask, as: 'resultMask', class: Google::Apis::ConsumersurveysV2::ResultsMask, decorator: Google::Apis::ConsumersurveysV2::ResultsMask::Representation - - end - end - - class ResultsMask - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :fields, as: 'fields', class: Google::Apis::ConsumersurveysV2::FieldMask, decorator: Google::Apis::ConsumersurveysV2::FieldMask::Representation - - property :projection, as: 'projection' - end - end - - class Survey - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :audience, as: 'audience', class: Google::Apis::ConsumersurveysV2::SurveyAudience, decorator: Google::Apis::ConsumersurveysV2::SurveyAudience::Representation - - property :cost, as: 'cost', class: Google::Apis::ConsumersurveysV2::SurveyCost, decorator: Google::Apis::ConsumersurveysV2::SurveyCost::Representation - - property :customer_data, :base64 => true, as: 'customerData' - property :description, as: 'description' - collection :owners, as: 'owners' - collection :questions, as: 'questions', class: Google::Apis::ConsumersurveysV2::SurveyQuestion, decorator: Google::Apis::ConsumersurveysV2::SurveyQuestion::Representation - - property :rejection_reason, as: 'rejectionReason', class: Google::Apis::ConsumersurveysV2::SurveyRejection, decorator: Google::Apis::ConsumersurveysV2::SurveyRejection::Representation - - property :state, as: 'state' - property :survey_url_id, as: 'surveyUrlId' - property :title, as: 'title' - property :wanted_response_count, as: 'wantedResponseCount' - end - end - - class SurveyAudience - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :ages, as: 'ages' - property :country, as: 'country' - property :country_subdivision, as: 'countrySubdivision' - property :gender, as: 'gender' - collection :languages, as: 'languages' - property :mobile_app_panel_id, as: 'mobileAppPanelId' - property :population_source, as: 'populationSource' - end - end - - class SurveyCost - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :cost_per_response_nanos, :numeric_string => true, as: 'costPerResponseNanos' - property :currency_code, as: 'currencyCode' - property :max_cost_per_response_nanos, :numeric_string => true, as: 'maxCostPerResponseNanos' - property :nanos, :numeric_string => true, as: 'nanos' - end - end - - class SurveyQuestion - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :answer_order, as: 'answerOrder' - collection :answers, as: 'answers' - property :has_other, as: 'hasOther' - property :high_value_label, as: 'highValueLabel' - collection :images, as: 'images', class: Google::Apis::ConsumersurveysV2::SurveyQuestionImage, decorator: Google::Apis::ConsumersurveysV2::SurveyQuestionImage::Representation - - property :last_answer_position_pinned, as: 'lastAnswerPositionPinned' - property :low_value_label, as: 'lowValueLabel' - property :must_pick_suggestion, as: 'mustPickSuggestion' - property :num_stars, as: 'numStars' - property :open_text_placeholder, as: 'openTextPlaceholder' - collection :open_text_suggestions, as: 'openTextSuggestions' - property :question, as: 'question' - property :sentiment_text, as: 'sentimentText' - property :single_line_response, as: 'singleLineResponse' - collection :threshold_answers, as: 'thresholdAnswers' - property :type, as: 'type' - property :unit_of_measurement_label, as: 'unitOfMeasurementLabel' - property :video_id, as: 'videoId' - end - end - - class SurveyQuestionImage - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :alt_text, as: 'altText' - property :data, :base64 => true, as: 'data' - property :url, as: 'url' - end - end - - class SurveyRejection - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :explanation, as: 'explanation' - property :type, as: 'type' - end - end - - class SurveyResults - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :status, as: 'status' - property :survey_url_id, as: 'surveyUrlId' - end - end - - class SurveysDeleteResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :request_id, as: 'requestId' - end - end - - class SurveysListResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :page_info, as: 'pageInfo', class: Google::Apis::ConsumersurveysV2::PageInfo, decorator: Google::Apis::ConsumersurveysV2::PageInfo::Representation - - property :request_id, as: 'requestId' - collection :resources, as: 'resources', class: Google::Apis::ConsumersurveysV2::Survey, decorator: Google::Apis::ConsumersurveysV2::Survey::Representation - - property :token_pagination, as: 'tokenPagination', class: Google::Apis::ConsumersurveysV2::TokenPagination, decorator: Google::Apis::ConsumersurveysV2::TokenPagination::Representation - - end - end - - class SurveysStartRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :max_cost_per_response_nanos, :numeric_string => true, as: 'maxCostPerResponseNanos' - end - end - - class SurveysStartResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :request_id, as: 'requestId' - end - end - - class SurveysStopResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :request_id, as: 'requestId' - end - end - - class TokenPagination - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - property :previous_page_token, as: 'previousPageToken' - end - end - end - end -end diff --git a/generated/google/apis/consumersurveys_v2/service.rb b/generated/google/apis/consumersurveys_v2/service.rb deleted file mode 100644 index 0c3214e87..000000000 --- a/generated/google/apis/consumersurveys_v2/service.rb +++ /dev/null @@ -1,478 +0,0 @@ -# Copyright 2015 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -require 'google/apis/core/base_service' -require 'google/apis/core/json_representation' -require 'google/apis/core/hashable' -require 'google/apis/errors' - -module Google - module Apis - module ConsumersurveysV2 - # Consumer Surveys API - # - # Creates and conducts surveys, lists the surveys that an authenticated user - # owns, and retrieves survey results and information about specified surveys. - # - # @example - # require 'google/apis/consumersurveys_v2' - # - # Consumersurveys = Google::Apis::ConsumersurveysV2 # Alias the module - # service = Consumersurveys::ConsumerSurveysService.new - # - class ConsumerSurveysService < Google::Apis::Core::BaseService - # @return [String] - # API key. Your API key identifies your project and provides you with API access, - # quota, and reports. Required unless you provide an OAuth 2.0 token. - attr_accessor :key - - # @return [String] - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # Overrides userIp if both are provided. - attr_accessor :quota_user - - # @return [String] - # IP address of the site where the request originates. Use this if you want to - # enforce per-user limits. - attr_accessor :user_ip - - def initialize - super('https://www.googleapis.com/', 'consumersurveys/v2/') - @batch_path = 'batch/consumersurveys/v2' - end - - # Retrieves a MobileAppPanel that is available to the authenticated user. - # @param [String] panel_id - # External URL ID for the panel. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::ConsumersurveysV2::MobileAppPanel] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ConsumersurveysV2::MobileAppPanel] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_mobileapppanel(panel_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:get, 'mobileAppPanels/{panelId}', options) - command.response_representation = Google::Apis::ConsumersurveysV2::MobileAppPanel::Representation - command.response_class = Google::Apis::ConsumersurveysV2::MobileAppPanel - command.params['panelId'] = panel_id unless panel_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 - - # Lists the MobileAppPanels available to the authenticated user. - # @param [Fixnum] max_results - # @param [Fixnum] start_index - # @param [String] 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::ConsumersurveysV2::MobileAppPanelsListResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ConsumersurveysV2::MobileAppPanelsListResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_mobileapppanels(max_results: nil, start_index: nil, token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:get, 'mobileAppPanels', options) - command.response_representation = Google::Apis::ConsumersurveysV2::MobileAppPanelsListResponse::Representation - command.response_class = Google::Apis::ConsumersurveysV2::MobileAppPanelsListResponse - command.query['maxResults'] = max_results unless max_results.nil? - command.query['startIndex'] = start_index unless start_index.nil? - command.query['token'] = token unless 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 - - # Updates a MobileAppPanel. Currently the only property that can be updated is - # the owners property. - # @param [String] panel_id - # External URL ID for the panel. - # @param [Google::Apis::ConsumersurveysV2::MobileAppPanel] mobile_app_panel_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::ConsumersurveysV2::MobileAppPanel] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ConsumersurveysV2::MobileAppPanel] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_mobileapppanel(panel_id, mobile_app_panel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:put, 'mobileAppPanels/{panelId}', options) - command.request_representation = Google::Apis::ConsumersurveysV2::MobileAppPanel::Representation - command.request_object = mobile_app_panel_object - command.response_representation = Google::Apis::ConsumersurveysV2::MobileAppPanel::Representation - command.response_class = Google::Apis::ConsumersurveysV2::MobileAppPanel - command.params['panelId'] = panel_id unless panel_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 - - # Retrieves any survey results that have been produced so far. Results are - # formatted as an Excel file. You must add "?alt=media" to the URL as an - # argument to get results. - # @param [String] survey_url_id - # External URL ID for the survey. - # @param [Google::Apis::ConsumersurveysV2::ResultsGetRequest] results_get_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 [IO, String] download_dest - # IO stream or filename to receive content download - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ConsumersurveysV2::SurveyResults] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ConsumersurveysV2::SurveyResults] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_result(survey_url_id, results_get_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block) - if download_dest.nil? - command = make_simple_command(:get, 'surveys/{surveyUrlId}/results', options) - else - command = make_download_command(:get, 'surveys/{surveyUrlId}/results', options) - command.download_dest = download_dest - end - command.request_representation = Google::Apis::ConsumersurveysV2::ResultsGetRequest::Representation - command.request_object = results_get_request_object - command.response_representation = Google::Apis::ConsumersurveysV2::SurveyResults::Representation - command.response_class = Google::Apis::ConsumersurveysV2::SurveyResults - command.params['surveyUrlId'] = survey_url_id unless survey_url_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 - - # Removes a survey from view in all user GET requests. - # @param [String] survey_url_id - # External URL ID for the survey. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::ConsumersurveysV2::SurveysDeleteResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ConsumersurveysV2::SurveysDeleteResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_survey(survey_url_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:delete, 'surveys/{surveyUrlId}', options) - command.response_representation = Google::Apis::ConsumersurveysV2::SurveysDeleteResponse::Representation - command.response_class = Google::Apis::ConsumersurveysV2::SurveysDeleteResponse - command.params['surveyUrlId'] = survey_url_id unless survey_url_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 - - # Retrieves information about the specified survey. - # @param [String] survey_url_id - # External URL ID for the survey. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available 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::ConsumersurveysV2::Survey] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ConsumersurveysV2::Survey] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_survey(survey_url_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:get, 'surveys/{surveyUrlId}', options) - command.response_representation = Google::Apis::ConsumersurveysV2::Survey::Representation - command.response_class = Google::Apis::ConsumersurveysV2::Survey - command.params['surveyUrlId'] = survey_url_id unless survey_url_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 - - # Creates a survey. - # @param [Google::Apis::ConsumersurveysV2::Survey] survey_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::ConsumersurveysV2::Survey] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ConsumersurveysV2::Survey] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_survey(survey_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:post, 'surveys', options) - command.request_representation = Google::Apis::ConsumersurveysV2::Survey::Representation - command.request_object = survey_object - command.response_representation = Google::Apis::ConsumersurveysV2::Survey::Representation - command.response_class = Google::Apis::ConsumersurveysV2::Survey - 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 - - # Lists the surveys owned by the authenticated user. - # @param [Fixnum] max_results - # @param [Fixnum] start_index - # @param [String] 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::ConsumersurveysV2::SurveysListResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ConsumersurveysV2::SurveysListResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_surveys(max_results: nil, start_index: nil, token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:get, 'surveys', options) - command.response_representation = Google::Apis::ConsumersurveysV2::SurveysListResponse::Representation - command.response_class = Google::Apis::ConsumersurveysV2::SurveysListResponse - command.query['maxResults'] = max_results unless max_results.nil? - command.query['startIndex'] = start_index unless start_index.nil? - command.query['token'] = token unless 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 - - # Begins running a survey. - # @param [String] resource_id - # @param [Google::Apis::ConsumersurveysV2::SurveysStartRequest] surveys_start_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::ConsumersurveysV2::SurveysStartResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ConsumersurveysV2::SurveysStartResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_survey(resource_id, surveys_start_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:post, 'surveys/{resourceId}/start', options) - command.request_representation = Google::Apis::ConsumersurveysV2::SurveysStartRequest::Representation - command.request_object = surveys_start_request_object - command.response_representation = Google::Apis::ConsumersurveysV2::SurveysStartResponse::Representation - command.response_class = Google::Apis::ConsumersurveysV2::SurveysStartResponse - command.params['resourceId'] = resource_id unless resource_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 - - # Stops a running survey. - # @param [String] resource_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. - # 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::ConsumersurveysV2::SurveysStopResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ConsumersurveysV2::SurveysStopResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_survey(resource_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:post, 'surveys/{resourceId}/stop', options) - command.response_representation = Google::Apis::ConsumersurveysV2::SurveysStopResponse::Representation - command.response_class = Google::Apis::ConsumersurveysV2::SurveysStopResponse - command.params['resourceId'] = resource_id unless resource_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 - - # Updates a survey. Currently the only property that can be updated is the - # owners property. - # @param [String] survey_url_id - # External URL ID for the survey. - # @param [Google::Apis::ConsumersurveysV2::Survey] survey_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::ConsumersurveysV2::Survey] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ConsumersurveysV2::Survey] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_survey(survey_url_id, survey_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) - command = make_simple_command(:put, 'surveys/{surveyUrlId}', options) - command.request_representation = Google::Apis::ConsumersurveysV2::Survey::Representation - command.request_object = survey_object - command.response_representation = Google::Apis::ConsumersurveysV2::Survey::Representation - command.response_class = Google::Apis::ConsumersurveysV2::Survey - command.params['surveyUrlId'] = survey_url_id unless survey_url_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 - - protected - - def apply_command_defaults(command) - command.query['key'] = key unless key.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['userIp'] = user_ip unless user_ip.nil? - end - end - end - end -end